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.
Implement support for debug information in the runtime system
This commit implements support for loading the debug information from a BEAM file and the `code:get_debug_info/1` BIF for retrieving the debug information. As an example, given the following module: -module(example). % 1 -export([foo/1]). % 2 foo(A) -> % 4 case A of % 5 0 -> % 6 B = 1, % 7 io:format("~p\n", [B]); % 8 1 -> % 9 C = [1,2,3], % 10 io:format("~p\n", [C]) % 11 end, % 12 A. % 13 here is how to compile it with BEAM debug information and display the debug information: 1> c(example, beam_debug_info). {ok,example} 2> code:get_debug_info(example). [{5,{none,[{<<"A">>,{x,0}}]}}, {7,{1,[{<<"A">>,{y,0}}]}}, {8,{1,[{<<"B">>,{value,1}},{<<"A">>,{y,0}}]}}, {10,{1,[{<<"A">>,{y,0}}]}}, {11,{1,[{<<"C">>,{value,[1,2,3]}},{<<"A">>,{y,0}}]}}, {13,{1,[{<<"A">>,{y,0}}]}}]
- Loading branch information
Showing
14 changed files
with
567 additions
and
15 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
Oops, something went wrong.