diff options
author | Richard Weinberger <richard@nod.at> | 2013-09-23 19:38:01 +0400 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2013-11-17 14:27:25 +0400 |
commit | 9d1ee8ce92e16c6aa0a3fd91ee8ed9e403b3a2eb (patch) | |
tree | fa38685d0c62cbc97d9016750bb18c7feac54799 /arch/x86/um/asm/processor_64.h | |
parent | 5e01dc7b26d9f24f39abace5da98ccbd6a5ceb52 (diff) | |
download | linux-9d1ee8ce92e16c6aa0a3fd91ee8ed9e403b3a2eb.tar.xz |
um: Rewrite show_stack()
Currently on UML stack traces are not very reliable and both
x86 and x86_64 have their on implementations.
This patch unifies both and adds support to outline unreliable
functions calls.
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/x86/um/asm/processor_64.h')
-rw-r--r-- | arch/x86/um/asm/processor_64.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/um/asm/processor_64.h b/arch/x86/um/asm/processor_64.h index 4b02a8455bd1..c3be85205a65 100644 --- a/arch/x86/um/asm/processor_64.h +++ b/arch/x86/um/asm/processor_64.h @@ -19,6 +19,8 @@ struct arch_thread { .fs = 0, \ .faultinfo = { 0, 0, 0 } } +#define STACKSLOTS_PER_LINE 4 + static inline void arch_flush_thread(struct arch_thread *thread) { } @@ -32,4 +34,7 @@ static inline void arch_copy_thread(struct arch_thread *from, #define current_text_addr() \ ({ void *pc; __asm__("movq $1f,%0\n1:":"=g" (pc)); pc; }) +#define current_sp() ({ void *sp; __asm__("movq %%rsp, %0" : "=r" (sp) : ); sp; }) +#define current_bp() ({ unsigned long bp; __asm__("movq %%rbp, %0" : "=r" (bp) : ); bp; }) + #endif |