Fixed an issue with:

(lldb) frame variable --location

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

llvm-svn: 114266
This commit is contained in:
Greg Clayton 2010-09-18 04:00:06 +00:00
parent ed8a705cea
commit f5fb427d85
3 changed files with 11 additions and 4 deletions

View File

@ -330,7 +330,7 @@ public:
//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());

View File

@ -772,9 +772,9 @@ g_duo_running_mode[] =
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 }
};

View File

@ -105,6 +105,13 @@ ValueObjectVariable::UpdateValue (ExecutionContextScope *exe_scope)
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;