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

2024-06-26 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben edited https://github.com/llvm/llvm-project/pull/94823 ___ 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-26 Thread Med Ismail Bennani via lldb-commits
@@ -1827,6 +1838,15 @@ class CommandObjectScriptingObjectParsed : public CommandObjectParsed { ScriptedCommandSynchronicity GetSynchronicity() { return m_synchro; } + std::optional GetRepeatCommand(Args &args, + uint32_t index)

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

2024-06-26 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben approved this pull request. LGTM with nits https://github.com/llvm/llvm-project/pull/94823 ___ 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-26 Thread Med Ismail Bennani via lldb-commits
@@ -32,6 +37,39 @@ def check_help_options(self, cmd_name, opt_list, substrs=[]): print(f"Opt Vec\n{substrs}") self.expect("help " + cmd_name, substrs=substrs) +def run_one_repeat(self, commands, expected_num_errors): +with open(self.stdin_path, "w")

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

2024-06-26 Thread Med Ismail Bennani via lldb-commits
@@ -831,6 +831,29 @@ bool lldb_private::python::SWIGBridge::LLDBSwigPythonCallCommandObject( return true; } +std::optional +lldb_private::python::SWIGBridge::LLDBSwigPythonGetRepeatCommandForScriptedCommand(PyObject *implementor, +

[Lldb-commits] [lldb] [lldb] Do not produce field information for registers known not to exist (PR #95125)

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

[Lldb-commits] [lldb] [lldb] Make use of Scripted{Python, }Interface for ScriptedThreadPlan (#70392) (PR #96868)

2024-06-27 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben created https://github.com/llvm/llvm-project/pull/96868 This patch makes ScriptedThreadPlan conforming to the ScriptedInterface & ScriptedPythonInterface facilities by introducing 2 ScriptedThreadPlanInterface & ScriptedThreadPlanPythonInterface classes. This a

[Lldb-commits] [lldb] [lldb] Make use of Scripted{Python, }Interface for ScriptedThreadPlan (#70392) (PR #96868)

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

[Lldb-commits] [lldb] [lldb/test] Mark TestStepScripted.py as XFAIL temporarily (PR #96894)

2024-06-27 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben created https://github.com/llvm/llvm-project/pull/96894 After landing 9a9ec228cdcf, some of the `TestStepScripted.py` methods started failing on various bots: - https://lab.llvm.org/buildbot/#/builders/162/builds/851 - https://lab.llvm.org/buildbot/#/builders/59

[Lldb-commits] [lldb] [lldb/test] Mark TestStepScripted.py as XFAIL temporarily (PR #96894)

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

[Lldb-commits] [lldb] [lldb/test] Mark TestStepScripted.py as XFAIL temporarily (PR #96894)

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

[Lldb-commits] [lldb] Revert "[lldb/test] Mark TestStepScripted.py as XFAIL temporarily (#96894)" (PR #96942)

2024-06-27 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben created https://github.com/llvm/llvm-project/pull/96942 This tentatively reverts commit 204c403b5215197ecdbdb68ca7f11402d6d9892b to remove the XFAIL from the tests while also trying to fix them at the same time. >From 56392162f1a573570d280bebe905347069d9ea54 Mon

[Lldb-commits] [lldb] Revert "[lldb/test] Mark TestStepScripted.py as XFAIL temporarily (#96894)" (PR #96942)

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

[Lldb-commits] [lldb] [clang] Fix incomplete umbrella warnings when building clang modules (NFC) (PR #96939)

2024-06-27 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben updated https://github.com/llvm/llvm-project/pull/96939 >From 56392162f1a573570d280bebe905347069d9ea54 Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Thu, 27 Jun 2024 10:53:24 -0700 Subject: [PATCH] Revert "[lldb/test] Mark TestStepScripted.py as XFAIL

[Lldb-commits] [lldb] Revert "Revert "[lldb/test] Mark TestStepScripted.py as XFAIL temporarily (#96894)"" (PR #96946)

2024-06-27 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben created https://github.com/llvm/llvm-project/pull/96946 Reverts llvm/llvm-project#96942 since the test failures are still happening: https://lab.llvm.org/buildbot/#/builders/162/builds/899/ >From 148a109bcd1592032bdda31694717bbeef5a976d Mon Sep 17 00:00:00 2001

[Lldb-commits] [lldb] Revert "Revert "[lldb/test] Mark TestStepScripted.py as XFAIL temporarily (#96894)"" (PR #96946)

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

[Lldb-commits] [lldb] [lldb/Interpreter] Discard ScriptedThreadPlan::GetStopDescription return value (PR #96985)

2024-06-27 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben created https://github.com/llvm/llvm-project/pull/96985 This patch changes `ScriptedThreadPlan::GetStopDescription` behaviour by discarding its return value since it is optional in the first place (i.e. the user doesn't need to provide a return value in their im

[Lldb-commits] [lldb] [lldb/Interpreter] Discard ScriptedThreadPlan::GetStopDescription return value (PR #96985)

2024-06-28 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben updated https://github.com/llvm/llvm-project/pull/96985 >From 5636039087cccad8cddcb2ea48d048a669c80ed7 Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Thu, 27 Jun 2024 16:30:58 -0700 Subject: [PATCH 1/2] [lldb/Interpreter] Discard ScriptedThreadPlan::Get

[Lldb-commits] [lldb] [lldb/Interpreter] Discard ScriptedThreadPlan::GetStopDescription return value (PR #96985)

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

[Lldb-commits] [lldb] [lldb/Interpreter] Discard ScriptedThreadPlan::GetStopDescription return value (PR #96985)

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

[Lldb-commits] [lldb] [lldb/Interpreter] Discard ScriptedThreadPlan::GetStopDescription return value (PR #96985)

2024-06-28 Thread Med Ismail Bennani via lldb-commits
@@ -106,10 +106,13 @@ ScriptInterpreter::GetOpaqueTypeFromSBEvent(const lldb::SBEvent &event) const { return event.m_opaque_ptr; } -Stream *ScriptInterpreter::GetOpaqueTypeFromSBStream( +lldb::StreamSP ScriptInterpreter::GetOpaqueTypeFromSBStream( const lldb::SBStream

[Lldb-commits] [lldb] [lldb][test] Remove duplicate testcase names in API test-suite (PR #97043)

2024-06-28 Thread Med Ismail Bennani via lldb-commits
medismailben wrote: > > LGTM. This has definitely come up in the past. If you feel motivated, I'm > > sure there must be a way to detect this issue in Python and we could have > > assert/warning/error that captures this at the dotest level. > > Agreed, making it part of `dotest` would be amazi

[Lldb-commits] [lldb] Reland "[lldb/Interpreter] Discard ScriptedThreadPlan::GetStopDescription return value (#96985)" (PR #97092)

2024-06-28 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben created https://github.com/llvm/llvm-project/pull/97092 This reverts commit a2e3af5d581547d3ea53e5383d6f7f1cab45120a and solves the build error in https://lab.llvm.org/buildbot/#/builders/141/builds/369. >From dfb2b17c32a22b970f8d4fbadc3ddb07a219e992 Mon Sep 17

[Lldb-commits] [lldb] Reland "[lldb/Interpreter] Discard ScriptedThreadPlan::GetStopDescription return value (#96985)" (PR #97092)

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

[Lldb-commits] [lldb] [lldb][test] Remove duplicate testcase names in API test-suite (PR #97043)

2024-06-28 Thread Med Ismail Bennani via lldb-commits
medismailben wrote: > > > > LGTM. This has definitely come up in the past. If you feel motivated, > > > > I'm sure there must be a way to detect this issue in Python and we > > > > could have assert/warning/error that captures this at the dotest level. > > > > > > > > > Agreed, making it part

[Lldb-commits] [lldb] [lldb/docs] Add scripting extensions documentation to the website (PR #97262)

2024-07-01 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben created https://github.com/llvm/llvm-project/pull/97262 This patch adds the documentation for a subset of scripting extensions such as scripted process, scripted thread, operating system threads & scritped thread plans to the lldb website. >From b6594ad486dba72

[Lldb-commits] [lldb] [lldb/docs] Add scripting extensions documentation to the website (PR #97262)

2024-07-01 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben updated https://github.com/llvm/llvm-project/pull/97262 >From b11dd597afcb0e46b58148b5ec0131708beadb5d Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Mon, 1 Jul 2024 00:39:40 -0700 Subject: [PATCH] [lldb/docs] Add scripting extensions documentation to th

[Lldb-commits] [lldb] [lldb/Commands] Alias `script` command to `scripting execute` (PR #97263)

2024-07-01 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben created https://github.com/llvm/llvm-project/pull/97263 This patch introduces a new top-level `scripting` command with an `execute` sub-command, that basically replaces the `script` raw command. To avoid breaking the `script` command usages, this patch also adds

[Lldb-commits] [lldb] [lldb/Commands] Add `scripting template list` command with auto discovery (PR #97273)

2024-07-01 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben created https://github.com/llvm/llvm-project/pull/97273 This patch introduces a new `template` multiword sub-command to the `scripting` top-level command. As the name suggests, this sub-command operates on scripting templates, and currently has the ability to auto

[Lldb-commits] [lldb] [lldb/Commands] Add `scripting template list` command with auto discovery (PR #97273)

2024-07-01 Thread Med Ismail Bennani via lldb-commits
medismailben wrote: Depends on #97263 https://github.com/llvm/llvm-project/pull/97273 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb/Commands] Alias `script` command to `scripting execute` (PR #97263)

2024-07-01 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben updated https://github.com/llvm/llvm-project/pull/97263 >From 1f3d0498ccedc4c8adef01d44c29be8b1a78b133 Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Mon, 1 Jul 2024 11:53:49 -0700 Subject: [PATCH] [lldb/Commands] Alias `script` command to `scripting exe

[Lldb-commits] [lldb] [lldb/Commands] Alias `script` command to `scripting execute` (PR #97263)

2024-07-01 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben updated https://github.com/llvm/llvm-project/pull/97263 >From 8e016c7aa66c4d5f7a90b5dc05b05c1838919177 Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Mon, 1 Jul 2024 12:00:04 -0700 Subject: [PATCH] [lldb/Commands] Alias `script` command to `scripting exe

[Lldb-commits] [lldb] [lldb/Commands] Add `scripting template list` command with auto discovery (PR #97273)

2024-07-01 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben updated https://github.com/llvm/llvm-project/pull/97273 >From 8e016c7aa66c4d5f7a90b5dc05b05c1838919177 Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Mon, 1 Jul 2024 12:00:04 -0700 Subject: [PATCH 1/2] [lldb/Commands] Alias `script` command to `scripting

[Lldb-commits] [lldb] [lldb/Commands] Alias `script` command to `scripting execute` (PR #97263)

2024-07-01 Thread Med Ismail Bennani via lldb-commits
@@ -518,6 +518,15 @@ void CommandInterpreter::Initialize() { AddAlias("re", cmd_obj_sp); } + cmd_obj_sp = GetCommandSPExact("scripting execute"); + if (cmd_obj_sp) { +AddAlias("sc", cmd_obj_sp); +AddAlias("scr", cmd_obj_sp); +AddAlias("scri", cmd_obj_sp); +

[Lldb-commits] [lldb] [lldb/Commands] Alias `script` command to `scripting execute` (PR #97263)

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

[Lldb-commits] [lldb] [lldb/docs] Add scripting extensions documentation to the website (PR #97262)

2024-07-01 Thread Med Ismail Bennani via lldb-commits
@@ -0,0 +1,70 @@ +from abc import abstractmethod + +import lldb + + +class ScriptedThreadPlan: +""" +Class that provides data for an instance of a LLDB 'ScriptedThreadPlan' plug-in class used to construct custom stepping logic. + +""" + +def __init__(self, thread_

[Lldb-commits] [lldb] [lldb/Commands] Alias `script` command to `scripting execute` (PR #97263)

2024-07-01 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben updated https://github.com/llvm/llvm-project/pull/97263 >From b9eba8c81b342d038f0ca6cb40f2390225c3770f Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Mon, 1 Jul 2024 20:45:34 -0700 Subject: [PATCH] [lldb/Commands] Alias `script` command to `scripting run

[Lldb-commits] [lldb] [lldb/Commands] Alias `script` command to `scripting execute` (PR #97263)

2024-07-01 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben updated https://github.com/llvm/llvm-project/pull/97263 >From 47344cbd1ae8a43eab1b845f893cc04114eeaa35 Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Mon, 1 Jul 2024 20:51:35 -0700 Subject: [PATCH] [lldb/Commands] Alias `script` command to `scripting run

[Lldb-commits] [lldb] [lldb/Commands] Alias `script` command to `scripting run` (PR #97263)

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

[Lldb-commits] [lldb] [lldb/Commands] Alias `script` command to `scripting run` (PR #97263)

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

[Lldb-commits] [lldb] [lldb/Commands] Alias `script` command to `scripting run` (PR #97263)

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

[Lldb-commits] [lldb] [lldb/Commands] Add `scripting template list` command with auto discovery (PR #97273)

2024-07-01 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben updated https://github.com/llvm/llvm-project/pull/97273 >From 828d8e8c35eb5a3d0886c5d331a8a4aa466c2324 Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Mon, 1 Jul 2024 22:07:49 -0700 Subject: [PATCH] [lldb/Commands] Add `scripting template list` command wi

[Lldb-commits] [lldb] [lldb/Commands] Alias `script` command to `scripting run` (PR #97263)

2024-07-01 Thread Med Ismail Bennani via lldb-commits
medismailben wrote: > LLVM Buildbot has detected a new failure on builder `lldb-aarch64-windows` > running on `linaro-armv8-windows-msvc-05` while building `lldb` at step 6 > "test". > > Full details are available at: > https://lab.llvm.org/buildbot/#/builders/141/builds/425 > > Here is the

[Lldb-commits] [lldb] [lldb/docs] Add scripting extensions documentation to the website (PR #97262)

2024-07-02 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben updated https://github.com/llvm/llvm-project/pull/97262 >From e08689b3e2482305755b56e4029f201fcf7af05b Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Tue, 2 Jul 2024 00:26:41 -0700 Subject: [PATCH] [lldb/docs] Add scripting extensions documentation to th

[Lldb-commits] [lldb] [lldb/Commands] Alias `script` command to `scripting run` (PR #97263)

2024-07-02 Thread Med Ismail Bennani via lldb-commits
medismailben wrote: > > The problem with this command is that it either executes a script given to > > it on the command line, or it runs the embedded script interpreter... > > > > I don't see the problem. The original `script` does both of those things, and > `run` fits those two use case a

[Lldb-commits] [lldb] [lldb/docs] Add scripting extensions documentation to the website (PR #97262)

2024-07-02 Thread Med Ismail Bennani via lldb-commits
@@ -10,9 +10,6 @@ class ScriptedPlatform(metaclass=ABCMeta): Most of the base class methods are `@abstractmethod` that need to be overwritten by the inheriting class. - -DISCLAIMER: THIS INTERFACE IS STILL UNDER DEVELOPMENT AND NOT STABLE. -THE METH

[Lldb-commits] [lldb] [lldb/docs] Add scripting extensions documentation to the website (PR #97262)

2024-07-02 Thread Med Ismail Bennani via lldb-commits
@@ -0,0 +1,36 @@ +Python Extensions += + +LLDB provides many scriptable extensions to augment the debugger capabilities +and give the ability to the user to tailor their experience to their own needs. + +This page describes some of these scripting extension: + +Ope

[Lldb-commits] [lldb] [lldb/docs] Add scripting extensions documentation to the website (PR #97262)

2024-07-02 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben updated https://github.com/llvm/llvm-project/pull/97262 >From 06a79c19a169fa6b8bed30bde37b7ee56ade5cef Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Tue, 2 Jul 2024 12:47:50 -0700 Subject: [PATCH] [lldb/docs] Add scripting extensions documentation to th

[Lldb-commits] [lldb] [lldb/docs] Add scripting extensions documentation to the website (PR #97262)

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

[Lldb-commits] [lldb] [lldb] Add scripted thread plan python base class to lldb & website (PR #97481)

2024-07-02 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben created https://github.com/llvm/llvm-project/pull/97481 Following a feedback request in #97262, I took out the scripted thread plan python base class from it and make a separate PR for it. This patch adds the scripted thread plan base python class to the lldb py

[Lldb-commits] [lldb] [lldb] Add scripted thread plan python base class to lldb & website (PR #97481)

2024-07-02 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben closed https://github.com/llvm/llvm-project/pull/97481 ___ 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-07-02 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/94823 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb/Commands] Add `scripting template list` command with auto discovery (PR #97273)

2024-07-02 Thread Med Ismail Bennani via lldb-commits
@@ -127,6 +130,171 @@ class CommandObjectScriptingRun : public CommandObjectRaw { CommandOptions m_options; }; +#pragma mark CommandObjectScriptingTemplateList + +#define LLDB_OPTIONS_scripting_template_list +#include "CommandOptions.inc" + +class CommandObjectScriptingTemp

[Lldb-commits] [lldb] [lldb/Commands] Add `scripting template list` command with auto discovery (PR #97273)

2024-07-02 Thread Med Ismail Bennani via lldb-commits
@@ -127,6 +130,171 @@ class CommandObjectScriptingRun : public CommandObjectRaw { CommandOptions m_options; }; +#pragma mark CommandObjectScriptingTemplateList + +#define LLDB_OPTIONS_scripting_template_list +#include "CommandOptions.inc" + +class CommandObjectScriptingTemp

[Lldb-commits] [lldb] [lldb/Commands] Add `scripting template list` command with auto discovery (PR #97273)

2024-07-02 Thread Med Ismail Bennani via lldb-commits
@@ -127,6 +130,171 @@ class CommandObjectScriptingRun : public CommandObjectRaw { CommandOptions m_options; }; +#pragma mark CommandObjectScriptingTemplateList + +#define LLDB_OPTIONS_scripting_template_list +#include "CommandOptions.inc" + +class CommandObjectScriptingTemp

[Lldb-commits] [lldb] [lldb/Commands] Add `scripting template list` command with auto discovery (PR #97273)

2024-07-02 Thread Med Ismail Bennani via lldb-commits
medismailben wrote: FWIW, this is the output it's producing for now: ``` (lldb) scripting template list Available scripted affordances: Name: ScriptedProcessPythonInterface Language: Python Description: Mock process state Command Interpreter Usages: process attach -C [-k key -v valu

[Lldb-commits] [lldb] [lldb/Commands] Add `scripting template list` command with auto discovery (PR #97273)

2024-07-02 Thread Med Ismail Bennani via lldb-commits
@@ -29,6 +29,9 @@ add_subdirectory(UnwindAssembly) set(LLDB_STRIPPED_PLUGINS) get_property(LLDB_ALL_PLUGINS GLOBAL PROPERTY LLDB_PLUGINS) +get_property(LLDB_EXTRA_PLUGINS GLOBAL PROPERTY LLDB_EXTRA_SCRIPT_PLUGINS) +list(APPEND LLDB_ALL_PLUGINS ${LLDB_EXTRA_PLUGINS}) --

[Lldb-commits] [lldb] [lldb/Commands] Add `scripting template list` command with auto discovery (PR #97273)

2024-07-02 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben updated https://github.com/llvm/llvm-project/pull/97273 >From c475dcf4e57fbbaa0bc50da5103f1eb3a273e83a Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Tue, 2 Jul 2024 21:31:21 -0700 Subject: [PATCH] [lldb/Commands] Add `scripting template list` command wi

[Lldb-commits] [lldb] [lldb/Commands] Add `scripting template list` command with auto discovery (PR #97273)

2024-07-02 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben updated https://github.com/llvm/llvm-project/pull/97273 >From 54e2299fead40dba247c65ea4974a550843a9b6d Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Tue, 2 Jul 2024 21:42:49 -0700 Subject: [PATCH] [lldb/Commands] Add `scripting template list` command wi

[Lldb-commits] [lldb] [lldb/Commands] Add `scripting template list` command with auto discovery (PR #97273)

2024-07-02 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben updated https://github.com/llvm/llvm-project/pull/97273 >From bfffecd229e695e2f5b63e704e917a3585826b55 Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Tue, 2 Jul 2024 21:57:48 -0700 Subject: [PATCH] [lldb/Commands] Add `scripting template list` command wi

[Lldb-commits] [lldb] [lldb] Remove Listener::SetShadow (PR #97555)

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

[Lldb-commits] [lldb] [lldb/Commands] Alias `script` command to `scripting run` (PR #97263)

2024-07-03 Thread Med Ismail Bennani via lldb-commits
medismailben wrote: > The reason behind this change is to have a top-level command that will cover > scripting related subcommands. >From @jimingham reply: Which other scripting subcommands do you envision, besides the [template](https://github.com/llvm/llvm-project/pull/97273) subcommand?

[Lldb-commits] [lldb] [lldb/Commands] Add `scripting template list` command with auto discovery (PR #97273)

2024-07-05 Thread Med Ismail Bennani via lldb-commits
@@ -19,6 +19,12 @@ if (LLDB_ENABLE_LIBEDIT) list(APPEND LLDB_LIBEDIT_LIBS LibEdit::LibEdit) endif() +set_property(GLOBAL PROPERTY LLDB_EXTRA_SCRIPT_PLUGINS + lldbPluginOperatingSystemPythonInterface + lldbPluginScriptedProcessPythonInterface + lldbPluginScriptedThreadPlan

[Lldb-commits] [lldb] Private process events were being delivered to the secondary listener (PR #98571)

2024-07-12 Thread Med Ismail Bennani via lldb-commits
@@ -4248,7 +4248,21 @@ bool Process::ProcessEventData::ShouldStop(Event *event_ptr, return still_should_stop; } +bool Process::ProcessEventData::ForwardEventToPendingListeners(Event *event_ptr) { + // STDIO and the other async event notifications should always be forwarde

[Lldb-commits] [lldb] Private process events were being delivered to the secondary listener (PR #98571)

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

[Lldb-commits] [lldb] [lldb] progressive progress reporting for darwin kernel/firmware (PR #98845)

2024-07-14 Thread Med Ismail Bennani via lldb-commits
medismailben wrote: > The one thing I was uncertain of is when I load kexts -- I have a known > number of kexts that I will be attempting to load -- and I wasn't sure if I > should log them individually as they happen (what I did), or if I should > initialize a progress category with the numbe

[Lldb-commits] [lldb] [lldb/Symbol] Hoist SymbolLocation from AssertFrameRecognizer to reuse it (PR #98975)

2024-07-15 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben created https://github.com/llvm/llvm-project/pull/98975 This patch hoists the `SymbolLocation` struct from the `AssertFrameRecognizer` source file, since it's pretty generic and could be reused for other purposes. >From d22b491ab6557e4d53ed722a46de58ff126af4a6 M

[Lldb-commits] [lldb] [lldb/Symbol] Hoist SymbolLocation from AssertFrameRecognizer to reuse it (PR #98975)

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

[Lldb-commits] [lldb] [lldb/Commands] Add `scripting template list` command with auto discovery (PR #97273)

2024-07-17 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben updated https://github.com/llvm/llvm-project/pull/97273 >From d812b8067d622b84af2ee62b837b87cb4479a477 Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Wed, 17 Jul 2024 02:21:21 -0700 Subject: [PATCH] [lldb/Commands] Add `scripting template list` command w

[Lldb-commits] [lldb] [lldb/Target] Add GetStartSymbol method to DynamicLoader plugins (PR #99673)

2024-07-19 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben created https://github.com/llvm/llvm-project/pull/99673 This patch introduces a new method to the dynamic loader plugin, to fetch its `start` symbol. This can be useful to resolve the `start` symbol address for instance. >From 2e3064b3f1af9ea5b4930cf3fd87c9f48f

[Lldb-commits] [lldb] [lldb/Target] Add GetStartSymbol method to DynamicLoader plugins (PR #99673)

2024-07-19 Thread Med Ismail Bennani via lldb-commits
@@ -329,6 +330,11 @@ class DynamicLoader : public PluginInterface { /// safe to call certain APIs or SPIs. virtual bool IsFullyInitialized() { return true; } + /// Return the `start` function \b symbol in the dynamic loader module. + virtual llvm::Expected GetStartSymbol

[Lldb-commits] [lldb] [lldb/Target] Add GetStartSymbol method to DynamicLoader plugins (PR #99673)

2024-07-19 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben updated https://github.com/llvm/llvm-project/pull/99673 >From 16ef7297eef25d329631fd62d126bf7a7be24c4d Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Fri, 19 Jul 2024 11:08:39 -0700 Subject: [PATCH] [lldb/Target] Add GetStartSymbol method to DynamicLoade

[Lldb-commits] [lldb] [lldb/Target] Add GetStartSymbol method to DynamicLoader plugins (PR #99673)

2024-07-19 Thread Med Ismail Bennani via lldb-commits
@@ -10,9 +10,11 @@ #define LLDB_TARGET_DYNAMICLOADER_H #include "lldb/Core/PluginInterface.h" +#include "lldb/Symbol/Symbol.h" #include "lldb/Utility/FileSpec.h" #include "lldb/Utility/Status.h" #include "lldb/Utility/UUID.h" +#include "lldb/Utility/UnimplementedError.h" --

[Lldb-commits] [lldb] [lldb/Target] Add GetStartSymbol method to DynamicLoader plugins (PR #99673)

2024-07-19 Thread Med Ismail Bennani via lldb-commits
@@ -10,9 +10,11 @@ #define LLDB_TARGET_DYNAMICLOADER_H #include "lldb/Core/PluginInterface.h" +#include "lldb/Symbol/Symbol.h" #include "lldb/Utility/FileSpec.h" #include "lldb/Utility/Status.h" #include "lldb/Utility/UUID.h" +#include "lldb/Utility/UnimplementedError.h" --

[Lldb-commits] [lldb] [lldb/Target] Add GetStartSymbol method to DynamicLoader plugins (PR #99673)

2024-07-19 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben updated https://github.com/llvm/llvm-project/pull/99673 >From 16ef7297eef25d329631fd62d126bf7a7be24c4d Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Fri, 19 Jul 2024 11:08:39 -0700 Subject: [PATCH 1/2] [lldb/Target] Add GetStartSymbol method to DynamicL

[Lldb-commits] [lldb] [lldb/Target] Add GetStartSymbol method to DynamicLoader plugins (PR #99673)

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

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #99736)

2024-07-19 Thread Med Ismail Bennani via lldb-commits
@@ -0,0 +1,12 @@ +static void start_recording() {} + +static void trigger_breakpoint() {} + +static void stop_recording() {} medismailben wrote: It would be nice to add some sample code in each of these functions to test of lldb behaves with things like variable

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #99736)

2024-07-19 Thread Med Ismail Bennani via lldb-commits
@@ -1395,6 +1395,91 @@ Status ProcessGDBRemote::DoResume() { return error; } +Status ProcessGDBRemote::DoResumeReverse() { + Status error; + Log *log = GetLog(GDBRLog::Process); + LLDB_LOGF(log, "ProcessGDBRemote::DoResumeReverse()"); + + ListenerSP listener_sp( + L

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #99736)

2024-07-19 Thread Med Ismail Bennani via lldb-commits
@@ -1881,18 +1970,24 @@ ThreadSP ProcessGDBRemote::SetThreadStopInfo( handled = true; } } else if (!signo) { -addr_t pc = thread_sp->GetRegisterContext()->GetPC(); -lldb::BreakpointSiteSP bp_site_sp = -thread_sp->GetProcess()-

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #99736)

2024-07-19 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben commented: This is very interesting, I've left a few comments here and there but I've noticed you didn't check if this works both when the debugger is in synchronous and asynchronous in your tests. This is definitely something you want to exercise since it chang

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #99736)

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

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #99736)

2024-07-19 Thread Med Ismail Bennani via lldb-commits
@@ -0,0 +1,79 @@ +import lldb +import unittest +from lldbsuite.test.lldbtest import * +from lldbsuite.test.decorators import * +from lldbsuite.test.gdbclientutils import * +from lldbsuite.test.lldbreverse import ReverseTestBase +from lldbsuite.test import lldbutil + + +class TestR

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #99736)

2024-07-19 Thread Med Ismail Bennani via lldb-commits
@@ -0,0 +1,79 @@ +import lldb +import unittest +from lldbsuite.test.lldbtest import * +from lldbsuite.test.decorators import * +from lldbsuite.test.gdbclientutils import * +from lldbsuite.test.lldbreverse import ReverseTestBase +from lldbsuite.test import lldbutil + + +class TestR

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #99736)

2024-07-19 Thread Med Ismail Bennani via lldb-commits
@@ -0,0 +1,415 @@ +import os +import os.path +import lldb +from lldbsuite.test.lldbtest import * +from lldbsuite.test.gdbclientutils import * +from lldbsuite.test.lldbgdbproxy import * +import lldbgdbserverutils +import re + + +class ThreadSnapshot: +def __init__(self, thread_

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #99736)

2024-07-19 Thread Med Ismail Bennani via lldb-commits
@@ -0,0 +1,79 @@ +import lldb +import unittest +from lldbsuite.test.lldbtest import * +from lldbsuite.test.decorators import * +from lldbsuite.test.gdbclientutils import * +from lldbsuite.test.lldbreverse import ReverseTestBase +from lldbsuite.test import lldbutil + + +class TestR

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #99736)

2024-07-19 Thread Med Ismail Bennani via lldb-commits
@@ -0,0 +1,176 @@ +import logging +import os +import os.path +import random + +import lldb +from lldbsuite.test.lldbtest import * +from lldbsuite.test.gdbclientutils import * +import lldbgdbserverutils +from lldbsuite.support import seven + + +class GDBProxyTestBase(TestBase): ---

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #99736)

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

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #99736)

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

[Lldb-commits] [lldb] [lldb/Commands] Add `scripting template list` command with auto discovery (PR #97273)

2024-07-20 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben updated https://github.com/llvm/llvm-project/pull/97273 >From 16ef7297eef25d329631fd62d126bf7a7be24c4d Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Fri, 19 Jul 2024 11:08:39 -0700 Subject: [PATCH 1/2] [lldb/Target] Add GetStartSymbol method to DynamicL

[Lldb-commits] [lldb] [lldb/Plugins] Introduce Scripted Platform Plugin (PR #99814)

2024-07-21 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben created https://github.com/llvm/llvm-project/pull/99814 This patch introduces Scripted Platform, a new platform plugin that can be customized with a python script. For now this can list processes described in the python script file but eventually, it will be us

[Lldb-commits] [lldb] [lldb/Plugins] Introduce Scripted Platform Plugin (PR #99814)

2024-07-21 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben updated https://github.com/llvm/llvm-project/pull/99814 >From 8008a0a3de1666580e6cf328b8f34e6f3db00856 Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Sun, 21 Jul 2024 11:16:30 -0700 Subject: [PATCH] [lldb/Plugins] Introduce Scripted Platform Plugin This

[Lldb-commits] [lldb] [lldb/Plugins] Introduce Scripted Platform Plugin (PR #99814)

2024-07-21 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben updated https://github.com/llvm/llvm-project/pull/99814 >From f236a764734facb1aa7c48f855f70d56f225a054 Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Sun, 21 Jul 2024 16:44:41 -0700 Subject: [PATCH] [lldb/Plugins] Introduce Scripted Platform Plugin This

[Lldb-commits] [lldb] [lldb] Change GetStartSymbol to GetStartAddress in DynamicLoader (PR #99909)

2024-07-22 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben created https://github.com/llvm/llvm-project/pull/99909 On linux, the start address doesn't necessarily have a symbol attached to it. This is why this patch replaces `DynamicLoader::GetStartSymbol` with `DynamicLoader::GetStartAddress` instead. >From f74357959a

[Lldb-commits] [lldb] [lldb/Target] Add GetStartSymbol method to DynamicLoader plugins (PR #99673)

2024-07-22 Thread Med Ismail Bennani via lldb-commits
medismailben wrote: @labath @jimingham I've addressed your comment in https://github.com/llvm/llvm-project/pull/99909 https://github.com/llvm/llvm-project/pull/99673 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-

[Lldb-commits] [lldb] [lldb] Change GetStartSymbol to GetStartAddress in DynamicLoader (PR #99909)

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

[Lldb-commits] [lldb] [lldb] Change GetStartSymbol to GetStartAddress in DynamicLoader (PR #99909)

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

[Lldb-commits] [lldb] [lldb/Commands] Add `scripting template list` command with auto discovery (PR #97273)

2024-07-22 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben updated https://github.com/llvm/llvm-project/pull/97273 >From faa1aec645e26145467b94260df7ca3abc012f62 Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Wed, 17 Jul 2024 02:21:21 -0700 Subject: [PATCH] [lldb/Commands] Add `scripting template list` command w

[Lldb-commits] [lldb] [lldb/Commands] Add `scripting template list` command with auto discovery (PR #97273)

2024-07-22 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben updated https://github.com/llvm/llvm-project/pull/97273 >From d40b66db50800e83ef2d9a74471e031fae1d78ae Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Mon, 22 Jul 2024 13:59:50 -0700 Subject: [PATCH] [lldb/Commands] Add `scripting template list` command w

[Lldb-commits] [lldb] [lldb/Plugins] Introduce Scripted Platform Plugin (PR #99814)

2024-07-22 Thread Med Ismail Bennani via lldb-commits
@@ -299,6 +301,35 @@ SBPlatform::SBPlatform(const char *platform_name) { m_opaque_sp = Platform::Create(platform_name); } +SBPlatform::SBPlatform(const char *platform_name, const SBDebugger &debugger, + const char *script_name, const SBStructuredData &d

[Lldb-commits] [lldb] [lldb/Plugins] Introduce Scripted Platform Plugin (PR #99814)

2024-07-22 Thread Med Ismail Bennani via lldb-commits
@@ -0,0 +1,288 @@ +//===-- ScriptedPlatform.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: Ap

  1   2   3   4   5   6   7   8   9   10   >