Misc cleanups in the trap handling code.

This commit is contained in:
Dan Gohman
2018-12-13 12:09:04 -08:00
parent 26eb8131da
commit 717f60bda1
4 changed files with 48 additions and 59 deletions

View File

@@ -11,19 +11,12 @@
extern "C" {
#endif
struct CodeSegment;
// Record the Trap code and wasm bytecode offset in TLS somewhere
void RecordTrap(const uint8_t* pc, const struct CodeSegment* codeSegment);
void RecordTrap(const uint8_t* pc);
// Initiate an unwind.
void Unwind(void);
// Return the CodeSegment containing the given pc, if any exist in the process.
// This method does not take a lock.
const struct CodeSegment*
LookupCodeSegment(const void* pc);
// Trap initialization state.
struct TrapContext {
bool triedToInstallSignalHandlers;