Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: RFA: match source code, not line numbers
Date: Thu, 10 Apr 2003 23:05:00 -0000	[thread overview]
Message-ID: <vt28yuiosuf.fsf@zenia.red-bean.com> (raw)


This makes these tests more robust when the .cc files are edited.

2003-04-10  Jim Blandy  <jimb@qa1a.devel.redhat.com>

	* gdb.c++/derivation.exp, gdb.c++/overload.exp,
	gdb.c++/userdef.exp: Match against the program text, not line
	numbers, to check that we've returned to the right place.

Index: gdb/testsuite/gdb.c++/derivation.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/derivation.exp,v
retrieving revision 1.11
diff -c -r1.11 derivation.exp
*** gdb/testsuite/gdb.c++/derivation.exp	9 Apr 2003 23:21:14 -0000	1.11
--- gdb/testsuite/gdb.c++/derivation.exp	10 Apr 2003 23:01:08 -0000
***************
*** 310,316 ****
      -re "#0  marker1.*$gdb_prompt $" {
          setup_kfail "gdb/1155" s390-*-linux-gnu
          fail "re-selected 'main' frame after inferior call"
!         gdb_test "finish" ".*main.*at .*derivation.cc:21\[79\].*" \
              "finish call to marker1"
      }
      -re "#1  ($hex in )?main.*$gdb_prompt $" {
--- 310,316 ----
      -re "#0  marker1.*$gdb_prompt $" {
          setup_kfail "gdb/1155" s390-*-linux-gnu
          fail "re-selected 'main' frame after inferior call"
!         gdb_test "finish" ".*main.*at .*derivation.cc:.*(marker1\\(\\);|a_instance\\.a = 20;).*" \
              "finish call to marker1"
      }
      -re "#1  ($hex in )?main.*$gdb_prompt $" {
Index: gdb/testsuite/gdb.c++/overload.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/overload.exp,v
retrieving revision 1.11
diff -c -r1.11 overload.exp
*** gdb/testsuite/gdb.c++/overload.exp	9 Apr 2003 23:21:14 -0000	1.11
--- gdb/testsuite/gdb.c++/overload.exp	10 Apr 2003 23:01:08 -0000
***************
*** 129,135 ****
      -re "#0  marker1.*$gdb_prompt $" {
          setup_kfail "gdb/1155" s390-*-linux-gnu
          fail "re-selected 'main' frame after inferior call"
!         gdb_test "finish" ".*main.*at .*overload.cc:7\[78\].*" \
              "finish call to marker1"
      }
      -re "#1  ($hex in )?main.*$gdb_prompt $" {
--- 129,135 ----
      -re "#0  marker1.*$gdb_prompt $" {
          setup_kfail "gdb/1155" s390-*-linux-gnu
          fail "re-selected 'main' frame after inferior call"
!         gdb_test "finish" ".*main.*at .*overload.cc:.*(marker1\\(\\);|return 0;).*" \
              "finish call to marker1"
      }
      -re "#1  ($hex in )?main.*$gdb_prompt $" {
Index: gdb/testsuite/gdb.c++/userdef.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/userdef.exp,v
retrieving revision 1.7
diff -c -r1.7 userdef.exp
*** gdb/testsuite/gdb.c++/userdef.exp	9 Apr 2003 23:21:14 -0000	1.7
--- gdb/testsuite/gdb.c++/userdef.exp	10 Apr 2003 23:01:08 -0000
***************
*** 75,81 ****
      -re "#0  marker1.*$gdb_prompt $" {
          setup_kfail "gdb/1155" s390-*-linux-gnu
          fail "re-selected 'main' frame after inferior call"
!         gdb_test "finish" ".*main.*at .*userdef.cc:27\[67\].*" \
                  "finish call to marker1"
      }
      -re "#1  ($hex in )?main.*$gdb_prompt $" {
--- 75,81 ----
      -re "#0  marker1.*$gdb_prompt $" {
          setup_kfail "gdb/1155" s390-*-linux-gnu
          fail "re-selected 'main' frame after inferior call"
!         gdb_test "finish" ".*main.*at .*userdef.cc:.*(marker1\\(\\);|cout << one;).*" \
                  "finish call to marker1"
      }
      -re "#1  ($hex in )?main.*$gdb_prompt $" {


             reply	other threads:[~2003-04-10 23:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-10 23:05 Jim Blandy [this message]
2003-04-10 23:39 ` David Carlton
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=vt28yuiosuf.fsf@zenia.red-bean.com \
    --to=jimb@redhat.com \
    --cc=gdb-patches@sources.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