[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

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

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-20 Thread Greg Clayton via lldb-commits
@@ -766,6 +771,14 @@ class CommandInterpreter : public Broadcaster, CommandUsageMap m_command_usages; StreamString m_transcript_stream; clayborg wrote: We should mention in a comment that this will only be filled in if the setting is true. https://githu

[Lldb-commits] [lldb] Improve performance of .debug_names lookups when DW_IDX_parent attributes are used (PR #91808)

2024-05-20 Thread Greg Clayton via lldb-commits
clayborg wrote: > What's an actual test case for this issue? The example given above doesn't > look like it'd produce entries for the declaration of ios_base? Like here's > something that looks equivalent, but is complete, and doesn't have a > DW_IDX_parent on the nested typedef entry in the i

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

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

[Lldb-commits] [lldb] SBDebugger: Add new APIs `AddDestroyCallback` and `RemoveDestroyCallback` (PR #89868)

2024-05-20 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. Thanks for all of the changes. Looks good. https://github.com/llvm/llvm-project/pull/89868 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[Lldb-commits] [lldb] Add AddressRange to SB API (PR #92014)

2024-05-20 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. See inlined comments as the `SBAddressRange::GetDescription()` could have crashed if we had an address with a no section and we did supply a valid target. So changes needed: - add a test for a SBAddressRange object that is cons

[Lldb-commits] [lldb] Add AddressRange to SB API (PR #92014)

2024-05-20 Thread Greg Clayton via lldb-commits
@@ -203,3 +208,38 @@ void AddressRange::DumpDebug(Stream *s) const { static_cast(m_base_addr.GetSection().get()), m_base_addr.GetOffset(), GetByteSize()); } + +bool AddressRange::GetDescription(Stream *s, Target *target) const { + const char *file_name

[Lldb-commits] [lldb] Add AddressRange to SB API (PR #92014)

2024-05-20 Thread Greg Clayton via lldb-commits
@@ -203,3 +208,38 @@ void AddressRange::DumpDebug(Stream *s) const { static_cast(m_base_addr.GetSection().get()), m_base_addr.GetOffset(), GetByteSize()); } + +bool AddressRange::GetDescription(Stream *s, Target *target) const { + const char *file_name

[Lldb-commits] [lldb] Add AddressRange to SB API (PR #92014)

2024-05-20 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,216 @@ +""" +Test SBAddressRange APIs. +""" + +import lldb +from lldbsuite.test.lldbtest import * + + +class AddressRangeTestCase(TestBase): +NO_DEBUG_INFO_TESTCASE = True + +def setUp(self): +TestBase.setUp(self) + +self.build() +exe = s

[Lldb-commits] [lldb] Add AddressRange to SB API (PR #92014)

2024-05-20 Thread Greg Clayton via lldb-commits
@@ -203,3 +208,38 @@ void AddressRange::DumpDebug(Stream *s) const { static_cast(m_base_addr.GetSection().get()), m_base_addr.GetOffset(), GetByteSize()); } + +bool AddressRange::GetDescription(Stream *s, Target *target) const { + const char *file_name

[Lldb-commits] [lldb] Add AddressRange to SB API (PR #92014)

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

[Lldb-commits] [lldb] Add AddressRange to SB API (PR #92014)

2024-05-20 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,65 @@ +//===-- SBAddressRange.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: Apa

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

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

[Lldb-commits] [lldb] SBDebugger: Add new APIs `AddDestroyCallback` and `RemoveDestroyCallback` (PR #89868)

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

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-20 Thread Greg Clayton via lldb-commits
@@ -147,96 +148,111 @@ class ProcessInstanceInfo : public ProcessInfo { ProcessInstanceInfo() = default; ProcessInstanceInfo(const char *name, const ArchSpec &arch, lldb::pid_t pid) - : ProcessInfo(name, arch, pid), m_euid(UINT32_MAX), m_egid(UINT32_MAX), -m_p

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

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

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-20 Thread Greg Clayton via lldb-commits
@@ -250,10 +268,12 @@ class ProcessInstanceInfo : public ProcessInfo { lldb::pid_t m_parent_pid = LLDB_INVALID_PROCESS_ID; lldb::pid_t m_process_group_id = LLDB_INVALID_PROCESS_ID; lldb::pid_t m_process_session_id = LLDB_INVALID_PROCESS_ID; - struct timespec m_user_time

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-20 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. We should either truly use `std::optional` and return `std::optional` for all getters, or just not use them. This patch adds a `bool IsZombieValid()` which the user must know to call prior to calling `bool IsZombie()`, which is

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-20 Thread Greg Clayton via lldb-commits
@@ -195,48 +195,66 @@ class ProcessInstanceInfo : public ProcessInfo { return m_process_session_id != LLDB_INVALID_PROCESS_ID; } - struct timespec GetUserTime() const { return m_user_time; } + struct timespec GetUserTime() const { return m_user_time.value(); } voi

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-20 Thread Greg Clayton via lldb-commits
@@ -195,48 +195,66 @@ class ProcessInstanceInfo : public ProcessInfo { return m_process_session_id != LLDB_INVALID_PROCESS_ID; } - struct timespec GetUserTime() const { return m_user_time; } + struct timespec GetUserTime() const { return m_user_time.value(); } voi

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-20 Thread Greg Clayton via lldb-commits
@@ -195,48 +195,66 @@ class ProcessInstanceInfo : public ProcessInfo { return m_process_session_id != LLDB_INVALID_PROCESS_ID; } - struct timespec GetUserTime() const { return m_user_time; } + struct timespec GetUserTime() const { return m_user_time.value(); } voi

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-20 Thread Greg Clayton via lldb-commits
@@ -195,48 +195,66 @@ class ProcessInstanceInfo : public ProcessInfo { return m_process_session_id != LLDB_INVALID_PROCESS_ID; } - struct timespec GetUserTime() const { return m_user_time; } + struct timespec GetUserTime() const { return m_user_time.value(); } voi

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-20 Thread Greg Clayton via lldb-commits
@@ -250,10 +268,12 @@ class ProcessInstanceInfo : public ProcessInfo { lldb::pid_t m_parent_pid = LLDB_INVALID_PROCESS_ID; lldb::pid_t m_process_group_id = LLDB_INVALID_PROCESS_ID; lldb::pid_t m_process_session_id = LLDB_INVALID_PROCESS_ID; - struct timespec m_user_time

[Lldb-commits] [lldb] [lldb] Added Debuginfod tests and fixed a couple issues (PR #92572)

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

[Lldb-commits] [lldb] [lldb] Added Debuginfod tests and fixed a couple issues (PR #92572)

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

[Lldb-commits] [lldb] [lldb/DWARF] Make sure bad abbreviation codes do not crash lldb (PR #93006)

2024-05-22 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: We have to back out the PeekDieName() patch locally at Meta because it was crashing us due to this assertion due to .debug_names tables having incorrect values for type units. Only one type unit will appear in the final file and type units can have differ

[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 fal

[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 &header); llvm::Expected> - parseSegment(const lldb_private::DataExtractor &segment); + parseSegment(const lldb_private::D

[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
@@ -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 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
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
@@ -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 fal

[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 fal

[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 &thread_data, } llvm::Expected> -ProcessElfCore::parseSegment(const DataExtractor &segment) { +ProcessElfCore::parseSegment(const DataExtractor &segment, + 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
@@ -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 fal

[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 fal

[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 &thread_data, } llvm::Expected> -ProcessElfCore::parseSegment(const DataExtractor &segment) { +ProcessElfCore::parseSegment(const DataExtractor &segment, + unsigned long segment_size)

[Lldb-commits] [lldb] Add AddressRange to SB API (PR #92014)

2024-05-23 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,65 @@ +//===-- SBAddressRange.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: Apa

[Lldb-commits] [lldb] Add AddressRange to SB API (PR #92014)

2024-05-23 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,28 @@ +%extend lldb::SBAddressRangeList { +#ifdef SWIGPYTHON +%pythoncode%{ +def __len__(self): + '''Return the number of address ranges in a lldb.SBAddressRangeList object.''' + return self.GetSize() + +def __iter__(self): + '''Iterate over

[Lldb-commits] [lldb] Add AddressRange to SB API (PR #92014)

2024-05-23 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,65 @@ +//===-- SBAddressRange.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: Apa

[Lldb-commits] [lldb] Add AddressRange to SB API (PR #92014)

2024-05-25 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. On nit in the getitem python, but looks good! Thanks for all of the changes. https://github.com/llvm/llvm-project/pull/92014 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists

[Lldb-commits] [lldb] Add AddressRange to SB API (PR #92014)

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

[Lldb-commits] [lldb] Add AddressRange to SB API (PR #92014)

2024-05-25 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,27 @@ +%extend lldb::SBAddressRangeList { +#ifdef SWIGPYTHON +%pythoncode%{ +def __len__(self): + '''Return the number of address ranges in a lldb.SBAddressRangeList object.''' + return self.GetSize() + +def __iter__(self): + '''Iterate over

[Lldb-commits] [lldb] Add AddressRange to SB API (PR #92014)

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

[Lldb-commits] [lldb] Add AddressRange to SB API (PR #92014)

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

[Lldb-commits] [lldb] Summarize std::string's when created from data. (PR #89110)

2024-05-28 Thread Greg Clayton via lldb-commits
@@ -254,13 +254,17 @@ bool lldb_private::formatters::LibStdcppStringSummaryProvider( } else addr_of_string = valobj.GetAddressOf(scalar_is_load_addr, &addr_type); - if (addr_of_string != LLDB_INVALID_ADDRESS) { + + // We have to check for host address here + /

[Lldb-commits] [lldb] A few updates around "transcript" (PR #92843)

2024-05-28 Thread Greg Clayton via lldb-commits
@@ -362,6 +363,36 @@ llvm::json::Value DebuggerStats::ReportStatistics( global_stats.try_emplace("modules", std::move(json_modules)); global_stats.try_emplace("memory", std::move(json_memory)); global_stats.try_emplace("commands", std::move(cmd_stats)); + +// Wh

[Lldb-commits] [lldb] A few updates around "transcript" (PR #92843)

2024-05-28 Thread Greg Clayton via lldb-commits
@@ -320,10 +320,13 @@ class SBCommandInterpreter { /// Returns a list of handled commands, output and error. Each element in /// the list is a dictionary with the following keys/values: - /// - "command" (string): The command that was executed. + /// - "command" (string)

[Lldb-commits] [lldb] [lldb-dap] Add timestamps to protocol logs (PR #93540)

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

[Lldb-commits] [lldb] Summarize std::string's when created from data. (PR #89110)

2024-05-28 Thread Greg Clayton via lldb-commits
@@ -254,13 +254,17 @@ bool lldb_private::formatters::LibStdcppStringSummaryProvider( } else addr_of_string = valobj.GetAddressOf(scalar_is_load_addr, &addr_type); - if (addr_of_string != LLDB_INVALID_ADDRESS) { + + // We have to check for host address here + /

[Lldb-commits] [lldb] [lldb/DWARF] Bypass the compres^Wconstruction of DIERefs in debug_names (PR #93296)

2024-05-28 Thread Greg Clayton via lldb-commits
clayborg wrote: LGTM as well. Avoiding bouncing between two different DIE representations is a good thing. https://github.com/llvm/llvm-project/pull/93296 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[Lldb-commits] [lldb] [lldb-dap] Added "port" property to vscode "attach" command. (PR #91570)

2024-05-28 Thread Greg Clayton via lldb-commits
@@ -348,6 +348,17 @@ "type": "string", "description": "The time in seconds to wait for a program to stop when attaching using \"attachCommands\". Defaults to 30 seconds." }, + "port": { +"type": [ +

[Lldb-commits] [lldb] [lldb-dap] Added "port" property to vscode "attach" command. (PR #91570)

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

[Lldb-commits] [lldb] [lldb-dap] Added "port" property to vscode "attach" command. (PR #91570)

2024-05-28 Thread Greg Clayton via lldb-commits
@@ -749,9 +752,30 @@ void request_attach(const llvm::json::Object &request) { // Disable async events so the attach will be successful when we return from // the launch call and the launch will happen synchronously g_dap.debugger.SetAsync(false); -if (core_file

[Lldb-commits] [lldb] [lldb-dap] Added "port" property to vscode "attach" command. (PR #91570)

2024-05-28 Thread Greg Clayton via lldb-commits
@@ -348,6 +348,17 @@ "type": "string", "description": "The time in seconds to wait for a program to stop when attaching using \"attachCommands\". Defaults to 30 seconds." }, + "port": { +"type": [ +

[Lldb-commits] [lldb] [lldb-dap] Added "port" property to vscode "attach" command. (PR #91570)

2024-05-28 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: Just a few questions if we want to prefix these settings with `"gdb-remote"` as suggested. Please chime in if you have any opinions on the matter. https://github.com/llvm/llvm-project/pull/91570 ___ lldb-commits

[Lldb-commits] [lldb] [nfc][lldb] Move FastSearch from CommandObjectMemoryFind to Process (PR #93688)

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

[Lldb-commits] [lldb] [nfc][lldb] Move FastSearch from CommandObjectMemoryFind to Process (PR #93688)

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

[Lldb-commits] [lldb] Improve performance of .debug_names lookups when DW_IDX_parent attributes are used (PR #91808)

2024-05-29 Thread Greg Clayton via lldb-commits
https://github.com/clayborg updated https://github.com/llvm/llvm-project/pull/91808 >From 0cc1be6988e6ab5498151f32485f525a66133be2 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Fri, 10 May 2024 13:49:22 -0700 Subject: [PATCH 1/2] Improve performance of .debug_names lookups when DW_IDX_pare

[Lldb-commits] [lldb] Improve performance of .debug_names lookups when DW_IDX_parent attributes are used (PR #91808)

2024-05-29 Thread Greg Clayton via lldb-commits
clayborg wrote: So I am trying to lookup `std::ios_base` in my example for a real definitions, but I end up with thousands of forward declarations due to the DWARF snippet in my original summary string. So when I lookup `std::ios_base`, I found thousands of `DW_AT_declaration` entries for `s

[Lldb-commits] [lldb] [lldb] Add AddressRange to SB API (PR #93836)

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

[Lldb-commits] [lldb] [lldb] Add AddressRange to SB API (PR #93836)

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

[Lldb-commits] [lldb] [lldb][test] Fix failing test TestAddressRange.py (PR #93871)

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

[Lldb-commits] [lldb] [lldb][test] Fix failing test TestAddressRange.py (PR #93871)

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

[Lldb-commits] [lldb] [lldb][test] Fix failing test TestAddressRange.py (PR #93871)

2024-05-30 Thread Greg Clayton via lldb-commits
@@ -191,7 +191,7 @@ def test_address_range_print_resolved(self): interp.HandleCommand(script, result, False) self.assertTrue(result.Succeeded(), "script command succeeded") # [0x1000-0x2000] // Resolved with target or addresses without sections -

[Lldb-commits] [lldb] [lldb][test] Fix failing test TestAddressRange.py (PR #93871)

2024-05-30 Thread Greg Clayton via lldb-commits
@@ -191,7 +191,7 @@ def test_address_range_print_resolved(self): interp.HandleCommand(script, result, False) self.assertTrue(result.Succeeded(), "script command succeeded") # [0x1000-0x2000] // Resolved with target or addresses without sections -

[Lldb-commits] [lldb] A few updates around "transcript" (PR #92843)

2024-05-30 Thread Greg Clayton via lldb-commits
@@ -1425,4 +1425,6 @@ let Command = "statistics dump" in { Desc<"Dump the total possible debug info statistics. " "Force loading all the debug information if not yet loaded, and collect " "statistics with those.">; + def statistics_dump_transcript: Option<"transcri

[Lldb-commits] [lldb] [lldb][test] Fix failing test TestAddressRange.py (PR #93871)

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

[Lldb-commits] [lldb] [lldb][test] Fix failing test TestAddressRange.py (PR #93871)

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

[Lldb-commits] [lldb] A few updates around "transcript" (PR #92843)

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

[Lldb-commits] [lldb] A few updates around "transcript" (PR #92843)

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

[Lldb-commits] [lldb] Fix a test failure in PR #92843 (PR #94067)

2024-05-31 Thread Greg Clayton via lldb-commits
@@ -177,7 +177,8 @@ def test_get_transcript(self): # (lldb) r self.assertEqual(transcript[3]["command"], "r") self.assertEqual(transcript[3]["commandName"], "process launch") -self.assertEqual(transcript[3]["commandArguments"], "-X true --") +

[Lldb-commits] [lldb] [lldb][test] Fix formatter tests for clang version 15 (PR #93710)

2024-06-03 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: My main question is how did you determine the clang-14 being the right version to check against here? Which clang-14 or clang-15 did you use? The public release branches from upstream? https://github.com/llvm/llvm-project/pull/93710 __

[Lldb-commits] [lldb] Re-merge `A few updates around "transcript"` (#92843) (PR #94067)

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

[Lldb-commits] [lldb] Re-merge `A few updates around "transcript"` (#92843) (PR #94067)

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

[Lldb-commits] [lldb] Improve performance of .debug_names lookups when DW_IDX_parent attributes are used (PR #91808)

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

[Lldb-commits] [lldb] Improve performance of .debug_names lookups when DW_IDX_parent attributes are used (PR #91808)

2024-06-03 Thread Greg Clayton via lldb-commits
clayborg wrote: This fix was committed as part of: commit 51dd4eaaa29683c16151f5168e7f8645acbd6e6c Author: Zequan Wu Date: Tue May 28 11:49:07 2024 -0400 Reapply [lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. (#92328) This reappl

[Lldb-commits] [lldb] [lldb] Support reading DW_OP_piece from file address (PR #94026)

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

[Lldb-commits] [lldb] [lldb] Support reading DW_OP_piece from file address (PR #94026)

2024-06-03 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. LGTM, just one optional comment, see inlined comment. https://github.com/llvm/llvm-project/pull/94026 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[Lldb-commits] [lldb] [lldb] Support reading DW_OP_piece from file address (PR #94026)

2024-06-03 Thread Greg Clayton via lldb-commits
@@ -1077,9 +1077,9 @@ class Target : public std::enable_shared_from_this, // section, then read from the file cache // 2 - if there is a process, then read from memory // 3 - if there is no process, then read from the file cache - size_t ReadMemory(const Address &addr,

[Lldb-commits] [lldb] [lldb] Support reading DW_OP_piece from file address (PR #94026)

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

[Lldb-commits] [lldb] [lldb] Include memory stats in statistics summary (PR #94671)

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

[Lldb-commits] [lldb] [llvm] [lldb] Encode operands and arity in Dwarf.def and use them in LLDB. (PR #94679)

2024-06-07 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: Looks good to me as long as the data is correct. Cleans up the code nicely. It would be possible to encode the argument values using DW_FORM enumerations with variadic macros. If we move the `OPERANDS, ARITY` to the end and have ARITY come first: ``` #de

[Lldb-commits] [lldb] [llvm] [lldb] Encode operands and arity in Dwarf.def and use them in LLDB. (PR #94679)

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

[Lldb-commits] [lldb] [llvm] [lldb] Encode operands and arity in Dwarf.def and use them in LLDB. (PR #94679)

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

[Lldb-commits] [lldb] [lldb-dap] Added "port" property to vscode "attach" command. (PR #91570)

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

[Lldb-commits] [lldb] [lldb-dap] Added "port" property to vscode "attach" command. (PR #91570)

2024-06-07 Thread Greg Clayton via lldb-commits
@@ -672,9 +672,14 @@ void request_attach(const llvm::json::Object &request) { lldb::SBError error; FillResponse(request, response); lldb::SBAttachInfo attach_info; + const int invalid_port = 0; auto arguments = request.getObject("arguments"); const lldb::pid_t pid

[Lldb-commits] [lldb] [lldb-dap] Added "port" property to vscode "attach" command. (PR #91570)

2024-06-07 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: The code looks good, a few nits in comments. @labath: did we resolve the port race condition testing issue? We really don't want this to be a flaky test on overloaded systems. It would be nice to make sure this is solid before getting this in. https://

[Lldb-commits] [lldb] [lldb-dap] Added "port" property to vscode "attach" command. (PR #91570)

2024-06-07 Thread Greg Clayton via lldb-commits
@@ -749,9 +755,27 @@ void request_attach(const llvm::json::Object &request) { // Disable async events so the attach will be successful when we return from // the launch call and the launch will happen synchronously g_dap.debugger.SetAsync(false); -if (core_file

[Lldb-commits] [lldb] [llvm] Add support for using foreign type units in .debug_names. (PR #87740)

2024-06-07 Thread Greg Clayton via lldb-commits
https://github.com/clayborg updated https://github.com/llvm/llvm-project/pull/87740 >From c364215cef4d383bf5cb51bf61d442a5bc9fbfe9 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Sat, 30 Mar 2024 10:50:34 -0700 Subject: [PATCH 1/5] Add support for using foreign type units in .debug_names. Th

[Lldb-commits] [lldb] [llvm] Add support for using foreign type units in .debug_names. (PR #87740)

2024-06-07 Thread Greg Clayton via lldb-commits
https://github.com/clayborg updated https://github.com/llvm/llvm-project/pull/87740 >From c364215cef4d383bf5cb51bf61d442a5bc9fbfe9 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Sat, 30 Mar 2024 10:50:34 -0700 Subject: [PATCH 1/7] Add support for using foreign type units in .debug_names. Th

[Lldb-commits] [lldb] [llvm] Add support for using foreign type units in .debug_names. (PR #87740)

2024-06-07 Thread Greg Clayton via lldb-commits
clayborg wrote: All feedback has been addressed and this now supports loading accelerator table entries from .dwo files for foreign type units as well. https://github.com/llvm/llvm-project/pull/87740 ___ lldb-commits mailing list lldb-commits@lists.l

[Lldb-commits] [lldb] [lldb] Use const reference for range variables to improve performance (NFC) (PR #94840)

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

[Lldb-commits] [lldb] [lldb] Remove redundant c_str() calls in stream output (NFC) (PR #94839)

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

[Lldb-commits] [lldb] [llvm] Add support for using foreign type units in .debug_names. (PR #87740)

2024-06-07 Thread Greg Clayton via lldb-commits
@@ -657,6 +657,42 @@ std::optional DWARFDebugNames::Entry::getLocalTUOffset() const { return NameIdx->getLocalTUOffset(*Index); } +std::optional +DWARFDebugNames::Entry::getForeignTUTypeSignature() const { + std::optional Index = getLocalTUIndex(); + const uint32_t NumLoc

[Lldb-commits] [lldb] [llvm] Add support for using foreign type units in .debug_names. (PR #87740)

2024-06-07 Thread Greg Clayton via lldb-commits
@@ -657,6 +657,42 @@ std::optional DWARFDebugNames::Entry::getLocalTUOffset() const { return NameIdx->getLocalTUOffset(*Index); } +std::optional +DWARFDebugNames::Entry::getForeignTUTypeSignature() const { + std::optional Index = getLocalTUIndex(); + const uint32_t NumLoc

[Lldb-commits] [lldb] [llvm] Add support for using foreign type units in .debug_names. (PR #87740)

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

[Lldb-commits] [lldb] Fix type lookup bug where wrong decl context was being used for a DIE. (PR #94846)

2024-06-08 Thread Greg Clayton via lldb-commits
https://github.com/clayborg created https://github.com/llvm/llvm-project/pull/94846 The function that calculated the declaration context for a DIE was incorrectly transparently traversing acrosss DW_TAG_subprogram dies when climbing the parent DIE chain. This meant that types defined in functi

[Lldb-commits] [lldb] [lldb][API] Add Find(Ranges)InMemory() to Process SB API (PR #95007)

2024-06-10 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,31 @@ +import lldb + +SINGLE_INSTANCE_PATTERN = "there_is_only_one_of_me" +DOUBLE_INSTANCE_PATTERN = "there_is_exactly_two_of_me" + + +def GetAddressRanges(test_base): +mem_regions = test_base.process.GetMemoryRegions() +test_base.assertTrue(len(mem_regions) > 0

[Lldb-commits] [lldb] [lldb][API] Add Find(Ranges)InMemory() to Process SB API (PR #95007)

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

<    10   11   12   13   14   15   16   17   18   19   >