Message ID | 1438560943-32173-3-git-send-email-sjg@chromium.org |
---|---|
State | Superseded |
Delegated to: | Simon Glass |
Headers | show |
On Sun, Aug 02, 2015 at 06:15:43PM -0600, Simon Glass wrote: > When trying to figure out where an exception has occured, the relocated > address is not a lot of help. Its value depends on various factors. Show > the un-relocated IP as well. This can be looked up in System.map directly. > > Signed-off-by: Simon Glass <sjg@chromium.org> I see ARM has something similar, and yes, this is helpful. Reviewed-by: Tom Rini <trini@konsulko.com>
Hi Simon, On Mon, Aug 3, 2015 at 8:15 AM, Simon Glass <sjg@chromium.org> wrote: > When trying to figure out where an exception has occured, the relocated > address is not a lot of help. Its value depends on various factors. Show > the un-relocated IP as well. This can be looked up in System.map directly. > > Signed-off-by: Simon Glass <sjg@chromium.org> > --- > > Changes in v2: > - Tweak the dump_regs() output to say 'Original EIP' > > arch/x86/cpu/interrupts.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/x86/cpu/interrupts.c b/arch/x86/cpu/interrupts.c > index 3a9c2d4..4c79cb3 100644 > --- a/arch/x86/cpu/interrupts.c > +++ b/arch/x86/cpu/interrupts.c > @@ -103,6 +103,8 @@ static void dump_regs(struct irq_regs *regs) > > printf("EIP: %04x:[<%08lx>] EFLAGS: %08lx\n", > (u16)cs, eip, eflags); > + if (gd->flags & GD_FLG_RELOC) > + printf("Original EIP :[<%08lx>]\n", regs->eip - gd->reloc_off); This should not be 'regs->eip'. It should be just 'eip'. > > printf("EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n", > regs->eax, regs->ebx, regs->ecx, regs->edx); > -- Regards, Bin
diff --git a/arch/x86/cpu/interrupts.c b/arch/x86/cpu/interrupts.c index 3a9c2d4..4c79cb3 100644 --- a/arch/x86/cpu/interrupts.c +++ b/arch/x86/cpu/interrupts.c @@ -103,6 +103,8 @@ static void dump_regs(struct irq_regs *regs) printf("EIP: %04x:[<%08lx>] EFLAGS: %08lx\n", (u16)cs, eip, eflags); + if (gd->flags & GD_FLG_RELOC) + printf("Original EIP :[<%08lx>]\n", regs->eip - gd->reloc_off); printf("EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n", regs->eax, regs->ebx, regs->ecx, regs->edx);
When trying to figure out where an exception has occured, the relocated address is not a lot of help. Its value depends on various factors. Show the un-relocated IP as well. This can be looked up in System.map directly. Signed-off-by: Simon Glass <sjg@chromium.org> --- Changes in v2: - Tweak the dump_regs() output to say 'Original EIP' arch/x86/cpu/interrupts.c | 2 ++ 1 file changed, 2 insertions(+)