diff options
author | Caroline Tice <ctice@apple.com> | 2010-09-15 18:29:06 +0000 |
---|---|---|
committer | Caroline Tice <ctice@apple.com> | 2010-09-15 18:29:06 +0000 |
commit | 3f12e8efc1dfefd01998cb863381adb5d29d7cec (patch) | |
tree | 4812b450b1f2fc3e2e204cabbb8cc658e75ed1af | |
parent | 46b96c4ba0b3720d26683e3fc1b7f7aed5c8405a (diff) | |
download | bcm5719-llvm-3f12e8efc1dfefd01998cb863381adb5d29d7cec.tar.gz bcm5719-llvm-3f12e8efc1dfefd01998cb863381adb5d29d7cec.zip |
Remove unnecessary/inappropriate output-printing functions from
the API.
llvm-svn: 113993
-rw-r--r-- | lldb/include/lldb/API/LLDB.h | 4 | ||||
-rw-r--r-- | lldb/include/lldb/API/SBBreakpoint.h | 8 | ||||
-rw-r--r-- | lldb/include/lldb/API/SBCommandInterpreter.h | 12 | ||||
-rw-r--r-- | lldb/include/lldb/API/SBDefines.h | 2 | ||||
-rw-r--r-- | lldb/include/lldb/API/SBEvent.h | 3 | ||||
-rw-r--r-- | lldb/include/lldb/API/SBThread.h | 19 | ||||
-rw-r--r-- | lldb/include/lldb/API/SBValue.h | 5 | ||||
-rw-r--r-- | lldb/lldb.xcodeproj/project.pbxproj | 8 | ||||
-rw-r--r-- | lldb/scripts/lldb.swig | 2 | ||||
-rw-r--r-- | lldb/source/API/SBBreakpoint.cpp | 52 | ||||
-rw-r--r-- | lldb/source/API/SBCommandInterpreter.cpp | 37 | ||||
-rw-r--r-- | lldb/source/API/SBEvent.cpp | 11 | ||||
-rw-r--r-- | lldb/source/API/SBProcess.cpp | 4 | ||||
-rw-r--r-- | lldb/source/API/SBThread.cpp | 100 | ||||
-rw-r--r-- | lldb/source/API/SBValue.cpp | 75 |
15 files changed, 7 insertions, 335 deletions
diff --git a/lldb/include/lldb/API/LLDB.h b/lldb/include/lldb/API/LLDB.h index f63b047d261..632f7aabfa2 100644 --- a/lldb/include/lldb/API/LLDB.h +++ b/lldb/include/lldb/API/LLDB.h @@ -20,7 +20,6 @@ #include "lldb/API/SBBreakpoint.h" #include "lldb/API/SBBreakpointLocation.h" #include "lldb/API/SBBroadcaster.h" -#include "lldb/API/SBCommandContext.h" #include "lldb/API/SBCommandInterpreter.h" #include "lldb/API/SBCommandReturnObject.h" #include "lldb/API/SBCommunication.h" @@ -33,11 +32,14 @@ #include "lldb/API/SBFunction.h" #include "lldb/API/SBHostOS.h" #include "lldb/API/SBInputReader.h" +#include "lldb/API/SBInstruction.h" +#include "lldb/API/SBInstructionList.h" #include "lldb/API/SBLineEntry.h" #include "lldb/API/SBListener.h" #include "lldb/API/SBModule.h" #include "lldb/API/SBProcess.h" #include "lldb/API/SBSourceManager.h" +#include "lldb/API/SBStringList.h" #include "lldb/API/SBSymbol.h" #include "lldb/API/SBSymbolContext.h" #include "lldb/API/SBTarget.h" diff --git a/lldb/include/lldb/API/SBBreakpoint.h b/lldb/include/lldb/API/SBBreakpoint.h index acceff0836e..de2d478ca8f 100644 --- a/lldb/include/lldb/API/SBBreakpoint.h +++ b/lldb/include/lldb/API/SBBreakpoint.h @@ -42,9 +42,6 @@ public: IsValid() const; void - Dump (FILE *f); - - void ClearAllBreakpointSites (); lldb::SBBreakpointLocation @@ -60,9 +57,6 @@ public: GetLocationAtIndex (uint32_t index); void - ListLocations (FILE *, const char *description_level = "full"); - - void SetEnabled (bool enable); bool @@ -111,7 +105,7 @@ public: GetNumLocations() const; void - GetDescription (FILE *, const char *description_level, bool describe_locations = false); + GetDescription (FILE *, const char *description_level); static lldb::BreakpointEventType GetBreakpointEventTypeFromEvent (const lldb::SBEvent& event); diff --git a/lldb/include/lldb/API/SBCommandInterpreter.h b/lldb/include/lldb/API/SBCommandInterpreter.h index d2e938719aa..5f18418820f 100644 --- a/lldb/include/lldb/API/SBCommandInterpreter.h +++ b/lldb/include/lldb/API/SBCommandInterpreter.h @@ -36,15 +36,9 @@ public: bool AliasExists (const char *cmd); - bool - UserCommandExists (const char *cmd); - lldb::SBBroadcaster GetBroadcaster (); - //const char ** - //GetEnvironmentVariables (); - bool HasCommands (); @@ -52,14 +46,8 @@ public: HasAliases (); bool - HasUserCommands (); - - bool HasAliasOptions (); - //bool - //HasInterpreterVariables (); - lldb::SBProcess GetProcess (); diff --git a/lldb/include/lldb/API/SBDefines.h b/lldb/include/lldb/API/SBDefines.h index aaaa62458af..703b111b740 100644 --- a/lldb/include/lldb/API/SBDefines.h +++ b/lldb/include/lldb/API/SBDefines.h @@ -30,7 +30,6 @@ class SBBlock; class SBBreakpoint; class SBBreakpointLocation; class SBBroadcaster; -class SBCommandContext; class SBCommandInterpreter; class SBCommandReturnObject; class SBCommunication; @@ -53,7 +52,6 @@ class SBSourceManager; class SBStringList; class SBSymbol; class SBSymbolContext; -class SBStringList; class SBTarget; class SBThread; class SBValue; diff --git a/lldb/include/lldb/API/SBEvent.h b/lldb/include/lldb/API/SBEvent.h index 2f3869a69a6..0ae23dde1cd 100644 --- a/lldb/include/lldb/API/SBEvent.h +++ b/lldb/include/lldb/API/SBEvent.h @@ -32,9 +32,6 @@ public: bool IsValid() const; - void - Dump (FILE *f) const; - const char * GetDataFlavor (); diff --git a/lldb/include/lldb/API/SBThread.h b/lldb/include/lldb/API/SBThread.h index bf63b669b98..2a9dd2a4dcc 100644 --- a/lldb/include/lldb/API/SBThread.h +++ b/lldb/include/lldb/API/SBThread.h @@ -52,25 +52,6 @@ public: GetQueueName() const; void - 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 = 3, - uint32_t source_lines_after = 3); - - bool - DisplaySingleFrameForSelectedContext (FILE *out, - FILE *err, - lldb::SBFrame &frame, - bool show_frame_info, - bool show_source, - uint32_t source_lines_after, - uint32_t source_lines_before); - - void StepOver (lldb::RunMode stop_other_threads = lldb::eOnlyDuringStepping); void diff --git a/lldb/include/lldb/API/SBValue.h b/lldb/include/lldb/API/SBValue.h index a8daae02fb8..2c817fff53f 100644 --- a/lldb/include/lldb/API/SBValue.h +++ b/lldb/include/lldb/API/SBValue.h @@ -26,9 +26,6 @@ public: bool IsValid() const; - void - Print (FILE *out_file, lldb::SBFrame *frame, bool print_type, bool print_value); - const char * GetName(); @@ -81,8 +78,6 @@ public: void * GetOpaqueType(); - //void - //DumpType (); lldb::SBValue Dereference (); diff --git a/lldb/lldb.xcodeproj/project.pbxproj b/lldb/lldb.xcodeproj/project.pbxproj index afb2ed60d9d..6693766b657 100644 --- a/lldb/lldb.xcodeproj/project.pbxproj +++ b/lldb/lldb.xcodeproj/project.pbxproj @@ -29,7 +29,6 @@ 26680219115FD13D008E1FE4 /* SBBreakpoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AF16A9E11402D69007A7B3F /* SBBreakpoint.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2668021A115FD13D008E1FE4 /* SBBreakpointLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AF16CC611408686007A7B3F /* SBBreakpointLocation.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2668021B115FD13D008E1FE4 /* SBBroadcaster.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A9830F31125FC5800A56CB0 /* SBBroadcaster.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2668021C115FD13D008E1FE4 /* SBCommandContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A9830F51125FC5800A56CB0 /* SBCommandContext.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2668021D115FD13D008E1FE4 /* SBCommandInterpreter.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A9830F71125FC5800A56CB0 /* SBCommandInterpreter.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2668021E115FD13D008E1FE4 /* SBCommandReturnObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A9830F91125FC5800A56CB0 /* SBCommandReturnObject.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2668021F115FD13D008E1FE4 /* SBCommunication.h in Headers */ = {isa = PBXBuildFile; fileRef = 260223E7115F06D500A601A2 /* SBCommunication.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -62,7 +61,6 @@ 26680331116005E9008E1FE4 /* SBCommunication.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260223E8115F06E500A601A2 /* SBCommunication.cpp */; }; 26680332116005EA008E1FE4 /* SBCommandReturnObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A9830F81125FC5800A56CB0 /* SBCommandReturnObject.cpp */; }; 26680333116005EC008E1FE4 /* SBCommandInterpreter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A9830F61125FC5800A56CB0 /* SBCommandInterpreter.cpp */; }; - 26680334116005ED008E1FE4 /* SBCommandContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A9830F41125FC5800A56CB0 /* SBCommandContext.cpp */; }; 26680335116005EE008E1FE4 /* SBBroadcaster.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A9830F21125FC5800A56CB0 /* SBBroadcaster.cpp */; }; 26680336116005EF008E1FE4 /* SBBreakpointLocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9AF16CC7114086A1007A7B3F /* SBBreakpointLocation.cpp */; }; 26680337116005F1008E1FE4 /* SBBreakpoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9AF16A9C11402D5B007A7B3F /* SBBreakpoint.cpp */; }; @@ -1043,8 +1041,6 @@ 9A82010B10FFB49800182560 /* ScriptInterpreter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ScriptInterpreter.cpp; path = source/Interpreter/ScriptInterpreter.cpp; sourceTree = "<group>"; }; 9A9830F21125FC5800A56CB0 /* SBBroadcaster.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBBroadcaster.cpp; path = source/API/SBBroadcaster.cpp; sourceTree = "<group>"; }; 9A9830F31125FC5800A56CB0 /* SBBroadcaster.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBBroadcaster.h; path = include/lldb/API/SBBroadcaster.h; sourceTree = "<group>"; }; - 9A9830F41125FC5800A56CB0 /* SBCommandContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBCommandContext.cpp; path = source/API/SBCommandContext.cpp; sourceTree = "<group>"; }; - 9A9830F51125FC5800A56CB0 /* SBCommandContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBCommandContext.h; path = include/lldb/API/SBCommandContext.h; sourceTree = "<group>"; }; 9A9830F61125FC5800A56CB0 /* SBCommandInterpreter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBCommandInterpreter.cpp; path = source/API/SBCommandInterpreter.cpp; sourceTree = "<group>"; }; 9A9830F71125FC5800A56CB0 /* SBCommandInterpreter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBCommandInterpreter.h; path = include/lldb/API/SBCommandInterpreter.h; sourceTree = "<group>"; }; 9A9830F81125FC5800A56CB0 /* SBCommandReturnObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBCommandReturnObject.cpp; path = source/API/SBCommandReturnObject.cpp; sourceTree = "<group>"; }; @@ -1447,8 +1443,6 @@ 9AF16CC7114086A1007A7B3F /* SBBreakpointLocation.cpp */, 9A9830F31125FC5800A56CB0 /* SBBroadcaster.h */, 9A9830F21125FC5800A56CB0 /* SBBroadcaster.cpp */, - 9A9830F51125FC5800A56CB0 /* SBCommandContext.h */, - 9A9830F41125FC5800A56CB0 /* SBCommandContext.cpp */, 9A9830F71125FC5800A56CB0 /* SBCommandInterpreter.h */, 9A9830F61125FC5800A56CB0 /* SBCommandInterpreter.cpp */, 9A9830F91125FC5800A56CB0 /* SBCommandReturnObject.h */, @@ -2221,7 +2215,6 @@ 26680219115FD13D008E1FE4 /* SBBreakpoint.h in Headers */, 2668021A115FD13D008E1FE4 /* SBBreakpointLocation.h in Headers */, 2668021B115FD13D008E1FE4 /* SBBroadcaster.h in Headers */, - 2668021C115FD13D008E1FE4 /* SBCommandContext.h in Headers */, 2668021D115FD13D008E1FE4 /* SBCommandInterpreter.h in Headers */, 2668021E115FD13D008E1FE4 /* SBCommandReturnObject.h in Headers */, 2668021F115FD13D008E1FE4 /* SBCommunication.h in Headers */, @@ -2692,7 +2685,6 @@ 26680331116005E9008E1FE4 /* SBCommunication.cpp in Sources */, 26680332116005EA008E1FE4 /* SBCommandReturnObject.cpp in Sources */, 26680333116005EC008E1FE4 /* SBCommandInterpreter.cpp in Sources */, - 26680334116005ED008E1FE4 /* SBCommandContext.cpp in Sources */, 26680335116005EE008E1FE4 /* SBBroadcaster.cpp in Sources */, 26680336116005EF008E1FE4 /* SBBreakpointLocation.cpp in Sources */, 26680337116005F1008E1FE4 /* SBBreakpoint.cpp in Sources */, diff --git a/lldb/scripts/lldb.swig b/lldb/scripts/lldb.swig index 9c0b9ee5104..32b387e089e 100644 --- a/lldb/scripts/lldb.swig +++ b/lldb/scripts/lldb.swig @@ -76,7 +76,6 @@ #include "lldb/API/SBBreakpoint.h" #include "lldb/API/SBBreakpointLocation.h" #include "lldb/API/SBBroadcaster.h" -#include "lldb/API/SBCommandContext.h" #include "lldb/API/SBCommandInterpreter.h" #include "lldb/API/SBCommandReturnObject.h" #include "lldb/API/SBCompileUnit.h" @@ -130,7 +129,6 @@ typedef int StopReason; %include "lldb/API/SBBreakpoint.h" %include "lldb/API/SBBreakpointLocation.h" %include "lldb/API/SBBroadcaster.h" -%include "lldb/API/SBCommandContext.h" %include "lldb/API/SBCommandInterpreter.h" %include "lldb/API/SBCommandReturnObject.h" %include "lldb/API/SBCompileUnit.h" diff --git a/lldb/source/API/SBBreakpoint.cpp b/lldb/source/API/SBBreakpoint.cpp index 91b159870ca..1e3c7123826 100644 --- a/lldb/source/API/SBBreakpoint.cpp +++ b/lldb/source/API/SBBreakpoint.cpp @@ -108,16 +108,6 @@ SBBreakpoint::IsValid() const } void -SBBreakpoint::Dump (FILE *f) -{ - if (m_opaque_sp && f) - { - lldb_private::StreamFile str (f); - m_opaque_sp->Dump (&str); - } -} - -void SBBreakpoint::ClearAllBreakpointSites () { if (m_opaque_sp) @@ -192,34 +182,6 @@ SBBreakpoint::GetLocationAtIndex (uint32_t index) } void -SBBreakpoint::ListLocations (FILE* f, const char *description_level) -{ - if (m_opaque_sp && f) - { - DescriptionLevel level; - if (strcmp (description_level, "brief") == 0) - level = eDescriptionLevelBrief; - else if (strcmp (description_level, "full") == 0) - level = eDescriptionLevelFull; - else if (strcmp (description_level, "verbose") == 0) - level = eDescriptionLevelVerbose; - else - level = eDescriptionLevelBrief; - - StreamFile str (f); - - str.IndentMore(); - int num_locs = m_opaque_sp->GetNumLocations(); - for (int i = 0; i < num_locs; ++i) - { - BreakpointLocation *loc = m_opaque_sp->GetLocationAtIndex (i).get(); - loc->GetDescription (&str, level); - str.EOL(); - } - } -} - -void SBBreakpoint::SetEnabled (bool enable) { if (m_opaque_sp) @@ -360,7 +322,7 @@ SBBreakpoint::GetNumLocations() const } void -SBBreakpoint::GetDescription (FILE *f, const char *description_level, bool describe_locations) +SBBreakpoint::GetDescription (FILE *f, const char *description_level) { if (f == NULL) return; @@ -381,18 +343,6 @@ SBBreakpoint::GetDescription (FILE *f, const char *description_level, bool descr m_opaque_sp->GetDescription (&str, level); str.EOL(); - if (describe_locations) - { - //str.IndentMore(); - // int num_locs = m_opaque_sp->GetNumLocations(); - // for (int i = 0; i < num_locs; ++i) - // { - // BreakpointLocation *loc = m_opaque_sp->FindLocationByIndex (i); - // loc->GetDescription (&str, level); - // str.EOL(); - // } - ListLocations (f, description_level); - } } } diff --git a/lldb/source/API/SBCommandInterpreter.cpp b/lldb/source/API/SBCommandInterpreter.cpp index c40d7cc37e5..d38b74107f8 100644 --- a/lldb/source/API/SBCommandInterpreter.cpp +++ b/lldb/source/API/SBCommandInterpreter.cpp @@ -18,7 +18,6 @@ #include "lldb/API/SBBroadcaster.h" #include "lldb/API/SBDebugger.h" #include "lldb/API/SBCommandReturnObject.h" -#include "lldb/API/SBCommandContext.h" #include "lldb/API/SBSourceManager.h" #include "lldb/API/SBCommandInterpreter.h" #include "lldb/API/SBProcess.h" @@ -62,14 +61,6 @@ SBCommandInterpreter::AliasExists (const char *cmd) return false; } -bool -SBCommandInterpreter::UserCommandExists (const char *cmd) -{ - if (m_opaque_ptr) - return m_opaque_ptr->UserCommandExists (cmd); - return false; -} - lldb::ReturnStatus SBCommandInterpreter::HandleCommand (const char *command_line, SBCommandReturnObject &result, bool add_to_history) { @@ -107,18 +98,6 @@ SBCommandInterpreter::HandleCompletion (const char *current_line, return num_completions; } -//const char ** -//SBCommandInterpreter::GetEnvironmentVariables () -//{ -// if (m_opaque_ptr) -// { -// //const Args *env_vars = m_opaque_ptr->GetEnvironmentVariables(); -// //if (env_vars) -// // return env_vars->GetConstArgumentVector (); -// } -// return NULL; -//} - bool SBCommandInterpreter::HasCommands () { @@ -136,14 +115,6 @@ SBCommandInterpreter::HasAliases () } bool -SBCommandInterpreter::HasUserCommands () -{ - if (m_opaque_ptr) - return m_opaque_ptr->HasUserCommands (); - return false; -} - -bool SBCommandInterpreter::HasAliasOptions () { if (m_opaque_ptr) @@ -151,14 +122,6 @@ SBCommandInterpreter::HasAliasOptions () return false; } -//bool -//SBCommandInterpreter::HasInterpreterVariables () -//{ -// if (m_opaque_ptr) -// return m_opaque_ptr->HasInterpreterVariables (); -// return false; -//} - SBProcess SBCommandInterpreter::GetProcess () { diff --git a/lldb/source/API/SBEvent.cpp b/lldb/source/API/SBEvent.cpp index c04ee72d889..543383b1ade 100644 --- a/lldb/source/API/SBEvent.cpp +++ b/lldb/source/API/SBEvent.cpp @@ -44,17 +44,6 @@ SBEvent::~SBEvent() { } -void -SBEvent::Dump (FILE *f) const -{ - const Event *lldb_event = get(); - if (lldb_event) - { - StreamFile str(f); - lldb_event->Dump ((Stream *) &str); - } -} - const char * SBEvent::GetDataFlavor () { diff --git a/lldb/source/API/SBProcess.cpp b/lldb/source/API/SBProcess.cpp index b3b083e78ef..0cae975de40 100644 --- a/lldb/source/API/SBProcess.cpp +++ b/lldb/source/API/SBProcess.cpp @@ -342,13 +342,13 @@ SBProcess::AttachByName (const char *name, bool wait_for_launch) } lldb::pid_t -SBProcess::AttachByPID (lldb::pid_t attach_pid) // DEPRECATED: will be removed in a few builds in favor of SBError AttachByPID(pid_t) +SBProcess::AttachByPID (lldb::pid_t attach_pid) // DEPRECATED: will be removed in a few builds in favor of SBError AttachByPID(pid_t) { Attach (attach_pid); return GetProcessID(); } - + SBError SBProcess::Attach (lldb::pid_t attach_pid) { diff --git a/lldb/source/API/SBThread.cpp b/lldb/source/API/SBThread.cpp index 705f08ce6e4..3c75e4d682a 100644 --- a/lldb/source/API/SBThread.cpp +++ b/lldb/source/API/SBThread.cpp @@ -219,106 +219,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) { if (m_opaque_sp) diff --git a/lldb/source/API/SBValue.cpp b/lldb/source/API/SBValue.cpp index a90c1bff6b7..e9d970baf34 100644 --- a/lldb/source/API/SBValue.cpp +++ b/lldb/source/API/SBValue.cpp @@ -52,81 +52,6 @@ SBValue::IsValid () const return (m_opaque_sp.get() != NULL); } -void -SBValue::Print (FILE *out_file, SBFrame *frame, bool print_type, bool print_value) -{ - if (out_file == NULL) - return; - - if (IsValid()) - { - - SBThread sb_thread = frame->GetThread(); - SBProcess sb_process = sb_thread.GetProcess(); - - lldb_private::StackFrame *lldb_frame = frame->GetLLDBObjectPtr(); - lldb_private::Thread *lldb_thread = sb_thread.GetLLDBObjectPtr(); - lldb_private::Process *lldb_process = sb_process.get(); - - lldb_private::ExecutionContext context (lldb_process, lldb_thread, lldb_frame); - - lldb_private::StreamFile out_stream (out_file); - - out_stream.Printf ("%s ", m_opaque_sp->GetName().AsCString (NULL)); - if (! m_opaque_sp->IsInScope (lldb_frame)) - out_stream.Printf ("[out-of-scope] "); - if (print_type) - { - out_stream.Printf ("(%s) ", m_opaque_sp->GetTypeName().AsCString ("<unknown-type>")); - } - - if (print_value) - { - ExecutionContextScope *exe_scope = frame->get(); - const char *val_cstr = m_opaque_sp->GetValueAsCString(exe_scope); - const char *err_cstr = m_opaque_sp->GetError().AsCString(); - - if (!err_cstr) - { - const char *sum_cstr = m_opaque_sp->GetSummaryAsCString(exe_scope); - const bool is_aggregate = - ClangASTContext::IsAggregateType (m_opaque_sp->GetOpaqueClangQualType()); - if (val_cstr) - out_stream.Printf ("= %s ", val_cstr); - - if (sum_cstr) - out_stream.Printf ("%s ", sum_cstr); - - if (is_aggregate) - { - out_stream.PutChar ('{'); - const uint32_t num_children = m_opaque_sp->GetNumChildren(); - if (num_children) - { - out_stream.IndentMore(); - for (uint32_t idx = 0; idx < num_children; ++idx) - { - lldb::ValueObjectSP child_sp (m_opaque_sp->GetChildAtIndex (idx, true)); - if (child_sp.get()) - { - out_stream.EOL(); - out_stream.Indent(); - out_stream.Printf ("%s (%s) = %s", child_sp.get()->GetName().AsCString (""), - child_sp.get()->GetTypeName().AsCString ("<unknown type>"), - child_sp.get()->GetValueAsCString(exe_scope)); - } - } - out_stream.IndentLess(); - } - out_stream.EOL(); - out_stream.Indent ("}"); - } - } - } - out_stream.EOL (); - } -} - const char * SBValue::GetName() { |