mirror of
https://github.com/intel/llvm.git
synced 2026-01-15 12:25:46 +08:00
Remove unnecessary/inappropriate output-printing functions from
the API. llvm-svn: 113993
This commit is contained in:
@@ -218,106 +218,6 @@ SBThread::GetQueueName () const
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SBThread::DisplayFramesForSelectedContext (FILE *out,
|
||||
FILE *err,
|
||||
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)
|
||||
{
|
||||
if ((out == NULL) || (err == NULL))
|
||||
return;
|
||||
|
||||
if (m_opaque_sp)
|
||||
{
|
||||
uint32_t num_stack_frames = m_opaque_sp->GetStackFrameCount ();
|
||||
StackFrameSP frame_sp;
|
||||
uint32_t frame_idx = 0;
|
||||
|
||||
for (frame_idx = first_frame; frame_idx < first_frame + num_frames; ++frame_idx)
|
||||
{
|
||||
if (frame_idx >= num_stack_frames)
|
||||
break;
|
||||
|
||||
frame_sp = m_opaque_sp->GetStackFrameAtIndex (frame_idx);
|
||||
if (!frame_sp)
|
||||
break;
|
||||
|
||||
SBFrame sb_frame (frame_sp);
|
||||
if (DisplaySingleFrameForSelectedContext (out,
|
||||
err,
|
||||
sb_frame,
|
||||
show_frame_info,
|
||||
num_frames_with_source > first_frame - frame_idx,
|
||||
source_lines_before,
|
||||
source_lines_after) == false)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
SBThread::DisplaySingleFrameForSelectedContext (FILE *out,
|
||||
FILE *err,
|
||||
SBFrame &frame,
|
||||
bool show_frame_info,
|
||||
bool show_source,
|
||||
uint32_t source_lines_after,
|
||||
uint32_t source_lines_before)
|
||||
{
|
||||
bool success = false;
|
||||
|
||||
if ((out == NULL) || (err == NULL))
|
||||
return false;
|
||||
|
||||
if (m_opaque_sp && frame.IsValid())
|
||||
{
|
||||
StreamFile str (out);
|
||||
|
||||
SBSymbolContext sc(frame.GetSymbolContext(eSymbolContextEverything));
|
||||
|
||||
if (show_frame_info && sc.IsValid())
|
||||
{
|
||||
user_id_t frame_idx = (user_id_t) frame.GetFrameID();
|
||||
lldb::addr_t pc = frame.GetPC();
|
||||
::fprintf (out,
|
||||
" frame #%u: tid = 0x%4.4x, pc = 0x%llx ",
|
||||
frame_idx,
|
||||
GetThreadID(),
|
||||
(long long)pc);
|
||||
sc->DumpStopContext (&str, &m_opaque_sp->GetProcess(), *frame.GetPCAddress(), false, true, false);
|
||||
fprintf (out, "\n");
|
||||
success = true;
|
||||
}
|
||||
|
||||
SBCompileUnit comp_unit(sc.GetCompileUnit());
|
||||
if (show_source && comp_unit.IsValid())
|
||||
{
|
||||
success = false;
|
||||
SBLineEntry line_entry;
|
||||
if (line_entry.IsValid())
|
||||
{
|
||||
SourceManager& source_manager = m_opaque_sp->GetProcess().GetTarget().GetDebugger().GetSourceManager();
|
||||
SBFileSpec line_entry_file_spec (line_entry.GetFileSpec());
|
||||
|
||||
if (line_entry_file_spec.IsValid())
|
||||
{
|
||||
source_manager.DisplaySourceLinesWithLineNumbers (line_entry_file_spec.ref(),
|
||||
line_entry.GetLine(),
|
||||
source_lines_after,
|
||||
source_lines_before, "->",
|
||||
&str);
|
||||
success = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return success;
|
||||
}
|
||||
|
||||
void
|
||||
SBThread::StepOver (lldb::RunMode stop_other_threads)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user