This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [PATCH] btrace: initiate teardown when closing record btrace target
- From: "Metzger, Markus T" <markus dot t dot metzger at intel dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Wed, 22 Jan 2014 09:34:50 +0000
- Subject: RE: [PATCH] btrace: initiate teardown when closing record btrace target
- Authentication-results: sourceware.org; auth=none
- References: <1390208421-6522-1-git-send-email-markus dot t dot metzger at intel dot com> <20140121141706 dot GA25775 at host2 dot jankratochvil dot net>
> -----Original Message-----
> From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] On Behalf Of Jan Kratochvil
> Sent: Tuesday, January 21, 2014 3:17 PM
> On Mon, 20 Jan 2014 10:00:21 +0100, Markus Metzger wrote:
> > In the remote case, the remote target that provides to_teardown_btrace
> > to free the GDB side resources has already been unpushed when threads
> > are destroyed. This results in a complaint "You can't do this ..." and
> > in a few bytes of memory leaked for each thread.
>
> Could you provide an example when this error happens?
>
> I can reproduce it with plain gdb+gdbserver but not with btrace functionality.
It happens with a simple hello-world.
$ gdbserver :2001 hello
$ gdb hello
(gdb) target remote :2001
...
(gdb) rec b
(gdb) kill
Kill the program being debugged? (y or n) y
You can't do that when your target is 'exec'.
(gdb)
When I set a breakpoint at tcomplain and go up, I'm in taret_teardown_btrace.
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