public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  archer-tromey-ambiguous-linespec: make say_where output "backward compatible" when there is just 1 location
@ 2011-08-30 20:59 tromey
  0 siblings, 0 replies; only message in thread
From: tromey @ 2011-08-30 20:59 UTC (permalink / raw)
  To: archer-commits

The branch, archer-tromey-ambiguous-linespec has been updated
       via  ef3f8a7f7a93fc42917e69700d7fc446703bf44b (commit)
       via  ce284bb1a1dd72342ca4b4b48fd7db1859e4c93f (commit)
      from  ca6ca903fc2de56be887695a2962e4b5f0289173 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit ef3f8a7f7a93fc42917e69700d7fc446703bf44b
Author: Tom Tromey <tromey@redhat.com>
Date:   Tue Aug 30 14:58:24 2011 -0600

    make say_where output "backward compatible" when there is just 1 location

commit ce284bb1a1dd72342ca4b4b48fd7db1859e4c93f
Author: Tom Tromey <tromey@redhat.com>
Date:   Tue Aug 30 14:56:17 2011 -0600

    fix objcdecode regexp to reflect current code

-----------------------------------------------------------------------

Summary of changes:
 gdb/breakpoint.c                        |   16 ++++++++++++----
 gdb/testsuite/gdb.linespec/linespec.exp |    4 ++--
 gdb/testsuite/gdb.objc/objcdecode.exp   |    2 +-
 3 files changed, 15 insertions(+), 7 deletions(-)

First 500 lines of diff:
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 94d7220..43b6dea 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -10696,10 +10696,18 @@ say_where (struct breakpoint *b)
 			  gdb_stdout);
 	}
       if (b->loc->source_file)
-	/* This is not ideal, but each location may have a different
-	   file name, and this at least reflects the real situation
-	   somewhat.  */
-	printf_filtered (": %s.", b->addr_string);
+	{
+	  /* If there is a single location, we can print the location
+	     more nicely.  */
+	  if (b->loc->next == NULL)
+	    printf_filtered (": file %s, line %d.",
+			     b->loc->source_file, b->loc->line_number);
+	  else
+	    /* This is not ideal, but each location may have a
+	       different file name, and this at least reflects the
+	       real situation somewhat.  */
+	    printf_filtered (": %s.", b->addr_string);
+	}
 
       if (b->loc->next)
 	{
diff --git a/gdb/testsuite/gdb.linespec/linespec.exp b/gdb/testsuite/gdb.linespec/linespec.exp
index af55af5..122a468 100644
--- a/gdb/testsuite/gdb.linespec/linespec.exp
+++ b/gdb/testsuite/gdb.linespec/linespec.exp
@@ -74,7 +74,7 @@ gdb_test "break NameSpace::overload" \
     "set breakpoint at all instances of NameSpace::overload"
 
 gdb_test "break lspec.cc:NameSpace::overload" \
-    "Breakpoint \[0-9\]+ at $hex: lspec.cc:NameSpace::overload." \
+    "Breakpoint \[0-9\]+ at $hex: file .*lspec.cc, line 7." \
     "set breakpoint at lspec.cc instance of NameSpace::overload"
 
 gdb_test "break lspec.cc:NameSpace::overload(double)" \
@@ -82,7 +82,7 @@ gdb_test "break lspec.cc:NameSpace::overload(double)" \
     "set breakpoint at non-existent lspec.cc instance of NameSpace::overload"
 
 gdb_test "break NameSpace::overload()" \
-    "Breakpoint \[0-9\]+ at $hex: NameSpace::overload\\(\\)." \
+    "Breakpoint \[0-9\]+ at $hex: file .*lspec.cc, line 7." \
     "set breakpoint at specific instance of NameSpace::overload"
 
 #
diff --git a/gdb/testsuite/gdb.objc/objcdecode.exp b/gdb/testsuite/gdb.objc/objcdecode.exp
index 720bfd8..098dd57 100644
--- a/gdb/testsuite/gdb.objc/objcdecode.exp
+++ b/gdb/testsuite/gdb.objc/objcdecode.exp
@@ -62,7 +62,7 @@ gdb_test_multiple "break multipleDef" $name \
 	send_gdb "3\n"
 	exp_continue
     }
-    -re "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file .*\r\n$gdb_prompt $" { pass $name }
+    -re "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: multipleDef.\r\n$gdb_prompt $" { pass $name }
     -re ".*$gdb_prompt $"   { kfail "gdb/1236" $name }
 }
 


hooks/post-receive
--
Repository for Project Archer.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-08-30 20:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-30 20:59 [SCM] archer-tromey-ambiguous-linespec: make say_where output "backward compatible" when there is just 1 location tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).