forked from OSchip/llvm-project
Revert commits that cause broken builds on GCC buildbots
- build fails due to PyCallable template definition inside an extern "C" scope This commit reverts 185240, 184893 and 184608. llvm-svn: 185560
This commit is contained in:
parent
4331ac7bd3
commit
9a71a7d81b
|
@ -98,13 +98,6 @@ public:
|
|||
const char *
|
||||
GetError (bool only_if_no_immediate);
|
||||
|
||||
void
|
||||
SetError (lldb::SBError &error,
|
||||
const char *fallback_error_cstr = NULL);
|
||||
|
||||
void
|
||||
SetError (const char* error_cstr);
|
||||
|
||||
protected:
|
||||
friend class SBCommandInterpreter;
|
||||
friend class SBOptions;
|
||||
|
|
|
@ -66,7 +66,6 @@ public:
|
|||
|
||||
protected:
|
||||
|
||||
friend class SBCommandReturnObject;
|
||||
friend class SBData;
|
||||
friend class SBDebugger;
|
||||
friend class SBCommunication;
|
||||
|
|
|
@ -143,11 +143,8 @@ public:
|
|||
|
||||
void
|
||||
SetError (const Error &error,
|
||||
const char *fallback_error_cstr = NULL);
|
||||
const char *fallback_error_cstr);
|
||||
|
||||
void
|
||||
SetError (const char *error_cstr);
|
||||
|
||||
lldb::ReturnStatus
|
||||
GetStatus();
|
||||
|
||||
|
|
|
@ -120,6 +120,7 @@ public:
|
|||
const char *session_dictionary_name,
|
||||
lldb::DebuggerSP& debugger,
|
||||
const char* args,
|
||||
std::string& err_msg,
|
||||
lldb_private::CommandReturnObject& cmd_retobj);
|
||||
|
||||
typedef bool (*SWIGPythonCallModuleInit) (const char *python_module_name,
|
||||
|
|
|
@ -1545,7 +1545,7 @@
|
|||
69A01E1E1236C5D400C660B5 /* Mutex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Mutex.cpp; sourceTree = "<group>"; };
|
||||
69A01E1F1236C5D400C660B5 /* Symbols.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Symbols.cpp; sourceTree = "<group>"; };
|
||||
69A01E201236C5D400C660B5 /* TimeValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TimeValue.cpp; sourceTree = "<group>"; };
|
||||
94005E0313F438DF001EF42D /* python-wrapper.swig */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; path = "python-wrapper.swig"; sourceTree = "<group>"; };
|
||||
94005E0313F438DF001EF42D /* python-wrapper.swig */ = {isa = PBXFileReference; lastKnownFileType = text; path = "python-wrapper.swig"; sourceTree = "<group>"; };
|
||||
94005E0513F45A1B001EF42D /* embedded_interpreter.py */ = {isa = PBXFileReference; lastKnownFileType = text.script.python; name = embedded_interpreter.py; path = source/Interpreter/embedded_interpreter.py; sourceTree = "<group>"; };
|
||||
94031A9B13CF484600DCFF3C /* InputReaderEZ.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = InputReaderEZ.h; path = include/lldb/Core/InputReaderEZ.h; sourceTree = "<group>"; };
|
||||
94031A9D13CF486600DCFF3C /* InputReaderEZ.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = InputReaderEZ.cpp; path = source/Core/InputReaderEZ.cpp; sourceTree = "<group>"; };
|
||||
|
@ -1557,7 +1557,7 @@
|
|||
944372DB171F6B4300E57C32 /* RegisterContextDummy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextDummy.h; path = Utility/RegisterContextDummy.h; sourceTree = "<group>"; };
|
||||
9443B120140C18A90013457C /* SBData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBData.h; path = include/lldb/API/SBData.h; sourceTree = "<group>"; };
|
||||
9443B121140C18C10013457C /* SBData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBData.cpp; path = source/API/SBData.cpp; sourceTree = "<group>"; };
|
||||
944DC3481774C99000D7D884 /* python-swigsafecast.swig */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; path = "python-swigsafecast.swig"; sourceTree = "<group>"; };
|
||||
944DC3481774C99000D7D884 /* python-swigsafecast.swig */ = {isa = PBXFileReference; lastKnownFileType = text; path = "python-swigsafecast.swig"; sourceTree = "<group>"; };
|
||||
9452573616262CD000325455 /* SBDeclaration.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBDeclaration.i; sourceTree = "<group>"; };
|
||||
9452573816262CEF00325455 /* SBDeclaration.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBDeclaration.h; path = include/lldb/API/SBDeclaration.h; sourceTree = "<group>"; };
|
||||
9452573916262D0200325455 /* SBDeclaration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBDeclaration.cpp; path = source/API/SBDeclaration.cpp; sourceTree = "<group>"; };
|
||||
|
@ -1628,7 +1628,7 @@
|
|||
94D6A0A816CEB55F00833B6E /* NSDictionary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NSDictionary.cpp; path = source/DataFormatters/NSDictionary.cpp; sourceTree = "<group>"; };
|
||||
94D6A0A916CEB55F00833B6E /* NSSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NSSet.cpp; path = source/DataFormatters/NSSet.cpp; sourceTree = "<group>"; };
|
||||
94E367CC140C4EC4001C7A5A /* modify-python-lldb.py */ = {isa = PBXFileReference; lastKnownFileType = text.script.python; path = "modify-python-lldb.py"; sourceTree = "<group>"; };
|
||||
94E367CE140C4EEA001C7A5A /* python-typemaps.swig */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; path = "python-typemaps.swig"; sourceTree = "<group>"; };
|
||||
94E367CE140C4EEA001C7A5A /* python-typemaps.swig */ = {isa = PBXFileReference; lastKnownFileType = text; path = "python-typemaps.swig"; sourceTree = "<group>"; };
|
||||
94EA1D5A15E6C99B00D4171A /* PythonDataObjects.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PythonDataObjects.h; path = include/lldb/Interpreter/PythonDataObjects.h; sourceTree = "<group>"; };
|
||||
94EA1D5B15E6C9B400D4171A /* PythonDataObjects.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PythonDataObjects.cpp; path = source/Interpreter/PythonDataObjects.cpp; sourceTree = "<group>"; };
|
||||
94EBAC8313D9EE26009BA64E /* PythonPointer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PythonPointer.h; path = include/lldb/Utility/PythonPointer.h; sourceTree = "<group>"; };
|
||||
|
@ -1658,7 +1658,7 @@
|
|||
9A42976211861AA600FE05CD /* CommandObjectBreakpointCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectBreakpointCommand.cpp; path = source/Commands/CommandObjectBreakpointCommand.cpp; sourceTree = "<group>"; };
|
||||
9A4633DA11F65D8600955CE1 /* UserSettingsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UserSettingsController.h; path = include/lldb/Core/UserSettingsController.h; sourceTree = "<group>"; };
|
||||
9A4633DC11F65D9A00955CE1 /* UserSettingsController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UserSettingsController.cpp; path = source/Core/UserSettingsController.cpp; sourceTree = "<group>"; };
|
||||
9A48A3A7124AAA5A00922451 /* python-extensions.swig */ = {isa = PBXFileReference; explicitFileType = text.script.python; fileEncoding = 4; path = "python-extensions.swig"; sourceTree = "<group>"; };
|
||||
9A48A3A7124AAA5A00922451 /* python-extensions.swig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "python-extensions.swig"; sourceTree = "<group>"; };
|
||||
9A4F350F1368A51A00823F52 /* StreamAsynchronousIO.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StreamAsynchronousIO.cpp; path = source/Core/StreamAsynchronousIO.cpp; sourceTree = "<group>"; };
|
||||
9A4F35111368A54100823F52 /* StreamAsynchronousIO.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StreamAsynchronousIO.h; path = include/lldb/Core/StreamAsynchronousIO.h; sourceTree = "<group>"; };
|
||||
9A633FE7112DCE3C001A7E43 /* SBFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBFrame.cpp; path = source/API/SBFrame.cpp; sourceTree = "<group>"; };
|
||||
|
|
|
@ -58,14 +58,7 @@ public:
|
|||
|
||||
void
|
||||
SetStatus (lldb::ReturnStatus status);
|
||||
|
||||
void
|
||||
SetError (lldb::SBError &error,
|
||||
const char *fallback_error_cstr = NULL);
|
||||
|
||||
void
|
||||
SetError (const char *error_cstr);
|
||||
|
||||
lldb::ReturnStatus
|
||||
GetStatus();
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
#ifndef __cplusplus
|
||||
#error needs C++ to build these
|
||||
#endif
|
||||
|
||||
// leaving this undefined ensures we will get a linker error if we try to use SBTypeToSWIGWrapper()
|
||||
// for a type for which we did not specialze this function
|
||||
template <typename SBClass>
|
||||
|
@ -11,38 +15,6 @@ SBTypeToSWIGWrapper (SBClass& sb_object)
|
|||
return SBTypeToSWIGWrapper(&sb_object);
|
||||
}
|
||||
|
||||
template <typename SBClass>
|
||||
PyObject*
|
||||
SBTypeToSWIGWrapper (const SBClass& sb_object)
|
||||
{
|
||||
return SBTypeToSWIGWrapper(&sb_object);
|
||||
}
|
||||
|
||||
template <>
|
||||
PyObject*
|
||||
SBTypeToSWIGWrapper (PyObject* py_object)
|
||||
{
|
||||
return py_object;
|
||||
}
|
||||
|
||||
template <>
|
||||
PyObject*
|
||||
SBTypeToSWIGWrapper (const char* c_str)
|
||||
{
|
||||
if (c_str)
|
||||
return PyString_FromString(c_str);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
template <>
|
||||
PyObject*
|
||||
SBTypeToSWIGWrapper (unsigned int* c_int)
|
||||
{
|
||||
if (!c_int)
|
||||
return NULL;
|
||||
return PyInt_FromLong(*c_int);
|
||||
}
|
||||
|
||||
template <>
|
||||
PyObject*
|
||||
SBTypeToSWIGWrapper (lldb::SBProcess* process_sb)
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -8,10 +8,8 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "lldb/API/SBCommandReturnObject.h"
|
||||
#include "lldb/API/SBError.h"
|
||||
#include "lldb/API/SBStream.h"
|
||||
|
||||
#include "lldb/Core/Error.h"
|
||||
#include "lldb/Core/Log.h"
|
||||
#include "lldb/Interpreter/CommandReturnObject.h"
|
||||
|
||||
|
@ -331,21 +329,3 @@ SBCommandReturnObject::Printf(const char* format, ...)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
SBCommandReturnObject::SetError (lldb::SBError &error, const char *fallback_error_cstr)
|
||||
{
|
||||
if (m_opaque_ap.get())
|
||||
{
|
||||
if (error.IsValid())
|
||||
m_opaque_ap->SetError(error.ref(), fallback_error_cstr);
|
||||
else if (fallback_error_cstr)
|
||||
m_opaque_ap->SetError(Error(), fallback_error_cstr);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SBCommandReturnObject::SetError (const char *error_cstr)
|
||||
{
|
||||
if (m_opaque_ap.get() && error_cstr)
|
||||
m_opaque_ap->SetError(error_cstr);
|
||||
}
|
||||
|
|
|
@ -1328,9 +1328,7 @@ protected:
|
|||
// Don't change the status if the command already set it...
|
||||
if (result.GetStatus() == eReturnStatusInvalid)
|
||||
{
|
||||
if (result.GetErrorData() && result.GetErrorData()[0])
|
||||
result.SetStatus(eReturnStatusFailed);
|
||||
else if (result.GetOutputData() == NULL || result.GetOutputData()[0] == '\0')
|
||||
if (result.GetOutputData() == NULL || result.GetOutputData()[0] == '\0')
|
||||
result.SetStatus(eReturnStatusSuccessFinishNoResult);
|
||||
else
|
||||
result.SetStatus(eReturnStatusSuccessFinishResult);
|
||||
|
|
|
@ -143,19 +143,9 @@ CommandReturnObject::SetError (const Error &error, const char *fallback_error_cs
|
|||
const char *error_cstr = error.AsCString();
|
||||
if (error_cstr == NULL)
|
||||
error_cstr = fallback_error_cstr;
|
||||
SetError(error_cstr);
|
||||
AppendError (error_cstr);
|
||||
SetStatus (eReturnStatusFailed);
|
||||
}
|
||||
|
||||
void
|
||||
CommandReturnObject::SetError (const char *error_cstr)
|
||||
{
|
||||
if (error_cstr)
|
||||
{
|
||||
AppendError (error_cstr);
|
||||
SetStatus (eReturnStatusFailed);
|
||||
}
|
||||
}
|
||||
|
||||
// Similar to AppendError, but do not prepend 'Error: ' to message, and
|
||||
// don't append "\n" to the end of it.
|
||||
|
||||
|
|
|
@ -115,6 +115,7 @@ LLDBSwigPythonCallCommand (const char *python_function_name,
|
|||
const char *session_dictionary_name,
|
||||
lldb::DebuggerSP& debugger,
|
||||
const char* args,
|
||||
std::string& err_msg,
|
||||
lldb_private::CommandReturnObject& cmd_retobj);
|
||||
|
||||
extern "C" bool
|
||||
|
@ -2969,7 +2970,7 @@ ScriptInterpreterPython::RunScriptBasedCommand(const char* impl_function,
|
|||
return false;
|
||||
}
|
||||
|
||||
bool ret_val = false;
|
||||
bool ret_val;
|
||||
|
||||
std::string err_msg;
|
||||
|
||||
|
@ -2994,11 +2995,12 @@ ScriptInterpreterPython::RunScriptBasedCommand(const char* impl_function,
|
|||
m_dictionary_name.c_str(),
|
||||
debugger_sp,
|
||||
args,
|
||||
err_msg,
|
||||
cmd_retobj);
|
||||
}
|
||||
|
||||
if (!ret_val)
|
||||
error.SetErrorString("unable to execute script function");
|
||||
error.SetErrorString(err_msg.c_str());
|
||||
else
|
||||
error.Clear();
|
||||
|
||||
|
|
|
@ -13,7 +13,9 @@ def target_name_impl(debugger, args, result, dict):
|
|||
file = target.GetExecutable()
|
||||
print >>result, ('Current target ' + file.GetFilename())
|
||||
if args == 'fail':
|
||||
result.SetError('a test for error in command')
|
||||
return 'a test for error in command'
|
||||
else:
|
||||
return None
|
||||
|
||||
def print_wait_impl(debugger, args, result, dict):
|
||||
result.SetImmediateOutputFile(sys.stdout)
|
||||
|
@ -23,10 +25,11 @@ def print_wait_impl(debugger, args, result, dict):
|
|||
print >>result, ('Still doing long task..')
|
||||
time.sleep(1)
|
||||
print >>result, ('Done; if you saw the delays I am doing OK')
|
||||
return None
|
||||
|
||||
def check_for_synchro(debugger, args, result, dict):
|
||||
if debugger.GetAsync() == True:
|
||||
print >>result, ('I am running async')
|
||||
if debugger.GetAsync() == False:
|
||||
print >>result, ('I am running sync')
|
||||
|
||||
return None
|
||||
|
|
|
@ -124,7 +124,7 @@ class HelpCommandTestCase(TestBase):
|
|||
"""Command 'help image du line' is not ambiguous and should work."""
|
||||
# 'image' is an alias for 'target modules'.
|
||||
self.expect("help image du line",
|
||||
substrs = ['Dump the line table for one or more compilation units'])
|
||||
substrs = ['Dump the debug symbol file for one or more target modules'])
|
||||
|
||||
def test_help_target_variable_syntax(self):
|
||||
"""Command 'help target variable' should display <variable-name> ..."""
|
||||
|
|
Loading…
Reference in New Issue