From: David Carlton <carlton@math.stanford.edu>
To: Jim Blandy <jimb@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: RFA: match source code, not line numbers
Date: Thu, 10 Apr 2003 23:39:00 -0000 [thread overview]
Message-ID: <ro14r55dirq.fsf@jackfruit.Stanford.EDU> (raw)
In-Reply-To: <vt28yuiosuf.fsf@zenia.red-bean.com>
On 10 Apr 2003 18:06:32 -0500, Jim Blandy <jimb@redhat.com> said:
> This makes these tests more robust when the .cc files are edited.
Yeah, I noticed that issue when I was looking over the second version
of the patches; it didn't seem worth commenting at the time, but I'm
glad you're fixing them.
Hmm. Normally we've been grabbing line numbers via marker comments
and gdb_get_line_number in these sorts of situations. (See
gdb.c++/m-data.exp, for example; of course, in that example, we
actually need a line number.) It's a little more complicated here,
because it looks like you're seeing two different target line numbers.
But marker comments have the advantage over your approach that they
leave a residue in the .cc file as well as in the .exp file, lessening
the chance that somebody will inadvertently edit the .cc file in a
fashion that silently breaks the test.
How about you add a comment like "// done-with-marker1" at the end of
both lines in question (in each test), and then put
'done-with-marker1' in your regexp instead of the matches for the
bodies of the two lines? That would satisfy my concerns, avoid the
need for gdb_get_line_number, and make the regexp a little simpler.
David Carlton
carlton@math.stanford.edu
next prev parent reply other threads:[~2003-04-10 23:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-10 23:05 Jim Blandy
2003-04-10 23:39 ` David Carlton [this message]
2003-04-11 19:38 ` Jim Blandy
2003-04-11 19:55 ` David Carlton
[not found] ` <ro1istkakec.fsf@jackfruit.Stanford.EDU>
2003-04-11 19:58 ` Jim Blandy
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=ro14r55dirq.fsf@jackfruit.Stanford.EDU \
--to=carlton@math.stanford.edu \
--cc=gdb-patches@sources.redhat.com \
--cc=jimb@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