Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Caz Yokoyama <cazyokoyama@gmail.com>
Cc: gdb-patches@sourceware.org
Subject: Re: patch to eliminate ADDR on loading symbols of Linux module
Date: Thu, 24 Sep 2009 20:16:00 -0000	[thread overview]
Message-ID: <20090924201644.GA30712@caradoc.them.org> (raw)
In-Reply-To: <4D3A256890A9458FB055F19527A022A2@xpjpn>

On Thu, Sep 24, 2009 at 01:11:02PM -0700, Caz Yokoyama wrote:
> Hello,
> When we debug a loadable module of Linux kernel, we use the command,
> add-symbol-file to read its symbols. We have to specify its loaded address
> like
> (gdb) add-symbol-file drivers/net/e1000e/e1000e.ko 0xfffffffffa008000
> The address is appeared in /proc/modules. Someone said several months ago
> that the address is taken by python script. But I don't know how. Therefore,
> I did by my way.

I want to make this fully automatic.  But if you're going to keep
using add-symbol-file, it's not hard to do this automatically from a
script without having to rebuild GDB.

Yes, you have to use the new Python interface.  Have the script search
the module list and then issue an appropriate gdb.execute().

... Except you'd need gdb.parse_and_eval, wouldn't you.  Tom, that
missed 7.0, I guess?

I firmly maintain that GDB should not have code baked into it that
knows about the layout of the Linux kernel.  That's impossible to
maintain.

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2009-09-24 20:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-24 20:10 Caz Yokoyama
2009-09-24 20:16 ` Daniel Jacobowitz [this message]
2009-09-24 20:22   ` Tom Tromey
2009-09-24 20:32     ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090924201644.GA30712@caradoc.them.org \
    --to=drow@false.org \
    --cc=cazyokoyama@gmail.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox