Page MenuHomePhabricator

Refactor GetSoftwareBreakpointTrapOpcode
ClosedPublic

Authored by ADodds on Feb 18 2016, 10:02 AM.

Details

Summary

This patch aims to reduce the code duplication among all of the platforms in GetSoftwareBreakpointTrapOpcode. Common code has been pushed into the Platform base class, and only special case platform code has been left in the derived platforms.

When remote debugging it can be the case that your current host platform will be queried for the trap opcode to use on the target, which currently lead to different results depending on the host lldb is running on. With this patch, platforms have a more unified view of trap opcodes for targets.

Some platforms however have specific/special case requirements so I should not have effected their functionality.

Do others think this is a usefull refactor, or have suggestions/feedback?

Diff Detail

Repository
rL LLVM

Event Timeline

ADodds updated this revision to Diff 48324.Feb 18 2016, 10:02 AM
ADodds retitled this revision from to Refactor GetSoftwareBreakpointTrapOpcode.
ADodds updated this object.
ADodds set the repository for this revision to rL LLVM.
ADodds added a subscriber: lldb-commits.
clayborg accepted this revision.Feb 18 2016, 5:18 PM
clayborg edited edge metadata.
This revision is now accepted and ready to land.Feb 18 2016, 5:18 PM
emaste edited edge metadata.Feb 18 2016, 5:23 PM

Nice work, happy to see this deduplication.

This revision was automatically updated to reflect the committed changes.