forked from OSchip/llvm-project
Extract SBAttachInfo into own set of files - SBAttachInfo.h, SBAttachInfo.cpp and SBAttachInfo.i.
llvm-svn: 229346
This commit is contained in:
parent
ecf8f7f49b
commit
71d08b3f2d
|
@ -0,0 +1,149 @@
|
|||
//===-- SBAttachInfo.h ------------------------------------------*- C++ -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLDB_SBAttachInfo_h_
|
||||
#define LLDB_SBAttachInfo_h_
|
||||
|
||||
#include "lldb/API/SBDefines.h"
|
||||
|
||||
namespace lldb {
|
||||
|
||||
class SBTarget;
|
||||
|
||||
class SBAttachInfo
|
||||
{
|
||||
public:
|
||||
SBAttachInfo ();
|
||||
|
||||
SBAttachInfo (lldb::pid_t pid);
|
||||
|
||||
SBAttachInfo (const char *path, bool wait_for);
|
||||
|
||||
SBAttachInfo (const SBAttachInfo &rhs);
|
||||
|
||||
~SBAttachInfo();
|
||||
|
||||
SBAttachInfo &
|
||||
operator = (const SBAttachInfo &rhs);
|
||||
|
||||
lldb::pid_t
|
||||
GetProcessID ();
|
||||
|
||||
void
|
||||
SetProcessID (lldb::pid_t pid);
|
||||
|
||||
void
|
||||
SetExecutable (const char *path);
|
||||
|
||||
void
|
||||
SetExecutable (lldb::SBFileSpec exe_file);
|
||||
|
||||
bool
|
||||
GetWaitForLaunch ();
|
||||
|
||||
void
|
||||
SetWaitForLaunch (bool b);
|
||||
|
||||
bool
|
||||
GetIgnoreExisting ();
|
||||
|
||||
void
|
||||
SetIgnoreExisting (bool b);
|
||||
|
||||
uint32_t
|
||||
GetResumeCount ();
|
||||
|
||||
void
|
||||
SetResumeCount (uint32_t c);
|
||||
|
||||
const char *
|
||||
GetProcessPluginName ();
|
||||
|
||||
void
|
||||
SetProcessPluginName (const char *plugin_name);
|
||||
|
||||
uint32_t
|
||||
GetUserID();
|
||||
|
||||
uint32_t
|
||||
GetGroupID();
|
||||
|
||||
bool
|
||||
UserIDIsValid ();
|
||||
|
||||
bool
|
||||
GroupIDIsValid ();
|
||||
|
||||
void
|
||||
SetUserID (uint32_t uid);
|
||||
|
||||
void
|
||||
SetGroupID (uint32_t gid);
|
||||
|
||||
uint32_t
|
||||
GetEffectiveUserID();
|
||||
|
||||
uint32_t
|
||||
GetEffectiveGroupID();
|
||||
|
||||
bool
|
||||
EffectiveUserIDIsValid ();
|
||||
|
||||
bool
|
||||
EffectiveGroupIDIsValid ();
|
||||
|
||||
void
|
||||
SetEffectiveUserID (uint32_t uid);
|
||||
|
||||
void
|
||||
SetEffectiveGroupID (uint32_t gid);
|
||||
|
||||
lldb::pid_t
|
||||
GetParentProcessID ();
|
||||
|
||||
void
|
||||
SetParentProcessID (lldb::pid_t pid);
|
||||
|
||||
bool
|
||||
ParentProcessIDIsValid();
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
/// Get the listener that will be used to receive process events.
|
||||
///
|
||||
/// If no listener has been set via a call to
|
||||
/// SBLaunchInfo::SetListener(), then an invalid SBListener will be
|
||||
/// returned (SBListener::IsValid() will return false). If a listener
|
||||
/// has been set, then the valid listener object will be returned.
|
||||
//----------------------------------------------------------------------
|
||||
SBListener
|
||||
GetListener ();
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
/// Set the listener that will be used to receive process events.
|
||||
///
|
||||
/// By default the SBDebugger, which has a listener, that the SBTarget
|
||||
/// belongs to will listen for the process events. Calling this function
|
||||
/// allows a different listener to be used to listen for process events.
|
||||
//----------------------------------------------------------------------
|
||||
void
|
||||
SetListener (SBListener &listener);
|
||||
|
||||
|
||||
protected:
|
||||
friend class SBTarget;
|
||||
|
||||
lldb_private::ProcessAttachInfo &
|
||||
ref ();
|
||||
|
||||
ProcessAttachInfoSP m_opaque_sp;
|
||||
};
|
||||
|
||||
} // namespace lldb
|
||||
|
||||
#endif // LLDB_SBAttachInfo_h_
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
#include "lldb/API/SBDefines.h"
|
||||
#include "lldb/API/SBAddress.h"
|
||||
#include "lldb/API/SBAttachInfo.h"
|
||||
#include "lldb/API/SBBroadcaster.h"
|
||||
#include "lldb/API/SBFileSpec.h"
|
||||
#include "lldb/API/SBFileSpecList.h"
|
||||
|
@ -25,134 +26,6 @@ namespace lldb {
|
|||
|
||||
class SBPlatform;
|
||||
|
||||
class SBAttachInfo
|
||||
{
|
||||
public:
|
||||
SBAttachInfo ();
|
||||
|
||||
SBAttachInfo (lldb::pid_t pid);
|
||||
|
||||
SBAttachInfo (const char *path, bool wait_for);
|
||||
|
||||
SBAttachInfo (const SBAttachInfo &rhs);
|
||||
|
||||
~SBAttachInfo();
|
||||
|
||||
SBAttachInfo &
|
||||
operator = (const SBAttachInfo &rhs);
|
||||
|
||||
lldb::pid_t
|
||||
GetProcessID ();
|
||||
|
||||
void
|
||||
SetProcessID (lldb::pid_t pid);
|
||||
|
||||
void
|
||||
SetExecutable (const char *path);
|
||||
|
||||
void
|
||||
SetExecutable (lldb::SBFileSpec exe_file);
|
||||
|
||||
bool
|
||||
GetWaitForLaunch ();
|
||||
|
||||
void
|
||||
SetWaitForLaunch (bool b);
|
||||
|
||||
bool
|
||||
GetIgnoreExisting ();
|
||||
|
||||
void
|
||||
SetIgnoreExisting (bool b);
|
||||
|
||||
uint32_t
|
||||
GetResumeCount ();
|
||||
|
||||
void
|
||||
SetResumeCount (uint32_t c);
|
||||
|
||||
const char *
|
||||
GetProcessPluginName ();
|
||||
|
||||
void
|
||||
SetProcessPluginName (const char *plugin_name);
|
||||
|
||||
uint32_t
|
||||
GetUserID();
|
||||
|
||||
uint32_t
|
||||
GetGroupID();
|
||||
|
||||
bool
|
||||
UserIDIsValid ();
|
||||
|
||||
bool
|
||||
GroupIDIsValid ();
|
||||
|
||||
void
|
||||
SetUserID (uint32_t uid);
|
||||
|
||||
void
|
||||
SetGroupID (uint32_t gid);
|
||||
|
||||
uint32_t
|
||||
GetEffectiveUserID();
|
||||
|
||||
uint32_t
|
||||
GetEffectiveGroupID();
|
||||
|
||||
bool
|
||||
EffectiveUserIDIsValid ();
|
||||
|
||||
bool
|
||||
EffectiveGroupIDIsValid ();
|
||||
|
||||
void
|
||||
SetEffectiveUserID (uint32_t uid);
|
||||
|
||||
void
|
||||
SetEffectiveGroupID (uint32_t gid);
|
||||
|
||||
lldb::pid_t
|
||||
GetParentProcessID ();
|
||||
|
||||
void
|
||||
SetParentProcessID (lldb::pid_t pid);
|
||||
|
||||
bool
|
||||
ParentProcessIDIsValid();
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
/// Get the listener that will be used to receive process events.
|
||||
///
|
||||
/// If no listener has been set via a call to
|
||||
/// SBLaunchInfo::SetListener(), then an invalid SBListener will be
|
||||
/// returned (SBListener::IsValid() will return false). If a listener
|
||||
/// has been set, then the valid listener object will be returned.
|
||||
//----------------------------------------------------------------------
|
||||
SBListener
|
||||
GetListener ();
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
/// Set the listener that will be used to receive process events.
|
||||
///
|
||||
/// By default the SBDebugger, which has a listener, that the SBTarget
|
||||
/// belongs to will listen for the process events. Calling this function
|
||||
/// allows a different listener to be used to listen for process events.
|
||||
//----------------------------------------------------------------------
|
||||
void
|
||||
SetListener (SBListener &listener);
|
||||
|
||||
|
||||
protected:
|
||||
friend class SBTarget;
|
||||
|
||||
lldb_private::ProcessAttachInfo &
|
||||
ref ();
|
||||
|
||||
ProcessAttachInfoSP m_opaque_sp;
|
||||
};
|
||||
|
||||
class SBTarget
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -94,6 +94,8 @@
|
|||
25420ED21A649D88009ADBCB /* PipeBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 25420ED11A649D88009ADBCB /* PipeBase.cpp */; };
|
||||
254FBB951A81AA7F00BD6378 /* SBLaunchInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 254FBB941A81AA7F00BD6378 /* SBLaunchInfo.cpp */; };
|
||||
254FBB971A81B03100BD6378 /* SBLaunchInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 254FBB961A81B03100BD6378 /* SBLaunchInfo.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
254FBBA31A9166F100BD6378 /* SBAttachInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 254FBBA21A9166F100BD6378 /* SBAttachInfo.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
254FBBA51A91670E00BD6378 /* SBAttachInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 254FBBA41A91670E00BD6378 /* SBAttachInfo.cpp */; };
|
||||
260157C61885F51C00F875CF /* libpanel.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 260157C41885F4FF00F875CF /* libpanel.dylib */; };
|
||||
260157C71885F52500F875CF /* libpanel.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 260157C41885F4FF00F875CF /* libpanel.dylib */; };
|
||||
260157C81885F53100F875CF /* libpanel.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 260157C41885F4FF00F875CF /* libpanel.dylib */; };
|
||||
|
@ -1224,6 +1226,9 @@
|
|||
254FBB921A81AA5200BD6378 /* SBLaunchInfo.i */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBLaunchInfo.i; sourceTree = "<group>"; };
|
||||
254FBB941A81AA7F00BD6378 /* SBLaunchInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBLaunchInfo.cpp; path = source/API/SBLaunchInfo.cpp; sourceTree = "<group>"; };
|
||||
254FBB961A81B03100BD6378 /* SBLaunchInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBLaunchInfo.h; path = include/lldb/API/SBLaunchInfo.h; sourceTree = "<group>"; };
|
||||
254FBBA21A9166F100BD6378 /* SBAttachInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBAttachInfo.h; path = include/lldb/API/SBAttachInfo.h; sourceTree = "<group>"; };
|
||||
254FBBA41A91670E00BD6378 /* SBAttachInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBAttachInfo.cpp; path = source/API/SBAttachInfo.cpp; sourceTree = "<group>"; };
|
||||
254FBBA61A91672800BD6378 /* SBAttachInfo.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBAttachInfo.i; sourceTree = "<group>"; };
|
||||
260157C41885F4FF00F875CF /* libpanel.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libpanel.dylib; path = /usr/lib/libpanel.dylib; sourceTree = "<absolute>"; };
|
||||
260223E7115F06D500A601A2 /* SBCommunication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBCommunication.h; path = include/lldb/API/SBCommunication.h; sourceTree = "<group>"; };
|
||||
260223E8115F06E500A601A2 /* SBCommunication.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBCommunication.cpp; path = source/API/SBCommunication.cpp; sourceTree = "<group>"; };
|
||||
|
@ -3129,6 +3134,7 @@
|
|||
2611FEEE142D83060017FEA3 /* interface */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
254FBBA61A91672800BD6378 /* SBAttachInfo.i */,
|
||||
254FBB921A81AA5200BD6378 /* SBLaunchInfo.i */,
|
||||
2611FEEF142D83060017FEA3 /* SBAddress.i */,
|
||||
2611FEF0142D83060017FEA3 /* SBBlock.i */,
|
||||
|
@ -3200,6 +3206,8 @@
|
|||
262D3190111B4341004E6F88 /* API */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
254FBBA41A91670E00BD6378 /* SBAttachInfo.cpp */,
|
||||
254FBBA21A9166F100BD6378 /* SBAttachInfo.h */,
|
||||
2611FEEE142D83060017FEA3 /* interface */,
|
||||
26BC7C2510F1B3BC00F91463 /* lldb-defines.h */,
|
||||
26BC7C2610F1B3BC00F91463 /* lldb-enumerations.h */,
|
||||
|
@ -5177,6 +5185,7 @@
|
|||
9443B123140C26AB0013457C /* SBData.h in Headers */,
|
||||
26680220115FD13D008E1FE4 /* SBDebugger.h in Headers */,
|
||||
490A966B1628C3BF00F0002E /* SBDeclaration.h in Headers */,
|
||||
254FBBA31A9166F100BD6378 /* SBAttachInfo.h in Headers */,
|
||||
26680221115FD13D008E1FE4 /* SBDefines.h in Headers */,
|
||||
8CCB018219BA4E270009FD44 /* SBThreadCollection.h in Headers */,
|
||||
AF0EBBEC185941360059E52F /* SBQueue.h in Headers */,
|
||||
|
@ -5827,6 +5836,7 @@
|
|||
9443B122140C18C40013457C /* SBData.cpp in Sources */,
|
||||
4CF52AF8142829390051E832 /* SBFileSpecList.cpp in Sources */,
|
||||
23059A101958B319007B8189 /* SBUnixSignals.cpp in Sources */,
|
||||
254FBBA51A91670E00BD6378 /* SBAttachInfo.cpp in Sources */,
|
||||
4C56543719D22B32002E9C44 /* SBThreadPlan.cpp in Sources */,
|
||||
8CCB018319BA51BF0009FD44 /* SBThreadCollection.cpp in Sources */,
|
||||
26B82840142D020F002DBC64 /* SBSection.cpp in Sources */,
|
||||
|
|
|
@ -79,6 +79,7 @@ HEADER_FILES="${SRC_ROOT}/include/lldb/lldb.h"\
|
|||
" ${SRC_ROOT}/include/lldb/lldb-forward-rtti.h"\
|
||||
" ${SRC_ROOT}/include/lldb/lldb-types.h"\
|
||||
" ${SRC_ROOT}/include/lldb/API/SBAddress.h"\
|
||||
" ${SRC_ROOT}/include/lldb/API/SBAttachInfo.h"\
|
||||
" ${SRC_ROOT}/include/lldb/API/SBBlock.h"\
|
||||
" ${SRC_ROOT}/include/lldb/API/SBBreakpoint.h"\
|
||||
" ${SRC_ROOT}/include/lldb/API/SBBreakpointLocation.h"\
|
||||
|
@ -131,6 +132,7 @@ HEADER_FILES="${SRC_ROOT}/include/lldb/lldb.h"\
|
|||
" ${SRC_ROOT}/include/lldb/API/SBUnixSignals.h"
|
||||
|
||||
INTERFACE_FILES="${SRC_ROOT}/scripts/Python/interface/SBAddress.i"\
|
||||
" ${SRC_ROOT}/scripts/Python/interface/SBAttachInfo.i"\
|
||||
" ${SRC_ROOT}/scripts/Python/interface/SBBlock.i"\
|
||||
" ${SRC_ROOT}/scripts/Python/interface/SBBreakpoint.i"\
|
||||
" ${SRC_ROOT}/scripts/Python/interface/SBBreakpointLocation.i"\
|
||||
|
|
|
@ -81,6 +81,7 @@ def get_header_files( vDictArgs ):
|
|||
"/include/lldb/lldb-forward-rtti.h",
|
||||
"/include/lldb/lldb-types.h",
|
||||
"/include/lldb/API/SBAddress.h",
|
||||
"/include/lldb/API/SBAttachInfo.h",
|
||||
"/include/lldb/API/SBBlock.h",
|
||||
"/include/lldb/API/SBBreakpoint.h",
|
||||
"/include/lldb/API/SBBreakpointLocation.h",
|
||||
|
@ -157,6 +158,7 @@ def get_header_files( vDictArgs ):
|
|||
def get_interface_files( vDictArgs ):
|
||||
dbg = utilsDebug.CDebugFnVerbose( "Python script get_interface_files()" );
|
||||
listIFaceFiles = [ "/scripts/Python/interface/SBAddress.i",
|
||||
"/scripts/Python/interface/SBAttachInfo.i",
|
||||
"/scripts/Python/interface/SBBlock.i",
|
||||
"/scripts/Python/interface/SBBreakpoint.i",
|
||||
"/scripts/Python/interface/SBBreakpointLocation.i",
|
||||
|
|
|
@ -0,0 +1,111 @@
|
|||
//===-- SWIG Interface for SBAttachInfo--------------------------*- C++ -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
namespace lldb {
|
||||
|
||||
class SBAttachInfo
|
||||
{
|
||||
public:
|
||||
SBAttachInfo ();
|
||||
|
||||
SBAttachInfo (lldb::pid_t pid);
|
||||
|
||||
SBAttachInfo (const char *path, bool wait_for);
|
||||
|
||||
SBAttachInfo (const lldb::SBAttachInfo &rhs);
|
||||
|
||||
lldb::pid_t
|
||||
GetProcessID ();
|
||||
|
||||
void
|
||||
SetProcessID (lldb::pid_t pid);
|
||||
|
||||
void
|
||||
SetExecutable (const char *path);
|
||||
|
||||
void
|
||||
SetExecutable (lldb::SBFileSpec exe_file);
|
||||
|
||||
bool
|
||||
GetWaitForLaunch ();
|
||||
|
||||
void
|
||||
SetWaitForLaunch (bool b);
|
||||
|
||||
bool
|
||||
GetIgnoreExisting ();
|
||||
|
||||
void
|
||||
SetIgnoreExisting (bool b);
|
||||
|
||||
uint32_t
|
||||
GetResumeCount ();
|
||||
|
||||
void
|
||||
SetResumeCount (uint32_t c);
|
||||
|
||||
const char *
|
||||
GetProcessPluginName ();
|
||||
|
||||
void
|
||||
SetProcessPluginName (const char *plugin_name);
|
||||
|
||||
uint32_t
|
||||
GetUserID();
|
||||
|
||||
uint32_t
|
||||
GetGroupID();
|
||||
|
||||
bool
|
||||
UserIDIsValid ();
|
||||
|
||||
bool
|
||||
GroupIDIsValid ();
|
||||
|
||||
void
|
||||
SetUserID (uint32_t uid);
|
||||
|
||||
void
|
||||
SetGroupID (uint32_t gid);
|
||||
|
||||
uint32_t
|
||||
GetEffectiveUserID();
|
||||
|
||||
uint32_t
|
||||
GetEffectiveGroupID();
|
||||
|
||||
bool
|
||||
EffectiveUserIDIsValid ();
|
||||
|
||||
bool
|
||||
EffectiveGroupIDIsValid ();
|
||||
|
||||
void
|
||||
SetEffectiveUserID (uint32_t uid);
|
||||
|
||||
void
|
||||
SetEffectiveGroupID (uint32_t gid);
|
||||
|
||||
lldb::pid_t
|
||||
GetParentProcessID ();
|
||||
|
||||
void
|
||||
SetParentProcessID (lldb::pid_t pid);
|
||||
|
||||
bool
|
||||
ParentProcessIDIsValid();
|
||||
|
||||
lldb::SBListener
|
||||
GetListener ();
|
||||
|
||||
void
|
||||
SetListener (lldb::SBListener &listener);
|
||||
};
|
||||
|
||||
} // namespace lldb
|
|
@ -9,106 +9,7 @@
|
|||
|
||||
namespace lldb {
|
||||
|
||||
class SBAttachInfo
|
||||
{
|
||||
public:
|
||||
SBAttachInfo ();
|
||||
|
||||
SBAttachInfo (lldb::pid_t pid);
|
||||
|
||||
SBAttachInfo (const char *path, bool wait_for);
|
||||
|
||||
SBAttachInfo (const lldb::SBAttachInfo &rhs);
|
||||
|
||||
lldb::pid_t
|
||||
GetProcessID ();
|
||||
|
||||
void
|
||||
SetProcessID (lldb::pid_t pid);
|
||||
|
||||
void
|
||||
SetExecutable (const char *path);
|
||||
|
||||
void
|
||||
SetExecutable (lldb::SBFileSpec exe_file);
|
||||
|
||||
bool
|
||||
GetWaitForLaunch ();
|
||||
|
||||
void
|
||||
SetWaitForLaunch (bool b);
|
||||
|
||||
bool
|
||||
GetIgnoreExisting ();
|
||||
|
||||
void
|
||||
SetIgnoreExisting (bool b);
|
||||
|
||||
uint32_t
|
||||
GetResumeCount ();
|
||||
|
||||
void
|
||||
SetResumeCount (uint32_t c);
|
||||
|
||||
const char *
|
||||
GetProcessPluginName ();
|
||||
|
||||
void
|
||||
SetProcessPluginName (const char *plugin_name);
|
||||
|
||||
uint32_t
|
||||
GetUserID();
|
||||
|
||||
uint32_t
|
||||
GetGroupID();
|
||||
|
||||
bool
|
||||
UserIDIsValid ();
|
||||
|
||||
bool
|
||||
GroupIDIsValid ();
|
||||
|
||||
void
|
||||
SetUserID (uint32_t uid);
|
||||
|
||||
void
|
||||
SetGroupID (uint32_t gid);
|
||||
|
||||
uint32_t
|
||||
GetEffectiveUserID();
|
||||
|
||||
uint32_t
|
||||
GetEffectiveGroupID();
|
||||
|
||||
bool
|
||||
EffectiveUserIDIsValid ();
|
||||
|
||||
bool
|
||||
EffectiveGroupIDIsValid ();
|
||||
|
||||
void
|
||||
SetEffectiveUserID (uint32_t uid);
|
||||
|
||||
void
|
||||
SetEffectiveGroupID (uint32_t gid);
|
||||
|
||||
lldb::pid_t
|
||||
GetParentProcessID ();
|
||||
|
||||
void
|
||||
SetParentProcessID (lldb::pid_t pid);
|
||||
|
||||
bool
|
||||
ParentProcessIDIsValid();
|
||||
|
||||
lldb::SBListener
|
||||
GetListener ();
|
||||
|
||||
void
|
||||
SetListener (lldb::SBListener &listener);
|
||||
};
|
||||
|
||||
|
||||
%feature("docstring",
|
||||
"Represents the target program running under the debugger.
|
||||
|
||||
|
|
|
@ -53,6 +53,7 @@ import os
|
|||
%{
|
||||
#include "lldb/lldb-public.h"
|
||||
#include "lldb/API/SBAddress.h"
|
||||
#include "lldb/API/SBAttachInfo.h"
|
||||
#include "lldb/API/SBBlock.h"
|
||||
#include "lldb/API/SBBreakpoint.h"
|
||||
#include "lldb/API/SBBreakpointLocation.h"
|
||||
|
@ -129,6 +130,7 @@ import os
|
|||
|
||||
/* Python interface files with docstrings. */
|
||||
%include "./Python/interface/SBAddress.i"
|
||||
%include "./Python/interface/SBAttachInfo.i"
|
||||
%include "./Python/interface/SBBlock.i"
|
||||
%include "./Python/interface/SBBreakpoint.i"
|
||||
%include "./Python/interface/SBBreakpointLocation.i"
|
||||
|
|
|
@ -5,6 +5,7 @@ set(LLVM_NO_RTTI 1)
|
|||
# well (where appropriate).
|
||||
add_lldb_library(lldbAPI
|
||||
SBAddress.cpp
|
||||
SBAttachInfo.cpp
|
||||
SBBlock.cpp
|
||||
SBBreakpoint.cpp
|
||||
SBBreakpointLocation.cpp
|
||||
|
|
|
@ -0,0 +1,244 @@
|
|||
//===-- SBAttachInfo.cpp ----------------------------------------*- C++ -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "lldb/lldb-python.h"
|
||||
|
||||
#include "lldb/API/SBAttachInfo.h"
|
||||
|
||||
#include "lldb/API/SBFileSpec.h"
|
||||
#include "lldb/API/SBListener.h"
|
||||
#include "lldb/Target/Process.h"
|
||||
|
||||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
|
||||
|
||||
SBAttachInfo::SBAttachInfo () :
|
||||
m_opaque_sp (new ProcessAttachInfo())
|
||||
{
|
||||
}
|
||||
|
||||
SBAttachInfo::SBAttachInfo (lldb::pid_t pid) :
|
||||
m_opaque_sp (new ProcessAttachInfo())
|
||||
{
|
||||
m_opaque_sp->SetProcessID (pid);
|
||||
}
|
||||
|
||||
SBAttachInfo::SBAttachInfo (const char *path, bool wait_for) :
|
||||
m_opaque_sp (new ProcessAttachInfo())
|
||||
{
|
||||
if (path && path[0])
|
||||
m_opaque_sp->GetExecutableFile().SetFile(path, false);
|
||||
m_opaque_sp->SetWaitForLaunch (wait_for);
|
||||
}
|
||||
|
||||
SBAttachInfo::SBAttachInfo (const SBAttachInfo &rhs) :
|
||||
m_opaque_sp (new ProcessAttachInfo())
|
||||
{
|
||||
*m_opaque_sp = *rhs.m_opaque_sp;
|
||||
}
|
||||
|
||||
SBAttachInfo::~SBAttachInfo()
|
||||
{
|
||||
}
|
||||
|
||||
lldb_private::ProcessAttachInfo &
|
||||
SBAttachInfo::ref ()
|
||||
{
|
||||
return *m_opaque_sp;
|
||||
}
|
||||
|
||||
SBAttachInfo &
|
||||
SBAttachInfo::operator = (const SBAttachInfo &rhs)
|
||||
{
|
||||
if (this != &rhs)
|
||||
*m_opaque_sp = *rhs.m_opaque_sp;
|
||||
return *this;
|
||||
}
|
||||
|
||||
lldb::pid_t
|
||||
SBAttachInfo::GetProcessID ()
|
||||
{
|
||||
return m_opaque_sp->GetProcessID();
|
||||
}
|
||||
|
||||
void
|
||||
SBAttachInfo::SetProcessID (lldb::pid_t pid)
|
||||
{
|
||||
m_opaque_sp->SetProcessID (pid);
|
||||
}
|
||||
|
||||
|
||||
uint32_t
|
||||
SBAttachInfo::GetResumeCount ()
|
||||
{
|
||||
return m_opaque_sp->GetResumeCount();
|
||||
}
|
||||
|
||||
void
|
||||
SBAttachInfo::SetResumeCount (uint32_t c)
|
||||
{
|
||||
m_opaque_sp->SetResumeCount (c);
|
||||
}
|
||||
|
||||
const char *
|
||||
SBAttachInfo::GetProcessPluginName ()
|
||||
{
|
||||
return m_opaque_sp->GetProcessPluginName();
|
||||
}
|
||||
|
||||
void
|
||||
SBAttachInfo::SetProcessPluginName (const char *plugin_name)
|
||||
{
|
||||
return m_opaque_sp->SetProcessPluginName (plugin_name);
|
||||
}
|
||||
|
||||
void
|
||||
SBAttachInfo::SetExecutable (const char *path)
|
||||
{
|
||||
if (path && path[0])
|
||||
m_opaque_sp->GetExecutableFile().SetFile(path, false);
|
||||
else
|
||||
m_opaque_sp->GetExecutableFile().Clear();
|
||||
}
|
||||
|
||||
void
|
||||
SBAttachInfo::SetExecutable (SBFileSpec exe_file)
|
||||
{
|
||||
if (exe_file.IsValid())
|
||||
m_opaque_sp->GetExecutableFile() = exe_file.ref();
|
||||
else
|
||||
m_opaque_sp->GetExecutableFile().Clear();
|
||||
}
|
||||
|
||||
bool
|
||||
SBAttachInfo::GetWaitForLaunch ()
|
||||
{
|
||||
return m_opaque_sp->GetWaitForLaunch();
|
||||
}
|
||||
|
||||
void
|
||||
SBAttachInfo::SetWaitForLaunch (bool b)
|
||||
{
|
||||
m_opaque_sp->SetWaitForLaunch (b);
|
||||
}
|
||||
|
||||
bool
|
||||
SBAttachInfo::GetIgnoreExisting ()
|
||||
{
|
||||
return m_opaque_sp->GetIgnoreExisting();
|
||||
}
|
||||
|
||||
void
|
||||
SBAttachInfo::SetIgnoreExisting (bool b)
|
||||
{
|
||||
m_opaque_sp->SetIgnoreExisting (b);
|
||||
}
|
||||
|
||||
uint32_t
|
||||
SBAttachInfo::GetUserID()
|
||||
{
|
||||
return m_opaque_sp->GetUserID();
|
||||
}
|
||||
|
||||
uint32_t
|
||||
SBAttachInfo::GetGroupID()
|
||||
{
|
||||
return m_opaque_sp->GetGroupID();
|
||||
}
|
||||
|
||||
bool
|
||||
SBAttachInfo::UserIDIsValid ()
|
||||
{
|
||||
return m_opaque_sp->UserIDIsValid();
|
||||
}
|
||||
|
||||
bool
|
||||
SBAttachInfo::GroupIDIsValid ()
|
||||
{
|
||||
return m_opaque_sp->GroupIDIsValid();
|
||||
}
|
||||
|
||||
void
|
||||
SBAttachInfo::SetUserID (uint32_t uid)
|
||||
{
|
||||
m_opaque_sp->SetUserID (uid);
|
||||
}
|
||||
|
||||
void
|
||||
SBAttachInfo::SetGroupID (uint32_t gid)
|
||||
{
|
||||
m_opaque_sp->SetGroupID (gid);
|
||||
}
|
||||
|
||||
uint32_t
|
||||
SBAttachInfo::GetEffectiveUserID()
|
||||
{
|
||||
return m_opaque_sp->GetEffectiveUserID();
|
||||
}
|
||||
|
||||
uint32_t
|
||||
SBAttachInfo::GetEffectiveGroupID()
|
||||
{
|
||||
return m_opaque_sp->GetEffectiveGroupID();
|
||||
}
|
||||
|
||||
bool
|
||||
SBAttachInfo::EffectiveUserIDIsValid ()
|
||||
{
|
||||
return m_opaque_sp->EffectiveUserIDIsValid();
|
||||
}
|
||||
|
||||
bool
|
||||
SBAttachInfo::EffectiveGroupIDIsValid ()
|
||||
{
|
||||
return m_opaque_sp->EffectiveGroupIDIsValid ();
|
||||
}
|
||||
|
||||
void
|
||||
SBAttachInfo::SetEffectiveUserID (uint32_t uid)
|
||||
{
|
||||
m_opaque_sp->SetEffectiveUserID(uid);
|
||||
}
|
||||
|
||||
void
|
||||
SBAttachInfo::SetEffectiveGroupID (uint32_t gid)
|
||||
{
|
||||
m_opaque_sp->SetEffectiveGroupID(gid);
|
||||
}
|
||||
|
||||
lldb::pid_t
|
||||
SBAttachInfo::GetParentProcessID ()
|
||||
{
|
||||
return m_opaque_sp->GetParentProcessID();
|
||||
}
|
||||
|
||||
void
|
||||
SBAttachInfo::SetParentProcessID (lldb::pid_t pid)
|
||||
{
|
||||
m_opaque_sp->SetParentProcessID (pid);
|
||||
}
|
||||
|
||||
bool
|
||||
SBAttachInfo::ParentProcessIDIsValid()
|
||||
{
|
||||
return m_opaque_sp->ParentProcessIDIsValid();
|
||||
}
|
||||
|
||||
SBListener
|
||||
SBAttachInfo::GetListener ()
|
||||
{
|
||||
return SBListener(m_opaque_sp->GetListener());
|
||||
}
|
||||
|
||||
void
|
||||
SBAttachInfo::SetListener (SBListener &listener)
|
||||
{
|
||||
m_opaque_sp->SetListener(listener.GetSP());
|
||||
}
|
|
@ -66,231 +66,6 @@ using namespace lldb_private;
|
|||
|
||||
#define DEFAULT_DISASM_BYTE_SIZE 32
|
||||
|
||||
|
||||
SBAttachInfo::SBAttachInfo () :
|
||||
m_opaque_sp (new ProcessAttachInfo())
|
||||
{
|
||||
}
|
||||
|
||||
SBAttachInfo::SBAttachInfo (lldb::pid_t pid) :
|
||||
m_opaque_sp (new ProcessAttachInfo())
|
||||
{
|
||||
m_opaque_sp->SetProcessID (pid);
|
||||
}
|
||||
|
||||
SBAttachInfo::SBAttachInfo (const char *path, bool wait_for) :
|
||||
m_opaque_sp (new ProcessAttachInfo())
|
||||
{
|
||||
if (path && path[0])
|
||||
m_opaque_sp->GetExecutableFile().SetFile(path, false);
|
||||
m_opaque_sp->SetWaitForLaunch (wait_for);
|
||||
}
|
||||
|
||||
SBAttachInfo::SBAttachInfo (const SBAttachInfo &rhs) :
|
||||
m_opaque_sp (new ProcessAttachInfo())
|
||||
{
|
||||
*m_opaque_sp = *rhs.m_opaque_sp;
|
||||
}
|
||||
|
||||
SBAttachInfo::~SBAttachInfo()
|
||||
{
|
||||
}
|
||||
|
||||
lldb_private::ProcessAttachInfo &
|
||||
SBAttachInfo::ref ()
|
||||
{
|
||||
return *m_opaque_sp;
|
||||
}
|
||||
|
||||
SBAttachInfo &
|
||||
SBAttachInfo::operator = (const SBAttachInfo &rhs)
|
||||
{
|
||||
if (this != &rhs)
|
||||
*m_opaque_sp = *rhs.m_opaque_sp;
|
||||
return *this;
|
||||
}
|
||||
|
||||
lldb::pid_t
|
||||
SBAttachInfo::GetProcessID ()
|
||||
{
|
||||
return m_opaque_sp->GetProcessID();
|
||||
}
|
||||
|
||||
void
|
||||
SBAttachInfo::SetProcessID (lldb::pid_t pid)
|
||||
{
|
||||
m_opaque_sp->SetProcessID (pid);
|
||||
}
|
||||
|
||||
|
||||
uint32_t
|
||||
SBAttachInfo::GetResumeCount ()
|
||||
{
|
||||
return m_opaque_sp->GetResumeCount();
|
||||
}
|
||||
|
||||
void
|
||||
SBAttachInfo::SetResumeCount (uint32_t c)
|
||||
{
|
||||
m_opaque_sp->SetResumeCount (c);
|
||||
}
|
||||
|
||||
const char *
|
||||
SBAttachInfo::GetProcessPluginName ()
|
||||
{
|
||||
return m_opaque_sp->GetProcessPluginName();
|
||||
}
|
||||
|
||||
void
|
||||
SBAttachInfo::SetProcessPluginName (const char *plugin_name)
|
||||
{
|
||||
return m_opaque_sp->SetProcessPluginName (plugin_name);
|
||||
}
|
||||
|
||||
void
|
||||
SBAttachInfo::SetExecutable (const char *path)
|
||||
{
|
||||
if (path && path[0])
|
||||
m_opaque_sp->GetExecutableFile().SetFile(path, false);
|
||||
else
|
||||
m_opaque_sp->GetExecutableFile().Clear();
|
||||
}
|
||||
|
||||
void
|
||||
SBAttachInfo::SetExecutable (SBFileSpec exe_file)
|
||||
{
|
||||
if (exe_file.IsValid())
|
||||
m_opaque_sp->GetExecutableFile() = exe_file.ref();
|
||||
else
|
||||
m_opaque_sp->GetExecutableFile().Clear();
|
||||
}
|
||||
|
||||
bool
|
||||
SBAttachInfo::GetWaitForLaunch ()
|
||||
{
|
||||
return m_opaque_sp->GetWaitForLaunch();
|
||||
}
|
||||
|
||||
void
|
||||
SBAttachInfo::SetWaitForLaunch (bool b)
|
||||
{
|
||||
m_opaque_sp->SetWaitForLaunch (b);
|
||||
}
|
||||
|
||||
bool
|
||||
SBAttachInfo::GetIgnoreExisting ()
|
||||
{
|
||||
return m_opaque_sp->GetIgnoreExisting();
|
||||
}
|
||||
|
||||
void
|
||||
SBAttachInfo::SetIgnoreExisting (bool b)
|
||||
{
|
||||
m_opaque_sp->SetIgnoreExisting (b);
|
||||
}
|
||||
|
||||
uint32_t
|
||||
SBAttachInfo::GetUserID()
|
||||
{
|
||||
return m_opaque_sp->GetUserID();
|
||||
}
|
||||
|
||||
uint32_t
|
||||
SBAttachInfo::GetGroupID()
|
||||
{
|
||||
return m_opaque_sp->GetGroupID();
|
||||
}
|
||||
|
||||
bool
|
||||
SBAttachInfo::UserIDIsValid ()
|
||||
{
|
||||
return m_opaque_sp->UserIDIsValid();
|
||||
}
|
||||
|
||||
bool
|
||||
SBAttachInfo::GroupIDIsValid ()
|
||||
{
|
||||
return m_opaque_sp->GroupIDIsValid();
|
||||
}
|
||||
|
||||
void
|
||||
SBAttachInfo::SetUserID (uint32_t uid)
|
||||
{
|
||||
m_opaque_sp->SetUserID (uid);
|
||||
}
|
||||
|
||||
void
|
||||
SBAttachInfo::SetGroupID (uint32_t gid)
|
||||
{
|
||||
m_opaque_sp->SetGroupID (gid);
|
||||
}
|
||||
|
||||
uint32_t
|
||||
SBAttachInfo::GetEffectiveUserID()
|
||||
{
|
||||
return m_opaque_sp->GetEffectiveUserID();
|
||||
}
|
||||
|
||||
uint32_t
|
||||
SBAttachInfo::GetEffectiveGroupID()
|
||||
{
|
||||
return m_opaque_sp->GetEffectiveGroupID();
|
||||
}
|
||||
|
||||
bool
|
||||
SBAttachInfo::EffectiveUserIDIsValid ()
|
||||
{
|
||||
return m_opaque_sp->EffectiveUserIDIsValid();
|
||||
}
|
||||
|
||||
bool
|
||||
SBAttachInfo::EffectiveGroupIDIsValid ()
|
||||
{
|
||||
return m_opaque_sp->EffectiveGroupIDIsValid ();
|
||||
}
|
||||
|
||||
void
|
||||
SBAttachInfo::SetEffectiveUserID (uint32_t uid)
|
||||
{
|
||||
m_opaque_sp->SetEffectiveUserID(uid);
|
||||
}
|
||||
|
||||
void
|
||||
SBAttachInfo::SetEffectiveGroupID (uint32_t gid)
|
||||
{
|
||||
m_opaque_sp->SetEffectiveGroupID(gid);
|
||||
}
|
||||
|
||||
lldb::pid_t
|
||||
SBAttachInfo::GetParentProcessID ()
|
||||
{
|
||||
return m_opaque_sp->GetParentProcessID();
|
||||
}
|
||||
|
||||
void
|
||||
SBAttachInfo::SetParentProcessID (lldb::pid_t pid)
|
||||
{
|
||||
m_opaque_sp->SetParentProcessID (pid);
|
||||
}
|
||||
|
||||
bool
|
||||
SBAttachInfo::ParentProcessIDIsValid()
|
||||
{
|
||||
return m_opaque_sp->ParentProcessIDIsValid();
|
||||
}
|
||||
|
||||
SBListener
|
||||
SBAttachInfo::GetListener ()
|
||||
{
|
||||
return SBListener(m_opaque_sp->GetListener());
|
||||
}
|
||||
|
||||
void
|
||||
SBAttachInfo::SetListener (SBListener &listener)
|
||||
{
|
||||
m_opaque_sp->SetListener(listener.GetSP());
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
Error
|
||||
|
|
|
@ -59,6 +59,7 @@ add_lldb_library(liblldb SHARED
|
|||
lldb.cpp
|
||||
lldb-log.cpp
|
||||
API/SBAddress.cpp
|
||||
API/SBAttachInfo.cpp
|
||||
API/SBBlock.cpp
|
||||
API/SBBreakpoint.cpp
|
||||
API/SBBreakpointLocation.cpp
|
||||
|
|
Loading…
Reference in New Issue