This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [patch v8 17/24] record-btrace: provide xfer_partial target method
- From: "Metzger, Markus T" <markus dot t dot metzger at intel dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: "jan dot kratochvil at redhat dot com" <jan dot kratochvil at redhat dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Wed, 18 Dec 2013 09:24:14 +0000
- Subject: RE: [patch v8 17/24] record-btrace: provide xfer_partial target method
- Authentication-results: sourceware.org; auth=none
- References: <1386839747-8860-1-git-send-email-markus dot t dot metzger at intel dot com> <1386839747-8860-18-git-send-email-markus dot t dot metzger at intel dot com> <52AB555A dot 3070301 at redhat dot com> <A78C989F6D9628469189715575E55B230AA38C53 at IRSMSX104 dot ger dot corp dot intel dot com> <52AF5188 dot 9040800 at redhat dot com> <A78C989F6D9628469189715575E55B230AA395A5 at IRSMSX104 dot ger dot corp dot intel dot com> <52B08240 dot 7060400 at redhat dot com>
> -----Original Message-----
> From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] On Behalf Of Pedro Alves
> > I have something to temporarily disable the xfer checks during
> > to_insert_breakpoint and to_remove_breakpoint.
> >
> > Not sure whether this is considered too hacky or what else I'm missing.
>
> It's hacky as the breakpoints in memory will never actually
> trigger/execute. If you want to assume that the inferior's current
> read only sections match exactly the read only sections the program
> had when the trace was taken, I won't insist. The assumption will
> fail across tracing e.g., dlopen/dlclose/mmap/unmmap, as breakpoints
> will fail to insert on unmapped sections.
Right. I might as well just ignore insert and remove breakpoints.
When I do that, however, I might leak breakpoint instructions for
breakpoints that have been deleted while replaying. Or I might end
up with breakpoints that have not been properly inserted.
The easiest choice seems to be to actually insert and remove breakpoint
instructions into the target memory.
This will fail if the current process image does not match the process
image at the time of the recorded execution. This is currently not
supported and will fail for various other reasons, as well. For one,
I won't be able to disassemble instructions that are no longer there
or might have been replaced meanwhile.
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