This is the mail archive of the gdb@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]

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


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