Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb@sourceware.org
Subject: Re: Expanding macros in breakpoint conditions
Date: Wed, 23 Oct 2013 17:04:00 -0000	[thread overview]
Message-ID: <83k3h3j4vo.fsf@gnu.org> (raw)
In-Reply-To: <87y55mk0tg.fsf@fleche.redhat.com>

> 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.


  reply	other threads:[~2013-10-23 17:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-21 16:53 Eli Zaretskii
2013-10-21 17:09 ` Tom Tromey
2013-10-23 17:04   ` Eli Zaretskii [this message]
2013-10-23 17:26     ` Tom Tromey
2013-10-23 17:33     ` Keith Seitz
2013-10-23 18:08       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83k3h3j4vo.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb@sourceware.org \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox