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 v8 17/24] record-btrace: provide xfer_partial target method


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


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