<rdar://problem/11852100>
The "stop-line-count-after" and "stop-line-count-before" settings are broken. This fixes them. llvm-svn: 160071
This commit is contained in:
parent
1fa2acaed4
commit
53eb7ad2f7
|
@ -167,9 +167,7 @@ public:
|
|||
bool
|
||||
GetStatus (Stream &strm,
|
||||
bool show_frame_info,
|
||||
bool show_source,
|
||||
uint32_t source_lines_before,
|
||||
uint32_t source_lines_after);
|
||||
bool show_source);
|
||||
|
||||
protected:
|
||||
friend class StackFrameList;
|
||||
|
|
|
@ -76,9 +76,7 @@ public:
|
|||
uint32_t first_frame,
|
||||
uint32_t num_frames,
|
||||
bool show_frame_info,
|
||||
uint32_t num_frames_with_source,
|
||||
uint32_t source_lines_before,
|
||||
uint32_t source_lines_after);
|
||||
uint32_t num_frames_with_source);
|
||||
|
||||
protected:
|
||||
|
||||
|
|
|
@ -762,9 +762,7 @@ public:
|
|||
uint32_t first_frame,
|
||||
uint32_t num_frames,
|
||||
bool show_frame_info,
|
||||
uint32_t num_frames_with_source,
|
||||
uint32_t source_lines_before,
|
||||
uint32_t source_lines_after);
|
||||
uint32_t num_frames_with_source);
|
||||
|
||||
// We need a way to verify that even though we have a thread in a shared
|
||||
// pointer that the object itself is still valid. Currently this won't be
|
||||
|
|
|
@ -282,14 +282,7 @@ protected:
|
|||
|
||||
bool show_frame_info = true;
|
||||
bool show_source = !already_shown;
|
||||
Debugger &debugger = m_interpreter.GetDebugger();
|
||||
const uint32_t source_lines_before = debugger.GetStopSourceLineCount(true);
|
||||
const uint32_t source_lines_after = debugger.GetStopSourceLineCount(false);
|
||||
if (frame->GetStatus (result.GetOutputStream(),
|
||||
show_frame_info,
|
||||
show_source,
|
||||
source_lines_before,
|
||||
source_lines_after))
|
||||
if (frame->GetStatus (result.GetOutputStream(), show_frame_info, show_source))
|
||||
{
|
||||
result.SetStatus (eReturnStatusSuccessFinishResult);
|
||||
return result.Succeeded();
|
||||
|
|
|
@ -2630,7 +2630,7 @@ DebuggerInstanceSettings::UpdateInstanceSettingsVariable (const ConstString &var
|
|||
if (new_value != UINT32_MAX)
|
||||
m_stop_source_before_count = new_value;
|
||||
else
|
||||
err.SetErrorStringWithFormat("invalid unsigned string value '%s' for the '%s' setting", value, StopSourceContextAfterName ().GetCString());
|
||||
err.SetErrorStringWithFormat("invalid unsigned string value '%s' for the '%s' setting", value, StopSourceContextBeforeName ().GetCString());
|
||||
}
|
||||
else if (var_name == StopSourceContextAfterName ())
|
||||
{
|
||||
|
@ -2638,7 +2638,7 @@ DebuggerInstanceSettings::UpdateInstanceSettingsVariable (const ConstString &var
|
|||
if (new_value != UINT32_MAX)
|
||||
m_stop_source_after_count = new_value;
|
||||
else
|
||||
err.SetErrorStringWithFormat("invalid unsigned string value '%s' for the '%s' setting", value, StopSourceContextBeforeName ().GetCString());
|
||||
err.SetErrorStringWithFormat("invalid unsigned string value '%s' for the '%s' setting", value, StopSourceContextAfterName ().GetCString());
|
||||
}
|
||||
else if (var_name == StopDisassemblyCountName ())
|
||||
{
|
||||
|
@ -2703,13 +2703,13 @@ DebuggerInstanceSettings::GetInstanceSettingsValue (const SettingEntry &entry,
|
|||
else if (var_name == StopSourceContextAfterName ())
|
||||
{
|
||||
StreamString strm;
|
||||
strm.Printf ("%u", m_stop_source_before_count);
|
||||
strm.Printf ("%u", m_stop_source_after_count);
|
||||
value.AppendString (strm.GetData());
|
||||
}
|
||||
else if (var_name == StopSourceContextBeforeName ())
|
||||
{
|
||||
StreamString strm;
|
||||
strm.Printf ("%u", m_stop_source_after_count);
|
||||
strm.Printf ("%u", m_stop_source_before_count);
|
||||
value.AppendString (strm.GetData());
|
||||
}
|
||||
else if (var_name == StopDisassemblyCountName ())
|
||||
|
|
|
@ -1296,10 +1296,9 @@ StackFrame::HasCachedData () const
|
|||
bool
|
||||
StackFrame::GetStatus (Stream& strm,
|
||||
bool show_frame_info,
|
||||
bool show_source,
|
||||
uint32_t source_lines_before,
|
||||
uint32_t source_lines_after)
|
||||
bool show_source)
|
||||
{
|
||||
|
||||
if (show_frame_info)
|
||||
{
|
||||
strm.Indent();
|
||||
|
@ -1312,7 +1311,14 @@ StackFrame::GetStatus (Stream& strm,
|
|||
bool have_source = false;
|
||||
DebuggerInstanceSettings::StopDisassemblyType disasm_display = DebuggerInstanceSettings::eStopDisassemblyTypeNever;
|
||||
Target *target = exe_ctx.GetTargetPtr();
|
||||
if (target && (source_lines_before || source_lines_after))
|
||||
if (target)
|
||||
{
|
||||
Debugger &debugger = target->GetDebugger();
|
||||
const uint32_t source_lines_before = debugger.GetStopSourceLineCount(true);
|
||||
const uint32_t source_lines_after = debugger.GetStopSourceLineCount(false);
|
||||
disasm_display = debugger.GetStopDisassemblyDisplay ();
|
||||
|
||||
if (source_lines_before > 0 || source_lines_after > 0)
|
||||
{
|
||||
GetSymbolContext(eSymbolContextCompUnit | eSymbolContextLineEntry);
|
||||
|
||||
|
@ -1328,9 +1334,7 @@ StackFrame::GetStatus (Stream& strm,
|
|||
have_source = true;
|
||||
}
|
||||
}
|
||||
disasm_display = target->GetDebugger().GetStopDisassemblyDisplay ();
|
||||
}
|
||||
|
||||
switch (disasm_display)
|
||||
{
|
||||
case DebuggerInstanceSettings::eStopDisassemblyTypeNever:
|
||||
|
@ -1343,7 +1347,7 @@ StackFrame::GetStatus (Stream& strm,
|
|||
case DebuggerInstanceSettings::eStopDisassemblyTypeAlways:
|
||||
if (target)
|
||||
{
|
||||
const uint32_t disasm_lines = target->GetDebugger().GetDisassemblyLineCount();
|
||||
const uint32_t disasm_lines = debugger.GetDisassemblyLineCount();
|
||||
if (disasm_lines > 0)
|
||||
{
|
||||
const ArchSpec &target_arch = target->GetArchitecture();
|
||||
|
@ -1364,6 +1368,7 @@ StackFrame::GetStatus (Stream& strm,
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -587,9 +587,7 @@ StackFrameList::GetStatus (Stream& strm,
|
|||
uint32_t first_frame,
|
||||
uint32_t num_frames,
|
||||
bool show_frame_info,
|
||||
uint32_t num_frames_with_source,
|
||||
uint32_t source_lines_before,
|
||||
uint32_t source_lines_after)
|
||||
uint32_t num_frames_with_source)
|
||||
{
|
||||
size_t num_frames_displayed = 0;
|
||||
|
||||
|
@ -614,9 +612,7 @@ StackFrameList::GetStatus (Stream& strm,
|
|||
|
||||
if (!frame_sp->GetStatus (strm,
|
||||
show_frame_info,
|
||||
num_frames_with_source > first_frame - frame_idx,
|
||||
source_lines_before,
|
||||
source_lines_after))
|
||||
num_frames_with_source > (first_frame - frame_idx)))
|
||||
break;
|
||||
++num_frames_displayed;
|
||||
}
|
||||
|
|
|
@ -1321,16 +1321,12 @@ Thread::GetStatus (Stream &strm, uint32_t start_frame, uint32_t num_frames, uint
|
|||
strm.IndentMore();
|
||||
|
||||
const bool show_frame_info = true;
|
||||
const uint32_t source_lines_before = 3;
|
||||
const uint32_t source_lines_after = 3;
|
||||
strm.IndentMore ();
|
||||
num_frames_shown = GetStackFrameList ()->GetStatus (strm,
|
||||
start_frame,
|
||||
num_frames,
|
||||
show_frame_info,
|
||||
num_frames_with_source,
|
||||
source_lines_before,
|
||||
source_lines_after);
|
||||
num_frames_with_source);
|
||||
strm.IndentLess();
|
||||
strm.IndentLess();
|
||||
}
|
||||
|
@ -1342,17 +1338,13 @@ Thread::GetStackFrameStatus (Stream& strm,
|
|||
uint32_t first_frame,
|
||||
uint32_t num_frames,
|
||||
bool show_frame_info,
|
||||
uint32_t num_frames_with_source,
|
||||
uint32_t source_lines_before,
|
||||
uint32_t source_lines_after)
|
||||
uint32_t num_frames_with_source)
|
||||
{
|
||||
return GetStackFrameList()->GetStatus (strm,
|
||||
first_frame,
|
||||
num_frames,
|
||||
show_frame_info,
|
||||
num_frames_with_source,
|
||||
source_lines_before,
|
||||
source_lines_after);
|
||||
num_frames_with_source);
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
Loading…
Reference in New Issue