This is an archive of the discontinued LLVM Phabricator instance.

Add setting for breakpoint PC adjustment from remote stubs which don't back PC up.
ClosedPublic

Authored by EwanCrawford on Jun 26 2015, 11:53 AM.

Details

Summary

Currently m_breakpoint_pc_offset is only set using the python target definition file. This variable adjusts the PC for a breakpoint hit when the remote stub, like gdbserver, hasn't backed up the PC.

The introduction of reading XML target definition files from the remote however means that the XML target def has priority over the python target definition. So in cases where the XML is provided, the python target def isn't used. In such a situation there is no way to provide the breakpoint PC offset.

This patch allows the breakpoint offset variable to set using a settting. An alternative however could be to prioritize the python target definition, over the XML target definition.

Diff Detail

Repository
rL LLVM

Event Timeline

EwanCrawford retitled this revision from to Add setting for breakpoint PC adjustment from remote stubs which don't back PC up. .
EwanCrawford updated this object.
EwanCrawford edited the test plan for this revision. (Show Details)
EwanCrawford added a reviewer: clayborg.
EwanCrawford set the repository for this revision to rL LLVM.
EwanCrawford added subscribers: Unknown Object (MLST), deepak2427, ted.
clayborg requested changes to this revision.Jun 26 2015, 12:52 PM
clayborg edited edge metadata.

This isn't a setting anyone should be setting. I would recommend extending your target.xml if you have control over it, or also loading the target definition file and only taking what you need from it.

This revision now requires changes to proceed.Jun 26 2015, 12:52 PM

I wouldn't be opposed to prioritizing the target definition python file over the target.xml. Maybe we can do this:

1 - Use the target definition python file if one is specified
2 - If the target definition doesn't have any of the info from the target.xml (registers) then proceed to read the target.xml
3 - Fall back on the qRegisterInfo packets

EwanCrawford edited edge metadata.

Prioritizing the python target definition seems a cleaner solution.

clayborg accepted this revision.Jun 29 2015, 11:34 AM
clayborg edited edge metadata.

Looks good.

This revision is now accepted and ready to land.Jun 29 2015, 11:34 AM
This revision was automatically updated to reflect the committed changes.