bug-gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Breakpoint not hit on function that begins with for (;;).


From: Kaz Kylheku
Subject: Breakpoint not hit on function that begins with for (;;).
Date: Sat, 24 Dec 2011 09:37:37 -0800
User-agent: Roundcube Webmail/0.4


I'm debugging a program in which a function looks like this:

type foo(args)
{
 foo (;;) {
   /* logic */
 }
 return ...;
}

If I set a breakpoint on the function using

(gdb) b foo

it is ignored. This is because the breakpoint is placed on the
first line, and that first line isn't considered to contain
any expressions!

In my experience with various line-oriented debuggers, if
a breakpoint is set on a line that doesn't map to any code,
the debugger should actually search through the successors of
that line until it finds something breakable.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]