splhack wrote:
@clayborg most likely calling GetModuleSpec is the cause of these failures.
ProcessGDBRemote fetches modules from remote.
FindBuildId does not have the issue. What do you think?
> looks like these changes break `lldb-api::TestLoadUnload.py` test on the LLDB
> remote-linux builder
vvereschaka wrote:
Hi @splhack ,
looks like these changes break `lldb-api::TestLoadUnload.py` test on the LLDB
remote-linux builders:
* https://lab.llvm.org/buildbot/#/builders/195/builds/1435
* https://lab.llvm.org/staging/#/builders/197/builds/663
https://github.com/llvm/llvm-project/pull/11
splhack wrote:
@vvereschaka let me check
https://github.com/llvm/llvm-project/pull/117070
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/splhack closed
https://github.com/llvm/llvm-project/pull/117070
___
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/117070
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -286,6 +286,22 @@ void ProcessElfCore::UpdateBuildIdForNTFileEntries() {
}
}
+bool ProcessElfCore::GetModuleSpec(const FileSpec &module_file_spec,
+ const ArchSpec &arch,
+ ModuleSpec &module_spec) {
+ m
https://github.com/splhack updated
https://github.com/llvm/llvm-project/pull/117070
>From 8d9f061d7b5dfe5966f117f5b2740c8acbd87797 Mon Sep 17 00:00:00 2001
From: Kazuki Sakamoto
Date: Wed, 20 Nov 2024 13:49:26 -0800
Subject: [PATCH] [lldb] Fix ELF core debugging
DynamicLoader does not use Proc
@@ -286,6 +286,22 @@ void ProcessElfCore::UpdateBuildIdForNTFileEntries() {
}
}
+bool ProcessElfCore::GetModuleSpec(const FileSpec &module_file_spec,
+ const ArchSpec &arch,
+ ModuleSpec &module_spec) {
+ m
https://github.com/clayborg requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/117070
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/splhack updated
https://github.com/llvm/llvm-project/pull/117070
>From b93478345fbaa747b44d678207b768948db0a7d6 Mon Sep 17 00:00:00 2001
From: Kazuki Sakamoto
Date: Wed, 20 Nov 2024 13:49:26 -0800
Subject: [PATCH] [lldb] Fix ELF core debugging
DynamicLoader does not use Proc
https://github.com/DavidSpickett edited
https://github.com/llvm/llvm-project/pull/117070
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -224,7 +224,7 @@ Status ProcessElfCore::DoLoadCore() {
ArchSpec core_arch(m_core_module_sp->GetArchitecture());
target_arch.MergeFrom(core_arch);
GetTarget().SetArchitecture(target_arch);
-
+
DavidSpickett wrote:
Keep formatting changes separate, pus
@@ -224,7 +224,7 @@ Status ProcessElfCore::DoLoadCore() {
ArchSpec core_arch(m_core_module_sp->GetArchitecture());
target_arch.MergeFrom(core_arch);
GetTarget().SetArchitecture(target_arch);
-
+
splhack wrote:
This pull request will be rebased onto #117
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 53a6a11e0d51229d341b8906252645cd8a5de796
b285bba80b7b7ad4e351485d59df41f328462867 --e
https://github.com/splhack edited
https://github.com/llvm/llvm-project/pull/117070
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/splhack updated
https://github.com/llvm/llvm-project/pull/117070
>From 6b8f4a824d39ce557230e610a846d316358b4f20 Mon Sep 17 00:00:00 2001
From: Kazuki Sakamoto
Date: Wed, 20 Nov 2024 16:20:40 -0800
Subject: [PATCH 1/2] Run clang format.
---
lldb/source/Core/DynamicLoader.cpp
@@ -97,6 +97,9 @@ class ProcessElfCore : public lldb_private::PostMortemProcess
{
bool GetProcessInfo(lldb_private::ProcessInstanceInfo &info) override;
+ // Returns the gnu uuid from matched NT_FILE entry
+ lldb_private::UUID FindBuildId(const llvm::StringRef path) over
@@ -157,6 +157,10 @@ DynamicLoader::GetSectionListFromModule(const ModuleSP
module) const {
ModuleSP DynamicLoader::FindModuleViaTarget(const FileSpec &file) {
Target &target = m_process->GetTarget();
ModuleSpec module_spec(file, target.GetArchitecture());
+ if (UUID uuid
@@ -281,6 +281,13 @@ void ProcessElfCore::UpdateBuildIdForNTFileEntries() {
}
}
+UUID ProcessElfCore::FindBuildId(const llvm::StringRef path) {
clayborg wrote:
Change to overrite `GetModuleSpec` instead.
https://github.com/llvm/llvm-project/pull/117070
___
https://github.com/clayborg requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/117070
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -1380,6 +1380,8 @@ class Process : public
std::enable_shared_from_this,
virtual bool GetProcessInfo(ProcessInstanceInfo &info);
+ virtual lldb_private::UUID FindBuildId(const llvm::StringRef path);
+
clayborg wrote:
There is already a function in Proc
@@ -6080,6 +6080,11 @@ bool Process::GetProcessInfo(ProcessInstanceInfo &info) {
return platform_sp->GetProcessInfo(GetID(), info);
}
+lldb_private::UUID Process::FindBuildId(const llvm::StringRef path) {
+ lldb_private::UUID invalid_uuid;
+ return invalid_uuid;
+}
+
-
@@ -1034,7 +1041,8 @@ UUID ProcessElfCore::FindBuidIdInCoreMemory(lldb::addr_t
address) {
std::vector note_bytes;
note_bytes.resize(program_header.p_memsz);
-byte_read = ReadMemory(program_header.p_vaddr, note_bytes.data(),
+const lldb::addr_t program_header_v
clayborg wrote:
The reading of build IDs is tracked in this PR:
https://github.com/llvm/llvm-project/pull/117028
https://github.com/llvm/llvm-project/pull/117070
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/
splhack wrote:
> The reading of build IDs is tracked in this PR: #117028
will rebase onto #117028
https://github.com/llvm/llvm-project/pull/117070
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinf
@@ -157,6 +157,10 @@ DynamicLoader::GetSectionListFromModule(const ModuleSP
module) const {
ModuleSP DynamicLoader::FindModuleViaTarget(const FileSpec &file) {
Target &target = m_process->GetTarget();
ModuleSpec module_spec(file, target.GetArchitecture());
+ if (UUID uuid
@@ -157,6 +157,10 @@ DynamicLoader::GetSectionListFromModule(const ModuleSP
module) const {
ModuleSP DynamicLoader::FindModuleViaTarget(const FileSpec &file) {
Target &target = m_process->GetTarget();
ModuleSpec module_spec(file, target.GetArchitecture());
+ if (UUID uuid
cs01 wrote:
Thank you! Are there any unit tests that can exercise this?
Or at least repro steps to generate a core with the elf headers in case any one
wants to manually test.
https://github.com/llvm/llvm-project/pull/117070
___
lldb-commits mailing
llvmbot wrote:
@llvm/pr-subscribers-lldb
Author: Kazuki Sakamoto (splhack)
Changes
Addressing two issues on ELF core debugging
1. ProcessElfCore::FindBuidIdInCoreMemory reads wrong address for ELF header
(fixed by @clayborg)
2. DynamicLoader does not use ProcessElfCore NT_FILE entries to
https://github.com/splhack created
https://github.com/llvm/llvm-project/pull/117070
Addressing two issues on ELF core debugging
1. ProcessElfCore::FindBuidIdInCoreMemory reads wrong address for ELF header
(fixed by @clayborg)
2. DynamicLoader does not use ProcessElfCore NT_FILE entries to get
30 matches
Mail list logo