This is an archive of the discontinued LLVM Phabricator instance.

Add new SBTarget::IsDummy method.
AbandonedPublic

Authored by apolyakov on Jun 29 2018, 9:08 AM.

Details

Summary

The new member function allows to check if a target is dummy or real.
It is useful for commands that can't be executed on the dummy target.
For instance: symbol-list-lines command.

Diff Detail

Event Timeline

apolyakov created this revision.Jun 29 2018, 9:08 AM
brucem requested changes to this revision.Jun 29 2018, 9:45 AM
brucem added a subscriber: brucem.
brucem added inline comments.
include/lldb/API/SBTarget.h
65

Could you add a doc comment here explaining it?

scripts/interface/SBTarget.i
85

And here as well?

This revision now requires changes to proceed.Jun 29 2018, 9:45 AM
apolyakov edited the summary of this revision. (Show Details)

Added description to source files and commit message.

Is the dummy target something we need to expose over the SBAPI?
I see that other places in lldb-mi query if (sbTarget == rSessionInfo.GetDebugger().GetDummyTarget()). Would that be sufficient?

I think we can remove comments added by me and commit patch as it is. Any thoughts about it?

Have you seen my earlier question:

Is the dummy target something we need to expose over the SBAPI?
I see that other places in lldb-mi query if (sbTarget == rSessionInfo.GetDebugger().GetDummyTarget()).
Would that be sufficient?

It's hard to choose something, both variants are good enough. But, if there is no necessity in such a method, we can drop it.

Okay then let's not do this for now. It's fine to revisit this later if there turns out to be a good use-case for it, but every SBAPI call we introduce has to be supported indefinitely and can therefore be quite expensive to maintain.

apolyakov abandoned this revision.Jul 2 2018, 6:17 PM

Abandoned since suggested functionality is optional.