mgorny wrote:
`LLVM_DIR` and `Clang_DIR` are merely hints to `find_package()`. If you need to
pass them, it simply means you haven't set `PATH` correctly and CMake can't
find installed LLVM/Clang. However, that shouldn't make any difference as long
as you provide paths to **installed**
kevinfrei wrote:
I've returned to this after getting some other work up for a PR, and I'm stuck
again. If I remove LLVM_DIR, the thing doesn't get anywhere. It explicitly asks
for LLVM_DIR, if I work through that, then it asks for Clang_DIR. I'm getting
frustrated because it seems like the
kevinfrei wrote:
Sorry: nice long holiday break. So calling that library a "left over from a
previous build" confuses me. What's the point of the
`-DLLVM_DIR=/home/freik/src/rel-llvm/lib/cmake/llvm` argument to the second
cmake config if not to instruct the build where to find stuff from the
kevinfrei wrote:
I've spent 5 or 6 more hours fighting this and I'm fully stuck on "No Repro". I
have a libLLVM-git18.so built, independent of building LLDB. Then I configured
LLDB to build against that as a standalone entity and validated that it worked
(all on my personal machine, which is
kevinfrei wrote:
Is there some documentation that both me & google are missing somewhere? I'm
trying to read between the lines of the scenario that's broken, with nothing
but a log (that refers to a bunch of pretty important configuration files from
somewhere I can't find) with a repo
mgorny wrote:
I've also confirmed that installing `LLVMDebuginfod` target won't help since it
references other internal targets that are created at build-time and not
included as part of the installed CMake configuration:
```
CMake Error at
https://github.com/clayborg closed
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
https://github.com/clayborg approved this pull request.
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
kevinfrei wrote:
> We need to respect the setting `symbols.enable-external-lookup` and not do
> anything with debuginfod if this is set to false.
>
> You can get this value by calling:
>
> ```
> ModuleList::GetGlobalModuleListProperties().GetEnableExternalLookup()
> ```
>
> Otherwise I fear
https://github.com/clayborg requested changes to this pull request.
We need to respect the setting `symbols.enable-external-lookup` and not do
anything with debuginfod if this is set to false.
You can get this value by calling:
```
https://github.com/kevinfrei updated
https://github.com/llvm/llvm-project/pull/70996
>From b04c85dbed0b369e747aa2a3823789203156736b Mon Sep 17 00:00:00 2001
From: Kevin Frei
Date: Wed, 18 Oct 2023 14:37:34 -0700
Subject: [PATCH 1/9] DEBUGINFOD based DWP acquisition for LLDB
Summary:
I've
https://github.com/kevinfrei updated
https://github.com/llvm/llvm-project/pull/70996
>From b04c85dbed0b369e747aa2a3823789203156736b Mon Sep 17 00:00:00 2001
From: Kevin Frei
Date: Wed, 18 Oct 2023 14:37:34 -0700
Subject: [PATCH 1/8] DEBUGINFOD based DWP acquisition for LLDB
Summary:
I've
DavidSpickett wrote:
If this code is calling a library - which itself is already tested, that's fine
but any smoke test we can do would be good.
E.g. set a bogus URL and expect that it fails to use it (assuming it does so
visibly). Just to check the integration.
clayborg wrote:
LGTM.
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
@@ -62,15 +66,23 @@ bool canUseDebuginfod() {
}
SmallVector getDefaultDebuginfodUrls() {
- const char *DebuginfodUrlsEnv = std::getenv("DEBUGINFOD_URLS");
- if (DebuginfodUrlsEnv == nullptr)
-return SmallVector();
-
- SmallVector DebuginfodUrls;
-
@@ -47,6 +47,10 @@ namespace llvm {
using llvm::object::BuildIDRef;
+SmallVector DebuginfodUrls;
kevinfrei wrote:
Done
https://github.com/llvm/llvm-project/pull/70996
___
lldb-commits mailing list
@@ -62,15 +66,23 @@ bool canUseDebuginfod() {
}
SmallVector getDefaultDebuginfodUrls() {
- const char *DebuginfodUrlsEnv = std::getenv("DEBUGINFOD_URLS");
- if (DebuginfodUrlsEnv == nullptr)
-return SmallVector();
-
- SmallVector DebuginfodUrls;
-
@@ -62,15 +66,23 @@ bool canUseDebuginfod() {
}
SmallVector getDefaultDebuginfodUrls() {
- const char *DebuginfodUrlsEnv = std::getenv("DEBUGINFOD_URLS");
- if (DebuginfodUrlsEnv == nullptr)
-return SmallVector();
-
- SmallVector DebuginfodUrls;
-
@@ -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);
@@ -0,0 +1,142 @@
+//===-- 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:
https://github.com/kevinfrei updated
https://github.com/llvm/llvm-project/pull/70996
>From b04c85dbed0b369e747aa2a3823789203156736b Mon Sep 17 00:00:00 2001
From: Kevin Frei
Date: Wed, 18 Oct 2023 14:37:34 -0700
Subject: [PATCH 1/7] DEBUGINFOD based DWP acquisition for LLDB
Summary:
I've
@@ -0,0 +1,142 @@
+//===-- 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:
@@ -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
@@ -62,15 +66,23 @@ bool canUseDebuginfod() {
}
SmallVector getDefaultDebuginfodUrls() {
- const char *DebuginfodUrlsEnv = std::getenv("DEBUGINFOD_URLS");
- if (DebuginfodUrlsEnv == nullptr)
-return SmallVector();
-
- SmallVector DebuginfodUrls;
-
@@ -62,15 +66,23 @@ bool canUseDebuginfod() {
}
SmallVector getDefaultDebuginfodUrls() {
- const char *DebuginfodUrlsEnv = std::getenv("DEBUGINFOD_URLS");
- if (DebuginfodUrlsEnv == nullptr)
-return SmallVector();
-
- SmallVector DebuginfodUrls;
-
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
@@ -0,0 +1,142 @@
+//===-- 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:
https://github.com/kevinfrei updated
https://github.com/llvm/llvm-project/pull/70996
>From b04c85dbed0b369e747aa2a3823789203156736b Mon Sep 17 00:00:00 2001
From: Kevin Frei
Date: Wed, 18 Oct 2023 14:37:34 -0700
Subject: [PATCH 1/5] DEBUGINFOD based DWP acquisition for LLDB
Summary:
I've
kevinfrei wrote:
Looks like I missed committing some staged edits. Hold on before reviewing...
https://github.com/llvm/llvm-project/pull/70996
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://github.com/kevinfrei updated
https://github.com/llvm/llvm-project/pull/70996
>From b04c85dbed0b369e747aa2a3823789203156736b Mon Sep 17 00:00:00 2001
From: Kevin Frei
Date: Wed, 18 Oct 2023 14:37:34 -0700
Subject: [PATCH 1/5] DEBUGINFOD based DWP acquisition for LLDB
Summary:
I've
@@ -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
@@ -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.
+//
@@ -62,15 +66,25 @@ bool canUseDebuginfod() {
}
SmallVector getDefaultDebuginfodUrls() {
- const char *DebuginfodUrlsEnv = std::getenv("DEBUGINFOD_URLS");
- if (DebuginfodUrlsEnv == nullptr)
-return SmallVector();
-
- SmallVector DebuginfodUrls;
-
@@ -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.
kevinfrei wrote:
Switched the
@@ -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
@@ -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.
+//
@@ -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.
+//
@@ -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.
+//
@@ -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.
+//
@@ -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
@@ -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.
+//
@@ -4892,6 +4894,21 @@ void TargetProperties::SetDebugUtilityExpression(bool
debug) {
SetPropertyAtIndex(idx, debug);
}
+Args TargetProperties::GetDebugInfoDURLs() const {
+ Args urls;
+ m_collection_sp->GetPropertyAtIndexAsArgs(ePropertyDebugInfoDURLs, urls);
+ return
@@ -396,8 +398,22 @@ Symbols::LocateExecutableSymbolFile(const ModuleSpec
_spec,
}
}
}
-
- return LocateExecutableSymbolFileDsym(module_spec);
+ FileSpec dsym_bundle = LocateExecutableSymbolFileDsym(module_spec);
+ if (dsym_bundle)
+return dsym_bundle;
+
+
kevinfrei wrote:
I updated the diff with the plugin-ified version of the work. It's *much*
cleaner with no debugger-wide changes to speak of (Thanks for the set up for
that, @JDevlieghere!). I did *not* add Debuginfod logging in the LLDB part of
the code, as I intend to add diagnostic
https://github.com/kevinfrei updated
https://github.com/llvm/llvm-project/pull/70996
>From b04c85dbed0b369e747aa2a3823789203156736b Mon Sep 17 00:00:00 2001
From: Kevin Frei
Date: Wed, 18 Oct 2023 14:37:34 -0700
Subject: [PATCH 1/4] DEBUGINFOD based DWP acquisition for LLDB
Summary:
I've
JDevlieghere wrote:
FWIW the "plugin-ification" has landed so this should be able to move forward
as a plugin.
https://github.com/llvm/llvm-project/pull/70996
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
JDevlieghere wrote:
> Are you asking me to create a SymbolServer class for _this_ change, or do you
> want me to get this diff polished & landed, then create the abstraction
> before adding anything more? (Either is fine: I just can't quite tell what
> you're looking for right now)
I was
@@ -4892,6 +4894,21 @@ void TargetProperties::SetDebugUtilityExpression(bool
debug) {
SetPropertyAtIndex(idx, debug);
}
+Args TargetProperties::GetDebugInfoDURLs() const {
+ Args urls;
+ m_collection_sp->GetPropertyAtIndexAsArgs(ePropertyDebugInfoDURLs, urls);
+ return
mysterymath wrote:
> > Out of curiosity, why did you choose the delimiter as ' ' instead of
> > something like ';'?
>
> Because that's how the environment variable works. It was less a choice and
> more 路
>
> Also, ChatGPT tells me that URL's can include semicolons, so maybe it's not a
>
https://github.com/mysterymath 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
https://github.com/mysterymath 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
https://github.com/kevinfrei 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
kevinfrei wrote:
> Out of curiosity, why did you choose the delimiter as ' ' instead of
> something like ';'?
Because that's how the environment variable works. It was less a choice and
more 路
https://github.com/llvm/llvm-project/pull/70996
___
@@ -396,8 +398,22 @@ Symbols::LocateExecutableSymbolFile(const ModuleSpec
_spec,
}
}
}
-
- return LocateExecutableSymbolFileDsym(module_spec);
+ FileSpec dsym_bundle = LocateExecutableSymbolFileDsym(module_spec);
+ if (dsym_bundle)
+return dsym_bundle;
+
+
@@ -258,6 +258,8 @@ class TargetProperties : public Properties {
bool GetDebugUtilityExpression() const;
+ Args GetDebugInfoDURLs() const;
mysterymath wrote:
General naming nit:
`debuginfod` is all lower-case, and capitalized as if it were a single
https://github.com/kevinfrei updated
https://github.com/llvm/llvm-project/pull/70996
>From 6454d4fb652f61a20850c75f0e69759dffe28511 Mon Sep 17 00:00:00 2001
From: Kevin Frei
Date: Wed, 18 Oct 2023 14:37:34 -0700
Subject: [PATCH 1/2] DEBUGINFOD based DWP acquisition for LLDB
Summary:
I've
@@ -48,6 +48,7 @@ add_lldb_library(lldbSymbol NO_PLUGIN_DEPENDENCIES
lldbHost
lldbTarget
lldbUtility
+LLVMDebuginfod
kevinfrei wrote:
`LINK_COMPONENTS` gets added to targets all over the place. The library is only
used in this particular
JDevlieghere wrote:
> Yes, that specific kind of refactoring seemed like a good idea, but given
> that this is my first real foray into the LLDB space, I didn't want to bite
> off that much work to start with.
I'd be happy to help with that and I'm sure @clayborg wouldn't mind providing
kevinfrei wrote:
> First off, thank you for working on this. `debuginfod` has been on my radar
> since support was added to LLVM and I was curious at which point someone was
> going to add support for it to LLDB. I wasn't super familiar with what
> exactly it provides, and in case others here
https://github.com/kevinfrei 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
JDevlieghere wrote:
First off, thank you for working on this. `debuginfod` has been on my radar
since support was added to LLVM and I was curious at which point someone was
going to add support for it to LLDB. I wasn't super familiar with what exactly
it provides, and in case others here
@@ -4892,6 +4894,21 @@ void TargetProperties::SetDebugUtilityExpression(bool
debug) {
SetPropertyAtIndex(idx, debug);
}
+Args TargetProperties::GetDebugInfoDURLs() const {
+ Args urls;
+ m_collection_sp->GetPropertyAtIndexAsArgs(ePropertyDebugInfoDURLs, urls);
+ return
@@ -4892,6 +4894,21 @@ void TargetProperties::SetDebugUtilityExpression(bool
debug) {
SetPropertyAtIndex(idx, debug);
}
+Args TargetProperties::GetDebugInfoDURLs() const {
+ Args urls;
+ m_collection_sp->GetPropertyAtIndexAsArgs(ePropertyDebugInfoDURLs, urls);
+ return
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
clayborg wrote:
> I would like to see a new setting added to lldb that should be the default
> way to enable the debuginfod support. Just adding something to
> `lldb/source/Target/TargetProperties.td` like:
>
> ```
> def DebuginfodURLs: Property<"debuginfod-urls", "Args">,
>
https://github.com/clayborg commented:
I would like to see a new setting added to lldb that should be the default way
to enable the debuginfod support. Just adding something to
`lldb/source/Target/TargetProperties.td` like:
```
def DebuginfodURLs: Property<"debuginfod-urls", "Args">,
@@ -396,8 +398,22 @@ Symbols::LocateExecutableSymbolFile(const ModuleSpec
_spec,
}
}
}
-
- return LocateExecutableSymbolFileDsym(module_spec);
+ FileSpec dsym_bundle = LocateExecutableSymbolFileDsym(module_spec);
+ if (dsym_bundle)
+return dsym_bundle;
@@ -396,8 +398,22 @@ Symbols::LocateExecutableSymbolFile(const ModuleSpec
_spec,
}
}
}
-
- return LocateExecutableSymbolFileDsym(module_spec);
+ FileSpec dsym_bundle = LocateExecutableSymbolFileDsym(module_spec);
+ if (dsym_bundle)
+return dsym_bundle;
+
+
@@ -4892,6 +4894,21 @@ void TargetProperties::SetDebugUtilityExpression(bool
debug) {
SetPropertyAtIndex(idx, debug);
}
+Args TargetProperties::GetDebugInfoDURLs() const {
+ Args urls;
+ m_collection_sp->GetPropertyAtIndexAsArgs(ePropertyDebugInfoDURLs, urls);
+ return
https://github.com/bulbazord 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
https://github.com/walter-erquinigo commented:
pretty nice feature!
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
@@ -396,8 +398,22 @@ Symbols::LocateExecutableSymbolFile(const ModuleSpec
_spec,
}
}
}
-
- return LocateExecutableSymbolFileDsym(module_spec);
+ FileSpec dsym_bundle = LocateExecutableSymbolFileDsym(module_spec);
+ if (dsym_bundle)
+return dsym_bundle;
+
+
@@ -396,8 +398,22 @@ Symbols::LocateExecutableSymbolFile(const ModuleSpec
_spec,
}
}
}
-
- return LocateExecutableSymbolFileDsym(module_spec);
+ FileSpec dsym_bundle = LocateExecutableSymbolFileDsym(module_spec);
+ if (dsym_bundle)
+return dsym_bundle;
+
+
https://github.com/walter-erquinigo 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
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff 801c78d5b474c2319aa8ead44db7ba8cacac4714
6454d4fb652f61a20850c75f0e69759dffe28511 --
llvmbot wrote:
@llvm/pr-subscribers-debuginfo
Author: Kevin Frei (kevinfrei)
Changes
I've plumbed the LLVM DebugInfoD client into LLDB, and added automatic
downloading of DWP files to the SymbolFileDWARF.cpp plugin. If you have
DEBUGINFOD_URLS set to a space delimited set of web
https://github.com/kevinfrei created
https://github.com/llvm/llvm-project/pull/70996
I've plumbed the LLVM DebugInfoD client into LLDB, and added automatic
downloading of DWP files to the SymbolFileDWARF.cpp plugin. If you have
DEBUGINFOD_URLS set to a space delimited set of web servers, LLDB
77 matches
Mail list logo