This is an archive of the discontinued LLVM Phabricator instance.

Remove the last manually constructed packet from gdb-remote register context + small refactor
ClosedPublic

Authored by labath on Aug 18 2016, 6:03 AM.

Details

Summary

The tricky part here was that the exisiting implementation of WriteAllRegisters was expecting
hex-encoded data (as that was what the first implementation I replaced was using, but here we had
binary data to begin with. I thought the read/write register functions would be more useful if
they handled the hex-encoding themselves (all the other client functions provide the responses in
a more-or-less digested form). The read functions return a DataBuffer, so they can allocate as
much memory as they need to, while the write functions functions take an llvm::ArrayRef, as that
can be constructed from pretty much anything.

Diff Detail

Event Timeline

labath updated this revision to Diff 68525.Aug 18 2016, 6:03 AM
labath retitled this revision from to Remove the last manually constructed packet from gdb-remote register context + small refactor.
labath updated this object.
labath added a reviewer: clayborg.
labath added a subscriber: lldb-commits.
clayborg accepted this revision.Aug 18 2016, 10:28 AM
clayborg edited edge metadata.

Looks good!

This revision is now accepted and ready to land.Aug 18 2016, 10:28 AM
This revision was automatically updated to reflect the committed changes.