This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [patch] Fix cleanup in finish_command
- From: "Metzger, Markus T" <markus dot t dot metzger at intel dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: Joel Brobecker <brobecker at adacore dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, "Pedro Alves (palves at redhat dot com)" <palves at redhat dot com>
- Date: Fri, 21 Jun 2013 08:03:21 +0000
- Subject: RE: [patch] Fix cleanup in finish_command
- References: <20130619211444 dot GA29379 at host2 dot jankratochvil dot net> <20130620143118 dot GA11929 at host2 dot jankratochvil dot net> <20130620151806 dot GD4724 at adacore dot com> <A78C989F6D9628469189715575E55B230A96FABA at IRSMSX104 dot ger dot corp dot intel dot com> <20130620161945 dot GA16142 at host2 dot jankratochvil dot net>
> -----Original Message-----
> From: Jan Kratochvil [mailto:jan.kratochvil@redhat.com]
> Sent: Thursday, June 20, 2013 6:20 PM
> Unrelated:
> There is testcase FAILing randomly, reproducible with "read1.so" from:
> http://sourceware.org/bugzilla/show_bug.cgi?id=12649
> Running ./gdb.btrace/exception.exp ...
> FAIL: gdb.btrace/exception.exp: exception - flat (timeout)
I do not think that this is an actual issue. It runs into a timeout because
there is so much memory to read.
When I add to my board file:
set_board_info gdb,timeout 8000
it takes a very long time, but the test eventually passes.
> > Can you point me to a specific test where this happens?
>
> Each time with: gdb.btrace/tailcall.exp
I don't get a core file, but I was able to reproduce the bug.
You need to "record btrace", then navigate in the trace using the "finish"
command. When the inferior then terminates (either by killing it or by
continuing to its end), you get the SEGV in delete_breakpoint.
When I remove the throw_error() in record-btrace.c's to_fetch_registers
function (and just return), the bug disappears.
Looks like someone isn't expecting an error from this function. Likely the
"finish" command or some code used by that command. Maybe "finish" is
caught by this exception before it can clean up its breakpoint correctly.
Am I allowed to throw_error() in target functions?
Or should I just warn and return normally?
Or just return and not even warn?
Regards,
Markus.
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052