[Qt-creator] Debugger: .gdbinit and gdb.current_progspace().filename

Poenitz Andre Andre.Poenitz at digia.com
Tue Nov 26 11:27:12 CET 2013


Sven Goericke [sven.goericke at gmail.com] wrote:
> i use a local .gdbinit in my programs working directory which uses the
> result from gdb.current_progspace().filename in python. This works well
> on commandline and also if using gdb in emacs. However, in qt-creator
> this doesn't work (i'll get an empty result). According to the gdb-log
> it seems that all .gdbinit stuff is loaded *before* the executable is set.

It's intentional to read init files before doing further actions.

> Is there a way to get a proper result for
> gdb.current_progspace().filename after qt-creator has set the executable
> but before starting the program to debug? I tried the "Additional
> Startup Commands" as well Debugger Helper etc. in the Debugger Options
> but no luck.

The "Debugging Helper Customization" triggers "as late as possible", i.e. when 
the first stop is handled. Commands in there should be visible in the log.

Andre'


More information about the Qt-creator mailing list