This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
RE: Using Python to infer some internal data
I agree. It uses add-symbol-file to add symbols for loadable modules. I
thought my code should use add-symbol-file (or underneath functions). My
concern here is
- Is there its counter part for Linux kernel?
- Is the code which break-in kernel when gdb is starts valuable? Before gdb
is started for Linux kernel, we have to type Ctrl+Alt+SysRq and g to break
in to kernel. My code sends BREAK and g to kernel through serial port to
break in. This code is mine and 16 lines.
-caz
-----Original Message-----
From: Daniel Jacobowitz [mailto:drow@false.org]
Sent: Sunday, January 11, 2009 7:30 PM
To: Andrew Brampton
Cc: archer@sourceware.org; Caz Yokoyama
Subject: Re: Using Python to infer some internal data
On Sun, Jan 11, 2009 at 09:17:03PM +0000, Andrew Brampton wrote:
> So my question is. Is it possible for a python script to tell GDB
> about what processes/threads are currently running? If it is not
> possible, why not? If it will be possible one day, but not yet, is
> there any way I can help?
> Also, is it possible for a python script to set a breakpoint, and be
> able to handle it itself without user interference? I would like this
> so that if a new kernel module is loaded, that a piece of my code is
> executed to load new symbols.
Tom will be able to give you a more definitive answer - but mine is
that I don't think either is possible yet, but both of these are on
my list of original goals for scripting support.
> [2] http://bramp.net/blog/autoload-symbols-for-freebsd-kernel-module
Caz, I've copied you because what Andrew's done here is very close to
what you posted for Linux KGDB - but done entirely in Python
scripting. Once we get the breakpoint issue resolved, I think this is
a much nicer way to handle Linux loadable modules too.
--
Daniel Jacobowitz
CodeSourcery