public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  archer-tromey-ambiguous-linespec: change solib-symbol.exp to conform to the new approach in this case it is correct to change the test because it is testing exactly the behavior we are changing
@ 2011-10-18 17:11 tromey
  0 siblings, 0 replies; only message in thread
From: tromey @ 2011-10-18 17:11 UTC (permalink / raw)
  To: archer-commits

The branch, archer-tromey-ambiguous-linespec has been updated
       via  86f130b82f4ae0ada0a2f0cb1149738d8930280d (commit)
       via  0b9395227767b0e93d8c18f0bb98f6bde92a86fb (commit)
       via  56713f4d483067ea4b99844795b8a968c8442c3f (commit)
      from  58fd563ad6ab0c205c7e7f34d519acdd9f8515d6 (commit)

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

- Log -----------------------------------------------------------------
commit 86f130b82f4ae0ada0a2f0cb1149738d8930280d
Author: Tom Tromey <tromey@redhat.com>
Date:   Tue Oct 18 11:10:16 2011 -0600

    change solib-symbol.exp to conform to the new approach
    in this case it is correct to change the test because it is testing exactly
    the behavior we are changing

commit 0b9395227767b0e93d8c18f0bb98f6bde92a86fb
Author: Tom Tromey <tromey@redhat.com>
Date:   Tue Oct 18 10:33:19 2011 -0600

    call skip_prologue_sal in decode_all_digits
    this mostly fixes ending-run.exp

commit 56713f4d483067ea4b99844795b8a968c8442c3f
Author: Tom Tromey <tromey@redhat.com>
Date:   Tue Oct 18 09:17:49 2011 -0600

    another use of VEC_empty

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

Summary of changes:
 gdb/linespec.c                          |    4 +++-
 gdb/testsuite/gdb.base/solib-symbol.exp |   14 +++++++-------
 2 files changed, 10 insertions(+), 8 deletions(-)

First 500 lines of diff:
diff --git a/gdb/linespec.c b/gdb/linespec.c
index 5a185f0..cdfaf9f 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -2301,7 +2301,7 @@ decode_all_digits (struct linespec_state *self,
       set_current_program_space (SYMTAB_PSPACE (elt));
 
       pcs = find_pcs_for_symtab_line (elt, val.line);
-      if (pcs == NULL)
+      if (VEC_empty (CORE_ADDR, pcs))
 	continue;
 
       for (pcix = 0; VEC_iterate (CORE_ADDR, pcs, pcix, pc); ++pcix)
@@ -2311,6 +2311,8 @@ decode_all_digits (struct linespec_state *self,
 	  val.pc = pc;
 	  val.explicit_line = 1;
 
+	  skip_prologue_sal (&val);
+
 	  add_sal_to_sals (self, &values, &val, NULL);
 	}
 
diff --git a/gdb/testsuite/gdb.base/solib-symbol.exp b/gdb/testsuite/gdb.base/solib-symbol.exp
index aa723c6..d402ebb 100644
--- a/gdb/testsuite/gdb.base/solib-symbol.exp
+++ b/gdb/testsuite/gdb.base/solib-symbol.exp
@@ -46,11 +46,6 @@ gdb_reinitialize_dir $srcdir/$subdir
 gdb_load ${binfile}
 gdb_load_shlibs $binfile_lib
 
-if ![runto_main] then {
-  fail "Can't run to main"
-  return 0
-}
-
 # Set a breakpoint in the binary.
 gdb_test "br foo2" \
 	 "Breakpoint.*file.*${testfile}\\.c.*" \
@@ -58,6 +53,11 @@ gdb_test "br foo2" \
 
 delete_breakpoints
 
+if ![runto_main] then {
+  fail "Can't run to main"
+  return 0
+}
+
 # Break in the library.
 gdb_test "br foo" \
 	 "Breakpoint.*file.*${libname}\\.c.*" \
@@ -67,9 +67,9 @@ gdb_test "continue" \
 	 "Continuing.*" \
 	 "continue"
 
-# This symbol is now looked up in the ELF library.
+# This symbol is now looked up in the ELF library and the binary.
 gdb_test "br foo2" \
-	 "Breakpoint.*file.*${libname}\\.c.*" \
+	 "Breakpoint.*: foo2. .2 locations..*" \
 	 "foo2 in mdlib"
 
 gdb_exit


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


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

only message in thread, other threads:[~2011-10-18 17:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-18 17:11 [SCM] archer-tromey-ambiguous-linespec: change solib-symbol.exp to conform to the new approach in this case it is correct to change the test because it is testing exactly the behavior we are changing 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).