This is an archive of the discontinued LLVM Phabricator instance.

gdb-remote: Centralize thread specific packet handling
ClosedPublic

Authored by labath on Aug 17 2016, 5:01 AM.

Details

Summary

Before this, each function had a copy of the code which handled appending of the thread suffix to
the packet (or using $Hg instead). I have moved that code into a single function and made
everyone else use that. The function takes the partial packet as a StreamString rvalue reference,
to avoid a copy and to remind the users that the packet will have undeterminate contents after
the call.

This also fixes the incorrect formatting of the QRestoreRegisterState packet in case thread
suffix is not supported.

Diff Detail

Repository
rL LLVM

Event Timeline

labath updated this revision to Diff 68337.Aug 17 2016, 5:01 AM
labath retitled this revision from to gdb-remote: Centralize thread specific packet handling.
labath updated this object.
labath added a reviewer: clayborg.
labath added a subscriber: lldb-commits.
clayborg accepted this revision.Aug 17 2016, 4:17 PM
clayborg edited edge metadata.

Looks good.

This revision is now accepted and ready to land.Aug 17 2016, 4:17 PM
This revision was automatically updated to reflect the committed changes.