diff --git a/lib/compiler/test/beam_debug_info_SUITE.erl b/lib/compiler/test/beam_debug_info_SUITE.erl index 23378d34722a..38b91de7cecb 100644 --- a/lib/compiler/test/beam_debug_info_SUITE.erl +++ b/lib/compiler/test/beam_debug_info_SUITE.erl @@ -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).