This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: patch to eliminate ADDR on loading symbols of Linux module


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]