Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorng committed Sep 1, 2024
1 parent 0fcc748 commit 298400d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lib/compiler/test/beam_debug_info_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -331,10 +331,13 @@ abstr_extract_executable_lines(Tuple, Acc0) when is_tuple(Tuple) ->
abstr_extract_executable_lines(_, Acc) -> Acc.

get_debug_info(Mod, Beam) ->
{ok,{Mod,Chunks}} = beam_lib:chunks(Beam, ["DbgB","LitT"]),
[{"DbgB",DebugInfo0},
{"LitT",Literals0}] = Chunks,
Literals = decode_literal_table(Literals0),
{ok,{Mod,[{"DbgB",DebugInfo0}]}} = beam_lib:chunks(Beam, ["DbgB"]),
Literals = case beam_lib:chunks(Beam, ["LitT"]) of
{ok,{Mod,[{"LitT",Literals0}]}} ->
decode_literal_table(Literals0);
{error,_,_} ->
[]
end,
CallOp = beam_opcodes:opcode(call, 2),
DebugInfo = decode_debug_info(DebugInfo0, Literals, CallOp),
lists:zip(lists:seq(1, length(DebugInfo)), DebugInfo).
Expand Down

0 comments on commit 298400d

Please sign in to comment.