This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Python plugin in GDB
- From: Sebastian Fischmeister <sfischme at uwaterloo dot ca>
- To: gdb at sourceware dot org
- Date: Tue, 1 Dec 2009 11:21:33 -0500
- Subject: Python plugin in GDB
Hello,
We're using the python plugin in GDB 7.0 and periodically attach to a running process to stop it and extract some data. This is the problem:
When running this script manually, it works (the value of 'i' changes over time), when running this script with the python plugin, it doesn't work (the value of 'i' never changes).
This is the python script:
while True:
gdb.execute("attach 11868")
gdb.execute("bt")
gdb.execute("frame 4")
gdb.execute("print i")
gdb.execute("detach")
time.sleep(10)
end
Does anyone know why it would work manually entering the commands and why it wouldn't work with the plugin?
Thanks,
Sebastian