diff options
author | Sverker Eriksson <[email protected]> | 2015-10-02 19:05:57 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2015-11-12 15:25:47 +0100 |
commit | b9caedf093d0ccf268562656e28cdda6a02631cb (patch) | |
tree | af8d495c7116225fb4e9ee279846b74a0c45cfb0 /erts/emulator/beam/beam_debug.c | |
parent | 49d2f809cf8435b17d54f0fd2f37a8aa939ea457 (diff) | |
download | otp-b9caedf093d0ccf268562656e28cdda6a02631cb.tar.gz otp-b9caedf093d0ccf268562656e28cdda6a02631cb.tar.bz2 otp-b9caedf093d0ccf268562656e28cdda6a02631cb.zip |
erts: Refactor header of loaded beam code
to use a real C struct instead of array.
Diffstat (limited to 'erts/emulator/beam/beam_debug.c')
-rw-r--r-- | erts/emulator/beam/beam_debug.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/erts/emulator/beam/beam_debug.c b/erts/emulator/beam/beam_debug.c index 3a1d328bbd..e961989fca 100644 --- a/erts/emulator/beam/beam_debug.c +++ b/erts/emulator/beam/beam_debug.c @@ -208,7 +208,7 @@ erts_debug_disassemble_1(BIF_ALIST_1) Eterm bin; Eterm mfa; BeamInstr* funcinfo = NULL; /* Initialized to eliminate warning. */ - BeamInstr* code_base; + BeamCodeHeader* code_hdr; BeamInstr* code_ptr = NULL; /* Initialized to eliminate warning. */ BeamInstr instr; BeamInstr uaddr; @@ -258,12 +258,12 @@ erts_debug_disassemble_1(BIF_ALIST_1) */ code_ptr = ((BeamInstr *) ep->addressv[code_ix]) - 5; funcinfo = code_ptr+2; - } else if (modp == NULL || (code_base = modp->curr.code) == NULL) { + } else if (modp == NULL || (code_hdr = modp->curr.code_hdr) == NULL) { BIF_RET(am_undef); } else { - n = code_base[MI_NUM_FUNCTIONS]; + n = code_hdr->num_functions; for (i = 0; i < n; i++) { - code_ptr = (BeamInstr *) code_base[MI_FUNCTIONS+i]; + code_ptr = code_hdr->functions[i]; if (code_ptr[3] == name && code_ptr[4] == arity) { funcinfo = code_ptr+2; break; |