aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectFrame.cpp
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2011-09-29 23:02:41 +0000
committerJason Molenda <jmolenda@apple.com>2011-09-29 23:02:41 +0000
commit82d4a2b91f3fe7ae5937e361aba1df1b882c3de2 (patch)
tree155813838588dd94fe3080dd79197a637c7ae135 /lldb/source/Commands/CommandObjectFrame.cpp
parent6b854c5d37181a055a1ae0cc90b700c198e609ac (diff)
downloadllvm-82d4a2b91f3fe7ae5937e361aba1df1b882c3de2.zip
llvm-82d4a2b91f3fe7ae5937e361aba1df1b882c3de2.tar.gz
llvm-82d4a2b91f3fe7ae5937e361aba1df1b882c3de2.tar.bz2
Add an additional "frame select" usage where it will re-select the current frame
if no frame is specified. This is useful to get the source context lines re-displayed when you need a reminder of where you are in the source currently. llvm-svn: 140819
Diffstat (limited to 'lldb/source/Commands/CommandObjectFrame.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectFrame.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lldb/source/Commands/CommandObjectFrame.cpp b/lldb/source/Commands/CommandObjectFrame.cpp
index 28ac841..4790eef 100644
--- a/lldb/source/Commands/CommandObjectFrame.cpp
+++ b/lldb/source/Commands/CommandObjectFrame.cpp
@@ -248,6 +248,12 @@ public:
const char *frame_idx_cstr = command.GetArgumentAtIndex(0);
frame_idx = Args::StringToUInt32 (frame_idx_cstr, UINT32_MAX, 0);
}
+ if (command.GetArgumentCount() == 0)
+ {
+ frame_idx = thread->GetSelectedFrameIndex ();
+ if (frame_idx == UINT32_MAX)
+ frame_idx = 0;
+ }
else
{
result.AppendError ("invalid arguments.\n");