This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Expanding macros in breakpoint conditions


> From: Tom Tromey <tromey@redhat.com>
> Cc: gdb@sourceware.org
> Date: Mon, 21 Oct 2013 11:09:47 -0600
> 
> >>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:
> 
> Eli> So my question is: is GDB supposed to expand macros in breakpoint
> Eli> conditions?
> 
> Yes, it should work under the conditions you describe -- namely when the
> macro information is available.
> 
> I don't think there are any known macro expansion bugs here, either.

Thanks.  I took a closer look, and discovered that the problem was
different.  It started as a cockpit error: instead of typing

  (gdb) break foo.c:707

I typed

  (gdb) break foo:707

(i.e., I forgot the .c extension).  File foo.c defines a function foo,
so what GDB did was put the breakpoint at entry to the function.

What I don't understand is why didn't GDB issue an error message in
this case.  There's no label '707' in that function.  Looks like the
linespec parser silently rejected the ":707" part, without telling
me.  It would be nice if it didn't do this silently.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]