aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2008-08-20 11:47:57 +0000
committerPedro Alves <palves@redhat.com>2008-08-20 11:47:57 +0000
commitb96e292732664fd8c63970ca11c3a9ac92f60ff9 (patch)
treefd77c1bc06b3746813e801d7beed7e6158fa6277 /gdb/testsuite
parentf1f6aadf8c572a21149a59d65adc49f2df5feeb6 (diff)
downloadgdb-b96e292732664fd8c63970ca11c3a9ac92f60ff9.zip
gdb-b96e292732664fd8c63970ca11c3a9ac92f60ff9.tar.gz
gdb-b96e292732664fd8c63970ca11c3a9ac92f60ff9.tar.bz2
gdb/
* linespec.c (symtab_from_filename): Also throw NOT_FOUND_ERROR if there are no symbols loaded, instead of throwing a generic error. (decode_variable): Likewise. gdb/testsuite/ * gdb.base/pending.exp: Test pending breakpoints without symbols loaded.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.base/pending.exp26
2 files changed, 31 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 8d7b7ff..110832d 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2008-08-20 Pedro Alves <pedro@codesourcery.com>
+
+ * gdb.base/pending.exp: Test pending breakpoints without symbols
+ loaded.
+
2008-08-19 Vladimir Prus <vladimir@codesourcery.com>
* lib/mi-support.exp (mi_expect_stop): Produce
diff --git a/gdb/testsuite/gdb.base/pending.exp b/gdb/testsuite/gdb.base/pending.exp
index bcca61e..48fe57f 100644
--- a/gdb/testsuite/gdb.base/pending.exp
+++ b/gdb/testsuite/gdb.base/pending.exp
@@ -54,6 +54,32 @@ if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != ""
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
+
+gdb_test_multiple "break pendfunc1" "set pending breakpoint" {
+ -re ".*Make breakpoint pending.*y or \\\[n\\\]. $" {
+ gdb_test "y" "Breakpoint.*pendfunc1.*pending." "set pending breakpoint (without symbols)"
+ }
+}
+
+gdb_test "info break" \
+ "Num Type\[ \]+Disp Enb Address\[ \]+What.*
+\[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*pendfunc1.*" \
+"single pending breakpoint info (without symbols)"
+
+gdb_load ${binfile}
+gdb_load_shlibs $lib_sl
+
+set pendfunc1_loc [gdb_get_line_number "y = x + 4" ${libfile}.c]
+gdb_test "run" \
+".*Breakpoint.*pendfunc1.*at.*pendshr.c:$pendfunc1_loc.*y = x \\+ 4.*" \
+"run to resolved breakpoint 1 (without symbols)"
+
+# Restart with a fresh gdb.
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+
gdb_load ${binfile}
gdb_load_shlibs $lib_sl