Page MenuHomePhabricator

Better handle the arguments common to all MI commands.
ClosedPublic

Authored by abidh on Oct 29 2015, 7:45 AM.

Details

Summary

I observed that eclipse was passing --thread-group for many other commands
then we are currently handling. Looking at the MI documentation, the
following link states that each MI command accept the --thread and
--frame option. Looking at the GDB implementation, it seems that apart
from these 2, --thread-group is also handled the same way.

https://sourceware.org/gdb/onlinedocs/gdb/Context-management.html#Context-management

So instead of handling those arguments in every comamnds, I have moved
them into the base class and removed them from elsewhere. Now any command
can use these arguments. The patch seems big but most of the changes are
mechanical.

Diff Detail

Event Timeline

abidh updated this revision to Diff 38738.Oct 29 2015, 7:45 AM
abidh retitled this revision from to Better handle the arguments common to all MI commands..
abidh updated this object.
abidh added a reviewer: ki.stfu.
abidh added a subscriber: lldb-commits.
ki.stfu added inline comments.Oct 29 2015, 8:16 AM
tools/lldb-mi/MICmdBase.h
68

How about renaming it to AddCommonArgs and making it protected?

tools/lldb-mi/MICmdInvoker.cpp
192

nic: add a space please

abidh updated this revision to Diff 38741.Oct 29 2015, 8:25 AM

Handled review comments.

abidh marked an inline comment as done.Oct 29 2015, 8:27 AM
abidh added inline comments.
tools/lldb-mi/MICmdBase.h
68

Changed name. But it cant be protected as it is called from the outside.

tools/lldb-mi/MICmdInvoker.cpp
192

Done.

ki.stfu accepted this revision.Oct 29 2015, 9:06 AM
ki.stfu edited edge metadata.

LGTM

tools/lldb-mi/MICmdBase.h
68

OK

This revision is now accepted and ready to land.Oct 29 2015, 9:06 AM
abidh closed this revision.Oct 29 2015, 9:33 AM
abidh marked an inline comment as done.