This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Expanding macros in breakpoint conditions
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb at sourceware dot org
- Date: Wed, 23 Oct 2013 20:04:11 +0300
- Subject: Re: Expanding macros in breakpoint conditions
- Authentication-results: sourceware.org; auth=none
- References: <83vc0qk1jx dot fsf at gnu dot org> <87y55mk0tg dot fsf at fleche dot redhat dot com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> 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.