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

2024-06-07 Thread Shivam Gupta via lldb-commits
https://github.com/xgupta closed 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] d3fc5cf - [lldb] Remove redundant c_str() calls in stream output (NFC) (#94839)

2024-06-07 Thread via lldb-commits
Author: Shivam Gupta Date: 2024-06-08T12:02:01+05:30 New Revision: d3fc5cf24a93003ba963fc406aa1901a292d55f4 URL: https://github.com/llvm/llvm-project/commit/d3fc5cf24a93003ba963fc406aa1901a292d55f4 DIFF: https://github.com/llvm/llvm-project/commit/d3fc5cf24a93003ba963fc406aa1901a292d55f4.diff

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

2024-06-07 Thread Shivam Gupta via lldb-commits
https://github.com/xgupta edited 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] [lldb] Adjust the for loop condition to prevent unintended increments in ExpandRLE (NFC) (PR #94844)

2024-06-07 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Shivam Gupta (xgupta) Changes This PR address the issue reported by static analyser cppcheck regarding missing bounds check for extra iterator increment in a loop. This could lead to accessing out-of-bounds memory. To fix this we have adj

[Lldb-commits] [lldb] [lldb] Adjust the for loop condition to prevent unintended increments in ExpandRLE (NFC) (PR #94844)

2024-06-07 Thread Shivam Gupta via lldb-commits
https://github.com/xgupta created https://github.com/llvm/llvm-project/pull/94844 This PR address the issue reported by static analyser cppcheck regarding missing bounds check for extra iterator increment in a loop. This could lead to accessing out-of-bounds memory. To fix this we have adjust

[Lldb-commits] [lldb] [lldb] Fix redundant condition in compression type check (NFC) (PR #94841)

2024-06-07 Thread Shivam Gupta via lldb-commits
https://github.com/xgupta updated https://github.com/llvm/llvm-project/pull/94841 >From 5451d769f36528e9640e665d4124103a6c34bf20 Mon Sep 17 00:00:00 2001 From: Shivam Gupta Date: Sat, 8 Jun 2024 11:14:06 +0530 Subject: [PATCH 1/2] [lldb] Fix redundant condition in compression type check (NFC)

[Lldb-commits] [lldb] [lldb] Remove redundant condition in watch mask check (NFC) (PR #94842)

2024-06-07 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Shivam Gupta (xgupta) Changes This issue is reported by cppcheck as a pointless test in the watch mask check. The `else if` condition is opposite to the previous `if` condition, making the expression always true. Caught by cppcheck - lldb

[Lldb-commits] [lldb] [lldb] Remove redundant condition in watch mask check (NFC) (PR #94842)

2024-06-07 Thread Shivam Gupta via lldb-commits
https://github.com/xgupta created https://github.com/llvm/llvm-project/pull/94842 This issue is reported by cppcheck as a pointless test in the watch mask check. The `else if` condition is opposite to the previous `if` condition, making the expression always true. Caught by cppcheck - lldb/so

[Lldb-commits] [lldb] [lldb] Fix redundant condition in compression type check (NFC) (PR #94841)

2024-06-07 Thread via lldb-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff ac404632f991fc6e7dc75ef553a99676ba8002ce 5451d769f36528e9640e665d4124103a6c34bf20 --

[Lldb-commits] [lldb] [lldb] Fix redundant condition in compression type check (NFC) (PR #94841)

2024-06-07 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Shivam Gupta (xgupta) Changes The `else if` condition for checking `m_compression_type` is redundant as it matches with a previous `if` condition, making the expression always false. Reported by cppcheck as a possible cut-and-paste error.

[Lldb-commits] [lldb] [lldb] Fix redundant condition in compression type check (NFC) (PR #94841)

2024-06-07 Thread Shivam Gupta via lldb-commits
https://github.com/xgupta created https://github.com/llvm/llvm-project/pull/94841 The `else if` condition for checking `m_compression_type` is redundant as it matches with a previous `if` condition, making the expression always false. Reported by cppcheck as a possible cut-and-paste error. Ca

[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] [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] [clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-07 Thread Artem Yurchenko via lldb-commits
https://github.com/temyurchenko updated https://github.com/llvm/llvm-project/pull/93913 >From 410c7ba9fb7667dabdfbc48fdbda427401ca8df0 Mon Sep 17 00:00:00 2001 From: Artem Yurchenko <44875844+temyurche...@users.noreply.github.com> Date: Thu, 30 May 2024 16:18:47 -0400 Subject: [PATCH 1/2] [clang

[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] [lldb] Use const reference for range variables to improve performance (NFC) (PR #94840)

2024-06-07 Thread Shivam Gupta via lldb-commits
https://github.com/xgupta edited 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] Use const reference for range variables to improve performance (NFC) (PR #94840)

2024-06-07 Thread Shivam Gupta via lldb-commits
https://github.com/xgupta updated https://github.com/llvm/llvm-project/pull/94840 >From ebfb9d81ccc9d54a03e33b73143753a6d0f008bb Mon Sep 17 00:00:00 2001 From: Shivam Gupta Date: Sat, 8 Jun 2024 10:43:01 +0530 Subject: [PATCH] [lldb] Use const reference for range variables to improve performan

[Lldb-commits] [clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-07 Thread Artem Yurchenko via lldb-commits
https://github.com/temyurchenko updated https://github.com/llvm/llvm-project/pull/93913 >From f1951f3f2dd322123a1c49221c4252f4ea932242 Mon Sep 17 00:00:00 2001 From: Artem Yurchenko <44875844+temyurche...@users.noreply.github.com> Date: Thu, 30 May 2024 16:18:47 -0400 Subject: [PATCH 1/2] [clang

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

2024-06-07 Thread Shivam Gupta via lldb-commits
https://github.com/xgupta edited 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] [lldb] Use const reference for range variables to improve performance (NFC) (PR #94840)

2024-06-07 Thread Shivam Gupta via lldb-commits
https://github.com/xgupta updated https://github.com/llvm/llvm-project/pull/94840 >From 25fb87d4bb4af55e642ec386f104412b39065a83 Mon Sep 17 00:00:00 2001 From: Shivam Gupta Date: Sat, 8 Jun 2024 10:43:01 +0530 Subject: [PATCH] [lldb] Use const reference for range variables to improve performan

[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] Use const reference for range variables to improve performance (NFC) (PR #94840)

2024-06-07 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Shivam Gupta (xgupta) Changes Cppcheck recommends using a const reference for range variables in a for-each loop. This avoids unnecessary copying of elements, improving performance. Caught by cppcheck - lldb/source/API/SBBreakpoint.cpp:717

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

2024-06-07 Thread Shivam Gupta via lldb-commits
https://github.com/xgupta created https://github.com/llvm/llvm-project/pull/94840 Cppcheck recommends using a const reference for range variables in a for-each loop. This avoids unnecessary copying of elements, improving performance. Caught by cppcheck - lldb/source/API/SBBreakpoint.cpp:717:22

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

2024-06-07 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Shivam Gupta (xgupta) Changes Passing the result of c_str() to a stream is slow and redundant. This change removes unnecessary c_str() calls and uses the string object directly. Caught by cppcheck - lldb/tools/debugserver/source/JSON.cpp:3

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

2024-06-07 Thread Shivam Gupta via lldb-commits
https://github.com/xgupta created https://github.com/llvm/llvm-project/pull/94839 Passing the result of c_str() to a stream is slow and redundant. This change removes unnecessary c_str() calls and uses the string object directly. Caught by cppcheck - lldb/tools/debugserver/source/JSON.cpp:398:

[Lldb-commits] [lldb] [lldb] Fix string truncation method when substring is the prefix of string (NFC) (PR #94785)

2024-06-07 Thread Shivam Gupta via lldb-commits
https://github.com/xgupta edited https://github.com/llvm/llvm-project/pull/94785 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix string truncation method when substring is the prefix of string (NFC) (PR #94785)

2024-06-07 Thread Shivam Gupta via lldb-commits
https://github.com/xgupta edited https://github.com/llvm/llvm-project/pull/94785 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Correct format specifier for sscanf to prevent buffer overflow (NFC) (PR #94783)

2024-06-07 Thread Shivam Gupta via lldb-commits
https://github.com/xgupta edited https://github.com/llvm/llvm-project/pull/94783 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Correct format specifier for sscanf to prevent buffer overflow (NFC) (PR #94783)

2024-06-07 Thread Shivam Gupta via lldb-commits
https://github.com/xgupta edited https://github.com/llvm/llvm-project/pull/94783 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix incorrect logical operator in 'if' condition check (NFC) (PR #94779)

2024-06-07 Thread Shivam Gupta via lldb-commits
https://github.com/xgupta edited https://github.com/llvm/llvm-project/pull/94779 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix incorrect logical operator in 'if' condition check (NFC) (PR #94779)

2024-06-07 Thread Shivam Gupta via lldb-commits
https://github.com/xgupta edited https://github.com/llvm/llvm-project/pull/94779 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Remove dead code block (NFC) (PR #94775)

2024-06-07 Thread Shivam Gupta via lldb-commits
https://github.com/xgupta edited https://github.com/llvm/llvm-project/pull/94775 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Remove dead code block (NFC) (PR #94775)

2024-06-07 Thread Shivam Gupta via lldb-commits
https://github.com/xgupta edited https://github.com/llvm/llvm-project/pull/94775 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [clang-tools-extra] [compiler-rt] [lldb] [llvm] [Memprof] Adds the option to collect AccessCountHistograms for memprof. (PR #94264)

2024-06-07 Thread Matthew Weingarten via lldb-commits
@@ -140,12 +140,16 @@ static cl::opt ClDebugMin("memprof-debug-min", cl::desc("Debug min inst"), static cl::opt ClDebugMax("memprof-debug-max", cl::desc("Debug max inst"), cl::Hidden, cl::init(-1)); +static cl::opt ClHistogram("memprof-histogram

[Lldb-commits] [clang-tools-extra] [compiler-rt] [lldb] [llvm] [Memprof] Adds the option to collect AccessCountHistograms for memprof. (PR #94264)

2024-06-07 Thread Matthew Weingarten via lldb-commits
https://github.com/mattweingarten updated https://github.com/llvm/llvm-project/pull/94264 error: too big or took too long to generate ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add the ability for Script based commands to specify their "repeat command" (PR #94823)

2024-06-07 Thread via lldb-commits
https://github.com/jimingham updated https://github.com/llvm/llvm-project/pull/94823 >From c2fea75364a0017be5e59020467d661bd00122ba Mon Sep 17 00:00:00 2001 From: Jim Ingham Date: Fri, 7 Jun 2024 17:36:34 -0700 Subject: [PATCH 1/2] Add the ability for Script based commands to specify their "re

[Lldb-commits] [lldb] Add the ability for Script based commands to specify their "repeat command" (PR #94823)

2024-06-07 Thread via lldb-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 435dd9746107e13c2ad019be3bd34815f7d2360d c2fea75364a0017be5e59020467d661bd00122ba --

[Lldb-commits] [lldb] Add the ability for Script based commands to specify their "repeat command" (PR #94823)

2024-06-07 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 435dd9746107e13c2ad019be3bd34815f7d2360d...c2fea75364a0017be5e59020467d661bd00122ba lldb/

[Lldb-commits] [lldb] Add the ability for Script based commands to specify their "repeat command" (PR #94823)

2024-06-07 Thread via lldb-commits
https://github.com/jimingham created https://github.com/llvm/llvm-project/pull/94823 Among other things, returning an empty string as the repeat command disables auto-repeat, which can be useful for state-changing commands. There's one remaining refinement to this setup, which is that for pars

[Lldb-commits] [lldb] Add AllowRepeats to SBCommandInterpreterRunOptions. (PR #94786)

2024-06-07 Thread via lldb-commits
https://github.com/jimingham closed https://github.com/llvm/llvm-project/pull/94786 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] 435dd97 - Add AllowRepeats to SBCommandInterpreterRunOptions. (#94786)

2024-06-07 Thread via lldb-commits
Author: jimingham Date: 2024-06-07T17:05:29-07:00 New Revision: 435dd9746107e13c2ad019be3bd34815f7d2360d URL: https://github.com/llvm/llvm-project/commit/435dd9746107e13c2ad019be3bd34815f7d2360d DIFF: https://github.com/llvm/llvm-project/commit/435dd9746107e13c2ad019be3bd34815f7d2360d.diff LOG

[Lldb-commits] [lldb] Add AllowRepeats to SBCommandInterpreterRunOptions. (PR #94786)

2024-06-07 Thread via lldb-commits
@@ -182,6 +187,11 @@ class CommandInterpreterRunOptions { void SetSpawnThread(bool spawn_thread) { m_spawn_thread = spawn_thread ? eLazyBoolYes : eLazyBoolNo; } + bool GetAllowRepeats() const { return DefaultToNo(m_allow_repeats); } jimingham wrote: d

[Lldb-commits] [lldb] Add AllowRepeats to SBCommandInterpreterRunOptions. (PR #94786)

2024-06-07 Thread via lldb-commits
https://github.com/jimingham updated https://github.com/llvm/llvm-project/pull/94786 >From bcd8c81c5fbc249886c53d8a2d1bc21a3f9e1ffd Mon Sep 17 00:00:00 2001 From: Jim Ingham Date: Fri, 7 Jun 2024 11:17:26 -0700 Subject: [PATCH 1/4] Add AllowRepeats to SBCommandInterpreterRunOptions. This is us

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

2024-06-07 Thread Alexander Yermolovich 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
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] [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
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] [lldb][api-test] Add API test for SBCommandInterpreter::CommandOverrideCallback (PR #94518)

2024-06-07 Thread Chelsea Cassanova via lldb-commits
https://github.com/chelcassanova updated https://github.com/llvm/llvm-project/pull/94518 >From 4e40f07e424458be6e44cc41d333f38763a0d0fb Mon Sep 17 00:00:00 2001 From: Chelsea Cassanova Date: Wed, 5 Jun 2024 11:24:01 -0700 Subject: [PATCH] [lldb][api-test] Add API test for SBCommandInterpreter:

[Lldb-commits] [lldb] [lldb][api-test] Add API test for SBCommandInterpreter::CommandOverrideCallback (PR #94518)

2024-06-07 Thread Chelsea Cassanova via lldb-commits
https://github.com/chelcassanova updated https://github.com/llvm/llvm-project/pull/94518 >From a7215585f55617a41f7c8e566088d3f50203fe55 Mon Sep 17 00:00:00 2001 From: Chelsea Cassanova Date: Wed, 5 Jun 2024 11:24:01 -0700 Subject: [PATCH] [lldb][api-test] Add API test for SBCommandInterpreter:

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

2024-06-07 Thread Santhosh Kumar Ellendula via lldb-commits
@@ -0,0 +1,202 @@ +""" +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

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

2024-06-07 Thread Santhosh Kumar Ellendula via lldb-commits
https://github.com/santhoshe447 updated https://github.com/llvm/llvm-project/pull/91570 >From 960351c9abf51f42d92604ac6297aa5b76ddfba5 Mon Sep 17 00:00:00 2001 From: Santhosh Kumar Ellendula Date: Fri, 17 Nov 2023 15:09:10 +0530 Subject: [PATCH 01/14] [lldb][test] Add the ability to extract the

[Lldb-commits] [lldb] [lldb][api-test] Add API test for SBCommandInterpreter::CommandOverrideCallback (PR #94518)

2024-06-07 Thread Jonas Devlieghere via lldb-commits
@@ -0,0 +1,27 @@ +from typing_extensions import override +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class CommandOverrideCallback(TestBase): +def setUp(self): +TestBase.setUp(se

[Lldb-commits] [lldb] [lldb][api-test] Add API test for SBCommandInterpreter::CommandOverrideCallback (PR #94518)

2024-06-07 Thread Jonas Devlieghere via lldb-commits
@@ -476,6 +475,23 @@ template <> bool SetNumberFromPyObject(double &number, PyObject *obj) { $1 = $1 || PyCallable_Check(reinterpret_cast($input)); } +%typemap(in) (lldb::CommandOverrideCallback callback, void *baton) { + if (!($input == Py_None || +PyCallable_Chec

[Lldb-commits] [lldb] [lldb][api-test] Add API test for SBCommandInterpreter::CommandOverrideCallback (PR #94518)

2024-06-07 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere requested changes to this pull request. https://github.com/llvm/llvm-project/pull/94518 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][api-test] Add API test for SBCommandInterpreter::CommandOverrideCallback (PR #94518)

2024-06-07 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere edited https://github.com/llvm/llvm-project/pull/94518 ___ 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
@@ -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] [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
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] Use `Address` to setup breakpoint (PR #94794)

2024-06-07 Thread Usama Hameed via lldb-commits
@@ -90,17 +90,9 @@ void InstrumentationRuntimeASanLibsanitizers::Activate() { if (!process_sp) return; - lldb::ModuleSP module_sp = GetRuntimeModuleSP(); - Breakpoint *breakpoint = ReportRetriever::SetupBreakpoint( - module_sp, process_sp, ConstString("sanitizer

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

2024-06-07 Thread Santhosh Kumar Ellendula via lldb-commits
@@ -0,0 +1,202 @@ +""" +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

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

2024-06-07 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere closed 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] 96d01a3 - [lldb] Encode operands and arity in Dwarf.def and use them in LLDB. (#94679)

2024-06-07 Thread via lldb-commits
Author: Jonas Devlieghere Date: 2024-06-07T13:48:17-07:00 New Revision: 96d01a350ce9875a8f893ecdc1d470caf7ed5bcd URL: https://github.com/llvm/llvm-project/commit/96d01a350ce9875a8f893ecdc1d470caf7ed5bcd DIFF: https://github.com/llvm/llvm-project/commit/96d01a350ce9875a8f893ecdc1d470caf7ed5bcd.d

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

2024-06-07 Thread Santhosh Kumar Ellendula via lldb-commits
@@ -0,0 +1,202 @@ +""" +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

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

2024-06-07 Thread Santhosh Kumar Ellendula via lldb-commits
@@ -0,0 +1,202 @@ +""" +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

[Lldb-commits] [lldb] Add AllowRepeats to SBCommandInterpreterRunOptions. (PR #94786)

2024-06-07 Thread Jonas Devlieghere via lldb-commits
@@ -3129,14 +3130,19 @@ void CommandInterpreter::IOHandlerInputComplete(IOHandler &io_handler, return; const bool is_interactive = io_handler.GetIsInteractive(); - if (!is_interactive) { + bool allow_repeats = JDevlieghere wrote: nit: `const bool`

[Lldb-commits] [lldb] Add AllowRepeats to SBCommandInterpreterRunOptions. (PR #94786)

2024-06-07 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere edited https://github.com/llvm/llvm-project/pull/94786 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add AllowRepeats to SBCommandInterpreterRunOptions. (PR #94786)

2024-06-07 Thread Jonas Devlieghere via lldb-commits
@@ -182,6 +187,11 @@ class CommandInterpreterRunOptions { void SetSpawnThread(bool spawn_thread) { m_spawn_thread = spawn_thread ? eLazyBoolYes : eLazyBoolNo; } + bool GetAllowRepeats() const { return DefaultToNo(m_allow_repeats); } JDevlieghere wrote:

[Lldb-commits] [lldb] Add AllowRepeats to SBCommandInterpreterRunOptions. (PR #94786)

2024-06-07 Thread Jonas Devlieghere via lldb-commits
@@ -72,6 +72,14 @@ class LLDB_API SBCommandInterpreterRunOptions { void SetSpawnThread(bool); + bool GetAllowRepeats() const; + + // By default, RunCommandInterpreter will discard repeats if the + // IOHandler being used is not interactive. Setting AllowRepeats to true

[Lldb-commits] [lldb] Add AllowRepeats to SBCommandInterpreterRunOptions. (PR #94786)

2024-06-07 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere approved this pull request. LGMT modulo nits. https://github.com/llvm/llvm-project/pull/94786 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][api-test] Add API test for SBCommandInterpreter::CommandOverrideCallback (PR #94518)

2024-06-07 Thread Chelsea Cassanova via lldb-commits
https://github.com/chelcassanova updated https://github.com/llvm/llvm-project/pull/94518 >From 44e8cab5d45a87eb1ea2076c498abe5be423eb1c Mon Sep 17 00:00:00 2001 From: Chelsea Cassanova Date: Wed, 5 Jun 2024 11:24:01 -0700 Subject: [PATCH] [lldb][api-test] Add API test for SBCommandInterpreter:

[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] Use `Address` to setup breakpoint (PR #94794)

2024-06-07 Thread Julian Lettner via lldb-commits
https://github.com/yln updated https://github.com/llvm/llvm-project/pull/94794 >From 40fd912a328cd9f7918a9f9c12f8cfd97094fc2f Mon Sep 17 00:00:00 2001 From: Julian Lettner Date: Fri, 7 Jun 2024 09:20:23 -0700 Subject: [PATCH 1/2] [lldb] Use `Address` to setup breakpoint Use `Address` (instead o

[Lldb-commits] [lldb] [lldb] Use `Address` to setup breakpoint (PR #94794)

2024-06-07 Thread Julian Lettner via lldb-commits
@@ -235,18 +234,13 @@ Breakpoint *ReportRetriever::SetupBreakpoint(ModuleSP module_sp, if (!symbol->ValueIsAddress() || !symbol->GetAddressRef().IsValid()) return nullptr; - Target &target = process_sp->GetTarget(); - addr_t symbol_address = symbol->GetAddressRef().G

[Lldb-commits] [lldb] [lldb] Use `Address` to setup breakpoint (PR #94794)

2024-06-07 Thread Julian Lettner via lldb-commits
@@ -90,17 +90,9 @@ void InstrumentationRuntimeASanLibsanitizers::Activate() { if (!process_sp) return; - lldb::ModuleSP module_sp = GetRuntimeModuleSP(); - Breakpoint *breakpoint = ReportRetriever::SetupBreakpoint( - module_sp, process_sp, ConstString("sanitizer

[Lldb-commits] [lldb] [lldb] Use `Address` to setup breakpoint (PR #94794)

2024-06-07 Thread via lldb-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff b01ac5137c28fa5e1b44a5d850cb7a6ace7d8799 dd02ca52d3cdad42c549bf66b4c05aca8fa93f62 --

[Lldb-commits] [clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-07 Thread Artem Yurchenko via lldb-commits
https://github.com/temyurchenko updated https://github.com/llvm/llvm-project/pull/93913 >From 9b18a5c4132cf093fc9b32f6b4dcfe406d485e3d Mon Sep 17 00:00:00 2001 From: Artem Yurchenko Date: Thu, 6 Jun 2024 20:20:19 -0400 Subject: [PATCH] enforce the unbraced `extern ` invariant Quoting 9.11.8: >

[Lldb-commits] [lldb] [lldb] Use `Address` to setup breakpoint (PR #94794)

2024-06-07 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Julian Lettner (yln) Changes Use `Address` (instead of `addr_t`) to setup breakpoint in `ReportRetriever::SetupBreakpoint`. This is cleaner and the breakpoint should now survive re-running of the binary. rdar://124399066 --- Full diff: htt

[Lldb-commits] [lldb] [lldb] Use `Address` to setup breakpoint (PR #94794)

2024-06-07 Thread Julian Lettner via lldb-commits
https://github.com/yln created https://github.com/llvm/llvm-project/pull/94794 Use `Address` (instead of `addr_t`) to setup breakpoint in `ReportRetriever::SetupBreakpoint`. This is cleaner and the breakpoint should now survive re-running of the binary. rdar://124399066 >From 988d184eb52824810f

[Lldb-commits] [lldb] Add AllowRepeats to SBCommandInterpreterRunOptions. (PR #94786)

2024-06-07 Thread via lldb-commits
@@ -93,15 +93,20 @@ class CommandInterpreterRunOptions { /// \param[in] add_to_history ///If \b true add the commands to the command history. If \b false, don't ///add them. + /// \param[in] process_repeats + ///If \b true then process empty lines as repeat

[Lldb-commits] [lldb] Add AllowRepeats to SBCommandInterpreterRunOptions. (PR #94786)

2024-06-07 Thread via lldb-commits
https://github.com/jimingham updated https://github.com/llvm/llvm-project/pull/94786 >From bcd8c81c5fbc249886c53d8a2d1bc21a3f9e1ffd Mon Sep 17 00:00:00 2001 From: Jim Ingham Date: Fri, 7 Jun 2024 11:17:26 -0700 Subject: [PATCH 1/3] Add AllowRepeats to SBCommandInterpreterRunOptions. This is us

[Lldb-commits] [lldb] Add AllowRepeats to SBCommandInterpreterRunOptions. (PR #94786)

2024-06-07 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben edited https://github.com/llvm/llvm-project/pull/94786 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add AllowRepeats to SBCommandInterpreterRunOptions. (PR #94786)

2024-06-07 Thread Med Ismail Bennani via lldb-commits
@@ -93,15 +93,20 @@ class CommandInterpreterRunOptions { /// \param[in] add_to_history ///If \b true add the commands to the command history. If \b false, don't ///add them. + /// \param[in] process_repeats + ///If \b true then process empty lines as repeat

[Lldb-commits] [lldb] Add AllowRepeats to SBCommandInterpreterRunOptions. (PR #94786)

2024-06-07 Thread via lldb-commits
@@ -93,15 +93,20 @@ class CommandInterpreterRunOptions { /// \param[in] add_to_history ///If \b true add the commands to the command history. If \b false, don't ///add them. + /// \param[in] process_repeats + ///If \b true then process empty lines as repeat

[Lldb-commits] [lldb] Add AllowRepeats to SBCommandInterpreterRunOptions. (PR #94786)

2024-06-07 Thread via lldb-commits
@@ -93,15 +93,20 @@ class CommandInterpreterRunOptions { /// \param[in] add_to_history ///If \b true add the commands to the command history. If \b false, don't ///add them. + /// \param[in] process_repeats + ///If \b true then process empty lines as repeat

[Lldb-commits] [clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-07 Thread Artem Yurchenko via lldb-commits
temyurchenko wrote: > Hmm... I don't have a great idea. Is using it not enough to get it to be > emitted? I see here we don't seem to cause them to be emitted: > https://godbolt.org/z/nYzMca7Te Yes, I get the same result. I also tried adding a test in `DeclPrinterTest`, but it doesn't lookup

[Lldb-commits] [clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-07 Thread Erich Keane via lldb-commits
erichkeane wrote: > > I see the 2nds commit doesn't add any tests! Please make it do so > > I've tried and I'm not quite sure how to do it. The issue is we need to test > AST printing of «implicitly declared» functions, such as builtins and > functions instrumented by lldb, such as `log` for l

[Lldb-commits] [lldb] Add AllowRepeats to SBCommandInterpreterRunOptions. (PR #94786)

2024-06-07 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben edited https://github.com/llvm/llvm-project/pull/94786 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add AllowRepeats to SBCommandInterpreterRunOptions. (PR #94786)

2024-06-07 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben approved this pull request. LGTM with nit. https://github.com/llvm/llvm-project/pull/94786 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add AllowRepeats to SBCommandInterpreterRunOptions. (PR #94786)

2024-06-07 Thread Med Ismail Bennani via lldb-commits
@@ -93,15 +93,20 @@ class CommandInterpreterRunOptions { /// \param[in] add_to_history ///If \b true add the commands to the command history. If \b false, don't ///add them. + /// \param[in] process_repeats + ///If \b true then process empty lines as repeat

[Lldb-commits] [clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-07 Thread Artem Yurchenko via lldb-commits
https://github.com/temyurchenko updated https://github.com/llvm/llvm-project/pull/93913 >From a54036c0fdc1a875f40a274d502dd96651a35ae3 Mon Sep 17 00:00:00 2001 From: Artem Yurchenko Date: Thu, 6 Jun 2024 20:20:19 -0400 Subject: [PATCH] enforce the unbraced `extern ` invariant Quoting 9.11.8: >

[Lldb-commits] [clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-07 Thread Artem Yurchenko via lldb-commits
temyurchenko wrote: > I see the 2nds commit doesn't add any tests! Please make it do so I've tried and I'm not quite sure how to do it. The issue is we need to test AST printing of «implicitly declared» functions, such as builtins and functions instrumented by lldb, such as `log` for logging;

[Lldb-commits] [lldb] Add AllowRepeats to SBCommandInterpreterRunOptions. (PR #94786)

2024-06-07 Thread via lldb-commits
https://github.com/jimingham updated https://github.com/llvm/llvm-project/pull/94786 >From bcd8c81c5fbc249886c53d8a2d1bc21a3f9e1ffd Mon Sep 17 00:00:00 2001 From: Jim Ingham Date: Fri, 7 Jun 2024 11:17:26 -0700 Subject: [PATCH 1/2] Add AllowRepeats to SBCommandInterpreterRunOptions. This is us

[Lldb-commits] [lldb] Add AllowRepeats to SBCommandInterpreterRunOptions. (PR #94786)

2024-06-07 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 b653357141030620ce3e70ea939efbcb71d40657...bcd8c81c5fbc249886c53d8a2d1bc21a3f9e1ffd lldb/

[Lldb-commits] [lldb] Add AllowRepeats to SBCommandInterpreterRunOptions. (PR #94786)

2024-06-07 Thread via lldb-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff b653357141030620ce3e70ea939efbcb71d40657 bcd8c81c5fbc249886c53d8a2d1bc21a3f9e1ffd --

[Lldb-commits] [lldb] Add AllowRepeats to SBCommandInterpreterRunOptions. (PR #94786)

2024-06-07 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: None (jimingham) Changes This is useful if you have a transcript of a user session and want to rerun those commands with RunCommandInterpreter. The same functionality is also useful in testing. I'm adding it primarily for the second reas

[Lldb-commits] [lldb] Add AllowRepeats to SBCommandInterpreterRunOptions. (PR #94786)

2024-06-07 Thread via lldb-commits
https://github.com/jimingham created https://github.com/llvm/llvm-project/pull/94786 This is useful if you have a transcript of a user session and want to rerun those commands with RunCommandInterpreter. The same functionality is also useful in testing. I'm adding it primarily for the second

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

2024-06-07 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl 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] [NFC] Fix a cppcheck warning in lldb/source/Utility/Scalar.cpp (PR #94775)

2024-06-07 Thread Shivam Gupta via lldb-commits
xgupta wrote: > The change LGTM, but I have a few suggestions regarding the title and > description: > > * Retitle the PR to something like "[lldb] Remove dead code block (NFC)" > or something that conveys the intent/outcome. The modified file and line > number are already part of the com

  1   2   >