forked from erlang/otp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provided that module Module contains debug information, code:get_debug_info(Module) will read out a symbolic representation of it. It is unclear how useful this BIF is in practice, but its source code shows how to access the debug information from inside the runtime system. The following example has been annotated with the index operand for the `executable_line` instruction preceding each line in the source code: foobar(A) -> case A of % 1 0 -> B = 1, % 2 io:format("~p\n", [B]); % 3 1 -> C = [1,2,3], % 4 io:format("~p\n", [C]) % 4 end, A. % 6 Here follows the dump of the debug information: 1> code:get_debug_info(t). [{1,{none,[{<<"A">>,{x,0}}]}}, {2,{1,[{<<"A">>,{y,0}}]}}, {3,{1,[{<<"B">>,1},{<<"A">>,{y,0}}]}}, {4,{1,[{<<"A">>,{y,0}}]}}, {5,{1,[{<<"C">>,[1,2,3]},{<<"A">>,{y,0}}]}}, {6,{1,[{<<"A">>,{y,0}}]}}]
- Loading branch information
Showing
5 changed files
with
163 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters