[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-dejagnu] [PATCH] gdb-comm: Script confusion with a pending breakpoi
From: |
Maciej W. Rozycki |
Subject: |
[Bug-dejagnu] [PATCH] gdb-comm: Script confusion with a pending breakpoint |
Date: |
Tue, 9 Jun 2009 01:18:58 +0100 (BST) |
User-agent: |
Alpine 1.10 (DEB 962 2008-03-14) |
Hello,
With the mips-sde-elf target I observe a problem with a test script from
the binutils testsuite looping as follows:
(gdb) file tmpdir/striprog
Reading symbols from [...]/tmpdir/striprog...(no debugging symbols
found)...done.
(gdb) break _exit
Function "_exit" not defined.
Make breakpoint pending on future shared library load? (y or [n]) break
exit
Please answer y or [n].
Make breakpoint pending on future shared library load? (y or [n]) break
abort
Please answer y or [n].
Make breakpoint pending on future shared library load? (y or [n]) target
mdi 15:2
Please answer y or [n].
Make breakpoint pending on future shared library load? (y or [n]) WARNING:
Unable to connect to 15:2 with GDB.
quit
Please answer y or [n].
Make breakpoint pending on future shared library load? (y or [n])
Rebooting mipssim-sde
In this case the binary has been stripped, so no surprise there is no
_exit symbol to place a breakpoint on. As seen from config/gdb-comm.exp
the breakpoint is used to catch a runaway debugger only, so it is safe to
skip it if it cannot be set straight away; the return status from the
function may be used for further processing if need be.
The following patch fixes the problem for me.
2009-06-08 Maciej W. Rozycki <address@hidden>
* config/gdb-comm.exp (gdb_comm_add_breakpoint): Handle pending
breakpoints.
Please apply.
Maciej
dejagnu-1.4.99-gdb-comm-1.patch
diff --git a/config/gdb-comm.exp b/config/gdb-comm.exp
index b7dbfc3..3d46011 100644
--- a/config/gdb-comm.exp
+++ b/config/gdb-comm.exp
@@ -200,6 +200,10 @@ proc gdb_comm_add_breakpoint { function } {
-re "Breakpoint.*$gdb_prompt $" { return "" }
-re "Function.*not defined.*$gdb_prompt $" { return "undef" }
-re "No symbol table.*$gdb_prompt $" { return "undef" }
+ -re ".*Make breakpoint pending.*\\\? \\(y or \\\[n\\\]\\) $" {
+ remote_send host "y\n"
+ return "maybe"
+ }
default {
return "untested"
}
- [Bug-dejagnu] [PATCH] gdb-comm: Script confusion with a pending breakpoint,
Maciej W. Rozycki <=