diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2015-07-10 05:38:32 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-07-28 19:36:21 +0300 |
commit | 013cf483c9d431e36d4ef2b854ee621cce51b8ce (patch) | |
tree | 513378f5f4dafc512599d43bc3e338a00dc52bd0 /arch/x86/include/asm/ptrace.h | |
parent | 66d10c18bf2c34698362b6fe1891bcc6e8755243 (diff) | |
download | u-boot-013cf483c9d431e36d4ef2b854ee621cce51b8ce.tar.xz |
x86: Display correct CS/EIP/EFLAGS when there is an error code
Some exceptions cause an error code to be saved on the current stack
after the EIP value. We should extract CS/EIP/EFLAGS from different
position on the stack based on the exception number.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/x86/include/asm/ptrace.h')
-rw-r--r-- | arch/x86/include/asm/ptrace.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/arch/x86/include/asm/ptrace.h b/arch/x86/include/asm/ptrace.h index a727dbfb05..3849bc0756 100644 --- a/arch/x86/include/asm/ptrace.h +++ b/arch/x86/include/asm/ptrace.h @@ -63,9 +63,19 @@ struct irq_regs { /* Pushed by vector handler (irq_<num>) */ long irq_id; /* Pushed by cpu in response to interrupt */ - long eip; - long xcs; - long eflags; + union { + struct { + long eip; + long xcs; + long eflags; + } ctx1; + struct { + long err; + long eip; + long xcs; + long eflags; + } ctx2; + } context; } __attribute__ ((packed)); /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */ |