[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-24 Thread via lldb-commits
https://github.com/GeorgeHuyubo closed https://github.com/llvm/llvm-project/pull/92492 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-24 Thread via lldb-commits
https://github.com/GeorgeHuyubo updated https://github.com/llvm/llvm-project/pull/92492 >From a9714b155a116e9b1d18434c0485ea2ad35680f3 Mon Sep 17 00:00:00 2001 From: George Hu Date: Tue, 14 May 2024 16:18:20 -0700 Subject: [PATCH 1/3] Read and store gnu build id from loaded core file ---

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-24 Thread via lldb-commits
https://github.com/GeorgeHuyubo updated https://github.com/llvm/llvm-project/pull/92492 >From a9714b155a116e9b1d18434c0485ea2ad35680f3 Mon Sep 17 00:00:00 2001 From: George Hu Date: Tue, 14 May 2024 16:18:20 -0700 Subject: [PATCH 1/3] Read and store gnu build id from loaded core file ---

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-24 Thread Pavel Labath via lldb-commits
labath wrote: Thanks for your patience. https://github.com/llvm/llvm-project/pull/92492 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-24 Thread Pavel Labath via lldb-commits
@@ -271,6 +275,14 @@ Status ProcessElfCore::DoLoadCore() { return error; } +void ProcessElfCore::UpdateBuildIdForNTFileEntries() { + if (!m_nt_file_entries.empty()) { labath wrote: No need to explicitly check for emptyness. The loop will naturally do

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-24 Thread Pavel Labath via lldb-commits
@@ -573,7 +585,6 @@ llvm::Expected> ProcessElfCore::parseSegment(const DataExtractor ) { lldb::offset_t offset = 0; std::vector result; - labath wrote: I know why this came to be, but it'd be nice to revert it so the final patch does not contain a

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-24 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. https://github.com/llvm/llvm-project/pull/92492 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-24 Thread Pavel Labath via lldb-commits
https://github.com/labath edited https://github.com/llvm/llvm-project/pull/92492 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-24 Thread via lldb-commits
https://github.com/GeorgeHuyubo updated https://github.com/llvm/llvm-project/pull/92492 >From a9714b155a116e9b1d18434c0485ea2ad35680f3 Mon Sep 17 00:00:00 2001 From: George Hu Date: Tue, 14 May 2024 16:18:20 -0700 Subject: [PATCH 1/2] Read and store gnu build id from loaded core file ---

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-24 Thread Pavel Labath via lldb-commits
@@ -983,6 +994,67 @@ llvm::Error ProcessElfCore::ParseThreadContextsFromNoteSegment( } } +UUID ProcessElfCore::FindBuidIdInCoreMemory(lldb::addr_t address) { + UUID invalid_uuid; + const uint32_t addr_size = GetAddressByteSize(); + const size_t elf_header_size =

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-24 Thread Pavel Labath via lldb-commits
https://github.com/labath commented: Very close. Just a couple of details. BTW, I believe the recommended workflow for working with pull requests is to put your new changes as additional commits on top and then squash them all together after merging. The GitHub UI just works better that way.

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-24 Thread Pavel Labath via lldb-commits
@@ -983,6 +994,67 @@ llvm::Error ProcessElfCore::ParseThreadContextsFromNoteSegment( } } +UUID ProcessElfCore::FindBuidIdInCoreMemory(lldb::addr_t address) { + UUID invalid_uuid; + const uint32_t addr_size = GetAddressByteSize(); + const size_t elf_header_size =

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-24 Thread Pavel Labath via lldb-commits
https://github.com/labath edited https://github.com/llvm/llvm-project/pull/92492 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-24 Thread Pavel Labath via lldb-commits
@@ -983,6 +994,67 @@ llvm::Error ProcessElfCore::ParseThreadContextsFromNoteSegment( } } +UUID ProcessElfCore::FindBuidIdInCoreMemory(lldb::addr_t address) { + UUID invalid_uuid; + const uint32_t addr_size = GetAddressByteSize(); + const size_t elf_header_size =

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-23 Thread via lldb-commits
https://github.com/GeorgeHuyubo updated https://github.com/llvm/llvm-project/pull/92492 >From a9714b155a116e9b1d18434c0485ea2ad35680f3 Mon Sep 17 00:00:00 2001 From: George Hu Date: Tue, 14 May 2024 16:18:20 -0700 Subject: [PATCH] Read and store gnu build id from loaded core file ---

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-23 Thread Pavel Labath via lldb-commits
https://github.com/labath edited https://github.com/llvm/llvm-project/pull/92492 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-23 Thread Pavel Labath via lldb-commits
@@ -271,6 +282,17 @@ Status ProcessElfCore::DoLoadCore() { return error; } +void ProcessElfCore::UpdateBuildIdForNTFileEntries() { + if (!m_nt_file_entries.empty()) { labath wrote: Makes sense. I though something like this might be the case.

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-23 Thread Pavel Labath via lldb-commits
@@ -983,6 +1001,66 @@ llvm::Error ProcessElfCore::ParseThreadContextsFromNoteSegment( } } +bool ProcessElfCore::IsElf(lldb::addr_t address) { + uint8_t buf[4]; + Status error; + size_t byte_read = ReadMemory(address, buf, 4, error); + if (byte_read != 4) +return

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-23 Thread Pavel Labath via lldb-commits
@@ -983,6 +1001,66 @@ llvm::Error ProcessElfCore::ParseThreadContextsFromNoteSegment( } } +bool ProcessElfCore::IsElf(lldb::addr_t address) { + uint8_t buf[4]; + Status error; + size_t byte_read = ReadMemory(address, buf, 4, error); + if (byte_read != 4) +return

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-23 Thread Pavel Labath via lldb-commits
@@ -271,6 +276,17 @@ Status ProcessElfCore::DoLoadCore() { return error; } +void ProcessElfCore::UpdateBuildIdForNTFileEntries() { + if (!m_nt_file_entries.empty()) { +for (NT_FILE_Entry : m_nt_file_entries) { + std::optional uuid = labath wrote:

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-22 Thread Greg Clayton via lldb-commits
@@ -570,11 +586,13 @@ static void ParseOpenBSDProcInfo(ThreadData _data, } llvm::Expected> -ProcessElfCore::parseSegment(const DataExtractor ) { +ProcessElfCore::parseSegment(const DataExtractor , + unsigned long segment_size) { lldb::offset_t

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-22 Thread Greg Clayton via lldb-commits
@@ -983,6 +1001,66 @@ llvm::Error ProcessElfCore::ParseThreadContextsFromNoteSegment( } } +bool ProcessElfCore::IsElf(lldb::addr_t address) { + uint8_t buf[4]; + Status error; + size_t byte_read = ReadMemory(address, buf, 4, error); + if (byte_read != 4) +return

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-22 Thread Greg Clayton via lldb-commits
@@ -983,6 +1001,66 @@ llvm::Error ProcessElfCore::ParseThreadContextsFromNoteSegment( } } +bool ProcessElfCore::IsElf(lldb::addr_t address) { + uint8_t buf[4]; + Status error; + size_t byte_read = ReadMemory(address, buf, 4, error); + if (byte_read != 4) +return

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-22 Thread Greg Clayton via lldb-commits
@@ -983,6 +1001,66 @@ llvm::Error ProcessElfCore::ParseThreadContextsFromNoteSegment( } } +bool ProcessElfCore::IsElf(lldb::addr_t address) { + uint8_t buf[4]; + Status error; + size_t byte_read = ReadMemory(address, buf, 4, error); + if (byte_read != 4) +return

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-22 Thread Greg Clayton via lldb-commits
@@ -983,6 +1001,66 @@ llvm::Error ProcessElfCore::ParseThreadContextsFromNoteSegment( } } +bool ProcessElfCore::IsElf(lldb::addr_t address) { + uint8_t buf[4]; + Status error; + size_t byte_read = ReadMemory(address, buf, 4, error); + if (byte_read != 4) +return

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-22 Thread Greg Clayton via lldb-commits
@@ -117,6 +117,7 @@ class ProcessElfCore : public lldb_private::PostMortemProcess { lldb::addr_t end; lldb::addr_t file_ofs; std::string path; +lldb_private::UUID uuid; //.note.gnu.build-id clayborg wrote: Add a comment letting the user know

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

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

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-22 Thread Greg Clayton via lldb-commits
@@ -570,11 +586,13 @@ static void ParseOpenBSDProcInfo(ThreadData _data, } llvm::Expected> -ProcessElfCore::parseSegment(const DataExtractor ) { +ProcessElfCore::parseSegment(const DataExtractor , + unsigned long segment_size) {

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

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

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-22 Thread Greg Clayton via lldb-commits
@@ -983,6 +1001,66 @@ llvm::Error ProcessElfCore::ParseThreadContextsFromNoteSegment( } } +bool ProcessElfCore::IsElf(lldb::addr_t address) { + uint8_t buf[4]; + Status error; + size_t byte_read = ReadMemory(address, buf, 4, error); + if (byte_read != 4) +return

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-22 Thread Greg Clayton via lldb-commits
@@ -167,7 +178,8 @@ class ProcessElfCore : public lldb_private::PostMortemProcess { AddAddressRangeFromMemoryTagSegment(const elf::ELFProgramHeader ); llvm::Expected> - parseSegment(const lldb_private::DataExtractor ); + parseSegment(const lldb_private::DataExtractor ,

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-22 Thread via lldb-commits
https://github.com/GeorgeHuyubo updated https://github.com/llvm/llvm-project/pull/92492 >From 11dda0b456880005695b6d1f195060788ad0edb7 Mon Sep 17 00:00:00 2001 From: George Hu Date: Tue, 14 May 2024 16:18:20 -0700 Subject: [PATCH] Read and store gnu build id from loaded core file ---

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-22 Thread via lldb-commits
https://github.com/GeorgeHuyubo updated https://github.com/llvm/llvm-project/pull/92492 >From 4e4ca8edc4116cba0925cca8229bd5b1cb002b21 Mon Sep 17 00:00:00 2001 From: George Hu Date: Tue, 14 May 2024 16:18:20 -0700 Subject: [PATCH] Read and store gnu build id from loaded core file ---

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-22 Thread via lldb-commits
https://github.com/GeorgeHuyubo updated https://github.com/llvm/llvm-project/pull/92492 >From fc7ae3cd19a999375504733be6c942978d80d5d7 Mon Sep 17 00:00:00 2001 From: George Hu Date: Tue, 14 May 2024 16:18:20 -0700 Subject: [PATCH] Read and store gnu build id from loaded core file ---

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-22 Thread via lldb-commits
@@ -271,6 +282,17 @@ Status ProcessElfCore::DoLoadCore() { return error; } +void ProcessElfCore::UpdateBuildIdForNTFileEntries() { + if (!m_nt_file_entries.empty()) { GeorgeHuyubo wrote: @labath There are two reasons, 1. We need to do this after we load

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-22 Thread via lldb-commits
https://github.com/GeorgeHuyubo updated https://github.com/llvm/llvm-project/pull/92492 >From 304528acdd3590bf4d8d1a03e31fd0970ed2eaa2 Mon Sep 17 00:00:00 2001 From: George Hu Date: Tue, 14 May 2024 16:18:20 -0700 Subject: [PATCH] Read and store gnu build id from loaded core file ---

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-17 Thread Greg Clayton via lldb-commits
@@ -983,6 +1005,73 @@ llvm::Error ProcessElfCore::ParseThreadContextsFromNoteSegment( } } +bool ProcessElfCore::IsElf(const lldb::addr_t address) { + uint8_t buf[4]; + Status error; + size_t byte_read = ReadMemory(address, buf, 4, error); + if (byte_read != 4) +

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-17 Thread Greg Clayton via lldb-commits
@@ -983,6 +1005,73 @@ llvm::Error ProcessElfCore::ParseThreadContextsFromNoteSegment( } } +bool ProcessElfCore::IsElf(const lldb::addr_t address) { + uint8_t buf[4]; + Status error; + size_t byte_read = ReadMemory(address, buf, 4, error); + if (byte_read != 4) +

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-17 Thread Greg Clayton via lldb-commits
@@ -1649,6 +1679,26 @@ class Process : public std::enable_shared_from_this, lldb::addr_t ReadPointerFromMemory(lldb::addr_t vm_addr, Status ); + /// Find a string within a memory region. + /// + /// This function searches for the string represented by the provided

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-17 Thread Greg Clayton via lldb-commits
@@ -33,12 +35,17 @@ #include "Plugins/Process/elf-core/RegisterUtilities.h" #include "ProcessElfCore.h" #include "ThreadElfCore.h" +#include "lldb/lldb-types.h" using namespace lldb_private; namespace ELF = llvm::ELF; LLDB_PLUGIN_DEFINE(ProcessElfCore) +#define

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-17 Thread Greg Clayton via lldb-commits
@@ -117,6 +117,13 @@ class ProcessElfCore : public lldb_private::PostMortemProcess { lldb::addr_t end; lldb::addr_t file_ofs; std::string path; +lldb_private::UUID uuid; //.note.gnu.build-id + }; + + struct Section_Note { +uint32_t namesz; +uint32_t

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-17 Thread Greg Clayton via lldb-commits
@@ -983,6 +1005,73 @@ llvm::Error ProcessElfCore::ParseThreadContextsFromNoteSegment( } } +bool ProcessElfCore::IsElf(const lldb::addr_t address) { + uint8_t buf[4]; + Status error; + size_t byte_read = ReadMemory(address, buf, 4, error); + if (byte_read != 4) +

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-17 Thread Greg Clayton via lldb-commits
@@ -1649,6 +1679,26 @@ class Process : public std::enable_shared_from_this, lldb::addr_t ReadPointerFromMemory(lldb::addr_t vm_addr, Status ); + /// Find a string within a memory region. clayborg wrote: Change to: ``` /// Find bytes within a memory

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-17 Thread Greg Clayton via lldb-commits
@@ -1649,6 +1679,26 @@ class Process : public std::enable_shared_from_this, lldb::addr_t ReadPointerFromMemory(lldb::addr_t vm_addr, Status ); + /// Find a string within a memory region. + /// + /// This function searches for the string represented by the provided

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-17 Thread Kevin Frei via lldb-commits
@@ -117,6 +117,13 @@ class ProcessElfCore : public lldb_private::PostMortemProcess { lldb::addr_t end; lldb::addr_t file_ofs; std::string path; +lldb_private::UUID uuid; //.note.gnu.build-id + }; + + struct Section_Note { +uint32_t namesz; +uint32_t

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-17 Thread Kevin Frei via lldb-commits
https://github.com/kevinfrei edited https://github.com/llvm/llvm-project/pull/92492 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-17 Thread Kevin Frei via lldb-commits
https://github.com/kevinfrei requested changes to this pull request. https://github.com/llvm/llvm-project/pull/92492 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-17 Thread Kevin Frei via lldb-commits
@@ -271,6 +282,17 @@ Status ProcessElfCore::DoLoadCore() { return error; } +void ProcessElfCore::UpdateBuildIdForNTFileEntries() { + if (!m_nt_file_entries.empty()) { kevinfrei wrote: I'd suggest adding it to that pass as well, though it will be a little

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-17 Thread Kevin Frei via lldb-commits
@@ -983,6 +1005,73 @@ llvm::Error ProcessElfCore::ParseThreadContextsFromNoteSegment( } } +bool ProcessElfCore::IsElf(const lldb::addr_t address) { + uint8_t buf[4]; + Status error; + size_t byte_read = ReadMemory(address, buf, 4, error); + if (byte_read != 4) +

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-17 Thread Pavel Labath via lldb-commits
@@ -983,6 +1005,73 @@ llvm::Error ProcessElfCore::ParseThreadContextsFromNoteSegment( } } +bool ProcessElfCore::IsElf(const lldb::addr_t address) { + uint8_t buf[4]; + Status error; + size_t byte_read = ReadMemory(address, buf, 4, error); + if (byte_read != 4) +

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-17 Thread Pavel Labath via lldb-commits
@@ -271,6 +282,17 @@ Status ProcessElfCore::DoLoadCore() { return error; } +void ProcessElfCore::UpdateBuildIdForNTFileEntries() { + if (!m_nt_file_entries.empty()) { labath wrote: Any specific reason doing this as a separate pass (and not from inside

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-17 Thread Pavel Labath via lldb-commits
@@ -983,6 +1005,73 @@ llvm::Error ProcessElfCore::ParseThreadContextsFromNoteSegment( } } +bool ProcessElfCore::IsElf(const lldb::addr_t address) { + uint8_t buf[4]; + Status error; + size_t byte_read = ReadMemory(address, buf, 4, error); + if (byte_read != 4) +

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-17 Thread Pavel Labath via lldb-commits
@@ -158,6 +165,16 @@ class ProcessElfCore : public lldb_private::PostMortemProcess { // Returns number of thread contexts stored in the core file uint32_t GetNumThreadContexts(); + // Populate gnu uuid for each NT_FILE entry + void UpdateBuildIdForNTFileEntries(); + +

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-17 Thread Pavel Labath via lldb-commits
@@ -983,6 +1005,73 @@ llvm::Error ProcessElfCore::ParseThreadContextsFromNoteSegment( } } +bool ProcessElfCore::IsElf(const lldb::addr_t address) { + uint8_t buf[4]; + Status error; + size_t byte_read = ReadMemory(address, buf, 4, error); + if (byte_read != 4) +

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-17 Thread Pavel Labath via lldb-commits
@@ -406,6 +406,36 @@ class Process : public std::enable_shared_from_this, lldb::StateType state); } Notifications; + class ProcessMemoryIterator { labath wrote: AFAICT, this isn't necessary anymore. If you think it's

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-17 Thread Pavel Labath via lldb-commits
https://github.com/labath commented: This looks much better, though, after looking at this closer, I don't think it's necessary to reimplement the elf parsing code. We already have all the necessary data structures for parsing notes in the core file itself, and it looks like it would be

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-17 Thread Pavel Labath via lldb-commits
@@ -983,6 +1005,73 @@ llvm::Error ProcessElfCore::ParseThreadContextsFromNoteSegment( } } +bool ProcessElfCore::IsElf(const lldb::addr_t address) { + uint8_t buf[4]; + Status error; + size_t byte_read = ReadMemory(address, buf, 4, error); + if (byte_read != 4) +

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-17 Thread Pavel Labath via lldb-commits
https://github.com/labath edited https://github.com/llvm/llvm-project/pull/92492 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-16 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: None (GeorgeHuyubo) Changes As we have debuginfod as symbol locator available in lldb now, we want to make full use of it. In case of post mortem debugging, we don't always have the main executable available. However, the

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-16 Thread via lldb-commits
https://github.com/GeorgeHuyubo created https://github.com/llvm/llvm-project/pull/92492 As we have debuginfod as symbol locator available in lldb now, we want to make full use of it. In case of post mortem debugging, we don't always have the main executable available. However, the