This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [patch] Fix cleanup in finish_command


> -----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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]