Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <kettenis@chello.nl>
To: mec.gnu@mindspring.com
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch/testsuite] lib/gdb.exp: native tcl gdb_get_line_number
Date: Mon, 09 Aug 2004 17:55:00 -0000	[thread overview]
Message-ID: <200408091755.i79Hta9D038666@elgar.kettenis.dyndns.org> (raw)
In-Reply-To: <4116516C.nailLPL1BAKH4@mindspring.com> (message from Michael Chastain on Sun, 08 Aug 2004 12:14:36 -0400)

   Date: Sun, 08 Aug 2004 12:14:36 -0400
   From: Michael Chastain <mec.gnu@mindspring.com>

   2004-08-08  Michael Chastain  <mec.gnu@mindspring.com>

	   * lib/gdb.exp (gdb_get_line_number): Rewrite with native tcl
	   rather than asking gdb to search.

This causes problems if you configure using a relative pathname, i.e.

  ../src/configure --enable-gdb-build-warnings=,-Werror

Because relative pathnames don't start with /, gdb_get_line_number
will prepend the source directory yet another time.  That won't work.

The attached patch fixes things for me, but can somebody please check
whether i've escaped the dot correctly?

Index: testsuite/ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* lib/gdb.exp: Recognize relative path names as well as absolute
	ones.

Index: testsuite/lib/gdb.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v
retrieving revision 1.54
diff -u -p -r1.54 gdb.exp
--- testsuite/lib/gdb.exp 9 Aug 2004 13:16:15 -0000 1.54
+++ testsuite/lib/gdb.exp 9 Aug 2004 17:54:47 -0000
@@ -1874,7 +1874,7 @@ proc gdb_get_line_number { text { file "
     if { "$file" == "" } then {
 	set file "$srcfile"
     }
-    if { ! [regexp "^/" "$file"] } then {
+    if { ! [regexp "^(/|\\.)" "$file"] } then {
 	set file "$srcdir/$subdir/$file"
     }
 


  reply	other threads:[~2004-08-09 17:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-08 16:14 Michael Chastain
2004-08-09 17:55 ` Mark Kettenis [this message]
2004-08-09 19:47   ` Michael Chastain
2004-08-09 20:22     ` Mark Kettenis
2004-08-09 22:18       ` [rfc/testsuite/cp] make all srcfile look the same Michael Chastain
2004-08-15  9:21         ` Michael Chastain

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=200408091755.i79Hta9D038666@elgar.kettenis.dyndns.org \
    --to=kettenis@chello.nl \
    --cc=gdb-patches@sources.redhat.com \
    --cc=mec.gnu@mindspring.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