1

The situation is: I've defined a series of breakpoints(say, 3 breakpoints), and when gdb is set with 'continue' waiting for any 1 of the 3 BPs, it would hit any one depending on other conditionals I set.

Problem is: When there are conditions that doesn't 'hit' any of the 3 BPs I defined, gdb seems stuck waiting indefinitely without returning anything.

Question is: Do we have option for gdb to wait for some 't' time trying to hit any breakpoint, and if 't' has elapsed then it would simply state so or return some meaningful value? Or better, is there a features to NOT 'indefinitely wait'?

The code will look like:

switch(expression) {

   case 1  :
      statement(s); /*Break 1 */
   case 2  :
      statement(s); /*Break 2 */
   case 3  :
      statement(s); /*Break 3 */
   case 4  :
      statement(s); /*no breakpoint allowed or a constraint */
   default : 
   statement(s);
}
ks1322
  • 33,961
  • 14
  • 109
  • 164
VGilla
  • 11
  • 2
  • 3
    Is this python related? – tdelaney Jun 16 '17 at 18:50
  • and "stuck indefinately"... doesn't this just mean that the program is running? If the program is stuck, perhaps a ctrl-c to it will help find out where it is. – tdelaney Jun 16 '17 at 18:51
  • Yes it is python related, and yes it means program is still running. Since I've automated over very large number of Breakpoints, there are instances where my breakpoint wouldn't hit due to incorrect inputs via a config script. By 'Stuck' I meant my process(script) is waiting for response from gdb.And gbd doesn't know when to stop looking for a breakpoint!!! – VGilla Jun 17 '17 at 10:44
  • Does that mean you have a python script calling GDB? What is waiting and how is it waiting? – tdelaney Jun 17 '17 at 13:22

0 Answers0