File tree Expand file tree Collapse file tree 5 files changed +30
-14
lines changed Expand file tree Collapse file tree 5 files changed +30
-14
lines changed Original file line number Diff line number Diff line change 1
- .text
1
+ /*
2
+ The function for switching to the C stack. It is called
3
+ __morestack because gdb allows any frame with that name to
4
+ move the stack pointer to a different stack, which it usually
5
+ considers an error.
6
+ */
7
+
8
+ .text
2
9
3
10
#if defined(__APPLE__) || defined(_WIN32)
4
- .globl _asm_call_on_stack
5
- _asm_call_on_stack :
11
+ .globl ___morestack
12
+ ___morestack :
6
13
#else
7
- .globl asm_call_on_stack
8
- asm_call_on_stack:
14
+ .globl __morestack
15
+ .hidden __morestack
16
+ __morestack:
9
17
#endif
10
18
11
19
#if defined(__linux__) || defined(__APPLE__)
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ struct registers_t {
29
29
uint32_t eip;
30
30
};
31
31
32
- extern " C" void asm_call_on_stack (void *args, void *fn_ptr, uintptr_t stack_ptr);
32
+ extern " C" void __morestack (void *args, void *fn_ptr, uintptr_t stack_ptr);
33
33
34
34
class context {
35
35
public:
@@ -57,7 +57,7 @@ class context {
57
57
}
58
58
59
59
void call_shim_on_c_stack (void *args, void *fn_ptr) {
60
- asm_call_on_stack (args, fn_ptr, regs.esp );
60
+ __morestack (args, fn_ptr, regs.esp );
61
61
}
62
62
};
63
63
Original file line number Diff line number Diff line change
1
+ /*
2
+ The function for switching to the C stack. It is called
3
+ __morestack because gdb allows any frame with that name to
4
+ move the stack pointer to a different stack, which it usually
5
+ considers an error.
6
+ */
7
+
1
8
#include "regs.h"
2
9
3
10
#define ARG0 RUSTRT_ARG0_S
7
14
.text
8
15
9
16
#if defined(__APPLE__) || defined(_WIN32)
10
- .globl _asm_call_on_stack
11
- _asm_call_on_stack:
17
+ .globl ___morestack
18
+ .private_extern MORESTACK
19
+ ___morestack:
12
20
#else
13
- .globl asm_call_on_stack
14
- asm_call_on_stack:
21
+ .globl __morestack
22
+ .hidden __morestack
23
+ __morestack:
15
24
#endif
16
25
17
26
#if defined(__linux__) || defined(__APPLE__)
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ struct registers_t {
27
27
uint64_t data[RUSTRT_MAX];
28
28
};
29
29
30
- extern " C" void asm_call_on_stack (void *args, void *fn_ptr, uintptr_t stack_ptr);
30
+ extern " C" void __morestack (void *args, void *fn_ptr, uintptr_t stack_ptr);
31
31
32
32
class context {
33
33
public:
@@ -55,7 +55,7 @@ class context {
55
55
}
56
56
57
57
void call_shim_on_c_stack (void *args, void *fn_ptr) {
58
- asm_call_on_stack (args, fn_ptr, regs.data [RUSTRT_RSP]);
58
+ __morestack (args, fn_ptr, regs.data [RUSTRT_RSP]);
59
59
}
60
60
};
61
61
Original file line number Diff line number Diff line change @@ -73,7 +73,6 @@ upcall_call_shim_on_c_stack
73
73
upcall_new_stack
74
74
upcall_del_stack
75
75
upcall_reset_stack_limit
76
- asm_call_on_stack
77
76
rust_uv_default_loop
78
77
rust_uv_loop_new
79
78
rust_uv_loop_delete
You can’t perform that action at this time.
0 commit comments