gdb command file scripting: wait for breakpoint supported? -


I want to debug a lot of complex programs with many queues, each has a relatively short timeout period set. I can not debug reliable in GDB's 'manual' command line mode, because timeouts are triggers when I type command.

I do not like the idea of ​​expanding the queue of all the queues, because things get really messy. (It seems like the design itself is rational, I know ...)

I would really like to use GDB 'scripting' feature, but I have not found a good tutorial for this.

Can anyone tell me that this is possible in a gdb "command file" script:

  • Some things (easy) init
  • One Set the Breakpoint
  • Run the program
  • After the breakpoint hit, execute the next command in the script

    So basically my question is: Am I Breakpoint inside a GDB command file script?

    Answer my own question: I was successfully using hook, my command file looks like this [Initialization code] Define the hook-stop [order given at the breakpoint] on the B set, the breakpoint is pending B. my_breakpoint_function r

Comments