[Lldb-commits] [lldb] [lldb] Refactor string manipulation in Debugger.cpp (#91209) (PR #92565)

2024-05-17 Thread via lldb-commits
https://github.com/aabhinavg updated https://github.com/llvm/llvm-project/pull/92565 >From 13fefb6846b6641900843c37746b03140063a955 Mon Sep 17 00:00:00 2001 From: aabhinavg Date: Fri, 17 May 2024 21:17:51 +0530 Subject: [PATCH 1/2] removed unwanted file --- lldb/source/Core/Debugger.cpp | 2

[Lldb-commits] [lldb] 1e9324a - [lldb] Namespace SBSourceLanguageName (NFC)

2024-05-17 Thread Jonas Devlieghere via lldb-commits
Author: Jonas Devlieghere Date: 2024-05-17T18:43:09-07:00 New Revision: 1e9324a8c734aaa933d2672522cc22d5022c6200 URL: https://github.com/llvm/llvm-project/commit/1e9324a8c734aaa933d2672522cc22d5022c6200 DIFF:

[Lldb-commits] [lldb] [lldb] Add the word "backtrace" to bt help string (PR #92618)

2024-05-17 Thread via lldb-commits
jimingham wrote: I'm fine with adding the to be searched for term to the alias help. https://github.com/llvm/llvm-project/pull/92618 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add the word "backtrace" to bt help string (PR #92618)

2024-05-17 Thread via lldb-commits
jimingham wrote: In simple aliases, apropos could get this right itself by resolving the command the alias points to and if THAT help string had the searched term, list the alias. But bt is an alias to a regex command. Again, you could look through all the branches of the regex command

[Lldb-commits] [lldb] [WIP] [lldb][Progress] Report progress when completing types from DWARF (PR #91452)

2024-05-17 Thread Jonas Devlieghere via lldb-commits
JDevlieghere wrote: > @JDevlieghere I know we discussed this in the past and it made sense to me, > but I'm right now failing to connect the dots. Why couldn't the same > single-line interface be used to print nested events something like this? > > ``` > Evaluating expression > Type Checking

[Lldb-commits] [lldb] [lldb] Add the word "backtrace" to bt help string (PR #92618)

2024-05-17 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl approved this pull request. https://github.com/llvm/llvm-project/pull/92618 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Refactor string manipulation in Debugger.cpp (#91209) (PR #92565)

2024-05-17 Thread Adrian Prantl via lldb-commits
@@ -2067,7 +2067,7 @@ void Debugger::HandleProgressEvent(const lldb::EventSP _sp) { const uint32_t term_width = GetTerminalWidth(); const uint32_t ellipsis = 3; if (message.size() + ellipsis >= term_width) -message = message.substr(0, term_width - ellipsis); +

[Lldb-commits] [lldb] [WIP] [lldb][Progress] Report progress when completing types from DWARF (PR #91452)

2024-05-17 Thread Adrian Prantl via lldb-commits
adrian-prantl wrote: > No, on the terminal it works that way by design. Unless you switch to > something that takes full control of your screen (like curses) there's no > good way to display multiple progress events at the same time and not doing > the shadowing (i.e. letting more recent

[Lldb-commits] [lldb] [lldb] Add the word "backtrace" to bt help string (PR #92618)

2024-05-17 Thread Dave Lee via lldb-commits
kastiglione wrote: Open to alternative rewordings that include "backtrace". https://github.com/llvm/llvm-project/pull/92618 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add the word "backtrace" to bt help string (PR #92618)

2024-05-17 Thread Dave Lee via lldb-commits
https://github.com/kastiglione edited https://github.com/llvm/llvm-project/pull/92618 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add the word "backtrace" to bt help string (PR #92618)

2024-05-17 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Dave Lee (kastiglione) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/92618.diff 2 Files Affected: - (modified) lldb/source/Commands/CommandObjectThread.cpp (+2-2) - (modified)

[Lldb-commits] [lldb] [lldb] Add the word "backtrace" to bt help string (PR #92618)

2024-05-17 Thread Dave Lee via lldb-commits
https://github.com/kastiglione created https://github.com/llvm/llvm-project/pull/92618 None >From 1564ae4ce3a56fc1f11e03e82e0da1e01f25f3ed Mon Sep 17 00:00:00 2001 From: Dave Lee Date: Thu, 16 May 2024 14:01:22 -0700 Subject: [PATCH] [lldb] Add the word "backtrace" to bt help string ---

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

2024-05-17 Thread Miro Bucko via lldb-commits
@@ -0,0 +1,215 @@ +""" +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 =

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

2024-05-17 Thread Miro Bucko via lldb-commits
@@ -0,0 +1,102 @@ +//===-- SBAddressRange.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] Add AddressRange to SB API (PR #92014)

2024-05-17 Thread Miro Bucko via lldb-commits
https://github.com/mbucko updated https://github.com/llvm/llvm-project/pull/92014 >From 0d8a110b922fde8e0439391f87a117c1d82913c4 Mon Sep 17 00:00:00 2001 From: Miro Bucko Date: Fri, 10 May 2024 12:42:03 -0700 Subject: [PATCH] Add AddressRange to SB API Summary: This adds new SB API calls and

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

2024-05-17 Thread via lldb-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r c675a58edec6d1a876a0d0e7d261f74764855b38...939d42eba9f88d90ac72782415640bbab360645c

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

2024-05-17 Thread Miro Bucko via lldb-commits
https://github.com/mbucko updated https://github.com/llvm/llvm-project/pull/92014 >From 939d42eba9f88d90ac72782415640bbab360645c Mon Sep 17 00:00:00 2001 From: Miro Bucko Date: Fri, 10 May 2024 12:42:03 -0700 Subject: [PATCH] Add AddressRange to SB API Summary: This adds new SB API calls and

[Lldb-commits] [lldb] bdfb04a - [lldb-dap] Bump the version to 0.2.1

2024-05-17 Thread Jonas Devlieghere via lldb-commits
Author: Jonas Devlieghere Date: 2024-05-17T14:00:24-07:00 New Revision: bdfb04a63d73c31ee75395064762d0d6ccb45819 URL: https://github.com/llvm/llvm-project/commit/bdfb04a63d73c31ee75395064762d0d6ccb45819 DIFF:

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

2024-05-17 Thread via lldb-commits
@@ -731,8 +747,11 @@ class Debugger : public std::enable_shared_from_this, lldb::TargetSP m_dummy_target_sp; Diagnostics::CallbackID m_diagnostics_callback_id; - lldb_private::DebuggerDestroyCallback m_destroy_callback = nullptr; - void *m_destroy_callback_baton =

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

2024-05-17 Thread via lldb-commits
@@ -731,8 +746,11 @@ class Debugger : public std::enable_shared_from_this, lldb::TargetSP m_dummy_target_sp; Diagnostics::CallbackID m_diagnostics_callback_id; - lldb_private::DebuggerDestroyCallback m_destroy_callback = nullptr; - void *m_destroy_callback_baton =

[Lldb-commits] [lldb] [lldb][Windows] Skip the TestDataFormatterLibcxxChrono test to avoid python crash (PR #92575)

2024-05-17 Thread Michael Buch via lldb-commits
Michael137 wrote: I think we should just fix https://github.com/llvm/llvm-project/issues/92574 since it seems pretty trivial to do with an ifdef https://github.com/llvm/llvm-project/pull/92575 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

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

2024-05-17 Thread via lldb-commits
@@ -135,7 +136,8 @@ CommandInterpreter::CommandInterpreter(Debugger , m_skip_lldbinit_files(false), m_skip_app_init_files(false), m_comment_char('#'), m_batch_command_mode(false), m_truncation_warning(eNoOmission), m_max_depth_warning(eNoOmission), -

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

2024-05-17 Thread via lldb-commits
@@ -766,6 +768,12 @@ class CommandInterpreter : public Broadcaster, CommandUsageMap m_command_usages; StreamString m_transcript_stream; + + /// Contains a list of handled commands, output and error. Each element in + /// the list is a dictionary with three keys:

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

2024-05-17 Thread via lldb-commits
@@ -571,6 +571,15 @@ SBStructuredData SBCommandInterpreter::GetStatistics() { return data; } +SBStructuredData SBCommandInterpreter::GetTranscript() { + LLDB_INSTRUMENT_VA(this); + + SBStructuredData data; + if (IsValid()) +

[Lldb-commits] [lldb] a4ad052 - [lldb-dap] Replace `assertEquals` with `assertEqual` (NFC)

2024-05-17 Thread Jonas Devlieghere via lldb-commits
Author: Jonas Devlieghere Date: 2024-05-17T10:12:51-07:00 New Revision: a4ad05284e97dd188c44252846486cbfb74a884c URL: https://github.com/llvm/llvm-project/commit/a4ad05284e97dd188c44252846486cbfb74a884c DIFF:

[Lldb-commits] [lldb] d74bc82 - [lldb] Include SBLanguages in the SWIG bindings (#92470)

2024-05-17 Thread Jonas Devlieghere via lldb-commits
Author: Jonas Devlieghere Date: 2024-05-17T09:58:56-07:00 New Revision: d74bc823beabbb7067a4b4ae2d69a36d874f5132 URL: https://github.com/llvm/llvm-project/commit/d74bc823beabbb7067a4b4ae2d69a36d874f5132 DIFF:

[Lldb-commits] [lldb] [lldb][Windows] Skip the TestDataFormatterLibcxxChrono test to avoid python crash (PR #92575)

2024-05-17 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Dmitry Vasilyev (slydiman) Changes The python crashed with the exit code 0xC409 (STATUS_STACK_BUFFER_OVERRUN) on the command `frame variable ss_neg_seconds` running on Windows x86_64. See this issue for details

[Lldb-commits] [lldb] [lldb][Windows] Skip the TestDataFormatterLibcxxChrono test to avoid python crash (PR #92575)

2024-05-17 Thread Dmitry Vasilyev via lldb-commits
https://github.com/slydiman created https://github.com/llvm/llvm-project/pull/92575 The python crashed with the exit code 0xC409 (STATUS_STACK_BUFFER_OVERRUN) on the command `frame variable ss_neg_seconds` running on Windows x86_64. See this issue for details

[Lldb-commits] [clang] [clang-tools-extra] [compiler-rt] [lldb] [llvm] [mlir] [openmp] [polly] fix(python): fix comparison to None (PR #91857)

2024-05-17 Thread Mehdi Amini via lldb-commits
joker-eph wrote: > It's a sed s/== None/is None/g - what is there to review? On my I'm not asking for more reviews, this is why I commented that this should be **pushed** in multiple commits, I don't even need to see PRs. Another thing also mentioned above was the problem of reverts. If there

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

2024-05-17 Thread Kevin Frei via lldb-commits
kevinfrei wrote: FYI: The previous diff exposed a bug in some ARM code that @DavidSpicket fixed in #91585, but (for understandable reasons) he didn't want to be left holding the back on restoring this diff, so I integrated some post-land feedback from @labath and put the diff back up for

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

2024-05-17 Thread via lldb-commits
https://github.com/royitaqi 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] [lldb] Added Debuginfod tests and fixed a couple issues (PR #92572)

2024-05-17 Thread Kevin Frei via lldb-commits
https://github.com/kevinfrei ready_for_review 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-17 Thread Kevin Frei via lldb-commits
https://github.com/kevinfrei edited 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-17 Thread Kevin Frei via lldb-commits
https://github.com/kevinfrei edited 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-17 Thread Kevin Frei via lldb-commits
https://github.com/kevinfrei edited 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-17 Thread Kevin Frei via lldb-commits
https://github.com/kevinfrei created https://github.com/llvm/llvm-project/pull/92572 Here we go with attempt #5. Again, no changes to the LLDB code diffs that have been looked at several times. For the tests, I added a `@skipIfCurlSupportMissing` annotation so that the Debuginfod mocked

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

2024-05-17 Thread via lldb-commits
https://github.com/royitaqi updated https://github.com/llvm/llvm-project/pull/90703 >From 0fd67e2de7e702ce6f7353845454ea7ff9f980d6 Mon Sep 17 00:00:00 2001 From: Roy Shi Date: Tue, 30 Apr 2024 21:35:49 -0700 Subject: [PATCH 01/18] Add SBCommandInterpreter::GetTranscript() ---

[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] [lldb] Fixed the test TestGdbRemoteAttachWait running on a remote target (PR #92413)

2024-05-17 Thread Dmitry Vasilyev via lldb-commits
https://github.com/slydiman closed https://github.com/llvm/llvm-project/pull/92413 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] d38ea8c - [lldb] Fixed the test TestGdbRemoteAttachWait running on a remote target (#92413)

2024-05-17 Thread via lldb-commits
Author: Dmitry Vasilyev Date: 2024-05-17T20:14:09+04:00 New Revision: d38ea8c4c84be9496249098053599c24b87f1376 URL: https://github.com/llvm/llvm-project/commit/d38ea8c4c84be9496249098053599c24b87f1376 DIFF:

[Lldb-commits] [lldb] [WIP] [lldb][Progress] Report progress when completing types from DWARF (PR #91452)

2024-05-17 Thread Jonas Devlieghere via lldb-commits
JDevlieghere wrote: > @JDevlieghere @adrian-prantl are there plans to change the presentation layer > to prevent this kind of shadowing in the future? Would be nice if all we > needed to do was report progress, and not worry about other progress events > in the debugger being in-flight No,

[Lldb-commits] [lldb] [WIP] [lldb][Progress] Report progress when completing types from DWARF (PR #91452)

2024-05-17 Thread Michael Buch via lldb-commits
Michael137 wrote: I attached to clang and printed an expression. That resulted in 16801 calls to `Progress::Increment`, all of which I'm guessing translate to event broadcasts. I collected some timing numbers: ```

[Lldb-commits] [lldb] Reapply [lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. (PR #92328)

2024-05-17 Thread Zequan Wu via lldb-commits
@@ -2306,6 +2345,11 @@ bool DWARFASTParserClang::CompleteTypeFromDWARF(const DWARFDIE , if (!die) return false; + ParsedDWARFTypeAttributes attrs(die); ZequanWu wrote: > How exactly do we get here in that case? >From

[Lldb-commits] [clang] [clang-tools-extra] [compiler-rt] [lldb] [llvm] [mlir] [openmp] [polly] fix(python): fix comparison to None (PR #91857)

2024-05-17 Thread Jonas Devlieghere via lldb-commits
JDevlieghere wrote: > It's a `sed s/== None/is None/g` - what is there to review? 10 separate > commits/PRs for the same exact `sed` costs more in commit noise (and effort > on the part of @e-kwsm) than one solid, patient, review here. In addition to what @ftynse said above, the `sed` might

[Lldb-commits] [lldb] [lldb] Refactor string manipulation in Debugger.cpp (#91209) (PR #92565)

2024-05-17 Thread via lldb-commits
github-actions[bot] wrote: ⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo. Please turn off [Keep my email addresses private](https://github.com/settings/emails) setting in your account. See [LLVM

[Lldb-commits] [lldb] [lldb] Refactor string manipulation in Debugger.cpp (#91209) (PR #92565)

2024-05-17 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: None (aabhinavg) Changes Summary of Changes: Replaced the ineffective call to `substr` with a more efficient use of `resize` to truncate the string. Adjusted the code to use 'resize' instead of 'substr' for better performance and

[Lldb-commits] [lldb] [lldb] Refactor string manipulation in Debugger.cpp (#91209) (PR #92565)

2024-05-17 Thread via lldb-commits
https://github.com/aabhinavg created https://github.com/llvm/llvm-project/pull/92565 Summary of Changes: Replaced the ineffective call to `substr` with a more efficient use of `resize` to truncate the string. Adjusted the code to use 'resize' instead of 'substr' for better performance and

[Lldb-commits] [lldb] [lldb-dap] Updating VariableDescription to use GetDescription() as a fallback. (PR #77026)

2024-05-17 Thread John Harrison via lldb-commits
ashgti wrote: Sounds good to me https://github.com/llvm/llvm-project/pull/77026 ___ 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
@@ -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] [llvm] [lldb] Refactor string manipulation in Debugger.cpp (#91209) (PR #91880)

2024-05-17 Thread Youngsuk Kim via lldb-commits
https://github.com/JOE1994 requested changes to this pull request. * The PR contains irrelevant changes to `X86` codegen. * Author of the commit shows up as another contributor. It seems like the author of this PR did a `git commit --amend` on top of e586556e375fc5c4f7e76b5c299cb981f2016108 to

[Lldb-commits] [lldb] [llvm] [lldb] Refactor string manipulation in Debugger.cpp (#91209) (PR #91880)

2024-05-17 Thread Youngsuk Kim via lldb-commits
https://github.com/JOE1994 reopened https://github.com/llvm/llvm-project/pull/91880 ___ 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-17 Thread Walter Erquinigo via lldb-commits
walter-erquinigo wrote: Thanks, @labath , for chiming in. I actually agree with all your points. https://github.com/llvm/llvm-project/pull/91570 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [lldb] [lldb-dap] Updating VariableDescription to use GetDescription() as a fallback. (PR #77026)

2024-05-17 Thread Walter Erquinigo via lldb-commits
walter-erquinigo wrote: I'm okay with anything that ensures hovering is fast. https://github.com/llvm/llvm-project/pull/77026 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fixed the DAP tests in case of a remote target (PR #92416)

2024-05-17 Thread Walter Erquinigo via lldb-commits
walter-erquinigo wrote: That's a great idea. There's no such `dap` category at the moment, but it would be nice if such category is created as part of the ongoing lldb-dap test fixes. https://github.com/llvm/llvm-project/pull/92416 ___ lldb-commits

[Lldb-commits] [lldb] [lldb] Fixed the test TestGdbRemoteAttachWait running on a remote target (PR #92413)

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

[Lldb-commits] [lldb] [lldb] Fixed the test TestGdbRemoteAttachWait running on a remote target (PR #92413)

2024-05-17 Thread Dmitry Vasilyev via lldb-commits
@@ -52,6 +52,9 @@ def test_attach_with_vAttachWait(self): server = self.connect_to_debug_monitor() self.do_handshake() +if self._run_args: +self._run_args[0] = lldbutil.install_to_target(self, self._run_args[0]) slydiman

[Lldb-commits] [lldb] [lldb] Fixed the test TestGdbRemoteAttachWait running on a remote target (PR #92413)

2024-05-17 Thread Dmitry Vasilyev via lldb-commits
https://github.com/slydiman updated https://github.com/llvm/llvm-project/pull/92413 >From d88cc6d992e1f753066aa5dccaa510d8a0a35b94 Mon Sep 17 00:00:00 2001 From: Dmitry Vasilyev Date: Thu, 16 May 2024 19:18:21 +0400 Subject: [PATCH 1/2] [lldb] Fixed the test TestGdbRemoteAttachWait running on

[Lldb-commits] [clang] [clang-tools-extra] [compiler-rt] [lldb] [llvm] [mlir] [openmp] [polly] fix(python): fix comparison to None (PR #91857)

2024-05-17 Thread Oleksandr Alex Zinenko via lldb-commits
ftynse wrote: > 10 separate commits/PRs for the same exact sed costs more in commit noise > (and effort on the part of @e-kwsm) than one solid, patient, review here Not unless you subscribe only to a subproject. FWIW, I'm not comfortable blanket approving changes, however trivial, to

[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] [lldb-dap] Updating VariableDescription to use GetDescription() as a fallback. (PR #77026)

2024-05-17 Thread Pavel Labath via lldb-commits
labath wrote: Thanks for checking this out. > I just checked and I'm not seeing the hover's in the same format as they were > when I made the pull request. The expression context should still have the > expanded forms though for example: >

[Lldb-commits] [lldb] [lldb-dap] Correctly detect alias commands with arguments in repl (PR #92137)

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

[Lldb-commits] [lldb] 33bf08e - [lldb-dap] Correctly detect alias commands with arguments in repl (#92137)

2024-05-17 Thread via lldb-commits
Author: Pavel Labath Date: 2024-05-17T11:24:20+02:00 New Revision: 33bf08ec36efc2fc2df8217eddd751cef9bc6be6 URL: https://github.com/llvm/llvm-project/commit/33bf08ec36efc2fc2df8217eddd751cef9bc6be6 DIFF: https://github.com/llvm/llvm-project/commit/33bf08ec36efc2fc2df8217eddd751cef9bc6be6.diff

[Lldb-commits] [lldb] Reapply [lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. (PR #92328)

2024-05-17 Thread Pavel Labath via lldb-commits
@@ -2306,6 +2345,11 @@ bool DWARFASTParserClang::CompleteTypeFromDWARF(const DWARFDIE , if (!die) return false; + ParsedDWARFTypeAttributes attrs(die); labath wrote: > Probably not, the `DWARFAttributes` object is large, 336 bytes. I think that

[Lldb-commits] [lldb] [lldb] Fixed the DAP tests in case of a remote target (PR #92416)

2024-05-17 Thread Pavel Labath via lldb-commits
labath wrote: Are *all* lldb-dap tests not compatible with running remotely? If so, then instead of annotating them individually, we could tag them all with some "dap" category (if they're not already) and then automatically skip that category when running remotely.

[Lldb-commits] [lldb] [lldb] Fixed the test TestGdbRemoteAttachWait running on a remote target (PR #92413)

2024-05-17 Thread Pavel Labath via lldb-commits
@@ -52,6 +52,9 @@ def test_attach_with_vAttachWait(self): server = self.connect_to_debug_monitor() self.do_handshake() +if self._run_args: +self._run_args[0] = lldbutil.install_to_target(self, self._run_args[0]) labath

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

2024-05-17 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,146 @@ +""" +Test lldb-dap "port" configuration to "attach" request +""" + + +import dap_server +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil +from lldbsuite.test import lldbplatformutil +import

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

2024-05-17 Thread Pavel Labath via lldb-commits
@@ -96,6 +96,7 @@ #define LLDB_INVALID_QUEUE_ID 0 #define LLDB_INVALID_CPU_ID UINT32_MAX #define LLDB_INVALID_WATCHPOINT_RESOURCE_ID UINT32_MAX +#define LLDB_INVALID_PORT_NUMBER 0 labath wrote: Port numbers aren't an lldb invention, so I don't think we should

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

2024-05-17 Thread Pavel Labath via lldb-commits
https://github.com/labath requested changes to this pull request. FWIW, I think this feature would be more useful and easier to implement if there was just a single setting called "connection url" or something, which accepted all of the usual lldb connection urls (unix-abstract-connect://,

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

2024-05-17 Thread Pavel Labath via lldb-commits
https://github.com/labath 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] b27eb0a - [lldb] Avoid modifying the source tree in TestCompletion.py

2024-05-17 Thread Pavel Labath via lldb-commits
Author: Pavel Labath Date: 2024-05-17T07:33:26Z New Revision: b27eb0ae8280675fc8fb249d39f1ccafa3ee2187 URL: https://github.com/llvm/llvm-project/commit/b27eb0ae8280675fc8fb249d39f1ccafa3ee2187 DIFF: https://github.com/llvm/llvm-project/commit/b27eb0ae8280675fc8fb249d39f1ccafa3ee2187.diff LOG:

[Lldb-commits] [lldb] [lldb] Fixed the TestCompletion test running on a remote target (PR #92281)

2024-05-17 Thread Pavel Labath via lldb-commits
@@ -107,9 +107,20 @@ def test_process_unload(self): self, "// Break here", lldb.SBFileSpec("main.cpp") ) err = lldb.SBError() -self.process().LoadImage( -lldb.SBFileSpec(self.getBuildArtifact("libshared.so")), err -) +

[Lldb-commits] [lldb] [lldb/aarch64] Fix unwinding when signal interrupts a leaf function (PR #91321)

2024-05-17 Thread Pavel Labath via lldb-commits
labath wrote: So, it took some effort, but I managed to reproduce the problem and figure out what's going on. You can find my analysis on https://github.com/llvm/llvm-project/pull/92503 https://github.com/llvm/llvm-project/pull/91321 ___

[Lldb-commits] [lldb] Reapply "[lldb/aarch64] Fix unwinding when signal interrupts a leaf f… (PR #92503)

2024-05-17 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Pavel Labath (labath) Changes …unction (#91321)" This reapplies fd1bd53ba5a06f344698a55578f6a5d79c457e30, which was reverted due to a test failure on aarch64/windows. The failure was caused by a combination of several factors: - clang

[Lldb-commits] [lldb] Reapply "[lldb/aarch64] Fix unwinding when signal interrupts a leaf f… (PR #92503)

2024-05-17 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/92503 …unction (#91321)" This reapplies fd1bd53ba5a06f344698a55578f6a5d79c457e30, which was reverted due to a test failure on aarch64/windows. The failure was caused by a combination of several factors: - clang

[Lldb-commits] [clang] [clang-tools-extra] [compiler-rt] [lldb] [llvm] [mlir] [openmp] [polly] fix(python): fix comparison to None (PR #91857)

2024-05-17 Thread Maksim Levental via lldb-commits
https://github.com/makslevental approved this pull request. There you go - diligently reviewed using GitHub 's fantastic UI. ![Screenshot_20240517_011154_com android chrome](https://github.com/llvm/llvm-project/assets/5657668/ece87aff-4c44-4f07-8176-1adeaa4ff32e)

[Lldb-commits] [clang] [clang-tools-extra] [compiler-rt] [lldb] [llvm] [mlir] [openmp] [polly] fix(python): fix comparison to None (PR #91857)

2024-05-17 Thread Maksim Levental via lldb-commits
makslevental wrote: It's a `sed s/== None/is None/g` - what is there to review? 10 separate PRs for the same exact `sed` costs more in commit noise (and effort on the part of @e-kwsm) than one solid, patient, review here. https://github.com/llvm/llvm-project/pull/91857

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

2024-05-16 Thread via lldb-commits
https://github.com/royitaqi updated https://github.com/llvm/llvm-project/pull/90703 >From 0fd67e2de7e702ce6f7353845454ea7ff9f980d6 Mon Sep 17 00:00:00 2001 From: Roy Shi Date: Tue, 30 Apr 2024 21:35:49 -0700 Subject: [PATCH 01/17] Add SBCommandInterpreter::GetTranscript() ---

[Lldb-commits] [clang] [clang-tools-extra] [compiler-rt] [lldb] [llvm] [mlir] [openmp] [polly] fix(python): fix comparison to None (PR #91857)

2024-05-16 Thread Mehdi Amini via lldb-commits
https://github.com/joker-eph approved this pull request. If you can push this to main in separate commits (one per project as it was mentioned?), that'd be great! https://github.com/llvm/llvm-project/pull/91857 ___ lldb-commits mailing list

[Lldb-commits] [lldb] c339226 - [lldb] Use operator==(StringRef, StringRef) instead of StringRef::equals (NFC) (#92476)

2024-05-16 Thread via lldb-commits
Author: Kazu Hirata Date: 2024-05-16T20:47:12-07:00 New Revision: c33922666ce219fd6cb3341c3394f72050599552 URL: https://github.com/llvm/llvm-project/commit/c33922666ce219fd6cb3341c3394f72050599552 DIFF: https://github.com/llvm/llvm-project/commit/c33922666ce219fd6cb3341c3394f72050599552.diff

[Lldb-commits] [lldb] [lldb] Use operator==(StringRef, StringRef) instead of StringRef::equals (NFC) (PR #92476)

2024-05-16 Thread Kazu Hirata via lldb-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/92476 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Use operator==(StringRef, StringRef) instead of StringRef::equals (NFC) (PR #92476)

2024-05-16 Thread Kazu Hirata via lldb-commits
kazutakahirata wrote: > The change looks fine. Was this done with by hand or with the help of a > script? If so please put that in the commit message so we can do the same > downstream. Thank you for reviewing the patch! I did get help from a script, but it's a bit too involved for a commit

  1   2   3   4   5   6   7   8   9   10   >