- .text
+/*
+ The function for switching to the C stack. It is called
+ __morestack because gdb allows any frame with that name to
+ move the stack pointer to a different stack, which it usually
+ considers an error.
+*/
+
+ .text
#if defined(__APPLE__) || defined(_WIN32)
-.globl _asm_call_on_stack
-_asm_call_on_stack:
+.globl ___morestack
+___morestack:
#else
-.globl asm_call_on_stack
-asm_call_on_stack:
+.globl __morestack
+.hidden __morestack
+__morestack:
#endif
#if defined(__linux__) || defined(__APPLE__)
uint32_t eip;
};
-extern "C" void asm_call_on_stack(void *args, void *fn_ptr, uintptr_t stack_ptr);
+extern "C" void __morestack(void *args, void *fn_ptr, uintptr_t stack_ptr);
class context {
public:
}
void call_shim_on_c_stack(void *args, void *fn_ptr) {
- asm_call_on_stack(args, fn_ptr, regs.esp);
+ __morestack(args, fn_ptr, regs.esp);
}
};
+/*
+ The function for switching to the C stack. It is called
+ __morestack because gdb allows any frame with that name to
+ move the stack pointer to a different stack, which it usually
+ considers an error.
+*/
+
#include "regs.h"
#define ARG0 RUSTRT_ARG0_S
.text
#if defined(__APPLE__) || defined(_WIN32)
-.globl _asm_call_on_stack
-_asm_call_on_stack:
+.globl ___morestack
+.private_extern MORESTACK
+___morestack:
#else
-.globl asm_call_on_stack
-asm_call_on_stack:
+.globl __morestack
+.hidden __morestack
+__morestack:
#endif
#if defined(__linux__) || defined(__APPLE__)
uint64_t data[RUSTRT_MAX];
};
-extern "C" void asm_call_on_stack(void *args, void *fn_ptr, uintptr_t stack_ptr);
+extern "C" void __morestack(void *args, void *fn_ptr, uintptr_t stack_ptr);
class context {
public:
}
void call_shim_on_c_stack(void *args, void *fn_ptr) {
- asm_call_on_stack(args, fn_ptr, regs.data[RUSTRT_RSP]);
+ __morestack(args, fn_ptr, regs.data[RUSTRT_RSP]);
}
};
upcall_new_stack
upcall_del_stack
upcall_reset_stack_limit
-asm_call_on_stack
rust_uv_default_loop
rust_uv_loop_new
rust_uv_loop_delete