[Lldb-commits] [PATCH] D32149: Correct handling NetBSD core(5) files with threads
krytarowski planned changes to this revision. krytarowski added a comment. Suspended, I need to resurrect tracing of 1 thread and fix kernel bugs for multiple threads first. Repository: rL LLVM https://reviews.llvm.org/D32149 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D38323: Enable breakpoints and read/write GPRs for ppc64le
alexandreyy created this revision. Herald added subscribers: JDevlieghere, kbarton, mgorny, nemanjai. Add support for ppc64le to create breakpoints and read/write general purpose registers. Other features for ppc64le and functions to read/write other registers are being implemented. https://reviews.llvm.org/D38323 Files: source/Plugins/Process/Linux/CMakeLists.txt source/Plugins/Process/Linux/NativeProcessLinux.cpp source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.cpp source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.h source/Plugins/Process/Utility/CMakeLists.txt source/Plugins/Process/Utility/RegisterContextPOSIX_ppc64le.cpp source/Plugins/Process/Utility/RegisterContextPOSIX_ppc64le.h source/Plugins/Process/Utility/RegisterInfoPOSIX_ppc64le.cpp source/Plugins/Process/Utility/RegisterInfoPOSIX_ppc64le.h source/Plugins/Process/Utility/RegisterInfos_ppc64le.h source/Plugins/Process/Utility/lldb-ppc64le-register-enums.h source/Target/Platform.cpp source/Target/Thread.cpp source/Utility/PPC64LE_DWARF_Registers.h source/Utility/PPC64LE_ehframe_Registers.h Index: source/Utility/PPC64LE_ehframe_Registers.h === --- /dev/null +++ source/Utility/PPC64LE_ehframe_Registers.h @@ -0,0 +1,63 @@ +//===-- PPC64LE_ehframe_Registers.h -*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===--===// + +#ifndef utility_PPC64LE_ehframe_Registers_h_ +#define utility_PPC64LE_ehframe_Registers_h_ + +// The register numbers used in the eh_frame unwind information. +// Should be the same as DWARF register numbers. + +namespace ppc64le_ehframe { + +enum { + r0 = 0, + r1, + r2, + r3, + r4, + r5, + r6, + r7, + r8, + r9, + r10, + r11, + r12, + r13, + r14, + r15, + r16, + r17, + r18, + r19, + r20, + r21, + r22, + r23, + r24, + r25, + r26, + r27, + r28, + r29, + r30, + r31, + lr = 65, + ctr, + cr = 68, + xer = 76, + pc, + softe, + trap, + origr3, + msr, +}; +} + +#endif // utility_PPC64LE_ehframe_Registers_h_ Index: source/Utility/PPC64LE_DWARF_Registers.h === --- /dev/null +++ source/Utility/PPC64LE_DWARF_Registers.h @@ -0,0 +1,63 @@ +//===-- PPC64LE_DWARF_Registers.h ---*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===--===// + +#ifndef utility_PPC64LE_DWARF_Registers_h_ +#define utility_PPC64LE_DWARF_Registers_h_ + +#include "lldb/lldb-private.h" + +namespace ppc64le_dwarf { + +enum { + dwarf_r0_ppc64le = 0, + dwarf_r1_ppc64le, + dwarf_r2_ppc64le, + dwarf_r3_ppc64le, + dwarf_r4_ppc64le, + dwarf_r5_ppc64le, + dwarf_r6_ppc64le, + dwarf_r7_ppc64le, + dwarf_r8_ppc64le, + dwarf_r9_ppc64le, + dwarf_r10_ppc64le, + dwarf_r11_ppc64le, + dwarf_r12_ppc64le, + dwarf_r13_ppc64le, + dwarf_r14_ppc64le, + dwarf_r15_ppc64le, + dwarf_r16_ppc64le, + dwarf_r17_ppc64le, + dwarf_r18_ppc64le, + dwarf_r19_ppc64le, + dwarf_r20_ppc64le, + dwarf_r21_ppc64le, + dwarf_r22_ppc64le, + dwarf_r23_ppc64le, + dwarf_r24_ppc64le, + dwarf_r25_ppc64le, + dwarf_r26_ppc64le, + dwarf_r27_ppc64le, + dwarf_r28_ppc64le, + dwarf_r29_ppc64le, + dwarf_r30_ppc64le, + dwarf_r31_ppc64le, + dwarf_lr_ppc64le = 65, + dwarf_ctr_ppc64le, + dwarf_cr_ppc64le = 68, + dwarf_xer_ppc64le = 76, + dwarf_pc_ppc64le, + dwarf_softe_ppc64le, + dwarf_trap_ppc64le, + dwarf_origr3_ppc64le, + dwarf_msr_ppc64le, +}; + +} // namespace ppc64le_dwarf + +#endif // utility_PPC64LE_DWARF_Registers_h_ Index: source/Target/Thread.cpp === --- source/Target/Thread.cpp +++ source/Target/Thread.cpp @@ -2075,6 +2075,7 @@ case llvm::Triple::mips64el: case llvm::Triple::ppc: case llvm::Triple::ppc64: +case llvm::Triple::ppc64le: case llvm::Triple::systemz: case llvm::Triple::hexagon: m_unwinder_ap.reset(new UnwindLLDB(*this)); Index: source/Target/Platform.cpp === --- source/Target/Platform.cpp +++ source/Target/Platform.cpp @@ -1878,6 +1878,12 @@ trap_opcode_size = sizeof(g_ppc_opcode); } break; + case llvm::Triple::ppc64le: { +static const uint8_t g_ppc64le_opcode[] = {0x08, 0x00, 0xe0, 0x7f}; // trap +trap_opcode = g_ppc64le_opcode; +trap_opcode_size = sizeof(g_ppc64le_opcode); + } break; + case llvm::Triple::x86: case llvm::Triple::x86_64: { static const uint8
[Lldb-commits] [PATCH] D38328: Assume git-generated patch files in build scripts
fjricci created this revision. It is probably reasonable to expect that most (or all) users of the patch file feature will be using git, and assuming git patch files makes this feature easier to use. https://reviews.llvm.org/D38328 Files: scripts/Xcode/build-llvm.py scripts/build-lldb-llvm-clang Index: scripts/build-lldb-llvm-clang === --- scripts/build-lldb-llvm-clang +++ scripts/build-lldb-llvm-clang @@ -33,15 +33,15 @@ for patch_file in ../scripts/llvm.*.diff do echo "Applying patch from '$patch_file'" -patch -p0 < "$patch_file" +patch -p1 < "$patch_file" done # change directory to "./llvm/tools/clang" cd tools/clang for patch_file in ../../../scripts/clang.*.diff do echo "Applying patch from '$patch_file'" -patch -p0 < "$patch_file" +patch -p1 < "$patch_file" done # change directory to "./" Index: scripts/Xcode/build-llvm.py === --- scripts/Xcode/build-llvm.py +++ scripts/Xcode/build-llvm.py @@ -224,7 +224,7 @@ f, spec['name'] + '.*.diff')] for p in patches: run_in_directory(["patch", - "-p0", + "-p1", "-i", os.path.join(lldb_source_path(), 'scripts', Index: scripts/build-lldb-llvm-clang === --- scripts/build-lldb-llvm-clang +++ scripts/build-lldb-llvm-clang @@ -33,15 +33,15 @@ for patch_file in ../scripts/llvm.*.diff do echo "Applying patch from '$patch_file'" -patch -p0 < "$patch_file" +patch -p1 < "$patch_file" done # change directory to "./llvm/tools/clang" cd tools/clang for patch_file in ../../../scripts/clang.*.diff do echo "Applying patch from '$patch_file'" -patch -p0 < "$patch_file" +patch -p1 < "$patch_file" done # change directory to "./" Index: scripts/Xcode/build-llvm.py === --- scripts/Xcode/build-llvm.py +++ scripts/Xcode/build-llvm.py @@ -224,7 +224,7 @@ f, spec['name'] + '.*.diff')] for p in patches: run_in_directory(["patch", - "-p0", + "-p1", "-i", os.path.join(lldb_source_path(), 'scripts', ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r314343 - Update the Objective-C runtime interface code to handle objc objects
Author: jmolenda Date: Wed Sep 27 13:56:32 2017 New Revision: 314343 URL: http://llvm.org/viewvc/llvm-project?rev=314343&view=rev Log: Update the Objective-C runtime interface code to handle objc objects whose isa is an index instead of a pointer. Currently, this type of isa encoding is only used on watchos. Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp?rev=314343&r1=314342&r2=314343&view=diff == --- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp (original) +++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp Wed Sep 27 13:56:32 2017 @@ -234,7 +234,7 @@ Address *AppleObjCRuntime::GetPrintForDe return m_PrintForDebugger_addr.get(); } -bool AppleObjCRuntime::CouldHaveDynamicValue(ValueObject &in_value) { + bool AppleObjCRuntime::CouldHaveDynamicValue(ValueObject &in_value) { return in_value.GetCompilerType().IsPossibleDynamicType( NULL, false, // do not check C++ Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h?rev=314343&r1=314342&r2=314343&view=diff == --- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h (original) +++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h Wed Sep 27 13:56:32 2017 @@ -95,6 +95,8 @@ public: virtual void GetValuesForGlobalCFBooleans(lldb::addr_t &cf_true, lldb::addr_t &cf_false); + + virtual bool IsTaggedPointer (lldb::addr_t addr) { return false; } protected: // Call CreateInstance instead. Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp?rev=314343&r1=314342&r2=314343&view=diff == --- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp (original) +++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp Wed Sep 27 13:56:32 2017 @@ -62,6 +62,11 @@ #include "AppleObjCTrampolineHandler.h" #include "AppleObjCTypeEncodingParser.h" +#include "clang/AST/ASTContext.h" +#include "clang/AST/DeclObjC.h" + +#include + using namespace lldb; using namespace lldb_private; @@ -394,7 +399,7 @@ AppleObjCRuntimeV2::AppleObjCRuntimeV2(P } bool AppleObjCRuntimeV2::GetDynamicTypeAndAddress( -ValueObject &in_value, DynamicValueType use_dynamic, +ValueObject &in_value, lldb::DynamicValueType use_dynamic, TypeAndOrName &class_type_or_name, Address &address, Value::ValueType &value_type) { // We should never get here with a null process... @@ -1980,6 +1985,8 @@ AppleObjCRuntimeV2::NonPointerISACache:: Status error; + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_TYPES)); + auto objc_debug_isa_magic_mask = ExtractRuntimeGlobalSymbol( process, ConstString("objc_debug_isa_magic_mask"), objc_module_sp, error); if (error.Fail()) @@ -1996,12 +2003,47 @@ AppleObjCRuntimeV2::NonPointerISACache:: if (error.Fail()) return NULL; + if (log) +log->PutCString("AOCRT::NPI: Found all the non-indexed ISA masks"); + + bool foundError = false; + auto objc_debug_indexed_isa_magic_mask = ExtractRuntimeGlobalSymbol( + process, ConstString("objc_debug_indexed_isa_magic_mask"), objc_module_sp, + error); + foundError |= error.Fail(); + + auto objc_debug_indexed_isa_magic_value = ExtractRuntimeGlobalSymbol( + process, ConstString("objc_debug_indexed_isa_magic_value"), + objc_module_sp, error); + foundError |= error.Fail(); + + auto objc_debug_indexed_isa_index_mask = ExtractRuntimeGlobalSymbol( + process, ConstString("objc_debug_indexed_isa_index_mask"), objc_module_sp, + error); + foundError |= error.Fail(); + + auto objc_debug_indexed_isa_index_shift = ExtractRuntimeGlobalSymbol( + process, ConstString("objc_debug_indexed_isa_index_shift"), + objc
[Lldb-commits] [lldb] r314355 - Add support for running the lldb testsuite against an apple watch
Author: jmolenda Date: Wed Sep 27 15:12:54 2017 New Revision: 314355 URL: http://llvm.org/viewvc/llvm-project?rev=314355&view=rev Log: Add support for running the lldb testsuite against an apple watch running watchos. These tests cannot run on normal customer devices, but I hope to some day have a public facing bot running against a device. Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/step_out/TestThreadStepOut.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/unwind/sigtramp/TestSigtrampUnwind.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-class-method/TestObjCClassMethod.py lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-stepping/TestObjCStepping.py lldb/trunk/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py lldb/trunk/packages/Python/lldbsuite/test/test_categories.py Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py?rev=314355&r1=314354&r2=314355&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py Wed Sep 27 15:12:54 2017 @@ -54,7 +54,7 @@ class DataFormatterBoolRefPtr(TestBase): # Execute the cleanup function during test case tear down. self.addTearDownHook(cleanup) -isiOS = (lldbplatformutil.getPlatform() == 'ios') +isiOS = (lldbplatformutil.getPlatform() == 'ios' or lldbplatformutil.getPlatform() == 'watchos') # Now check that we use the right summary for BOOL& self.expect('frame variable yes_ref', Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py?rev=314355&r1=314354&r2=314355&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py Wed Sep 27 15:12:54 2017 @@ -45,7 +45,7 @@ class RegisterCommandsTestCase(TestBase) self.runCmd("register read xmm0") self.runCmd("register read ymm15") # may be available self.runCmd("register read bnd0") # may be available -elif self.getArchitecture() in ['arm', 'armv7', 'arm64']: +elif self.getArchitecture() in ['arm', 'armv7', 'armv7k', 'arm64']: self.runCmd("register read s0") self.runCmd("register read q15") # may be available @@ -87,7 +87,7 @@ class RegisterCommandsTestCase(TestBase) elif self.getArchitecture() in ['arm64', 'aarch64']: gpr = "w0" vector = "v0" -elif self.getArchitecture() in ['arm', 'armv7']: +elif self.getArchitecture() in ['arm', 'armv7', 'armv7k']: gpr = "r0" vector = "q0" @@ -334,7 +334,7 @@ class RegisterCommandsTestCase(TestBase) "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x0e 0x0f}", False), ] -elif self.getArchitecture() in ['armv7', 'armv7k'] and self.platformIsDarwin(): +elif self.getArchitecture() in ['armv7'] and self.platformIsDarwin(): reg_list = [ # reg value # must-have @@ -348,7 +348,7 @@ class RegisterCommandsTestCase(TestBase) "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x0e 0x0f}", False), ] -elif self.getArchitecture() in ['arm']: +elif self.getArchitecture() in ['arm', 'armv7k']: reg_list = [ # reg value # must-have Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/step_out/TestThreadStepOut.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/step_out/TestThreadStepOut.py?rev=314355&r1=
[Lldb-commits] [PATCH] D38328: Assume git-generated patch files in build scripts
This revision was automatically updated to reflect the committed changes. Closed by commit rL314366: Change build-llvm.py and build-lldb-llvm-clang's patching mechanisms to (authored by jmolenda). Repository: rL LLVM https://reviews.llvm.org/D38328 Files: lldb/trunk/scripts/Xcode/build-llvm.py lldb/trunk/scripts/build-lldb-llvm-clang Index: lldb/trunk/scripts/build-lldb-llvm-clang === --- lldb/trunk/scripts/build-lldb-llvm-clang +++ lldb/trunk/scripts/build-lldb-llvm-clang @@ -33,15 +33,15 @@ for patch_file in ../scripts/llvm.*.diff do echo "Applying patch from '$patch_file'" -patch -p0 < "$patch_file" +patch -p1 < "$patch_file" done # change directory to "./llvm/tools/clang" cd tools/clang for patch_file in ../../../scripts/clang.*.diff do echo "Applying patch from '$patch_file'" -patch -p0 < "$patch_file" +patch -p1 < "$patch_file" done # change directory to "./" Index: lldb/trunk/scripts/Xcode/build-llvm.py === --- lldb/trunk/scripts/Xcode/build-llvm.py +++ lldb/trunk/scripts/Xcode/build-llvm.py @@ -224,7 +224,7 @@ f, spec['name'] + '.*.diff')] for p in patches: run_in_directory(["patch", - "-p0", + "-p1", "-i", os.path.join(lldb_source_path(), 'scripts', Index: lldb/trunk/scripts/build-lldb-llvm-clang === --- lldb/trunk/scripts/build-lldb-llvm-clang +++ lldb/trunk/scripts/build-lldb-llvm-clang @@ -33,15 +33,15 @@ for patch_file in ../scripts/llvm.*.diff do echo "Applying patch from '$patch_file'" -patch -p0 < "$patch_file" +patch -p1 < "$patch_file" done # change directory to "./llvm/tools/clang" cd tools/clang for patch_file in ../../../scripts/clang.*.diff do echo "Applying patch from '$patch_file'" -patch -p0 < "$patch_file" +patch -p1 < "$patch_file" done # change directory to "./" Index: lldb/trunk/scripts/Xcode/build-llvm.py === --- lldb/trunk/scripts/Xcode/build-llvm.py +++ lldb/trunk/scripts/Xcode/build-llvm.py @@ -224,7 +224,7 @@ f, spec['name'] + '.*.diff')] for p in patches: run_in_directory(["patch", - "-p0", + "-p1", "-i", os.path.join(lldb_source_path(), 'scripts', ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r314366 - Change build-llvm.py and build-lldb-llvm-clang's patching mechanisms to
Author: jmolenda Date: Wed Sep 27 16:44:54 2017 New Revision: 314366 URL: http://llvm.org/viewvc/llvm-project?rev=314366&view=rev Log: Change build-llvm.py and build-lldb-llvm-clang's patching mechanisms to assume git-style diffs. Committing for Francis Ricci. Differential Revision: https://reviews.llvm.org/D38328 Modified: lldb/trunk/scripts/Xcode/build-llvm.py lldb/trunk/scripts/build-lldb-llvm-clang Modified: lldb/trunk/scripts/Xcode/build-llvm.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Xcode/build-llvm.py?rev=314366&r1=314365&r2=314366&view=diff == --- lldb/trunk/scripts/Xcode/build-llvm.py (original) +++ lldb/trunk/scripts/Xcode/build-llvm.py Wed Sep 27 16:44:54 2017 @@ -224,7 +224,7 @@ def apply_patches(spec): f, spec['name'] + '.*.diff')] for p in patches: run_in_directory(["patch", - "-p0", + "-p1", "-i", os.path.join(lldb_source_path(), 'scripts', Modified: lldb/trunk/scripts/build-lldb-llvm-clang URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/build-lldb-llvm-clang?rev=314366&r1=314365&r2=314366&view=diff == --- lldb/trunk/scripts/build-lldb-llvm-clang (original) +++ lldb/trunk/scripts/build-lldb-llvm-clang Wed Sep 27 16:44:54 2017 @@ -33,7 +33,7 @@ cd .. for patch_file in ../scripts/llvm.*.diff do echo "Applying patch from '$patch_file'" -patch -p0 < "$patch_file" +patch -p1 < "$patch_file" done # change directory to "./llvm/tools/clang" @@ -41,7 +41,7 @@ cd tools/clang for patch_file in ../../../scripts/clang.*.diff do echo "Applying patch from '$patch_file'" -patch -p0 < "$patch_file" +patch -p1 < "$patch_file" done # change directory to "./" ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r314371 - Revert patch r313904, as it breaks "command source" and in
Author: jingham Date: Wed Sep 27 18:39:07 2017 New Revision: 314371 URL: http://llvm.org/viewvc/llvm-project?rev=314371&view=rev Log: Revert patch r313904, as it breaks "command source" and in particular causes lldb to die on startup if you have a ~/.lldbinit file. I filed: https://bugs.llvm.org/show_bug.cgi?id=34758 to cover fixing the bug. Modified: lldb/trunk/include/lldb/API/SBCommandInterpreter.h lldb/trunk/include/lldb/Core/IOHandler.h lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h lldb/trunk/scripts/interface/SBCommandInterpreter.i lldb/trunk/source/API/SBCommandInterpreter.cpp lldb/trunk/source/Commands/CommandObjectTarget.cpp lldb/trunk/source/Core/Debugger.cpp lldb/trunk/source/Interpreter/CommandInterpreter.cpp Modified: lldb/trunk/include/lldb/API/SBCommandInterpreter.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBCommandInterpreter.h?rev=314371&r1=314370&r2=314371&view=diff == --- lldb/trunk/include/lldb/API/SBCommandInterpreter.h (original) +++ lldb/trunk/include/lldb/API/SBCommandInterpreter.h Wed Sep 27 18:39:07 2017 @@ -165,8 +165,6 @@ public: int match_start_point, int max_return_elements, lldb::SBStringList &matches); - bool WasInterrupted() const; - // Catch commands before they execute by registering a callback that will // get called when the command gets executed. This allows GUI or command // line interfaces to intercept a command and stop it from happening Modified: lldb/trunk/include/lldb/Core/IOHandler.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/IOHandler.h?rev=314371&r1=314370&r2=314371&view=diff == --- lldb/trunk/include/lldb/Core/IOHandler.h (original) +++ lldb/trunk/include/lldb/Core/IOHandler.h Wed Sep 27 18:39:07 2017 @@ -195,7 +195,7 @@ public: enum class Completion { None, LLDBCommand, Expression }; IOHandlerDelegate(Completion completion = Completion::None) - : m_completion(completion) {} + : m_completion(completion), m_io_handler_done(false) {} virtual ~IOHandlerDelegate() = default; @@ -296,6 +296,7 @@ public: protected: Completion m_completion; // Support for common builtin completions + bool m_io_handler_done; }; //-- Modified: lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h?rev=314371&r1=314370&r2=314371&view=diff == --- lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h (original) +++ lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h Wed Sep 27 18:39:07 2017 @@ -242,8 +242,6 @@ public: bool repeat_on_empty_command = true, bool no_context_switching = false); - bool WasInterrupted() const; - //-- /// Execute a list of commands in sequence. /// @@ -524,24 +522,6 @@ private: StringList &commands_help, CommandObject::CommandMap &command_map); - // An interruptible wrapper around the stream output - void PrintCommandOutput(Stream &stream, llvm::StringRef str, - bool interruptible); - - // A very simple state machine which models the command handling transitions - enum class CommandHandlingState { -eIdle, -eInProgress, -eInterrupted, - }; - - std::atomic m_command_state{ - CommandHandlingState::eIdle}; - - void StartHandlingCommand(); - void FinishHandlingCommand(); - bool InterruptCommand(); - Debugger &m_debugger; // The debugger session that this interpreter is // associated with ExecutionContextRef m_exe_ctx_ref; // The current execution context to use Modified: lldb/trunk/scripts/interface/SBCommandInterpreter.i URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBCommandInterpreter.i?rev=314371&r1=314370&r2=314371&view=diff == --- lldb/trunk/scripts/interface/SBCommandInterpreter.i (original) +++ lldb/trunk/scripts/interface/SBCommandInterpreter.i Wed Sep 27 18:39:07 2017 @@ -125,18 +125,18 @@ public: { eBroadcastBitThreadShouldExit = (1 << 0), eBroadcastBitResetPrompt= (1 << 1), -eBroadcastBitQuitCommandReceived= (1 << 2), // User entered quit +eBroadcastBitQuitCommandReceived= (1 << 2), // User entered quit eBroadcastBitAsynchronousOutputData = (1 << 3), eBroadcastBitAsynchronousErrorData = (1