[Lldb-commits] [PATCH] D48865: [LLDB] CommandObjectThreadUntil::DoExecute() sets the wrong selected thread ID
RamNalamothu added a subscriber: labath. RamNalamothu added a comment. @jingham @labath I have tried to add a test but it's becoming difficult for me to come-up with a failing test scenario. Is it okay to commit this without a test? Otherwise, I could add the following or error capturing diff --git a/lldb/source/Commands/CommandObjectThread.cpp b/lldb/source/Commands/CommandObjectThread.cpp index 95a8301a318a..f91188f4446b 100644 --- a/lldb/source/Commands/CommandObjectThread.cpp +++ b/lldb/source/Commands/CommandObjectThread.cpp @@ -1096,7 +1096,7 @@ protected: return false; } - process->GetThreadList().SetSelectedThreadByID(m_options.m_thread_idx); + assert(process->GetThreadList().SetSelectedThreadByID(m_options.m_thread_idx)); StreamString stream; Status error; which will break `thread until` functionality and then I can add the patch fixing it immediately. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D48865/new/ https://reviews.llvm.org/D48865 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D126367: [lldb] Add gnu-debuglink support for Windows PE/COFF
alvinhochun updated this revision to Diff 432725. alvinhochun added a comment. Changed `GetPluginNameStatic` to "PE-COFF", and rebased onto `main`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126367/new/ https://reviews.llvm.org/D126367 Files: lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h lldb/source/Plugins/SymbolVendor/CMakeLists.txt lldb/source/Plugins/SymbolVendor/PECOFF/CMakeLists.txt lldb/source/Plugins/SymbolVendor/PECOFF/SymbolVendorPECOFF.cpp lldb/source/Plugins/SymbolVendor/PECOFF/SymbolVendorPECOFF.h lldb/test/Shell/ObjectFile/PECOFF/dwarf-gnu-debuglink.yaml Index: lldb/test/Shell/ObjectFile/PECOFF/dwarf-gnu-debuglink.yaml === --- /dev/null +++ lldb/test/Shell/ObjectFile/PECOFF/dwarf-gnu-debuglink.yaml @@ -0,0 +1,46 @@ +# RUN: yaml2obj %s -o %t +# RUN: llvm-objcopy --strip-all --add-gnu-debuglink=%t %t %t.stripped +# RUN: lldb-test object-file %t.stripped | FileCheck %s + +# CHECK: Name: .debug_info +# CHECK-NEXT: Type: dwarf-info + +--- !COFF +OptionalHeader: + AddressOfEntryPoint: 5152 + ImageBase: 5368709120 + SectionAlignment: 4096 + FileAlignment: 512 + MajorOperatingSystemVersion: 6 + MinorOperatingSystemVersion: 0 + MajorImageVersion: 0 + MinorImageVersion: 0 + MajorSubsystemVersion: 6 + MinorSubsystemVersion: 0 + Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI + DLLCharacteristics: [ IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA, IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE, IMAGE_DLL_CHARACTERISTICS_NX_COMPAT, IMAGE_DLL_CHARACTERISTICS_TERMINAL_SERVER_AWARE ] + SizeOfStackReserve: 1048576 + SizeOfStackCommit: 4096 + SizeOfHeapReserve: 1048576 + SizeOfHeapCommit: 4096 +header: + Machine: IMAGE_FILE_MACHINE_AMD64 + Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE ] +sections: + - Name:.text +Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ] +VirtualAddress: 4096 +VirtualSize: 64 +SectionData: DEADBEEFBAADF00D + - Name:.data +Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ] +VirtualAddress: 8192 +VirtualSize: 64 +SectionData: DEADBEEFBAADF00D + - Name:.debug_info +Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ] +VirtualAddress: 16384 +VirtualSize: 64 +SectionData: DEADBEEFBAADF00D +symbols: [] +... Index: lldb/source/Plugins/SymbolVendor/PECOFF/SymbolVendorPECOFF.h === --- /dev/null +++ lldb/source/Plugins/SymbolVendor/PECOFF/SymbolVendorPECOFF.h @@ -0,0 +1,37 @@ +//===-- SymbolVendorPECOFF.h *- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===--===// + +#ifndef LLDB_SOURCE_PLUGINS_SYMBOLVENDOR_PECOFF_SYMBOLVENDORPECOFF_H +#define LLDB_SOURCE_PLUGINS_SYMBOLVENDOR_PECOFF_SYMBOLVENDORPECOFF_H + +#include "lldb/Symbol/SymbolVendor.h" +#include "lldb/lldb-private.h" + +class SymbolVendorPECOFF : public lldb_private::SymbolVendor { +public: + // Constructors and Destructors + SymbolVendorPECOFF(const lldb::ModuleSP &module_sp); + + // Static Functions + static void Initialize(); + + static void Terminate(); + + static llvm::StringRef GetPluginNameStatic() { return "PE-COFF"; } + + static llvm::StringRef GetPluginDescriptionStatic(); + + static lldb_private::SymbolVendor * + CreateInstance(const lldb::ModuleSP &module_sp, + lldb_private::Stream *feedback_strm); + + // PluginInterface protocol + llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); } +}; + +#endif // LLDB_SOURCE_PLUGINS_SYMBOLVENDOR_PECOFF_SYMBOLVENDORPECOFF_H Index: lldb/source/Plugins/SymbolVendor/PECOFF/SymbolVendorPECOFF.cpp === --- /dev/null +++ lldb/source/Plugins/SymbolVendor/PECOFF/SymbolVendorPECOFF.cpp @@ -0,0 +1,133 @@ +//===-- SymbolVendorPECOFF.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===--===// + +#include "SymbolVendorPECOFF.h" + +#include + +#include "Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h" +#include "lldb/Core/Module.h" +#include "lldb/Core/ModuleSpec.h" +#include "lldb/Core/PluginManager.h"
[Lldb-commits] [PATCH] D126596: [lldb, test] Fix typos in the lldb tests
RamNalamothu created this revision. RamNalamothu added reviewers: jingham, labath. Herald added a subscriber: wenlei. Herald added a project: All. RamNalamothu requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D126596 Files: lldb/test/API/commands/expression/dont_allow_jit/TestAllowJIT.py lldb/test/API/commands/frame/language/TestGuessLanguage.py lldb/test/API/commands/frame/var/TestFrameVar.py lldb/test/API/commands/target/stop-hooks/TestStopHookScripted.py lldb/test/API/commands/target/stop-hooks/TestStopHooks.py lldb/test/API/functionalities/history/TestHistoryRecall.py lldb/test/API/functionalities/tail_call_frames/thread_step_out_or_return/TestSteppingOutWithArtificialFrames.py lldb/test/API/functionalities/var_path/TestVarPath.py lldb/test/API/lang/c/find_struct_type/TestFindStructTypes.py lldb/test/API/lang/cpp/dynamic-value-same-basename/TestDynamicValueSameBase.py lldb/test/API/macosx/save_crashlog/TestSaveCrashlog.py lldb/test/API/macosx/version_zero/TestGetVersionZeroVersion.py lldb/test/API/sample_test/TestSampleTest.py Index: lldb/test/API/sample_test/TestSampleTest.py === --- lldb/test/API/sample_test/TestSampleTest.py +++ lldb/test/API/sample_test/TestSampleTest.py @@ -13,7 +13,7 @@ mydir = TestBase.compute_mydir(__file__) -# If your test case doesn't stress debug info, the +# If your test case doesn't stress debug info, then # set this to true. That way it won't be run once for # each debug info format. NO_DEBUG_INFO_TESTCASE = True Index: lldb/test/API/macosx/version_zero/TestGetVersionZeroVersion.py === --- lldb/test/API/macosx/version_zero/TestGetVersionZeroVersion.py +++ lldb/test/API/macosx/version_zero/TestGetVersionZeroVersion.py @@ -14,7 +14,7 @@ mydir = TestBase.compute_mydir(__file__) -# If your test case doesn't stress debug info, the +# If your test case doesn't stress debug info, then # set this to true. That way it won't be run once for # each debug info format. NO_DEBUG_INFO_TESTCASE = True Index: lldb/test/API/macosx/save_crashlog/TestSaveCrashlog.py === --- lldb/test/API/macosx/save_crashlog/TestSaveCrashlog.py +++ lldb/test/API/macosx/save_crashlog/TestSaveCrashlog.py @@ -14,7 +14,7 @@ mydir = TestBase.compute_mydir(__file__) -# If your test case doesn't stress debug info, the +# If your test case doesn't stress debug info, then # set this to true. That way it won't be run once for # each debug info format. NO_DEBUG_INFO_TESTCASE = True Index: lldb/test/API/lang/cpp/dynamic-value-same-basename/TestDynamicValueSameBase.py === --- lldb/test/API/lang/cpp/dynamic-value-same-basename/TestDynamicValueSameBase.py +++ lldb/test/API/lang/cpp/dynamic-value-same-basename/TestDynamicValueSameBase.py @@ -14,7 +14,7 @@ mydir = TestBase.compute_mydir(__file__) -# If your test case doesn't stress debug info, the +# If your test case doesn't stress debug info, then # set this to true. That way it won't be run once for # each debug info format. NO_DEBUG_INFO_TESTCASE = True Index: lldb/test/API/lang/c/find_struct_type/TestFindStructTypes.py === --- lldb/test/API/lang/c/find_struct_type/TestFindStructTypes.py +++ lldb/test/API/lang/c/find_struct_type/TestFindStructTypes.py @@ -13,7 +13,7 @@ mydir = TestBase.compute_mydir(__file__) -# If your test case doesn't stress debug info, the +# If your test case doesn't stress debug info, then # set this to true. That way it won't be run once for # each debug info format. NO_DEBUG_INFO_TESTCASE = True Index: lldb/test/API/functionalities/var_path/TestVarPath.py === --- lldb/test/API/functionalities/var_path/TestVarPath.py +++ lldb/test/API/functionalities/var_path/TestVarPath.py @@ -13,7 +13,7 @@ mydir = TestBase.compute_mydir(__file__) -# If your test case doesn't stress debug info, the +# If your test case doesn't stress debug info, then # set this to true. That way it won't be run once for # each debug info format. NO_DEBUG_INFO_TESTCASE = True Index: lldb/test/API/functionalities/tail_call_frames/thread_step_out_or_return/TestSteppingOutWithArtificialFrames.py === --- lldb/test/API/functionalities/tail_call_frames/thread_step_out_or_return/TestSteppingOutWithArtificialFrames.py +++ lldb/test/API/functionalities/tail_call_frames/thread_step_out_or_return/TestSteppingO
[Lldb-commits] [lldb] 2f23abd - Increase the default maximum stack walk
Author: Jason Molenda Date: 2022-05-28T13:12:57-07:00 New Revision: 2f23abd6c692134c69b6d19f726d51e11200d8e4 URL: https://github.com/llvm/llvm-project/commit/2f23abd6c692134c69b6d19f726d51e11200d8e4 DIFF: https://github.com/llvm/llvm-project/commit/2f23abd6c692134c69b6d19f726d51e11200d8e4.diff LOG: Increase the default maximum stack walk lldb will only backtrace a fixed number of stack frames, as a last-ditch attempt to avoid a runaway looping backtrace. It's unusual that anyone ends up depending on this final safety net in years. I picked the original number of 30 was picked by seeing how many stack frames I could make in a small recursive function on Darwin systems before using the default stack space. Checking again today on a modern system, I can exceed this limit & lldb will not show the original invocation of the recursing call. Double the old value to cover this larger maximum possible stack frame count, as a default value. (`target.process.thread.max-backtrace-depth`) Added: Modified: lldb/source/Target/TargetProperties.td Removed: diff --git a/lldb/source/Target/TargetProperties.td b/lldb/source/Target/TargetProperties.td index 62d2c866bba99..1ceb9db82013d 100644 --- a/lldb/source/Target/TargetProperties.td +++ b/lldb/source/Target/TargetProperties.td @@ -277,6 +277,6 @@ let Definition = "thread" in { DefaultFalse, Desc<"If true, this thread will single-step and log execution.">; def MaxBacktraceDepth: Property<"max-backtrace-depth", "UInt64">, -DefaultUnsignedValue<30>, +DefaultUnsignedValue<60>, Desc<"Maximum number of frames to backtrace.">; } ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits