RE: [patch v8 17/24] record-btrace: provide xfer_partial target method

Metzger, Markus T
2013-12-16T10:53:59Z

> -----Original Message-----
> From: Pedro Alves [mailto:palves@redhat.com]
> Sent: Friday, December 13, 2013 7:44 PM

> I must be missing something, but won't raw_memory_xfer_partial
> keep trying in the target beneath, anyway?

You're right. This function did not have any effect - and that was good;
at least to some extent. Thanks for pointing this out!

I changed the return -1 to throw_error (...) and added a check for
writebuf != NULL. Suddenly I got tons of errors when GDB can't insert
breakpoints any longer for (reverse-)stepping. Also stepping gets broken.

I still get the nice <unavailable> for function parameters. This fails
already when trying to access the SP for computing the CFA.

I now get an error when trying to access a variable with static storage
duration or when trying to access memory directly via its address.
It would be nice to also get an <unavailable> in those cases. This would
require the respective layer to catch my exception.

To avoid those errors when trying to set breakpoints, I could try
providing to_insert_breakpoint and to_remove_breakpoint methods
and maintain my own breakpoints.

Breakpoint conditions would still fail. Not sure what else I'm missing.

Any better idea?

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