public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* how to get kernel global data dynamically ?
@ 2012-09-05  1:54 John Smith
  2012-09-05  5:36 ` oza Pawandeep
  0 siblings, 1 reply; 2+ messages in thread
From: John Smith @ 2012-09-05  1:54 UTC (permalink / raw)
  To: gdb

hi,

      I  got  a  segment  fault  when  debug  a  process ,  so  I
disassemble the code  which   cause  the  fault  ,  and  find  the
instruction  which  fires  the  fault ,

     this  instruction  is  xlat  ds:(%bx)    , as  you  know , this
is a  protect-mode  addressing ,so  I  need  to  know  the  base
address  responding to   this  ds  descript ,

     then  I  could calculate  the  linear  address and  catch  its
memory data .


   but , as you know too , gdb can not tell you the    base address
responding to   this  ds  descript ,  is anyone have some solutions
here ?


thanks!

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

* Re: how to get kernel global data dynamically ?
  2012-09-05  1:54 how to get kernel global data dynamically ? John Smith
@ 2012-09-05  5:36 ` oza Pawandeep
  0 siblings, 0 replies; 2+ messages in thread
From: oza Pawandeep @ 2012-09-05  5:36 UTC (permalink / raw)
  To: John Smith; +Cc: gdb

there is a utility called 'crash utility' from redhat
which is capable of debugging live linux kernel space; of course you
can not set breakpoints/watchpoints, but certainly you should be able
to query all kernel symbols.

Regards,
Oza.

On Wed, Sep 5, 2012 at 7:24 AM, John Smith <horserivers@gmail.com> wrote:
> hi,
>
>       I  got  a  segment  fault  when  debug  a  process ,  so  I
> disassemble the code  which   cause  the  fault  ,  and  find  the
> instruction  which  fires  the  fault ,
>
>      this  instruction  is  xlat  ds:(%bx)    , as  you  know , this
> is a  protect-mode  addressing ,so  I  need  to  know  the  base
> address  responding to   this  ds  descript ,
>
>      then  I  could calculate  the  linear  address and  catch  its
> memory data .
>
>
>    but , as you know too , gdb can not tell you the    base address
> responding to   this  ds  descript ,  is anyone have some solutions
> here ?
>
>
> thanks!

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

end of thread, other threads:[~2012-09-05  5:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-05  1:54 how to get kernel global data dynamically ? John Smith
2012-09-05  5:36 ` oza Pawandeep

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).