[Lldb-commits] [lldb] r113993 - in /lldb/trunk: include/lldb/API/LLDB.h include/lldb/API/SBBreakpoint.h include/lldb/API/SBCommandInterpreter.h include/lldb/API/SBDefines.h include/lldb/API/SBEvent.h include/lldb/API/SBThread.h include/lldb/API/SBValue.h lldb.xcodeproj/project.pbxproj scripts/lldb.swig source/API/SBBreakpoint.cpp source/API/SBCommandInterpreter.cpp source/API/SBEvent.cpp source/API/SBProcess.cpp source/API/SBThread.cpp source/API/SBValue.cpp
Caroline Tice
ctice at apple.com
Wed Sep 15 11:29:06 PDT 2010
Author: ctice
Date: Wed Sep 15 13:29:06 2010
New Revision: 113993
URL: http://llvm.org/viewvc/llvm-project?rev=113993&view=rev
Log:
Remove unnecessary/inappropriate output-printing functions from
the API.
Modified:
lldb/trunk/include/lldb/API/LLDB.h
lldb/trunk/include/lldb/API/SBBreakpoint.h
lldb/trunk/include/lldb/API/SBCommandInterpreter.h
lldb/trunk/include/lldb/API/SBDefines.h
lldb/trunk/include/lldb/API/SBEvent.h
lldb/trunk/include/lldb/API/SBThread.h
lldb/trunk/include/lldb/API/SBValue.h
lldb/trunk/lldb.xcodeproj/project.pbxproj
lldb/trunk/scripts/lldb.swig
lldb/trunk/source/API/SBBreakpoint.cpp
lldb/trunk/source/API/SBCommandInterpreter.cpp
lldb/trunk/source/API/SBEvent.cpp
lldb/trunk/source/API/SBProcess.cpp
lldb/trunk/source/API/SBThread.cpp
lldb/trunk/source/API/SBValue.cpp
Modified: lldb/trunk/include/lldb/API/LLDB.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/LLDB.h?rev=113993&r1=113992&r2=113993&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/LLDB.h (original)
+++ lldb/trunk/include/lldb/API/LLDB.h Wed Sep 15 13:29:06 2010
@@ -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"
Modified: lldb/trunk/include/lldb/API/SBBreakpoint.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBBreakpoint.h?rev=113993&r1=113992&r2=113993&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBBreakpoint.h (original)
+++ lldb/trunk/include/lldb/API/SBBreakpoint.h Wed Sep 15 13:29:06 2010
@@ -42,9 +42,6 @@
IsValid() const;
void
- Dump (FILE *f);
-
- void
ClearAllBreakpointSites ();
lldb::SBBreakpointLocation
@@ -60,9 +57,6 @@
GetLocationAtIndex (uint32_t index);
void
- ListLocations (FILE *, const char *description_level = "full");
-
- void
SetEnabled (bool enable);
bool
@@ -111,7 +105,7 @@
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);
Modified: lldb/trunk/include/lldb/API/SBCommandInterpreter.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBCommandInterpreter.h?rev=113993&r1=113992&r2=113993&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBCommandInterpreter.h (original)
+++ lldb/trunk/include/lldb/API/SBCommandInterpreter.h Wed Sep 15 13:29:06 2010
@@ -36,15 +36,9 @@
bool
AliasExists (const char *cmd);
- bool
- UserCommandExists (const char *cmd);
-
lldb::SBBroadcaster
GetBroadcaster ();
- //const char **
- //GetEnvironmentVariables ();
-
bool
HasCommands ();
@@ -52,14 +46,8 @@
HasAliases ();
bool
- HasUserCommands ();
-
- bool
HasAliasOptions ();
- //bool
- //HasInterpreterVariables ();
-
lldb::SBProcess
GetProcess ();
Modified: lldb/trunk/include/lldb/API/SBDefines.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBDefines.h?rev=113993&r1=113992&r2=113993&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBDefines.h (original)
+++ lldb/trunk/include/lldb/API/SBDefines.h Wed Sep 15 13:29:06 2010
@@ -30,7 +30,6 @@
class SBBreakpoint;
class SBBreakpointLocation;
class SBBroadcaster;
-class SBCommandContext;
class SBCommandInterpreter;
class SBCommandReturnObject;
class SBCommunication;
@@ -53,7 +52,6 @@
class SBStringList;
class SBSymbol;
class SBSymbolContext;
-class SBStringList;
class SBTarget;
class SBThread;
class SBValue;
Modified: lldb/trunk/include/lldb/API/SBEvent.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBEvent.h?rev=113993&r1=113992&r2=113993&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBEvent.h (original)
+++ lldb/trunk/include/lldb/API/SBEvent.h Wed Sep 15 13:29:06 2010
@@ -32,9 +32,6 @@
bool
IsValid() const;
- void
- Dump (FILE *f) const;
-
const char *
GetDataFlavor ();
Modified: lldb/trunk/include/lldb/API/SBThread.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBThread.h?rev=113993&r1=113992&r2=113993&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBThread.h (original)
+++ lldb/trunk/include/lldb/API/SBThread.h Wed Sep 15 13:29:06 2010
@@ -52,25 +52,6 @@
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
Modified: lldb/trunk/include/lldb/API/SBValue.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBValue.h?rev=113993&r1=113992&r2=113993&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBValue.h (original)
+++ lldb/trunk/include/lldb/API/SBValue.h Wed Sep 15 13:29:06 2010
@@ -26,9 +26,6 @@
bool
IsValid() const;
- void
- Print (FILE *out_file, lldb::SBFrame *frame, bool print_type, bool print_value);
-
const char *
GetName();
@@ -81,8 +78,6 @@
void *
GetOpaqueType();
- //void
- //DumpType ();
lldb::SBValue
Dereference ();
Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=113993&r1=113992&r2=113993&view=diff
==============================================================================
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Wed Sep 15 13:29:06 2010
@@ -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 */,
Modified: lldb/trunk/scripts/lldb.swig
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/lldb.swig?rev=113993&r1=113992&r2=113993&view=diff
==============================================================================
--- lldb/trunk/scripts/lldb.swig (original)
+++ lldb/trunk/scripts/lldb.swig Wed Sep 15 13:29:06 2010
@@ -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 @@
%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"
Modified: lldb/trunk/source/API/SBBreakpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBBreakpoint.cpp?rev=113993&r1=113992&r2=113993&view=diff
==============================================================================
--- lldb/trunk/source/API/SBBreakpoint.cpp (original)
+++ lldb/trunk/source/API/SBBreakpoint.cpp Wed Sep 15 13:29:06 2010
@@ -108,16 +108,6 @@
}
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 @@
}
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 @@
}
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 @@
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);
- }
}
}
Modified: lldb/trunk/source/API/SBCommandInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBCommandInterpreter.cpp?rev=113993&r1=113992&r2=113993&view=diff
==============================================================================
--- lldb/trunk/source/API/SBCommandInterpreter.cpp (original)
+++ lldb/trunk/source/API/SBCommandInterpreter.cpp Wed Sep 15 13:29:06 2010
@@ -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 @@
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 @@
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 @@
}
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 @@
return false;
}
-//bool
-//SBCommandInterpreter::HasInterpreterVariables ()
-//{
-// if (m_opaque_ptr)
-// return m_opaque_ptr->HasInterpreterVariables ();
-// return false;
-//}
-
SBProcess
SBCommandInterpreter::GetProcess ()
{
Modified: lldb/trunk/source/API/SBEvent.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBEvent.cpp?rev=113993&r1=113992&r2=113993&view=diff
==============================================================================
--- lldb/trunk/source/API/SBEvent.cpp (original)
+++ lldb/trunk/source/API/SBEvent.cpp Wed Sep 15 13:29:06 2010
@@ -44,17 +44,6 @@
{
}
-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 ()
{
Modified: lldb/trunk/source/API/SBProcess.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBProcess.cpp?rev=113993&r1=113992&r2=113993&view=diff
==============================================================================
--- lldb/trunk/source/API/SBProcess.cpp (original)
+++ lldb/trunk/source/API/SBProcess.cpp Wed Sep 15 13:29:06 2010
@@ -342,13 +342,13 @@
}
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)
{
Modified: lldb/trunk/source/API/SBThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBThread.cpp?rev=113993&r1=113992&r2=113993&view=diff
==============================================================================
--- lldb/trunk/source/API/SBThread.cpp (original)
+++ lldb/trunk/source/API/SBThread.cpp Wed Sep 15 13:29:06 2010
@@ -219,106 +219,6 @@
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)
Modified: lldb/trunk/source/API/SBValue.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBValue.cpp?rev=113993&r1=113992&r2=113993&view=diff
==============================================================================
--- lldb/trunk/source/API/SBValue.cpp (original)
+++ lldb/trunk/source/API/SBValue.cpp Wed Sep 15 13:29:06 2010
@@ -52,81 +52,6 @@
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()
{
More information about the lldb-commits
mailing list