public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* how to see DAR (data access register) on ppc using gdb 7.0.1 on Linux?
@ 2012-09-07 13:26 Stefan Puiu
  2012-09-07 13:44 ` Luis Gustavo
  2012-09-07 17:12 ` Pedro Alves
  0 siblings, 2 replies; 3+ messages in thread
From: Stefan Puiu @ 2012-09-07 13:26 UTC (permalink / raw)
  To: gdb

Hi,

I'm trying to debug a crash on our embedded Linux platform using:

# gdb --version

warning: Can not parse XML syscalls information; XML support was
disabled at compile time.
GNU gdb (GDB) 7.0.1
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "powerpc-750-linux-gnu".

I was trying to see the PPC registers after a crash:

    (gdb) info registers
     r0             0x1034875e       271877982
     r1             0x7fffed30       2147478832
     r2             0xfd7f7a0        265811872
     [...]
     pc             0xf18d718        0xf18d718
     msr            0xd032   53298
     cr             0x80000848       2147485768
     lr             0xf18d6f8        0xf18d6f8
     ctr            0xf235d90        253975952
     xer            0x20000000       536870912
     orig_r3        0x26     38
     trap           0x300    768

I noticed that the DAR (data access register) is not present here -
I'm trying to see the memory address whose access caused the crash. I
only see the trap register, which confirms that there was an invalid
memory access, but that's it as far as I can tell.

I know the contents of the DAR are printed in case of kernel crashes
(in oops dumps), is there a way to view the register from gdb? 'info
register dar' doesn't work...

Thanks in advance,
Stefan.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: how to see DAR (data access register) on ppc using gdb 7.0.1 on Linux?
  2012-09-07 13:26 how to see DAR (data access register) on ppc using gdb 7.0.1 on Linux? Stefan Puiu
@ 2012-09-07 13:44 ` Luis Gustavo
  2012-09-07 17:12 ` Pedro Alves
  1 sibling, 0 replies; 3+ messages in thread
From: Luis Gustavo @ 2012-09-07 13:44 UTC (permalink / raw)
  To: Stefan Puiu; +Cc: gdb

On 09/07/2012 10:26 AM, Stefan Puiu wrote:
> Hi,
>
> I'm trying to debug a crash on our embedded Linux platform using:
>
> # gdb --version
>
> warning: Can not parse XML syscalls information; XML support was
> disabled at compile time.
> GNU gdb (GDB) 7.0.1
> Copyright (C) 2009 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later<http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "powerpc-750-linux-gnu".
>
> I was trying to see the PPC registers after a crash:
>
>      (gdb) info registers
>       r0             0x1034875e       271877982
>       r1             0x7fffed30       2147478832
>       r2             0xfd7f7a0        265811872
>       [...]
>       pc             0xf18d718        0xf18d718
>       msr            0xd032   53298
>       cr             0x80000848       2147485768
>       lr             0xf18d6f8        0xf18d6f8
>       ctr            0xf235d90        253975952
>       xer            0x20000000       536870912
>       orig_r3        0x26     38
>       trap           0x300    768
>
> I noticed that the DAR (data access register) is not present here -
> I'm trying to see the memory address whose access caused the crash. I
> only see the trap register, which confirms that there was an invalid
> memory access, but that's it as far as I can tell.
>
> I know the contents of the DAR are printed in case of kernel crashes
> (in oops dumps), is there a way to view the register from gdb? 'info
> register dar' doesn't work...
>
> Thanks in advance,
> Stefan.
>

Such a register is not made visible to GDB by the kernel, so you won't 
be able to see it through GDB.

Luis

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: how to see DAR (data access register) on ppc using gdb 7.0.1 on Linux?
  2012-09-07 13:26 how to see DAR (data access register) on ppc using gdb 7.0.1 on Linux? Stefan Puiu
  2012-09-07 13:44 ` Luis Gustavo
@ 2012-09-07 17:12 ` Pedro Alves
  1 sibling, 0 replies; 3+ messages in thread
From: Pedro Alves @ 2012-09-07 17:12 UTC (permalink / raw)
  To: Stefan Puiu; +Cc: gdb

On 09/07/2012 02:26 PM, Stefan Puiu wrote:
> Hi,
> 
> I'm trying to debug a crash on our embedded Linux platform using:

> GNU gdb (GDB) 7.0.1

You can also find the address that caused a SIGSEGV by printing
$_siginfo (the siginfo_t associated with the signal).  Look for the
sig_fault/si_addr fields) after GDB catches the signal.  Doesn't work with
core files though, only live debugging.

For PPC, you'd need GDB 7.5 for that.

-- 
Pedro Alves

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-09-07 17:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-07 13:26 how to see DAR (data access register) on ppc using gdb 7.0.1 on Linux? Stefan Puiu
2012-09-07 13:44 ` Luis Gustavo
2012-09-07 17:12 ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).