Problem setting a breakpoint with command in gdbinit
Edgar Mobile
heideggm@hotmail.com
Wed Feb 2 16:01:11 GMT 2022
Greetings,
I try to set a silent breakpoint with commands via .gdbinit like this:
define breakXOpenDisplayRun
set pagination off
break XOpenDisplay
commands
silent
info locals
bt full
cont
end
run
end
Then I call my application like this:
gdb -q -ex breakXOpenDisplayRun ./myapp
The breakpoint is set and the application starts. However, when it encounters the breakpoint the first time it doesn't execute the command silently but stops there. Entering "continue" will continue with debugging and after that point it works.
If I start up GDB manually, then execute breakXOpenDisplayRun and run manually everything works fine.
What can I do?
GDB Version is 8.1.0.20180409-git for Ubuntu Linux 18.04 AMD64.
Regards
More information about the Gdb
mailing list