[Lldb-commits] [lldb] r140819 - /lldb/trunk/source/Commands/CommandObjectFrame.cpp

Jason Molenda jmolenda at apple.com
Thu Sep 29 16:02:42 PDT 2011


Author: jmolenda
Date: Thu Sep 29 18:02:41 2011
New Revision: 140819

URL: http://llvm.org/viewvc/llvm-project?rev=140819&view=rev
Log:
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.


Modified:
    lldb/trunk/source/Commands/CommandObjectFrame.cpp

Modified: lldb/trunk/source/Commands/CommandObjectFrame.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectFrame.cpp?rev=140819&r1=140818&r2=140819&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectFrame.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectFrame.cpp Thu Sep 29 18:02:41 2011
@@ -248,6 +248,12 @@
                     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");





More information about the lldb-commits mailing list