[Lldb-commits] [lldb] Centralize the code that figures out which memory ranges to save into core files (PR #71772)

2023-11-09 Thread Greg Clayton via lldb-commits
@@ -6252,3 +6243,188 @@ Status Process::WriteMemoryTags(lldb::addr_t addr, size_t len, return DoWriteMemoryTags(addr, len, tag_manager->GetAllocationTagType(), *packed_tags); } + +// Create a CoreFileMemoryRange from a MemoryRegionInfo +static Proc

[Lldb-commits] [lldb] Centralize the code that figures out which memory ranges to save into core files (PR #71772)

2023-11-09 Thread Greg Clayton via lldb-commits
@@ -6252,3 +6243,188 @@ Status Process::WriteMemoryTags(lldb::addr_t addr, size_t len, return DoWriteMemoryTags(addr, len, tag_manager->GetAllocationTagType(), *packed_tags); } + +// Create a CoreFileMemoryRange from a MemoryRegionInfo +static Proc

[Lldb-commits] [lldb] Centralize the code that figures out which memory ranges to save into core files (PR #71772)

2023-11-09 Thread Greg Clayton via lldb-commits
@@ -6252,3 +6243,188 @@ Status Process::WriteMemoryTags(lldb::addr_t addr, size_t len, return DoWriteMemoryTags(addr, len, tag_manager->GetAllocationTagType(), *packed_tags); } + +// Create a CoreFileMemoryRange from a MemoryRegionInfo +static Proc

[Lldb-commits] [lldb] Centralize the code that figures out which memory ranges to save into core files (PR #71772)

2023-11-09 Thread Greg Clayton via lldb-commits
@@ -6252,3 +6243,188 @@ Status Process::WriteMemoryTags(lldb::addr_t addr, size_t len, return DoWriteMemoryTags(addr, len, tag_manager->GetAllocationTagType(), *packed_tags); } + +// Create a CoreFileMemoryRange from a MemoryRegionInfo +static Proc

[Lldb-commits] [lldb] Centralize the code that figures out which memory ranges to save into core files (PR #71772)

2023-11-09 Thread Greg Clayton via lldb-commits
https://github.com/clayborg updated https://github.com/llvm/llvm-project/pull/71772 >From feea395f4ef165dfc057dfdc0649c6948895eeb3 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Wed, 8 Nov 2023 21:14:49 -0800 Subject: [PATCH] Centralize the code that figures out which memory ranges to save

[Lldb-commits] [lldb] Centralize the code that figures out which memory ranges to save into core files (PR #71772)

2023-11-09 Thread Greg Clayton via lldb-commits
clayborg wrote: I addressed most of the feedback. Alex let me know if you still really want llvm::Error and llvm::Expected to be used as I can add that if you think it is required. I also ran clang format. https://github.com/llvm/llvm-project/pull/71772

[Lldb-commits] [lldb] Centralize the code that figures out which memory ranges to save into core files (PR #71772)

2023-11-09 Thread Greg Clayton via lldb-commits
clayborg wrote: @jasonmolenda I was wondering if we should modify `GetCoreFileSaveRangesDirtyOnly(...)` to try and add all dirty pages and see if any regions have the dirty page info, but if no memory region infos have the dirty pages information, then fall back to adding all memory regions wi

[Lldb-commits] [lldb] Centralize the code that figures out which memory ranges to save into core files (PR #71772)

2023-11-09 Thread Greg Clayton via lldb-commits
clayborg wrote: @bulbazord let me know if you require any changes after reading my inline comments. https://github.com/llvm/llvm-project/pull/71772 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[Lldb-commits] [lldb] [lldb-dap] Add an option to show function args in stack frames (PR #71843)

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

[Lldb-commits] [lldb] [lldb-dap] Add an option to show function args in stack frames (PR #71843)

2023-11-09 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. So this hardcodes the frame display to only be the function name, or function name with args. Do we want to allow users to specify a frame format in the lldb-vscode settings? We could have two settings: one to enable the featur

[Lldb-commits] [lldb] [lldb-dap] Add an option to show function args in stack frames (PR #71843)

2023-11-09 Thread Greg Clayton via lldb-commits
@@ -1232,6 +1234,32 @@ const char *SBFrame::GetFunctionName() const { return name; } +void SBFrame::GetDisplayFunctionNameWithArgs(SBStream &output) { + Stream &strm = output.ref(); + + std::unique_lock lock; + ExecutionContext exe_ctx(m_opaque_sp.get(), lock); + + Stack

[Lldb-commits] [lldb] [llvm] DEBUGINFOD based DWP acquisition for LLDB (PR #70996)

2023-11-09 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,154 @@ +//===-- SymbolLocatorDebuginfod.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] [llvm] [lldb] DEBUGINFOD based DWP acquisition for LLDB (PR #70996)

2023-11-09 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,154 @@ +//===-- SymbolLocatorDebuginfod.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] [llvm] DEBUGINFOD based DWP acquisition for LLDB (PR #70996)

2023-11-09 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,8 @@ +include "../../../../include/lldb/Core/PropertiesBase.td" + +let Definition = "symbollocatordebuginfod" in { + def URLs: Property<"urls", "String">, +Global, +DefaultStringValue<"">, +Desc<"A space-separated, ordered list of Debuginfod server URLs to

[Lldb-commits] [llvm] [lldb] DEBUGINFOD based DWP acquisition for LLDB (PR #70996)

2023-11-09 Thread Greg Clayton via lldb-commits
@@ -4,7 +4,7 @@ let Definition = "modulelist" in { def EnableExternalLookup: Property<"enable-external-lookup", "Boolean">, Global, DefaultTrue, -Desc<"Control the use of external tools and repositories to locate symbol files. Directories listed in target.debug-f

[Lldb-commits] [llvm] [lldb] DEBUGINFOD based DWP acquisition for LLDB (PR #70996)

2023-11-09 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,154 @@ +//===-- SymbolLocatorDebuginfod.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] [llvm] DEBUGINFOD based DWP acquisition for LLDB (PR #70996)

2023-11-09 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,154 @@ +//===-- SymbolLocatorDebuginfod.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] [llvm] [lldb] DEBUGINFOD based DWP acquisition for LLDB (PR #70996)

2023-11-09 Thread Greg Clayton via lldb-commits
@@ -4180,7 +4180,6 @@ TargetProperties::TargetProperties(Target *target) ePropertyInheritTCC, [this] { InheritTCCValueChangedCallback(); }); m_collection_sp->SetValueChangedCallback( ePropertyDisableSTDIO, [this] { DisableSTDIOValueChangedCallback(); }); - -

[Lldb-commits] [llvm] [lldb] DEBUGINFOD based DWP acquisition for LLDB (PR #70996)

2023-11-09 Thread Greg Clayton via lldb-commits
@@ -46,6 +46,10 @@ bool canUseDebuginfod(); /// environment variable. SmallVector getDefaultDebuginfodUrls(); +/// Sets the list of debuginfod server URLs to query. This overrides the +/// environment variable DEBUGINFOD_URLS. clayborg wrote: Should this over

[Lldb-commits] [llvm] [lldb] DEBUGINFOD based DWP acquisition for LLDB (PR #70996)

2023-11-09 Thread Greg Clayton via lldb-commits
@@ -62,15 +66,25 @@ bool canUseDebuginfod() { } SmallVector getDefaultDebuginfodUrls() { - const char *DebuginfodUrlsEnv = std::getenv("DEBUGINFOD_URLS"); - if (DebuginfodUrlsEnv == nullptr) -return SmallVector(); - - SmallVector DebuginfodUrls; - StringRef(DebuginfodU

[Lldb-commits] [lldb] [LLDB] Ensure the data of apple accelerator tables is kept around (PR #71828)

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

[Lldb-commits] [lldb] [LLDB] Ensure the data of apple accelerator tables is kept around (PR #71828)

2023-11-09 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: See inline comment https://github.com/llvm/llvm-project/pull/71828 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB] Ensure the data of apple accelerator tables is kept around (PR #71828)

2023-11-09 Thread Greg Clayton via lldb-commits
@@ -57,7 +57,9 @@ std::unique_ptr AppleDWARFIndex::Create( return std::make_unique( clayborg wrote: DataExtractor objects don't always have shared buffers. I am guessing in this case it does have them, but you might throw in a `lldbassert(...)` just in case

[Lldb-commits] [lldb] [lldb] Change interface of StructuredData::Array::GetItemAtIndexAsDictionary (PR #71961)

2023-11-10 Thread Greg Clayton via lldb-commits
clayborg wrote: A great future patch would be to have StructuredData backed by the llvm::json stuff instead of our own custom version of this a JSON style object hiearchy https://github.com/llvm/llvm-project/pull/71961 ___ lldb-commits mailing list ll

[Lldb-commits] [lldb] [LLDB] Ensure the data of apple accelerator tables is kept around (PR #71828)

2023-11-10 Thread Greg Clayton via lldb-commits
@@ -57,7 +57,9 @@ std::unique_ptr AppleDWARFIndex::Create( return std::make_unique( clayborg wrote: Fine with me! https://github.com/llvm/llvm-project/pull/71828 ___ lldb-commits mailing list lldb-commits@lists.ll

[Lldb-commits] [lldb] [LLDB] Ensure the data of apple accelerator tables is kept around (PR #71828)

2023-11-10 Thread Greg Clayton via lldb-commits
@@ -57,7 +57,9 @@ std::unique_ptr AppleDWARFIndex::Create( return std::make_unique( clayborg wrote: > These asserts might not always pass? I don't know if it's guaranteed that if > one of those sections is present, then the rest of them are as well. You ca

[Lldb-commits] [lldb] Centralize the code that figures out which memory ranges to save into core files (PR #71772)

2023-11-10 Thread Greg Clayton via lldb-commits
https://github.com/clayborg updated https://github.com/llvm/llvm-project/pull/71772 >From feea395f4ef165dfc057dfdc0649c6948895eeb3 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Wed, 8 Nov 2023 21:14:49 -0800 Subject: [PATCH 1/2] Centralize the code that figures out which memory ranges to s

[Lldb-commits] [lldb] [lldb] Fix a off-by-one error in ParseSupportFilesFromPrologue (PR #71984)

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

[Lldb-commits] [lldb] [LLDB] Ensure the data of apple accelerator tables is kept around (PR #71828)

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

[Lldb-commits] [lldb] [lldb-dap] Add an option to provide a format for stack frames (PR #71843)

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

[Lldb-commits] [lldb] [lldb-dap] Add an option to provide a format for stack frames (PR #71843)

2023-11-11 Thread Greg Clayton via lldb-commits
@@ -601,8 +602,8 @@ SBValue SBFrame::FindValue(const char *name, ValueType value_type, stop_if_block_is_inlined_function, [frame](Variable *v) { return v->IsInScope(frame); }, &variable_list); - if (value_type == eValueT

[Lldb-commits] [lldb] [lldb-dap] Add an option to provide a format for stack frames (PR #71843)

2023-11-11 Thread Greg Clayton via lldb-commits
@@ -255,6 +255,11 @@ "type": "string", "description": "The escape prefix to use for executing regular LLDB commands in the Debug Console, instead of p

[Lldb-commits] [lldb] [lldb-dap] Add an option to provide a format for stack frames (PR #71843)

2023-11-11 Thread Greg Clayton via lldb-commits
@@ -324,8 +325,29 @@ class StackFrame : public ExecutionContextScope, ///C string with the assembly instructions for this function. const char *Disassemble(); + /// Print a description of this frame using the provided frame format. + /// + /// \param[out] strm + //

[Lldb-commits] [lldb] [lldb-dap] Add an option to provide a format for stack frames (PR #71843)

2023-11-11 Thread Greg Clayton via lldb-commits
@@ -947,6 +950,33 @@ SBValue SBFrame::FindRegister(const char *name) { return result; } +bool SBFrame::GetDescriptionWithFormat(const SBFormat &format, SBStream &output, + const char *default_value) { clayborg wrote: r

[Lldb-commits] [lldb] [lldb-dap] Add an option to provide a format for stack frames (PR #71843)

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

[Lldb-commits] [lldb] [lldb-dap] Add an option to provide a format for stack frames (PR #71843)

2023-11-11 Thread Greg Clayton via lldb-commits
@@ -193,6 +193,27 @@ class LLDB_API SBFrame { bool GetDescription(lldb::SBStream &description); + /// Similar to \a GetDescription() but the format of the description can be + /// configured via the \p format parameter. See + /// https://lldb.llvm.org/use/formatting.html

[Lldb-commits] [lldb] [lldb-dap] Add an option to provide a format for stack frames (PR #71843)

2023-11-11 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,50 @@ +//===-- SBFormat.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: Apa

[Lldb-commits] [lldb] [lldb-dap] Add an option to provide a format for stack frames (PR #71843)

2023-11-11 Thread Greg Clayton via lldb-commits
@@ -814,9 +815,11 @@ SBValueList SBFrame::GetVariables(const lldb::SBVariablesOptions &options) { if (num_variables) { size_t num_produced = 0; for (const VariableSP &variable_sp : *variable_list) { - if (INTERRUPT_REQUESTED(dbg,

[Lldb-commits] [lldb] [lldb-dap] Add an option to provide a format for stack frames (PR #71843)

2023-11-11 Thread Greg Clayton via lldb-commits
@@ -1779,18 +1779,36 @@ void StackFrame::CalculateExecutionContext(ExecutionContext &exe_ctx) { exe_ctx.SetContext(shared_from_this()); } +bool StackFrame::DumpUsingFormat(Stream &strm, + const FormatEntity::Entry *format, +

[Lldb-commits] [lldb] [lldb-dap] Add an option to provide a format for stack frames (PR #71843)

2023-11-11 Thread Greg Clayton via lldb-commits
@@ -785,11 +785,18 @@ llvm::json::Value CreateStackFrame(lldb::SBFrame &frame) { int64_t frame_id = MakeDAPFrameID(frame); object.try_emplace("id", frame_id); - // `function_name` can be a nullptr, which throws an error when assigned to an - // `std::string`. - const c

[Lldb-commits] [lldb] [lldb][DWARFASTParserClang] Make MemberAttributes const when parsing member DIEs (PR #71921)

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

[Lldb-commits] [lldb] Add new API in SBTarget for loading core from SBFile (PR #71769)

2023-11-11 Thread Greg Clayton via lldb-commits
@@ -184,6 +184,8 @@ class LLDB_API SBTarget { SBProcess LoadCore(const char *core_file); SBProcess LoadCore(const char *core_file, lldb::SBError &error); + SBProcess LoadCore(SBFile &file); clayborg wrote: Just add the error to your function call: ``` SB

[Lldb-commits] [lldb] Centralize the code that figures out which memory ranges to save into core files (PR #71772)

2023-11-11 Thread Greg Clayton via lldb-commits
https://github.com/clayborg updated https://github.com/llvm/llvm-project/pull/71772 >From feea395f4ef165dfc057dfdc0649c6948895eeb3 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Wed, 8 Nov 2023 21:14:49 -0800 Subject: [PATCH 1/3] Centralize the code that figures out which memory ranges to s

[Lldb-commits] [lldb] Centralize the code that figures out which memory ranges to save into core files (PR #71772)

2023-11-11 Thread Greg Clayton via lldb-commits
https://github.com/clayborg updated https://github.com/llvm/llvm-project/pull/71772 >From f1bd931ff434012888b0b87a75daaf6ba99102c0 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Wed, 8 Nov 2023 21:14:49 -0800 Subject: [PATCH 1/3] Centralize the code that figures out which memory ranges to s

[Lldb-commits] [lldb] Centralize the code that figures out which memory ranges to save into core files (PR #71772)

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

[Lldb-commits] [lldb] Centralize the code that figures out which memory ranges to save into core files (PR #71772)

2023-11-13 Thread Greg Clayton via lldb-commits
clayborg wrote: > Hello @clayborg ! Looks like this patch broke lldb-aarch64-windows bot: > https://lab.llvm.org/buildbot/#/builders/219/builds/6868 Could you please > look at this ? @antmox I looked at this and I didn't touch anything related to native windows core file saving. If this is

[Lldb-commits] [lldb] [lldb][DWARFASTParserClang][NFC] Extract static data member decl creation into helper (PR #72109)

2023-11-13 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. https://github.com/llvm/llvm-project/pull/72109 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Centralize the code that figures out which memory ranges to save into core files (PR #71772)

2023-11-13 Thread Greg Clayton via lldb-commits
clayborg wrote: Does anyone have access to a native windows arm64 build of LLDB that could help look at this? https://github.com/llvm/llvm-project/pull/71772 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[Lldb-commits] [lldb] [lldb-dap] Add an option to provide a format for stack frames (PR #71843)

2023-11-13 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. Just need to not use `llvm::errs()` or `llvm::outs()` in lldb DAP, use DAP::SendOutput(OutputType::Console, ...)` to ensure that the users sees this. https://github.com/llvm/llvm-project/pull/71843

[Lldb-commits] [lldb] [lldb-dap] Add an option to provide a format for stack frames (PR #71843)

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

[Lldb-commits] [lldb] [lldb-dap] Add an option to provide a format for stack frames (PR #71843)

2023-11-13 Thread Greg Clayton via lldb-commits
@@ -824,4 +824,15 @@ bool ReplModeRequestHandler::DoExecute(lldb::SBDebugger debugger, return true; } +void DAP::SetFrameFormat(llvm::StringRef format) { + if (format.empty()) +return; + lldb::SBError error; + g_dap.frame_format = lldb::SBFormat::Parse(format.data(),

[Lldb-commits] [lldb] [lldb-dap] Add an option to provide a format for stack frames (PR #71843)

2023-11-13 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,69 @@ + +//===-- SBFormat.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: A

[Lldb-commits] [lldb] [lldb-dap] Add an option to provide a format for stack frames (PR #71843)

2023-11-13 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,47 @@ +//===-- SBFormat.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: Apa

[Lldb-commits] [lldb] [lldb-dap] Add an option to provide a format for stack frames (PR #71843)

2023-11-13 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. One last request: test the SBFormat API in a stand alone test in `lldb/test/api/sbformat` so we can see if the errors work and the "operator bool" works as expected: ``` format = lldb.SBFormat() self.assertFalse(format) err = l

[Lldb-commits] [lldb] [lldb-dap] Add an option to provide a format for stack frames (PR #71843)

2023-11-13 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. Thanks for all of the changes. Looks great! https://github.com/llvm/llvm-project/pull/71843 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[Lldb-commits] [lldb] [lldb-dap] Add an option to provide a format for threads (PR #72196)

2023-11-13 Thread Greg Clayton via lldb-commits
@@ -839,4 +839,19 @@ void DAP::SetFrameFormat(llvm::StringRef format) { } } +void DAP::SetThreadFormat(llvm::StringRef format) { + if (format.empty()) +return; + lldb::SBError error; + g_dap.thread_format = lldb::SBFormat(format.data(), error); claybo

[Lldb-commits] [lldb] [lldb-dap] Add an option to provide a format for threads (PR #72196)

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

[Lldb-commits] [lldb] [lldb-dap] Add an option to provide a format for threads (PR #72196)

2023-11-13 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. On simple change and this is good to go. https://github.com/llvm/llvm-project/pull/72196 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[Lldb-commits] [lldb] [lldb-dap] Add an option to provide a format for threads (PR #72196)

2023-11-14 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. https://github.com/llvm/llvm-project/pull/72196 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Fixing a type encoding issue with dap Stopped events. (PR #72292)

2023-11-14 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. https://github.com/llvm/llvm-project/pull/72292 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Fixing a type encoding issue with dap Stopped events. (PR #72292)

2023-11-14 Thread Greg Clayton via lldb-commits
@@ -953,9 +953,9 @@ llvm::json::Value CreateThreadStopped(lldb::SBThread &thread, } else { body.try_emplace("reason", "breakpoint"); char desc_str[64]; - uint64_t bp_id = thread.GetStopReasonDataAtIndex(0); - uint64_t bp_loc_id = thread.GetStopReasonD

[Lldb-commits] [lldb] [lldb-dap] Fixing a type encoding issue with dap Stopped events. (PR #72292)

2023-11-14 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited https://github.com/llvm/llvm-project/pull/72292 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Centralize the code that figures out which memory ranges to save into core files (PR #71772)

2023-11-14 Thread Greg Clayton via lldb-commits
clayborg wrote: > @clayborg I will try to reproduce on the buildbot windows machine. build > ongoing If you end up being able to reproduce, if you can send the minidump file that was produced I should be able to look at it to make sure it was not produced by the core file saver. But if this i

[Lldb-commits] [lldb] [lldb-dap] Fixing a type encoding issue with dap Stopped events. (PR #72292)

2023-11-14 Thread Greg Clayton via lldb-commits
@@ -953,9 +953,9 @@ llvm::json::Value CreateThreadStopped(lldb::SBThread &thread, } else { body.try_emplace("reason", "breakpoint"); char desc_str[64]; - uint64_t bp_id = thread.GetStopReasonDataAtIndex(0); - uint64_t bp_loc_id = thread.GetStopReasonD

[Lldb-commits] [lldb] [lldb][DWARFASTParserClang] DWARFv5: support DW_TAG_variable static data members declarations (PR #72236)

2023-11-14 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. https://github.com/llvm/llvm-project/pull/72236 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Fixing a type encoding issue with dap Stopped events. (PR #72292)

2023-11-14 Thread Greg Clayton via lldb-commits
clayborg wrote: LGTM. I didn't mean to accept the patch when it was using `PRIo32` https://github.com/llvm/llvm-project/pull/72292 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commit

[Lldb-commits] [lldb] Centralize the code that figures out which memory ranges to save into core files (PR #71772)

2023-11-14 Thread Greg Clayton via lldb-commits
clayborg wrote: > [core_dmps.tar.gz](https://github.com/llvm/llvm-project/files/13355872/core_dmps.tar.gz) > here is an archive with the 2 core.dmp files It does indeed seem like my new core file creation code is being triggered on windows. I am working on a fix that adds ARM64 support to the

[Lldb-commits] [lldb] Add support for arm64 registers in minidump core file saving. (PR #72315)

2023-11-14 Thread Greg Clayton via lldb-commits
https://github.com/clayborg created https://github.com/llvm/llvm-project/pull/72315 This patch adds support for saving minidumps with the arm64 architecture. It also will cause unsupported architectures to emit an error where before this patch it would emit a minidump with partial information.

[Lldb-commits] [lldb] Centralize the code that figures out which memory ranges to save into core files (PR #71772)

2023-11-14 Thread Greg Clayton via lldb-commits
clayborg wrote: > [antmox](/antmox) https://github.com/llvm/llvm-project/pull/72315 A new PR to fix this issue. Is there any way you can test this to see if this works? https://github.com/llvm/llvm-project/pull/71772 ___ lldb-commits mailing list ll

[Lldb-commits] [lldb] Add support for arm64 registers in minidump core file saving. (PR #72315)

2023-11-14 Thread Greg Clayton via lldb-commits
https://github.com/clayborg updated https://github.com/llvm/llvm-project/pull/72315 >From dd4dd79853566049874f49d1290217f5abde23fd Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Tue, 14 Nov 2023 13:53:25 -0800 Subject: [PATCH 1/2] Add support for arm64 registers in minidump core file saving

[Lldb-commits] [lldb] Add support for arm64 registers in minidump core file saving. (PR #72315)

2023-11-14 Thread Greg Clayton via lldb-commits
clayborg wrote: > LGTM. minidump tests are now OK on linaro-armv8-windows-msvc machine. Feel free to accept this patch then and I can get it merged! https://github.com/llvm/llvm-project/pull/72315 ___ lldb-commits mailing list lldb-commits@lists.llvm

[Lldb-commits] [lldb] Add support for arm64 registers in minidump core file saving. (PR #72315)

2023-11-14 Thread Greg Clayton via lldb-commits
https://github.com/clayborg closed https://github.com/llvm/llvm-project/pull/72315 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add support for arm64 registers in minidump core file saving. (PR #72315)

2023-11-14 Thread Greg Clayton via lldb-commits
clayborg wrote: @antmox Hopefully this clears up the issue on the build bot! Thanks for testing this for me. https://github.com/llvm/llvm-project/pull/72315 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[Lldb-commits] [clang] [clang-tools-extra] [llvm] [lldb] Add new API in SBTarget for loading core from SBFile (PR #71769)

2023-11-15 Thread Greg Clayton via lldb-commits
@@ -244,9 +245,38 @@ SBProcess SBTarget::LoadCore(const char *core_file, lldb::SBError &error) { TargetSP target_sp(GetSP()); if (target_sp) { FileSpec filespec(core_file); -FileSystem::Instance().Resolve(filespec); +auto file = FileSystem::Instance().Open( +

[Lldb-commits] [llvm] [clang-tools-extra] [lldb] [clang] Add new API in SBTarget for loading core from SBFile (PR #71769)

2023-11-15 Thread Greg Clayton via lldb-commits
@@ -627,7 +628,7 @@ class Target : public std::enable_shared_from_this, // used. const lldb::ProcessSP &CreateProcess(lldb::ListenerSP listener_sp, llvm::StringRef plugin_name, - const FileSpec *cr

[Lldb-commits] [clang] [clang-tools-extra] [lldb] [llvm] Add new API in SBTarget for loading core from SBFile (PR #71769)

2023-11-15 Thread Greg Clayton via lldb-commits
@@ -3174,8 +3174,17 @@ class TargetCreateFormDelegate : public FormDelegate { core_file_directory_spec.SetDirectory(core_file_spec.GetDirectory()); target_sp->AppendExecutableSearchPaths(core_file_directory_spec); -ProcessSP process_sp(target_sp->CreateProcess( -

[Lldb-commits] [clang-tools-extra] [clang] [llvm] [lldb] Add new API in SBTarget for loading core from SBFile (PR #71769)

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

[Lldb-commits] [lldb] [clang-tools-extra] [llvm] [clang] Add new API in SBTarget for loading core from SBFile (PR #71769)

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

[Lldb-commits] [lldb] [clang-tools-extra] [clang] [llvm] Add new API in SBTarget for loading core from SBFile (PR #71769)

2023-11-15 Thread Greg Clayton via lldb-commits
@@ -194,11 +194,12 @@ void ProcessGDBRemote::Terminate() { PluginManager::UnregisterPlugin(ProcessGDBRemote::CreateInstance); } -lldb::ProcessSP ProcessGDBRemote::CreateInstance( -lldb::TargetSP target_sp, ListenerSP listener_sp, -const FileSpec *crash_file_path, boo

[Lldb-commits] [clang] [clang-tools-extra] [lldb] [llvm] Add new API in SBTarget for loading core from SBFile (PR #71769)

2023-11-15 Thread Greg Clayton via lldb-commits
@@ -427,8 +427,17 @@ class CommandObjectTargetCreate : public CommandObjectParsed { core_file_dir.SetDirectory(core_file.GetDirectory()); target_sp->AppendExecutableSearchPaths(core_file_dir); +auto file = FileSystem::Instance().Open( +core

[Lldb-commits] [clang] [llvm] [clang-tools-extra] [lldb] Add new API in SBTarget for loading core from SBFile (PR #71769)

2023-11-15 Thread Greg Clayton via lldb-commits
@@ -102,10 +102,10 @@ void ProcessKDP::Terminate() { lldb::ProcessSP ProcessKDP::CreateInstance(TargetSP target_sp, ListenerSP listener_sp, - const FileSpec *crash_file_path, +

[Lldb-commits] [lldb] [llvm] DEBUGINFOD based DWP acquisition for LLDB (PR #70996)

2023-11-16 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited https://github.com/llvm/llvm-project/pull/70996 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [llvm] DEBUGINFOD based DWP acquisition for LLDB (PR #70996)

2023-11-16 Thread Greg Clayton via lldb-commits
@@ -62,15 +66,23 @@ bool canUseDebuginfod() { } SmallVector getDefaultDebuginfodUrls() { - const char *DebuginfodUrlsEnv = std::getenv("DEBUGINFOD_URLS"); - if (DebuginfodUrlsEnv == nullptr) -return SmallVector(); - - SmallVector DebuginfodUrls; - StringRef(DebuginfodU

[Lldb-commits] [lldb] [llvm] DEBUGINFOD based DWP acquisition for LLDB (PR #70996)

2023-11-16 Thread Greg Clayton via lldb-commits
@@ -62,15 +66,23 @@ bool canUseDebuginfod() { } SmallVector getDefaultDebuginfodUrls() { - const char *DebuginfodUrlsEnv = std::getenv("DEBUGINFOD_URLS"); - if (DebuginfodUrlsEnv == nullptr) -return SmallVector(); - - SmallVector DebuginfodUrls; - StringRef(DebuginfodU

[Lldb-commits] [llvm] [lldb] DEBUGINFOD based DWP acquisition for LLDB (PR #70996)

2023-11-16 Thread Greg Clayton via lldb-commits
@@ -62,15 +66,23 @@ bool canUseDebuginfod() { } SmallVector getDefaultDebuginfodUrls() { - const char *DebuginfodUrlsEnv = std::getenv("DEBUGINFOD_URLS"); - if (DebuginfodUrlsEnv == nullptr) -return SmallVector(); - - SmallVector DebuginfodUrls; - StringRef(DebuginfodU

[Lldb-commits] [llvm] [lldb] DEBUGINFOD based DWP acquisition for LLDB (PR #70996)

2023-11-16 Thread Greg Clayton via lldb-commits
@@ -46,6 +46,10 @@ bool canUseDebuginfod(); /// environment variable. SmallVector getDefaultDebuginfodUrls(); +/// Sets the list of debuginfod server URLs to query. This overrides the +/// environment variable DEBUGINFOD_URLS. +void setDefaultDebuginfodUrls(SmallVector URLs);

[Lldb-commits] [llvm] [lldb] DEBUGINFOD based DWP acquisition for LLDB (PR #70996)

2023-11-16 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: Looks good, a few suggestions in `llvm/lib/Debuginfod/Debuginfod.cpp`. I will let Jonas comment if the settings are done the right way in the plug-in manager. Plug-in code looks fine. https://github.com/llvm/llvm-project/pull/70996 ___

[Lldb-commits] [lldb] [llvm] DEBUGINFOD based DWP acquisition for LLDB (PR #70996)

2023-11-16 Thread Greg Clayton via lldb-commits
@@ -47,6 +47,10 @@ namespace llvm { using llvm::object::BuildIDRef; +SmallVector DebuginfodUrls; clayborg wrote: Maybe make this `std::optional< SmallVector >` and get rid of `DebuginfodUrlsSet` below? We might want a std::mutex here to protect multi-threa

[Lldb-commits] [lldb] Add new API in SBTarget for loading core from SBFile (PR #71769)

2023-11-17 Thread Greg Clayton via lldb-commits
clayborg wrote: I am not sure how this actually works? We pass in a SBFile and then get the FileSpec from it and then somehow that allows us to open a file that doesn't actually exist on disk? Or does this work _because_ the `fd` we had is actually backed by some file on disk? In that case we

[Lldb-commits] [lldb] Send an explicit interrupt to cancel an attach waitfor. (PR #72565)

2023-11-17 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: Looks good to me from a code perspective as long as this works. It would be nice to add a test for Darwin only. Luckily this is easy to test to ensure it works. https://github.com/llvm/llvm-project/pull/72565 __

[Lldb-commits] [lldb] Send an explicit interrupt to cancel an attach waitfor. (PR #72565)

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

[Lldb-commits] [lldb] Send an explicit interrupt to cancel an attach waitfor. (PR #72565)

2023-11-17 Thread Greg Clayton via lldb-commits
@@ -799,7 +799,33 @@ DNBProcessAttachWait(RNBContext *ctx, const char *waitfor_process_name, break; } - ::usleep(waitfor_interval); // Sleep for WAITFOR_INTERVAL, then poll again + // Now we're going to wait a while before polling again. But we also

[Lldb-commits] [lldb] 613336d - Don't index the skeleton CU when we have a fission compile unit.

2022-08-25 Thread Greg Clayton via lldb-commits
Author: Greg Clayton Date: 2022-08-25T14:48:04-07:00 New Revision: 613336da8ce16bd2e998e77e02eaf5866ad7e311 URL: https://github.com/llvm/llvm-project/commit/613336da8ce16bd2e998e77e02eaf5866ad7e311 DIFF: https://github.com/llvm/llvm-project/commit/613336da8ce16bd2e998e77e02eaf5866ad7e311.diff

[Lldb-commits] [lldb] 9af089f - Add the ability to show when variables fails to be available when debug info is valid.

2022-09-09 Thread Greg Clayton via lldb-commits
Author: Greg Clayton Date: 2022-09-09T16:14:46-07:00 New Revision: 9af089f5179d52c6561ec27532880edcfb6253af URL: https://github.com/llvm/llvm-project/commit/9af089f5179d52c6561ec27532880edcfb6253af DIFF: https://github.com/llvm/llvm-project/commit/9af089f5179d52c6561ec27532880edcfb6253af.diff

[Lldb-commits] [lldb] 4763200 - Add the ability to show when variables fails to be available when debug info is valid.

2022-09-12 Thread Greg Clayton via lldb-commits
Author: Greg Clayton Date: 2022-09-12T13:59:05-07:00 New Revision: 4763200ec95ce6514403176017f29b87757b292a URL: https://github.com/llvm/llvm-project/commit/4763200ec95ce6514403176017f29b87757b292a DIFF: https://github.com/llvm/llvm-project/commit/4763200ec95ce6514403176017f29b87757b292a.diff

[Lldb-commits] [lldb] 376c7bd - Fix DW_OP_convert to resolve the CU relative offset correctly.

2022-09-12 Thread Greg Clayton via lldb-commits
Author: Greg Clayton Date: 2022-09-12T16:53:19-07:00 New Revision: 376c7bd92aff0e4256b2842400936a9b29343045 URL: https://github.com/llvm/llvm-project/commit/376c7bd92aff0e4256b2842400936a9b29343045 DIFF: https://github.com/llvm/llvm-project/commit/376c7bd92aff0e4256b2842400936a9b29343045.diff

[Lldb-commits] [lldb] ccb47b4 - Track .dwo/.dwp loading errors and notify user when viewing variables.

2022-09-22 Thread Greg Clayton via lldb-commits
Author: Greg Clayton Date: 2022-09-22T11:35:20-07:00 New Revision: ccb47b41e4936d1d44dfbaf5aac028280c216932 URL: https://github.com/llvm/llvm-project/commit/ccb47b41e4936d1d44dfbaf5aac028280c216932 DIFF: https://github.com/llvm/llvm-project/commit/ccb47b41e4936d1d44dfbaf5aac028280c216932.diff

[Lldb-commits] [lldb] 15f83ab - When there are variable errors, display an error in VS Code's local variables view.

2022-09-28 Thread Greg Clayton via lldb-commits
Author: Greg Clayton Date: 2022-09-28T15:38:02-07:00 New Revision: 15f83ab77502cb2bd405a091cf419536e1d41381 URL: https://github.com/llvm/llvm-project/commit/15f83ab77502cb2bd405a091cf419536e1d41381 DIFF: https://github.com/llvm/llvm-project/commit/15f83ab77502cb2bd405a091cf419536e1d41381.diff

[Lldb-commits] [lldb] 8f89351 - Track which modules have debug info variable errors.

2022-09-28 Thread Greg Clayton via lldb-commits
Author: Greg Clayton Date: 2022-09-28T15:39:54-07:00 New Revision: 8f8935139adf44584634d4bacd35e3eee3f648a5 URL: https://github.com/llvm/llvm-project/commit/8f8935139adf44584634d4bacd35e3eee3f648a5 DIFF: https://github.com/llvm/llvm-project/commit/8f8935139adf44584634d4bacd35e3eee3f648a5.diff

[Lldb-commits] [lldb] b3a0bed - [NFC] Add header documentation to the SBError::GetCString() to clarify ownwership of the returned string.

2022-09-29 Thread Greg Clayton via lldb-commits
Author: Greg Clayton Date: 2022-09-29T10:54:31-07:00 New Revision: b3a0bed5fb8766dcf27583ab1f73edc6e7232657 URL: https://github.com/llvm/llvm-project/commit/b3a0bed5fb8766dcf27583ab1f73edc6e7232657 DIFF: https://github.com/llvm/llvm-project/commit/b3a0bed5fb8766dcf27583ab1f73edc6e7232657.diff

<    24   25   26   27   28   29   30   31   32   33   >