aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/global.h
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2011-02-20 10:38:17 +0100
committerBjörn Gustavsson <[email protected]>2011-08-16 08:58:50 +0200
commit71fa3d0011cc19236de082ae068ed2306774e91a (patch)
tree99959e2cb90a20b8ed03af5e04acceb0964d2b73 /erts/emulator/beam/global.h
parent70d016cf227dfae7f77a57349be09cd57dba18d6 (diff)
downloadotp-71fa3d0011cc19236de082ae068ed2306774e91a.tar.gz
otp-71fa3d0011cc19236de082ae068ed2306774e91a.tar.bz2
otp-71fa3d0011cc19236de082ae068ed2306774e91a.zip
Refactor building of the exception stacktrace
As a preparation for providing information about the source location for an MFA item in an exception stacktrace, refactor the code that builds the exception stacktrace. Basically we need two passes over the saved continuation counters: a first pass to calculate the needed heap space and a second pass to actually build the stacktrace.
Diffstat (limited to 'erts/emulator/beam/global.h')
-rw-r--r--erts/emulator/beam/global.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/erts/emulator/beam/global.h b/erts/emulator/beam/global.h
index 249df54015..ab675ad4a1 100644
--- a/erts/emulator/beam/global.h
+++ b/erts/emulator/beam/global.h
@@ -859,10 +859,19 @@ void erts_system_monitor_clear(Process *c_p);
void erts_system_profile_clear(Process *c_p);
/* beam_load.c */
+typedef struct {
+ BeamInstr* current; /* Pointer to: Mod, Name, Arity */
+ Uint needed; /* Heap space needed for entire tuple */
+} FunctionInfo;
+
int erts_load_module(Process *c_p, ErtsProcLocks c_p_locks,
Eterm group_leader, Eterm* mod, byte* code, int size);
void init_load(void);
BeamInstr* find_function_from_pc(BeamInstr* pc);
+Eterm* erts_build_mfa_item(FunctionInfo* fi, Eterm* hp,
+ Eterm args, Eterm* mfa_p);
+void erts_lookup_function_info(FunctionInfo* fi, BeamInstr* pc, int full_info);
+void erts_set_current_function(FunctionInfo* fi, BeamInstr* current);
Eterm erts_module_info_0(Process* p, Eterm module);
Eterm erts_module_info_1(Process* p, Eterm module, Eterm what);
Eterm erts_make_stub_module(Process* p, Eterm Mod, Eterm Beam, Eterm Info);