Page MenuHomePhabricator

Turn off 'quit' confirmation in lldb-mi
ClosedPublic

Authored by ki.stfu on Mar 19 2015, 9:49 AM.

Details

Summary
  1. Turn off interpreter.prompt-on-quit on startup (MI)
  2. Add CommandInterpreter::SetPromptOnQuit
  3. Add SBCommandInterpreter::GetPromptOnQuit/SetPromptOnQuit

All tests pass on OS X.

Diff Detail

Event Timeline

ki.stfu updated this revision to Diff 22265.Mar 19 2015, 9:49 AM
ki.stfu retitled this revision from to Turn off 'quit' confirmation in lldb-mi.
ki.stfu updated this object.
ki.stfu edited the test plan for this revision. (Show Details)
ki.stfu added reviewers: abidh, clayborg.
ki.stfu added subscribers: abidh, clayborg, Unknown Object (MLST).

Friendly ping.

abidh accepted this revision.Mar 23 2015, 7:47 AM
abidh edited edge metadata.

MI part looks ok to me. Please wait for Greg to approve the rest.

This revision is now accepted and ready to land.Mar 23 2015, 7:47 AM
ki.stfu requested a review of this revision.Mar 23 2015, 7:54 AM
ki.stfu edited edge metadata.
In D8444#145131, @abidh wrote:

MI part looks ok to me. Please wait for Greg to approve the rest.

Thanks for review!

@clayborg, take a look please.

clayborg requested changes to this revision.Mar 23 2015, 10:34 AM
clayborg edited edge metadata.

Add the new API to the .i files as mentioned in the inline comments.

include/lldb/API/SBCommandInterpreter.h
222–226

You also need to add these to the SBCommandInterpreter.i file so they are available in python. If you have made any other lldb::SB changes in the last few weeks, you should go back and make sure to add any new functions to the appropriate .i file as well.

This revision now requires changes to proceed.Mar 23 2015, 10:34 AM
ki.stfu updated this revision to Diff 22518.Mar 23 2015, 2:38 PM
ki.stfu edited edge metadata.

Add GetPromptOnQuit/SetPromptOnQuit to SBCommandInterpreter.i

clayborg requested changes to this revision.Mar 23 2015, 2:53 PM
clayborg edited edge metadata.

Remove "const" as per inline comments.

include/lldb/API/SBCommandInterpreter.h
223

You can actually take the const off of this as it does nothing when your only member is an std::shared_ptr, std::auto_ptr or just a pointer. So please take off the const so it doesn't cause problems later. We should have no functions that return "const lldb::SB" objects.

scripts/Python/interface/SBCommandInterpreter.i
150

Remove const per above note.

source/API/SBCommandInterpreter.cpp
451

remove const

This revision now requires changes to proceed.Mar 23 2015, 2:53 PM

@clayborg, take a look again please.

include/lldb/API/SBCommandInterpreter.h
222–226

If you have made any other lldb::SB changes in the last few weeks, you should go back and make sure to add any new functions to the appropriate .i file as well.

Done.

$ svn commit
Sending        scripts/Python/interface/SBCommandInterpreter.i
Sending        scripts/Python/interface/SBModule.i
Sending        scripts/Python/interface/SBTarget.i
Transmitting file data ...
Committed revision 233029.
ki.stfu added inline comments.Mar 23 2015, 3:03 PM
include/lldb/API/SBCommandInterpreter.h
223

I saw the same thing in scripts/Python/interface/SBTarget.i:

bool
IsValid() const;

Should we remove the 'const' here?

No, don't change any existing API. Unfortunately by the time we caught this one, it was out in the wild and we had programs linking against it. Just make sure to not add const to any new API.

ki.stfu added inline comments.Mar 23 2015, 3:08 PM
include/lldb/API/SBCommandInterpreter.h
27–67

or here?

101–102

or here?

No, don't change any existing API. Unfortunately by the time we caught this one, it was out in the wild and we had programs linking against it. Just make sure to not add const to any new API.

ok.

ki.stfu updated this revision to Diff 22522.Mar 23 2015, 3:13 PM
ki.stfu edited edge metadata.

Remove the const from SBxxx methods

clayborg accepted this revision.Mar 23 2015, 3:42 PM
clayborg edited edge metadata.

Looks good.

This revision is now accepted and ready to land.Mar 23 2015, 3:42 PM
ki.stfu closed this revision.Mar 23 2015, 3:47 PM