aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/beam_ranges.c
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2016-10-05 12:16:35 +0200
committerLukas Larsson <[email protected]>2016-10-12 15:39:38 +0200
commit8e2490086b45b9ce4d51883e594c38e2e17b5b47 (patch)
tree091b4fcad015cd0eaa8f7c03b03bfcd66f745493 /erts/emulator/beam/beam_ranges.c
parent855b3a9be724ffd3c9f7e311cf9d810099fa36ef (diff)
downloadotp-8e2490086b45b9ce4d51883e594c38e2e17b5b47.tar.gz
otp-8e2490086b45b9ce4d51883e594c38e2e17b5b47.tar.bz2
otp-8e2490086b45b9ce4d51883e594c38e2e17b5b47.zip
erts: Refactor find_function_from_pc to return MFA
Diffstat (limited to 'erts/emulator/beam/beam_ranges.c')
-rw-r--r--erts/emulator/beam/beam_ranges.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/erts/emulator/beam/beam_ranges.c b/erts/emulator/beam/beam_ranges.c
index 887f80e7e3..9b0335e83d 100644
--- a/erts/emulator/beam/beam_ranges.c
+++ b/erts/emulator/beam/beam_ranges.c
@@ -227,7 +227,7 @@ erts_lookup_function_info(FunctionInfo* fi, BeamInstr* pc, int full_info)
Range* rp;
BeamCodeHeader* hdr;
- fi->ci = NULL;
+ fi->mfa = NULL;
fi->needed = 5;
fi->loc = LINE_INVALID_LOCATION;
rp = find_range(pc);
@@ -243,7 +243,7 @@ erts_lookup_function_info(FunctionInfo* fi, BeamInstr* pc, int full_info)
if (pc < (BeamInstr*)(mid[0])) {
high = mid;
} else if (pc < (BeamInstr*)(mid[1])) {
- fi->ci = mid[0];
+ fi->mfa = &mid[0]->mfa;
if (full_info) {
ErtsCodeInfo** fp = hdr->functions;
int idx = mid - fp;
@@ -316,7 +316,7 @@ lookup_loc(FunctionInfo* fi, const BeamInstr* pc,
file = LOC_FILE(fi->loc);
if (file == 0) {
/* Special case: Module name with ".erl" appended */
- Atom* mod_atom = atom_tab(atom_val(fi->ci->mfa.module));
+ Atom* mod_atom = atom_tab(atom_val(fi->mfa->module));
fi->needed += 2*(mod_atom->len+4);
} else {
Atom* ap = atom_tab(atom_val((fi->fname_ptr)[file-1]));