[Lldb-commits] [lldb] Fix lldb crash while handling concurrent vfork() (PR #81564)

2024-02-23 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited https://github.com/llvm/llvm-project/pull/81564 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Fix lldb crash while handling concurrent vfork() (PR #81564)

2024-02-23 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. https://github.com/llvm/llvm-project/pull/81564 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix term-width setting (PR #82736)

2024-02-22 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: LGTM https://github.com/llvm/llvm-project/pull/82736 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Re-land [lldb-dap] Add support for data breakpoint. (PR #81909)

2024-02-22 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. https://github.com/llvm/llvm-project/pull/81909 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] [debugserver] fix qLaunchSuccess error, add QErrorStringInPacketSupported (PR #82593)

2024-02-22 Thread Greg Clayton via lldb-commits
@@ -3944,15 +3955,22 @@ rnb_err_t RNBRemote::HandlePacket_v(const char *p) { // The order of these checks is important. if (process_does_not_exist (pid_attaching_to)) { DNBLogError("Tried to attach to pid that doesn't exist"); - std::string

[Lldb-commits] [lldb] [lldb] [debugserver] fix qLaunchSuccess error, add QErrorStringInPacketSupported (PR #82593)

2024-02-22 Thread Greg Clayton via lldb-commits
@@ -3969,30 +3987,43 @@ rnb_err_t RNBRemote::HandlePacket_v(const char *p) { process_username = pw->pw_name; } DNBLogError("Tried to attach to process with uid mismatch"); - std::string return_message = "E96;"; - std::string

[Lldb-commits] [lldb] [lldb] [debugserver] fix qLaunchSuccess error, add QErrorStringInPacketSupported (PR #82593)

2024-02-22 Thread Greg Clayton via lldb-commits
@@ -3969,30 +3987,43 @@ rnb_err_t RNBRemote::HandlePacket_v(const char *p) { process_username = pw->pw_name; } DNBLogError("Tried to attach to process with uid mismatch"); - std::string return_message = "E96;"; - std::string

[Lldb-commits] [lldb] [lldb] [debugserver] fix qLaunchSuccess error, add QErrorStringInPacketSupported (PR #82593)

2024-02-22 Thread Greg Clayton via lldb-commits
@@ -3944,15 +3955,22 @@ rnb_err_t RNBRemote::HandlePacket_v(const char *p) { // The order of these checks is important. if (process_does_not_exist (pid_attaching_to)) { DNBLogError("Tried to attach to pid that doesn't exist"); - std::string

[Lldb-commits] [lldb] [lldb] [debugserver] fix qLaunchSuccess error, add QErrorStringInPacketSupported (PR #82593)

2024-02-22 Thread Greg Clayton via lldb-commits
@@ -3969,30 +3987,43 @@ rnb_err_t RNBRemote::HandlePacket_v(const char *p) { process_username = pw->pw_name; } DNBLogError("Tried to attach to process with uid mismatch"); - std::string return_message = "E96;"; - std::string

[Lldb-commits] [lldb] [lldb] [debugserver] fix qLaunchSuccess error, add QErrorStringInPacketSupported (PR #82593)

2024-02-22 Thread Greg Clayton via lldb-commits
@@ -3944,15 +3955,22 @@ rnb_err_t RNBRemote::HandlePacket_v(const char *p) { // The order of these checks is important. if (process_does_not_exist (pid_attaching_to)) { DNBLogError("Tried to attach to pid that doesn't exist"); - std::string

[Lldb-commits] [lldb] [lldb] [debugserver] fix qLaunchSuccess error, add QErrorStringInPacketSupported (PR #82593)

2024-02-22 Thread Greg Clayton via lldb-commits
@@ -3944,15 +3955,22 @@ rnb_err_t RNBRemote::HandlePacket_v(const char *p) { // The order of these checks is important. if (process_does_not_exist (pid_attaching_to)) { DNBLogError("Tried to attach to pid that doesn't exist"); - std::string

[Lldb-commits] [lldb] [lldb] Implement WebAssembly debugging (PR #77949)

2024-02-20 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,108 @@ +//=== wasmRegisterContext.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:

[Lldb-commits] [lldb] [lldb] Implement WebAssembly debugging (PR #77949)

2024-02-20 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,76 @@ +//===-- UnwindWasm.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:

[Lldb-commits] [lldb] [lldb] Implement WebAssembly debugging (PR #77949)

2024-02-20 Thread Greg Clayton via lldb-commits
@@ -2595,6 +2604,37 @@ bool DWARFExpression::Evaluate( break; } +case DW_OP_WASM_location: { + uint8_t wasm_op = opcodes.GetU8(); + uint32_t index; + + /* LLDB doesn't have an address space to represents WebAssembly locals, + * globals and

[Lldb-commits] [lldb] [lldb] Implement WebAssembly debugging (PR #77949)

2024-02-20 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,108 @@ +//=== wasmRegisterContext.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:

[Lldb-commits] [lldb] [lldb] Implement WebAssembly debugging (PR #77949)

2024-02-20 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,108 @@ +//=== wasmRegisterContext.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:

[Lldb-commits] [lldb] [lldb] Implement WebAssembly debugging (PR #77949)

2024-02-20 Thread Greg Clayton via lldb-commits
@@ -2595,6 +2604,37 @@ bool DWARFExpression::Evaluate( break; } +case DW_OP_WASM_location: { + uint8_t wasm_op = opcodes.GetU8(); + uint32_t index; + + /* LLDB doesn't have an address space to represents WebAssembly locals, + * globals and

[Lldb-commits] [lldb] [lldb] Implement WebAssembly debugging (PR #77949)

2024-02-20 Thread Greg Clayton via lldb-commits
@@ -346,6 +346,15 @@ static offset_t GetOpcodeDataSize(const DataExtractor , return (offset - data_offset) + subexpr_len; } + case DW_OP_WASM_location: { +uint8_t wasm_op = data.GetU8(); +if (wasm_op == 3) clayborg wrote: It would be great to

[Lldb-commits] [lldb] [lldb] Implement WebAssembly debugging (PR #77949)

2024-02-20 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,108 @@ +//=== wasmRegisterContext.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:

[Lldb-commits] [lldb] [lldb] Implement WebAssembly debugging (PR #77949)

2024-02-20 Thread Greg Clayton via lldb-commits
@@ -1450,6 +1450,14 @@ class Process : public std::enable_shared_from_this, /// platforms where there is a difference (only Arm Thumb at this time). lldb::addr_t FixAnyAddress(lldb::addr_t pc); + /// Some targets might use bits in a code address to represent additional

[Lldb-commits] [lldb] [lldb] Implement WebAssembly debugging (PR #77949)

2024-02-20 Thread Greg Clayton via lldb-commits
@@ -2595,6 +2604,37 @@ bool DWARFExpression::Evaluate( break; } +case DW_OP_WASM_location: { + uint8_t wasm_op = opcodes.GetU8(); + uint32_t index; + + /* LLDB doesn't have an address space to represents WebAssembly locals, + * globals and

[Lldb-commits] [lldb] [lldb] Implement WebAssembly debugging (PR #77949)

2024-02-20 Thread Greg Clayton via lldb-commits
@@ -2595,6 +2604,37 @@ bool DWARFExpression::Evaluate( break; } +case DW_OP_WASM_location: { + uint8_t wasm_op = opcodes.GetU8(); + uint32_t index; + + /* LLDB doesn't have an address space to represents WebAssembly locals, + * globals and

[Lldb-commits] [lldb] [lldb] Add more ways to find the .dwp file. (PR #81067)

2024-02-20 Thread Greg Clayton via lldb-commits
https://github.com/clayborg closed https://github.com/llvm/llvm-project/pull/81067 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Fix lldb crash while handling concurrent vfork() (PR #81564)

2024-02-20 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited https://github.com/llvm/llvm-project/pull/81564 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Fix lldb crash while handling concurrent vfork() (PR #81564)

2024-02-20 Thread Greg Clayton via lldb-commits
@@ -301,7 +301,8 @@ class ProcessGDBRemote : public Process, using FlashRange = FlashRangeVector::Entry; FlashRangeVector m_erased_flash_ranges; - bool m_vfork_in_progress; + // Number of vfork in process. clayborg wrote: ``` // Number of fork() or

[Lldb-commits] [lldb] Fix lldb crash while handling concurrent vfork() (PR #81564)

2024-02-20 Thread Greg Clayton via lldb-commits
@@ -120,15 +120,23 @@ bool NativeThreadLinux::GetStopReason(ThreadStopInfo _info, case eStateCrashed: case eStateExited: case eStateSuspended: - case eStateUnloaded: + case eStateUnloaded: { if (log) LogThreadStopInfo(*log, m_stop_info, "m_stop_info in

[Lldb-commits] [lldb] Fix lldb crash while handling concurrent vfork() (PR #81564)

2024-02-20 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. https://github.com/llvm/llvm-project/pull/81564 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add more ways to find the .dwp file. (PR #81067)

2024-02-17 Thread Greg Clayton via lldb-commits
https://github.com/clayborg updated https://github.com/llvm/llvm-project/pull/81067 >From 3c2f6039cf0e253d78b5193098b311028daaea72 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Wed, 7 Feb 2024 16:43:50 -0800 Subject: [PATCH 1/6] Add more ways to find the .dwp file. When using split DWARF

[Lldb-commits] [lldb] [lldb] Use PyBytes and PyByteArray in Python Data Objects unittest (PR #82098)

2024-02-17 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. https://github.com/llvm/llvm-project/pull/82098 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Centralize the handling of completion for simple argument lists. (PR #82085)

2024-02-17 Thread Greg Clayton via lldb-commits
@@ -305,6 +305,42 @@ void CommandObject::HandleCompletion(CompletionRequest ) { } } +void +CommandObject::HandleArgumentCompletion(CompletionRequest , + OptionElementVector _element_vector) { + size_t num_arg_entries = GetNumArgumentEntries(); +

[Lldb-commits] [lldb] Centralize the handling of completion for simple argument lists. (PR #82085)

2024-02-17 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: Good fix. Just a few comments https://github.com/llvm/llvm-project/pull/82085 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Centralize the handling of completion for simple argument lists. (PR #82085)

2024-02-17 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited https://github.com/llvm/llvm-project/pull/82085 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Centralize the handling of completion for simple argument lists. (PR #82085)

2024-02-17 Thread Greg Clayton via lldb-commits
@@ -305,6 +305,42 @@ void CommandObject::HandleCompletion(CompletionRequest ) { } } +void +CommandObject::HandleArgumentCompletion(CompletionRequest , + OptionElementVector _element_vector) { + size_t num_arg_entries = GetNumArgumentEntries(); +

[Lldb-commits] [lldb] Centralize the handling of completion for simple argument lists. (PR #82085)

2024-02-17 Thread Greg Clayton via lldb-commits
@@ -305,6 +305,42 @@ void CommandObject::HandleCompletion(CompletionRequest ) { } } +void +CommandObject::HandleArgumentCompletion(CompletionRequest , + OptionElementVector _element_vector) { + size_t num_arg_entries = GetNumArgumentEntries(); +

[Lldb-commits] [lldb] [lldb-dap] Do not write over the existing error if launchCommands fail during debugger launch. (PR #82051)

2024-02-17 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. Looks good. Always good to have a test. https://github.com/llvm/llvm-project/pull/82051 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [lldb] [lldb] Add more ways to find the .dwp file. (PR #81067)

2024-02-16 Thread Greg Clayton via lldb-commits
clayborg wrote: Is there a website or something that details how to correctly save symbols for split DWARF? Is there an existing tool people use? If the answer is no, I would like to support all variations for now. I am happy to emit a warning with a URL for best practices when it comes to

[Lldb-commits] [lldb] [lldb-dap] Do not write over the existing error if launchCommands fail during debugger launch. (PR #82051)

2024-02-16 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: Needs a test and this will be good to go. https://github.com/llvm/llvm-project/pull/82051 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Report only loaded debug info in statistics dump (PR #81706)

2024-02-16 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. https://github.com/llvm/llvm-project/pull/81706 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Report only loaded debug info in statistics dump (PR #81706)

2024-02-15 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. You can remove the headerdoc in the SymbolFileDWARF.h file and this is good to go. https://github.com/llvm/llvm-project/pull/81706 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [lldb] Report only loaded debug info in statistics dump (PR #81706)

2024-02-15 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited https://github.com/llvm/llvm-project/pull/81706 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Report only loaded debug info in statistics dump (PR #81706)

2024-02-15 Thread Greg Clayton via lldb-commits
@@ -186,7 +186,19 @@ class SymbolFileDWARF : public SymbolFileCommon { GetMangledNamesForFunction(const std::string _qualified_name, std::vector _names) override; - uint64_t GetDebugInfoSize() override; + /// Get total currently loaded debug

[Lldb-commits] [lldb] [lldb][progress] Add progress manager class (PR #81319)

2024-02-15 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: Just remove `static ProgressManager ();` and inline the code into `static ProgressManager ();` and this is good to go. https://github.com/llvm/llvm-project/pull/81319 ___ lldb-commits mailing list

[Lldb-commits] [lldb] [lldb][progress] Add progress manager class (PR #81319)

2024-02-15 Thread Greg Clayton via lldb-commits
@@ -66,3 +67,41 @@ void Progress::ReportProgress() { m_debugger_id); } } + +ProgressManager ::InstanceImpl() { + static std::once_flag g_once_flag; + static ProgressManager *g_progress_manager = nullptr; + std::call_once(g_once_flag, []() { +

[Lldb-commits] [lldb] [lldb][progress] Add progress manager class (PR #81319)

2024-02-15 Thread Greg Clayton via lldb-commits
@@ -66,3 +67,37 @@ void Progress::ReportProgress() { m_debugger_id); } } + +ProgressManager ::InstanceImpl() { + static std::once_flag g_once_flag; + static ProgressManager *g_progress_manager = nullptr; + std::call_once(g_once_flag, []() { +

[Lldb-commits] [lldb] [lldb][progress] Add progress manager class (PR #81319)

2024-02-15 Thread Greg Clayton via lldb-commits
@@ -119,6 +120,32 @@ class Progress { bool m_complete = false; }; +/// A class used to group progress reports by category. This is done by using a +/// map that maintains a refcount of each category of progress reports that have +/// come in. Keeping track of progress

[Lldb-commits] [lldb] [lldb][progress] Add progress manager class (PR #81319)

2024-02-15 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited https://github.com/llvm/llvm-project/pull/81319 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Store proper integer bitwidth in Scalar Type (PR #81451)

2024-02-14 Thread Greg Clayton via lldb-commits
clayborg wrote: I am fine with this patch if we fix the Scalar class to obey the bit width as suggested above. I do worry though that other Scalar values in the expression might get set to 64 bit values all of the time and cause problems with DWARF expressions. Do you have a code snippet of

[Lldb-commits] [lldb] [lldb] Add more ways to find the .dwp file. (PR #81067)

2024-02-14 Thread Greg Clayton via lldb-commits
clayborg wrote: > > I am fine with telling people what to do and giving them a golden path to > > what is easiest for our debuggers. And I will suggest to everyone that they > > use `.debug` and `.dwp`, but if we want to only support this, this leaves > > the downloading of the `.debug` file

[Lldb-commits] [lldb] [lldb] Add more ways to find the .dwp file. (PR #81067)

2024-02-13 Thread Greg Clayton via lldb-commits
https://github.com/clayborg updated https://github.com/llvm/llvm-project/pull/81067 >From 3c2f6039cf0e253d78b5193098b311028daaea72 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Wed, 7 Feb 2024 16:43:50 -0800 Subject: [PATCH 1/5] Add more ways to find the .dwp file. When using split DWARF

[Lldb-commits] [lldb] Report only loaded debug info in statistics dump (PR #81706)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -1419,6 +1419,10 @@ let Command = "statistics dump" in { def statistics_dump_all: Option<"all-targets", "a">, Group<1>, Desc<"Include statistics for all targets.">; def statistics_dump_summary: Option<"summary", "s">, Group<1>, -Desc<"Dump only high-level

[Lldb-commits] [lldb] Report only loaded debug info in statistics dump (PR #81706)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -391,7 +392,14 @@ class SymbolFile : public PluginInterface { /// entire file should be returned. The default implementation of this /// function will iterate over all sections in a module and add up their /// debug info only section byte sizes. - virtual uint64_t

[Lldb-commits] [lldb] Report only loaded debug info in statistics dump (PR #81706)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -186,7 +186,19 @@ class SymbolFileDWARF : public SymbolFileCommon { GetMangledNamesForFunction(const std::string _qualified_name, std::vector _names) override; - uint64_t GetDebugInfoSize() override; + /// Get total currently loaded debug

[Lldb-commits] [lldb] Report only loaded debug info in statistics dump (PR #81706)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -132,6 +132,7 @@ struct ConstStringStats { struct StatisticsOptions { bool summary_only = false; + bool force_loading = false; clayborg wrote: Maybe `load_all_debug_info` is more clear? https://github.com/llvm/llvm-project/pull/81706

[Lldb-commits] [lldb] Report only loaded debug info in statistics dump (PR #81706)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -24,6 +24,9 @@ class LLDB_API SBStatisticsOptions { void SetSummaryOnly(bool b); bool GetSummaryOnly(); + + void SetForceLoading(bool b); clayborg wrote: Need headerdoc for these. https://github.com/llvm/llvm-project/pull/81706

[Lldb-commits] [lldb] Report only loaded debug info in statistics dump (PR #81706)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -24,6 +24,9 @@ class LLDB_API SBStatisticsOptions { void SetSummaryOnly(bool b); bool GetSummaryOnly(); + + void SetForceLoading(bool b); + bool GetForceLoading(); clayborg wrote: The `SetForceLoading` name doesn't clearly indicate to us what we

[Lldb-commits] [lldb] [lldb] Add more ways to find the .dwp file. (PR #81067)

2024-02-13 Thread Greg Clayton via lldb-commits
clayborg wrote: > > I am fine with telling people what to do and giving them a golden path to > > what is easiest for our debuggers. And I will suggest to everyone that they > > use `.debug` and `.dwp`, but if we want to only support this, this leaves > > the downloading of the `.debug` file

[Lldb-commits] [lldb] [lldb][NFCI] Remove CommandObjectProcessHandle::VerifyCommandOptionValue (PR #79901)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -1666,33 +1646,52 @@ class CommandObjectProcessHandle : public CommandObjectParsed { // the user's options. ProcessSP process_sp = target.GetProcessSP(); -int stop_action = -1; // -1 means leave the current setting alone -int pass_action = -1; // -1

[Lldb-commits] [lldb] [lldb][progress] Add progress manager class (PR #81319)

2024-02-13 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. Looks good! https://github.com/llvm/llvm-project/pull/81319 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Followup fixs for data breakpoints (PR #81680)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -2757,13 +2769,18 @@ void request_dataBreakpointInfo(const llvm::json::Object ) { body.try_emplace("description", error_cstr && error_cstr[0] ? std::string(error_cstr) : "evaluation

[Lldb-commits] [lldb] [lldb-dap] Followup fixs for data breakpoints (PR #81680)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -2757,13 +2769,18 @@ void request_dataBreakpointInfo(const llvm::json::Object ) { body.try_emplace("description", error_cstr && error_cstr[0] ? std::string(error_cstr) : "evaluation

[Lldb-commits] [lldb] [lldb-dap] Followup fixs for data breakpoints (PR #81680)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -2757,13 +2769,18 @@ void request_dataBreakpointInfo(const llvm::json::Object ) { body.try_emplace("description", error_cstr && error_cstr[0] ? std::string(error_cstr) : "evaluation

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -2697,58 +2737,41 @@ void request_dataBreakpointInfo(const llvm::json::Object ) { GetUnsigned(arguments, "variablesReference", 0); llvm::StringRef name = GetString(arguments, "name"); lldb::SBFrame frame = g_dap.GetLLDBFrame(*arguments); - bool

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -2697,58 +2737,41 @@ void request_dataBreakpointInfo(const llvm::json::Object ) { GetUnsigned(arguments, "variablesReference", 0); llvm::StringRef name = GetString(arguments, "name"); lldb::SBFrame frame = g_dap.GetLLDBFrame(*arguments); - bool

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -2697,58 +2737,41 @@ void request_dataBreakpointInfo(const llvm::json::Object ) { GetUnsigned(arguments, "variablesReference", 0); llvm::StringRef name = GetString(arguments, "name"); lldb::SBFrame frame = g_dap.GetLLDBFrame(*arguments); - bool

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -561,6 +561,46 @@ void EventThreadFunction() { } } +lldb::SBValue FindVariable(uint64_t variablesReference, llvm::StringRef name) { + lldb::SBValue variable; + if (lldb::SBValueList *top_scope = GetTopLevelScope(variablesReference)) { +bool

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -2697,58 +2737,41 @@ void request_dataBreakpointInfo(const llvm::json::Object ) { GetUnsigned(arguments, "variablesReference", 0); llvm::StringRef name = GetString(arguments, "name"); lldb::SBFrame frame = g_dap.GetLLDBFrame(*arguments); - bool

[Lldb-commits] [lldb] [lldb] Store proper integer bitwidth in Scalar Type (PR #81451)

2024-02-13 Thread Greg Clayton via lldb-commits
clayborg wrote: What code is taking a scalar and then trying to byte swap it after it has been created? https://github.com/llvm/llvm-project/pull/81451 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [lldb] [lldb] Store proper integer bitwidth in Scalar Type (PR #81451)

2024-02-13 Thread Greg Clayton via lldb-commits
clayborg wrote: > > This uses `DataExtractor::GetMaxU64` which already does this under the > > hood. What does this do that isn't already being done? It may help if you > > add a test case to show what you are trying to fix. > > @clayborg @bulbazord The problem with GetMaxU64 is that it

[Lldb-commits] [lldb] [lldb][NFCI] Remove CommandObjectProcessHandle::VerifyCommandOptionValue (PR #79901)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -1666,33 +1646,52 @@ class CommandObjectProcessHandle : public CommandObjectParsed { // the user's options. ProcessSP process_sp = target.GetProcessSP(); -int stop_action = -1; // -1 means leave the current setting alone -int pass_action = -1; // -1

[Lldb-commits] [lldb] Fix lldb crash while handling concurrent vfork() (PR #81564)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -301,7 +301,8 @@ class ProcessGDBRemote : public Process, using FlashRange = FlashRangeVector::Entry; FlashRangeVector m_erased_flash_ranges; - bool m_vfork_in_progress; + // Number of vfork in process. + int m_vfork_in_progress; clayborg wrote: Do

[Lldb-commits] [lldb] Fix lldb crash while handling concurrent vfork() (PR #81564)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,45 @@ +#include +#include +#include +#include + +int call_vfork() { + printf("Before vfork\n"); + + pid_t child_pid = vfork(); + + if (child_pid == -1) { +// Error handling +perror("vfork"); +return 1; + } else if (child_pid == 0) { +// This

[Lldb-commits] [lldb] Fix lldb crash while handling concurrent vfork() (PR #81564)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,45 @@ +#include +#include +#include +#include + +int call_vfork() { + printf("Before vfork\n"); + + pid_t child_pid = vfork(); + + if (child_pid == -1) { +// Error handling +perror("vfork"); +return 1; + } else if (child_pid == 0) { +// This

[Lldb-commits] [lldb] Fix lldb crash while handling concurrent vfork() (PR #81564)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -5670,8 +5673,8 @@ void ProcessGDBRemote::DidVFork(lldb::pid_t child_pid, lldb::tid_t child_tid) { } void ProcessGDBRemote::DidVForkDone() { - assert(m_vfork_in_progress); - m_vfork_in_progress = false; + --m_vfork_in_progress; + assert(m_vfork_in_progress >= 0);

[Lldb-commits] [lldb] Fix lldb crash while handling concurrent vfork() (PR #81564)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -5681,7 +5684,10 @@ void ProcessGDBRemote::DidVForkDone() { void ProcessGDBRemote::DidExec() { // If we are following children, vfork is finished by exec (rather than // vforkdone that is submitted for parent). - if (GetFollowForkMode() == eFollowChild) -

[Lldb-commits] [lldb] Fix lldb crash while handling concurrent vfork() (PR #81564)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,31 @@ +""" +Make sure that the concurrent vfork() from multiple threads works correctly. +""" + + +import lldb +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.lldbtest import * +from lldbsuite.test.decorators import * + + +class

[Lldb-commits] [lldb] Fix lldb crash while handling concurrent vfork() (PR #81564)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,45 @@ +#include +#include +#include +#include + clayborg wrote: Might be a good idea to create a global `std::vector` and a mutex to protect it. And any child processes that get forked get added to this vector. So maybe add: ``` std::mutex

[Lldb-commits] [lldb] Fix lldb crash while handling concurrent vfork() (PR #81564)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -120,15 +120,25 @@ bool NativeThreadLinux::GetStopReason(ThreadStopInfo _info, case eStateCrashed: case eStateExited: case eStateSuspended: - case eStateUnloaded: + case eStateUnloaded: { if (log) LogThreadStopInfo(*log, m_stop_info, "m_stop_info in

[Lldb-commits] [lldb] Fix lldb crash while handling concurrent vfork() (PR #81564)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,31 @@ +""" +Make sure that the concurrent vfork() from multiple threads works correctly. +""" + + +import lldb +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.lldbtest import * +from lldbsuite.test.decorators import * + + +class

[Lldb-commits] [lldb] Fix lldb crash while handling concurrent vfork() (PR #81564)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,31 @@ +""" +Make sure that the concurrent vfork() from multiple threads works correctly. +""" + + +import lldb +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.lldbtest import * +from lldbsuite.test.decorators import * + + +class

[Lldb-commits] [lldb] Fix lldb crash while handling concurrent vfork() (PR #81564)

2024-02-13 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. https://github.com/llvm/llvm-project/pull/81564 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Fix lldb crash while handling concurrent vfork() (PR #81564)

2024-02-13 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited https://github.com/llvm/llvm-project/pull/81564 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add settings and code that limits the number of progress events. (PR #75769)

2024-02-12 Thread Greg Clayton via lldb-commits
clayborg wrote: What is the status of this PR? I think we will want this to make sure we don't spam too many individual progress events. It can also be adpated for the new categories after it goes in. https://github.com/llvm/llvm-project/pull/75769

[Lldb-commits] [lldb] [lldb] Add more ways to find the .dwp file. (PR #81067)

2024-02-12 Thread Greg Clayton via lldb-commits
clayborg wrote: Any chance we can get this in? https://github.com/llvm/llvm-project/pull/81067 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Store proper integer bitwidth in Scalar Type (PR #81451)

2024-02-12 Thread Greg Clayton via lldb-commits
clayborg wrote: What is the problem here? I tried to understand the description, but don't know what the issue is? Can we test this? https://github.com/llvm/llvm-project/pull/81451 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [lldb] [lldb][progress] Add progress manager class (PR #81319)

2024-02-11 Thread Greg Clayton via lldb-commits
@@ -66,3 +66,47 @@ void Progress::ReportProgress() { m_debugger_id); } } + +void ProgressManager::Initialize() { + lldbassert(!InstanceImpl() && "A progress report manager already exists."); + InstanceImpl().emplace(); +} + +void

[Lldb-commits] [lldb] [lldb] Add more ways to find the .dwp file. (PR #81067)

2024-02-09 Thread Greg Clayton via lldb-commits
clayborg wrote: I am fine with telling people what to do and giving them a golden path to what is easiest for our debuggers. And I will suggest to everyone that they use `.debug` and `.dwp`, but if we want to only support this, this leaves the downloading of the `.debug` file requiring a

[Lldb-commits] [lldb] [lldb][progress] Add progress manager class (PR #81319)

2024-02-09 Thread Greg Clayton via lldb-commits
@@ -66,3 +66,47 @@ void Progress::ReportProgress() { m_debugger_id); } } + +void ProgressManager::Initialize() { + lldbassert(!InstanceImpl() && "A progress report manager already exists."); + InstanceImpl().emplace(); +} + +void

[Lldb-commits] [lldb] [lldb][progress] Add progress manager class (PR #81319)

2024-02-09 Thread Greg Clayton via lldb-commits
@@ -66,3 +66,47 @@ void Progress::ReportProgress() { m_debugger_id); } } + +void ProgressManager::Initialize() { + lldbassert(!InstanceImpl() && "A progress report manager already exists."); + InstanceImpl().emplace(); +} + +void

[Lldb-commits] [lldb] Make ValueObjectPrinter's handling of its ValueObject pointers more principled (NFC) (PR #81314)

2024-02-09 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. Ok, LGTM. https://github.com/llvm/llvm-project/pull/81314 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add more ways to find the .dwp file. (PR #81067)

2024-02-09 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited https://github.com/llvm/llvm-project/pull/81067 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][progress] Add progress manager class (PR #81319)

2024-02-09 Thread Greg Clayton via lldb-commits
@@ -66,3 +66,47 @@ void Progress::ReportProgress() { m_debugger_id); } } + +void ProgressManager::Initialize() { + lldbassert(!InstanceImpl() && "A progress report manager already exists."); + InstanceImpl().emplace(); +} + +void

[Lldb-commits] [lldb] [lldb][progress] Add progress manager class (PR #81319)

2024-02-09 Thread Greg Clayton via lldb-commits
@@ -66,3 +66,47 @@ void Progress::ReportProgress() { m_debugger_id); } } + +void ProgressManager::Initialize() { + lldbassert(!InstanceImpl() && "A progress report manager already exists."); + InstanceImpl().emplace(); +} + +void

[Lldb-commits] [lldb] [lldb][progress] Add progress manager class (PR #81319)

2024-02-09 Thread Greg Clayton via lldb-commits
@@ -66,3 +66,47 @@ void Progress::ReportProgress() { m_debugger_id); } } + +void ProgressManager::Initialize() { + lldbassert(!InstanceImpl() && "A progress report manager already exists."); + InstanceImpl().emplace(); +} + +void

[Lldb-commits] [lldb] [lldb][progress] Add progress manager class (PR #81319)

2024-02-09 Thread Greg Clayton via lldb-commits
@@ -66,3 +66,47 @@ void Progress::ReportProgress() { m_debugger_id); } } + +void ProgressManager::Initialize() { + lldbassert(!InstanceImpl() && "A progress report manager already exists."); + InstanceImpl().emplace(); +} + +void

[Lldb-commits] [lldb] Make ValueObjectPrinter's handling of its ValueObject pointers more principled (NFC) (PR #81314)

2024-02-09 Thread Greg Clayton via lldb-commits
clayborg wrote: None of what I suggested was mandatory. I was mainly trying to make sure things don't go away on us without us knowing about it. If we have crashes it is always hard to tell if simple heap corruption is the issue or if we are having lifetime issues. If you are not concerned

[Lldb-commits] [lldb] [lldb][progress] Add progress manager class (PR #81319)

2024-02-09 Thread Greg Clayton via lldb-commits
@@ -66,3 +66,47 @@ void Progress::ReportProgress() { m_debugger_id); } } + +void ProgressManager::Initialize() { + lldbassert(!InstanceImpl() && "A progress report manager already exists."); + InstanceImpl().emplace(); +} + +void

[Lldb-commits] [lldb] [lldb][progress] Add progress manager class (PR #81319)

2024-02-09 Thread Greg Clayton via lldb-commits
@@ -66,3 +66,47 @@ void Progress::ReportProgress() { m_debugger_id); } } + +void ProgressManager::Initialize() { + lldbassert(!InstanceImpl() && "A progress report manager already exists."); + InstanceImpl().emplace(); +} + +void

[Lldb-commits] [lldb] [lldb][progress] Add progress manager class (PR #81319)

2024-02-09 Thread Greg Clayton via lldb-commits
@@ -119,6 +120,32 @@ class Progress { bool m_complete = false; }; +/// A class used to group progress reports by category. This is done by using a +/// map that maintains a refcount of each category of progress reports that have +/// come in. Keeping track of progress

[Lldb-commits] [lldb] [lldb][progress] Add progress manager class (PR #81319)

2024-02-09 Thread Greg Clayton via lldb-commits
@@ -66,3 +66,47 @@ void Progress::ReportProgress() { m_debugger_id); } } + +void ProgressManager::Initialize() { + lldbassert(!InstanceImpl() && "A progress report manager already exists."); + InstanceImpl().emplace(); +} + +void

[Lldb-commits] [lldb] [lldb][progress] Add progress manager class (PR #81319)

2024-02-09 Thread Greg Clayton via lldb-commits
@@ -119,6 +120,32 @@ class Progress { bool m_complete = false; }; +/// A class used to group progress reports by category. This is done by using a +/// map that maintains a refcount of each category of progress reports that have +/// come in. Keeping track of progress

<    3   4   5   6   7   8   9   10   11   12   >