[Lldb-commits] [lldb] r114266 - in /lldb/trunk/source: Commands/CommandObjectFrame.cpp Commands/CommandObjectThread.cpp Core/ValueObjectVariable.cpp

Greg Clayton gclayton at apple.com
Fri Sep 17 21:00:06 PDT 2010


Author: gclayton
Date: Fri Sep 17 23:00:06 2010
New Revision: 114266

URL: http://llvm.org/viewvc/llvm-project?rev=114266&view=rev
Log:
Fixed an issue with:

(lldb) frame variable --location

Where the address of variables wasn't being formatted consistently.


Modified:
    lldb/trunk/source/Commands/CommandObjectFrame.cpp
    lldb/trunk/source/Commands/CommandObjectThread.cpp
    lldb/trunk/source/Core/ValueObjectVariable.cpp

Modified: lldb/trunk/source/Commands/CommandObjectFrame.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectFrame.cpp?rev=114266&r1=114265&r2=114266&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectFrame.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectFrame.cpp Fri Sep 17 23:00:06 2010
@@ -330,7 +330,7 @@
             //const char *loc_cstr = valobj->GetLocationAsCString();
             if (m_options.show_location)
             {
-                s.Printf("@ %s: ", valobj->GetLocationAsCString(exe_scope));
+                s.Printf("%s: ", valobj->GetLocationAsCString(exe_scope));
             }
             if (m_options.debug)
                 s.Printf ("%p ValueObject{%u} ", valobj, valobj->GetID());

Modified: lldb/trunk/source/Commands/CommandObjectThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectThread.cpp?rev=114266&r1=114265&r2=114266&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectThread.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectThread.cpp Fri Sep 17 23:00:06 2010
@@ -772,9 +772,9 @@
 lldb::OptionDefinition
 CommandObjectThreadStepWithTypeAndScope::CommandOptions::g_option_table[] =
 {
-{ LLDB_OPT_SET_1, false, "avoid-no-debug",  'a', required_argument, NULL,               0, "<bool>",    "A boolean value that sets whether step-in will step over functions with no debug information."},
-{ LLDB_OPT_SET_1, false, "run-mode",        'm', required_argument, g_tri_running_mode, 0, "<run-mode>","Determine how to run other threads while stepping the current thread."},
-{ LLDB_OPT_SET_1, false, "step-over-regexp",'r', required_argument, NULL,               0, "<regexp>",  "A regular expression that defines function names to step over."},
+{ LLDB_OPT_SET_1, false, "avoid-no-debug",  'a', required_argument, NULL,               0, "<bool>",     "A boolean value that sets whether step-in will step over functions with no debug information."},
+{ LLDB_OPT_SET_1, false, "run-mode",        'm', required_argument, g_tri_running_mode, 0, "<run-mode>", "Determine how to run other threads while stepping the current thread."},
+{ LLDB_OPT_SET_1, false, "step-over-regexp",'r', required_argument, NULL,               0, "<regexp>",   "A regular expression that defines function names to step over."},
 { 0, false, NULL, 0, 0, NULL, 0, NULL, NULL }
 };
 

Modified: lldb/trunk/source/Core/ValueObjectVariable.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectVariable.cpp?rev=114266&r1=114265&r2=114266&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectVariable.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectVariable.cpp Fri Sep 17 23:00:06 2010
@@ -105,6 +105,13 @@
     DWARFExpression &expr = variable->LocationExpression();
     lldb::addr_t loclist_base_load_addr = LLDB_INVALID_ADDRESS;
     ExecutionContext exe_ctx (exe_scope);
+    
+    if (exe_ctx.process)
+    {
+        m_data.SetByteOrder(exe_ctx.process->GetByteOrder());
+        m_data.SetAddressByteSize(exe_ctx.process->GetAddressByteSize());
+    }
+
     if (expr.IsLocationList())
     {
         SymbolContext sc;





More information about the lldb-commits mailing list