diff options
author | Markus Metzger <mmetzger@sourceware.org> | 2013-03-26 07:15:09 +0000 |
---|---|---|
committer | Markus Metzger <mmetzger@sourceware.org> | 2013-03-26 07:15:09 +0000 |
commit | 99c819eea0b33989b8482c8059a5df28c8fec8f4 (patch) | |
tree | 29b0e480fbf899e500b69ba5eb96c0095ab16c62 /gdb | |
parent | ffd65175b8323bbfba7fce227b23f6a22294fdda (diff) | |
download | gdb-99c819eea0b33989b8482c8059a5df28c8fec8f4.zip gdb-99c819eea0b33989b8482c8059a5df28c8fec8f4.tar.gz gdb-99c819eea0b33989b8482c8059a5df28c8fec8f4.tar.bz2 |
record-btrace: fix assertion when enabling recording after re-run
Reading symbols from /bin/true...(no debugging symbols found)...done.
(gdb) b _start
Function "_start" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (_start) pending.
(gdb) r
Starting program: /bin/true
Breakpoint 1, 0x00000039a0400af0 in _start () from /lib64/ld-linux-x86-64.so.2
(gdb) rec b
(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /bin/true
Breakpoint 1, 0x00000039a0400af0 in _start () from /lib64/ld-linux-x86-64.so.2
(gdb) rec b
gdb/record-btrace.c:154: internal-error: record_btrace_open:
Assertion `record_btrace_thread_observer == NULL' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n)
gdb/
* record-btrace.c (record_btrace_close): Call
record_btrace_auto_disable.
testsuite/
* gdb.btrace/enable.exp: Add regression test.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/record-btrace.c | 4 | ||||
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.btrace/enable.exp | 11 |
4 files changed, 24 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c0054b8..1233bd7 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2013-03-26 Markus Metzger <markus.t.metzger@intel.com> + + * record-btrace.c (record_btrace_close): Call + record_btrace_auto_disable. + 2013-03-25 Joel Brobecker <brobecker@adacore.com> * rs6000-nat.c (fixup_breakpoints): Delete declaration. diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c index e85de5e..8fb413e 100644 --- a/gdb/record-btrace.c +++ b/gdb/record-btrace.c @@ -192,6 +192,10 @@ record_btrace_stop_recording (void) static void record_btrace_close (void) { + /* Make sure automatic recording gets disabled even if we did not stop + recording before closing the record-btrace target. */ + record_btrace_auto_disable (); + /* We already stopped recording. */ } diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index ad4fd40..bff8f30 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2013-03-26 Markus Metzger <markus.t.metzger@intel.com> + + * gdb.btrace/enable.exp: Add regression test. + 2013-03-25 Tom Tromey <tromey@redhat.com> * gdb.cp/m-static.exp: Add destructor-printing tests. diff --git a/gdb/testsuite/gdb.btrace/enable.exp b/gdb/testsuite/gdb.btrace/enable.exp index f3acbf8..2e23e41 100644 --- a/gdb/testsuite/gdb.btrace/enable.exp +++ b/gdb/testsuite/gdb.btrace/enable.exp @@ -82,3 +82,14 @@ if ![runto_main] { if ![runto_main] { return -1 } + +# make sure record-btrace can be enabled after re-run +clean_restart $testfile +if ![runto_main] { + return -1 +} +gdb_test_no_output "record btrace" +if ![runto_main] { + return -1 +} +gdb_test_no_output "record btrace" "enable after re-run" |