Re: Expanding macros in breakpoint conditions

Eli Zaretskii <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
> From: Tom Tromey <[email protected]>
> Cc: [email protected]
> Date: Mon, 21 Oct 2013 11:09:47 -0600
> 
> >>>>> "Eli" == Eli Zaretskii <[email protected]> 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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.