I need to debug a certain set of commands each time i invoke gdb - so I decided to put them in my .gdbinit. Everything was fine , till i decided to use commands (to execute a certain set of gdb commands each time a certain brkpt is hit). My script looks is as follows:
define setup handle SIGTRAP noprint nostop br 'Class1::Fun1(void)' run br 'Class2::Run(void)' c br Function2 commands 3 return 0 c end end Problem is , whenever I execute them one by one , it behaves perfectly , but when i source the script and run setup , it behaves weirdly after the commands (does not do what was previously doing. i.e everytime brkpt 3 is hit, return 0 and continue). GDB version: GNU gdb Red Hat Linux (6.3.0.0-1.143.el4rh) Can anyone help ? -- View this message in context: http://old.nabble.com/How-to-write-commands-in-a-GDB-script-that-get-executed-every-time-a-particular-brkpt-is-hit---tp27527100p27527100.html Sent from the Gnu - gdb - General mailing list archive at Nabble.com.