[Lldb-commits] [PATCH] D140293: [lldb] Update custom commands to always be overrriden

2023-01-11 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added a comment. In D140293#4044524 , @JDevlieghere wrote: > LGTM. The pattern of `debugger.HandleCommand("command script add -o -c > [...]")` seems rather tedious. Would it make sense to add a wrapper to the > SBAPI that takes care of that? I thi

[Lldb-commits] [PATCH] D139250: [lldb] Add ScriptedPlatform python implementation

2023-01-11 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib marked 5 inline comments as done. mib added inline comments. Comment at: lldb/examples/python/scripted_process/scripted_platform.py:31 +def list_processes(self): +""" Get a list of processes that can be ran on the platform. + labath wrote: > mib w

[Lldb-commits] [PATCH] D139250: [lldb] Add ScriptedPlatform python implementation

2023-01-11 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib updated this revision to Diff 488485. mib marked an inline comment as done. mib added a comment. Address @labath comments: - Rephrase documentation to remove any `Scripted Process` occurrence - Add `attach_to_process` affordance to python `Scripted Platform` class CHANGES SINCE LAST ACTION

[Lldb-commits] [PATCH] D139251: [lldb/Interpreter] Introduce ScriptedPlatform{, Python}Interface

2023-01-11 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib updated this revision to Diff 488488. mib added a comment. Add `AttachToProcess` method to interface CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139251/new/ https://reviews.llvm.org/D139251 Files: lldb/include/lldb/Interpreter/ScriptInterpreter.h lldb/include/lldb/Interpreter

[Lldb-commits] [PATCH] D139945: [lldb] Add scripted process launch/attach option to platform commands

2023-01-11 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added a comment. In D139945#4011466 , @labath wrote: > In D139945#4009427 , @JDevlieghere > wrote: > >> In D139945#3999351 , @labath wrote: >> >>> For a "plugin", the

[Lldb-commits] [PATCH] D139247: [lldb/Interpreter] Make ScriptedProcessInfo more generic

2023-01-12 Thread Med Ismail Bennani via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd9f4d1b04852: [lldb/Interpreter] Make ScriptedProcessInfo more generic (authored by mib). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139247/new/ https://

[Lldb-commits] [PATCH] D139248: [lldb/Interpreter] Improve ScriptedPythonInterface::GetStatusFromMethod

2023-01-12 Thread Med Ismail Bennani via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3fbc89048517: [lldb/Interpreter] Improve ScriptedPythonInterface::GetStatusFromMethod (authored by mib). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139248

[Lldb-commits] [PATCH] D139249: [lldb] Add Debugger & ScriptedMetadata reference to Platform::CreateInstance

2023-01-12 Thread Med Ismail Bennani via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2d53527e9c64: [lldb] Add Debugger & ScriptedMetadata reference to Platform::CreateInstance (authored by mib). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[Lldb-commits] [PATCH] D139251: [lldb/Interpreter] Introduce ScriptedPlatform{, Python}Interface

2023-01-12 Thread Med Ismail Bennani via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb1256f2345f6: [lldb/Interpreter] Introduce ScriptedPlatform{,Python}Interface (authored by mib). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139251/new/ h

[Lldb-commits] [PATCH] D139250: [lldb] Add ScriptedPlatform python implementation

2023-01-12 Thread Med Ismail Bennani via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbb4ccc668889: [lldb] Add ScriptedPlatform python implementation (authored by mib). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139250/new/ https://reviews

[Lldb-commits] [PATCH] D139951: [lldb/crashlog] Refactor CrashLogParser into a Factory patern

2023-01-12 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib updated this revision to Diff 488796. mib marked 2 inline comments as done. mib edited the summary of this revision. mib added a comment. Address @kastiglione & @JDevlieghere comments: - rename the factory method to `create` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139951/new/

[Lldb-commits] [PATCH] D139951: [lldb/crashlog] Refactor CrashLogParser into a Factory pattern

2023-01-12 Thread Med Ismail Bennani via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6b26e1dad960: [lldb/crashlog] Refactor CrashLogParser into a Factory pattern (authored by mib). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139951/new/ ht

[Lldb-commits] [PATCH] D139853: [lldb/Process] Populate queues in Scripted Process

2023-01-12 Thread Med Ismail Bennani via Phabricator via lldb-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG44b81f621c41: [lldb/Process] Populate queues in Scripted Process (authored by mib). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[Lldb-commits] [PATCH] D140293: [lldb] Update custom commands to always be overrriden

2023-01-12 Thread Med Ismail Bennani via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe3930e77fc5b: [lldb] Update custom commands to always be overrriden (authored by mib). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140293/new/ https://rev

[Lldb-commits] [PATCH] D140113: [lldb] Force override when adding crashlog command

2023-01-12 Thread Med Ismail Bennani via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc3b471c0be4f: [lldb] Force override when adding crashlog command (authored by mib). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140113/new/ https://review

[Lldb-commits] [PATCH] D139484: [lldb/test] Fix data racing issue in TestStackCoreScriptedProcess

2023-01-12 Thread Med Ismail Bennani via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8f549c532927: [lldb/test] Fix data racing issue in TestStackCoreScriptedProcess (authored by mib). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139484/new/

[Lldb-commits] [PATCH] D141658: [lldb/crashlog] Make interactive mode a default & report progress on image loading

2023-01-12 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib created this revision. mib added reviewers: JDevlieghere, kastiglione, bulbazord. mib added a project: LLDB. Herald added a project: All. mib requested review of this revision. Herald added a subscriber: lldb-commits. This patch makes interactive mode as the default when using the crashlog com

[Lldb-commits] [PATCH] D141702: [lldb/crashlog] Make module loading use Scripted Process affordance

2023-01-13 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib created this revision. mib added reviewers: JDevlieghere, bulbazord. mib added a project: LLDB. Herald added a project: All. mib requested review of this revision. Herald added a subscriber: lldb-commits. This patch changes the way modules get loaded in lldb when using interactive crashlog. It

[Lldb-commits] [PATCH] D141658: [lldb/crashlog] Make interactive mode the new default

2023-01-13 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib updated this revision to Diff 489042. mib marked 2 inline comments as done. mib retitled this revision from "[lldb/crashlog] Default interactive mode & report progress on image loading" to "[lldb/crashlog] Make interactive mode the new default". mib edited the summary of this revision. mib ad

[Lldb-commits] [PATCH] D141658: [lldb/crashlog] Make interactive mode the new default

2023-01-13 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added inline comments. Comment at: lldb/examples/python/crashlog.py:1302 +print("Aborting symbolication.") +print() +option_parser.print_help() JDevlieghere wrote: > Spurious print? It doesn't look like we're printing a double newline

[Lldb-commits] [PATCH] D141702: [lldb/crashlog] Make module loading use Scripted Process affordance

2023-01-13 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib marked an inline comment as done. mib added inline comments. Comment at: lldb/examples/python/scripted_process/crashlog_scripted_process.py:34-37 +for section in image.section_infos: +if section.start_addr and section.name

[Lldb-commits] [PATCH] D141702: [lldb/crashlog] Make module loading use Scripted Process affordance

2023-01-13 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib updated this revision to Diff 489102. mib marked an inline comment as done. mib added a reviewer: jasonmolenda. mib added a comment. Address @bulbazord feedback CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141702/new/ https://reviews.llvm.org/D141702 Files: lldb/examples/python/

[Lldb-commits] [PATCH] D141702: [lldb/crashlog] Make module loading use Scripted Process affordance

2023-01-13 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib marked an inline comment as done. mib added inline comments. Comment at: lldb/examples/python/scripted_process/crashlog_scripted_process.py:34-37 +for section in image.section_infos: +if section.start_addr and section.name

[Lldb-commits] [PATCH] D141658: [lldb/crashlog] Make interactive mode the new default

2023-01-13 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib updated this revision to Diff 489151. mib marked an inline comment as not done. mib added a comment. Address @JDevlieghere comment: - Check is stdout is a tty to run in interactive mode - Remove extra return line CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141658/new/ https://rev

[Lldb-commits] [PATCH] D141702: [lldb/crashlog] Make module loading use Scripted Process affordance

2023-01-13 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib updated this revision to Diff 489152. mib added a comment. Only force symbol lookup for crashlog scripted process. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141702/new/ https://reviews.llvm.org/D141702 Files: lldb/examples/python/scripted_process/crashlog_scripted_process.py

[Lldb-commits] [PATCH] D141702: [lldb/crashlog] Make module loading use Scripted Process affordance

2023-01-17 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added a comment. ping @JDevlieghere @bulbazord :p CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141702/new/ https://reviews.llvm.org/D141702 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[Lldb-commits] [PATCH] D141702: [lldb/crashlog] Make module loading use Scripted Process affordance

2023-01-18 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added inline comments. Comment at: lldb/source/Plugins/Process/scripted/ScriptedProcess.cpp:493 if (!loaded_images_sp->ForEach(reload_image)) return ScriptedInterface::ErrorWithMessage( I'm just thinking about this but I don't see any reason not to

[Lldb-commits] [PATCH] D142059: [lldb/Plugins] Add ScriptedProcess::GetCapabilities affordance (NFC)

2023-01-18 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib created this revision. mib added reviewers: bulbazord, JDevlieghere. mib added a project: LLDB. Herald added a project: All. mib requested review of this revision. Herald added a subscriber: lldb-commits. This patch introduces a new method to the Scripted Process interface, GetCapabilities. T

[Lldb-commits] [PATCH] D142059: [lldb/Plugins] Add ScriptedProcess::GetCapabilities affordance (NFC)

2023-01-18 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib updated this revision to Diff 490301. mib added a comment. Add python docstring CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142059/new/ https://reviews.llvm.org/D142059 Files: lldb/examples/python/scripted_process/scripted_process.py lldb/include/lldb/Interpreter/ScriptedProc

[Lldb-commits] [PATCH] D142245: [lldb/swig] Remove deprecated `-py3` flag to generate bindings

2023-01-20 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib created this revision. mib added reviewers: JDevlieghere, bulbazord, LLDB. mib added a project: LLDB. Herald added a project: All. mib requested review of this revision. Herald added a subscriber: lldb-commits. This patch removes the `-py3` swig flag, to generate python3 bindings since it has

[Lldb-commits] [PATCH] D142245: [lldb/swig] Remove deprecated `-py3` flag to generate bindings

2023-01-20 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added a comment. In D142245#4069960 , @JDevlieghere wrote: > In what version of SWIG was this deprecated? We officially support SWIG 3 > and later. What happens with SWIG 3 if you omit the flag, is it a NOOP? If so > then this is fine, otherwise w

[Lldb-commits] [PATCH] D142245: [lldb/swig] Remove deprecated `-py3` flag to generate bindings

2023-01-20 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added a comment. In D142245#4070002 , @kastiglione wrote: > Looks like -py3 was marked deprecated and no-effect in 4.1. Thanks for looking it up Dave :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[Lldb-commits] [PATCH] D142245: [lldb/swig] Remove deprecated `-py3` flag to generate bindings

2023-01-20 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added inline comments. Comment at: lldb/bindings/python/CMakeLists.txt:11 -c++ -shadow -python kastiglione wrote: > Note that `-shadow` has been deprecated since 2002 and is on by default. I guess that this is a leftover from the time we

[Lldb-commits] [PATCH] D142245: [lldb/swig] Remove deprecated flags for generating bindings

2023-01-20 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib updated this revision to Diff 490983. mib retitled this revision from "[lldb/swig] Remove deprecated `-py3` flag to generate bindings" to "[lldb/swig] Remove deprecated flags for generating bindings". mib edited the summary of this revision. mib added a comment. Address @JDevlieghere & @kast

[Lldb-commits] [PATCH] D142059: [lldb/Plugins] Add ScriptedProcess::GetCapabilities affordance (NFC)

2023-01-20 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib updated this revision to Diff 490997. mib added a comment. Make small adjustments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142059/new/ https://reviews.llvm.org/D142059 Files: lldb/examples/python/scripted_process/scripted_process.py lldb/include/lldb/Interpreter/ScriptedPr

[Lldb-commits] [PATCH] D141702: [lldb/crashlog] Make module loading use Scripted Process affordance

2023-01-20 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib updated this revision to Diff 491006. mib edited the summary of this revision. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141702/new/ https://reviews.llvm.org/D141702 Files: lldb/examples/python/scripted_process/crashlog_scripted_process.py lldb/source/Plugins/Process/scripted

[Lldb-commits] [PATCH] D141702: [lldb/crashlog] Make module loading use Scripted Process affordance

2023-01-20 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib updated this revision to Diff 491007. mib added a comment. Address @JDevlieghere & @bulbazord comments - Use D142059 's ScriptedProcess::GetCapabilities to decide whether we should force symbol lookup. - Make symbol fetching parallel. CHANGES SINCE LAST A

[Lldb-commits] [PATCH] D141702: [lldb/crashlog] Make module loading use Scripted Process affordance

2023-01-20 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added inline comments. Comment at: lldb/source/Plugins/Process/scripted/ScriptedProcess.cpp:537-543 + for (size_t i = 0; i < loaded_images_sp->GetSize(); i++) +if (loaded_images_sp->GetItemAtIndexAsDictionary(i, item)) + task_group.async(fetch_symbols, item); + tas

[Lldb-commits] [PATCH] D142266: [lldb] Add PlatformMetadata for ScriptedPlatform

2023-01-20 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib created this revision. mib added reviewers: JDevlieghere, labath. mib added a project: LLDB. Herald added a project: All. mib requested review of this revision. Herald added a subscriber: lldb-commits. This patch is a less intrusive implementation of 2d53527

[Lldb-commits] [PATCH] D142266: [lldb] Add PlatformMetadata for ScriptedPlatform

2023-01-24 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added a comment. Friendly reminding @labath @JDevlieghere Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142266/new/ https://reviews.llvm.org/D142266 ___ lldb-commits mailing list lldb-commits@lists.l

[Lldb-commits] [PATCH] D142662: Allow bytes-only mach-o corefile to load into lldb

2023-01-26 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib accepted this revision. mib added a comment. This revision is now accepted and ready to land. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142662/new/ https://reviews.llvm.org/D142662 ___ lldb

[Lldb-commits] [PATCH] D142926: [lldb][RFC] Replace SB swig interfaces with API headers

2023-01-30 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added a comment. I'm very excited about this :) ! We've already discussed that offline but it would be nice if we could use Doxygen comments in the header files to generate the python Docstrings (I'm pretty sure SWIG supports it). Then, for python specific comments, we would have a separate

[Lldb-commits] [PATCH] D142245: [lldb/swig] Remove deprecated flags for generating bindings

2023-01-30 Thread Med Ismail Bennani via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8520b0fc59c0: [lldb/swig] Remove deprecated flags for generating bindings (authored by mib). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142245/new/ https

[Lldb-commits] [PATCH] D141702: [lldb/crashlog] Make module loading use Scripted Process affordance

2023-01-30 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib updated this revision to Diff 493453. mib added a comment. Address @JDevlieghere comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141702/new/ https://reviews.llvm.org/D141702 Files: lldb/examples/python/scripted_process/crashlog_scripted_process.py lldb/source/Plugins/Pr

[Lldb-commits] [PATCH] D141658: [lldb/crashlog] Make interactive mode the new default

2023-01-30 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib updated this revision to Diff 493456. mib edited the summary of this revision. mib added a comment. Fix test failures: - Change `-b|--batch` flag to `-m|--mode` options that expects an enum value. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141658/new/ https://reviews.llvm.org/D1

[Lldb-commits] [PATCH] D141658: [lldb/crashlog] Make interactive mode the new default

2023-01-30 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib marked 2 inline comments as done. mib added inline comments. Comment at: lldb/examples/python/crashlog.py:452 -with open(path, 'r', encoding='utf-8') as f: +with open(os.path.normpath(os.path.expanduser(path)), 'r', encoding='utf-8') as f: buff

[Lldb-commits] [PATCH] D141658: [lldb/crashlog] Make interactive mode the new default

2023-01-30 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib requested review of this revision. mib added a comment. I changed the implementation to be a blue to fix the tests. Could you guys please take another look ? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141658/new/ https://reviews.llvm.org/D141658

[Lldb-commits] [PATCH] D143104: [lldb/Plugins] Add Attach capabilities to ScriptedProcess

2023-02-01 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib created this revision. mib added reviewers: JDevlieghere, bulbazord. mib added a project: LLDB. Herald added a project: All. mib requested review of this revision. Herald added a subscriber: lldb-commits. This patch adds process attach capabilities to the ScriptedProcess plugin. This doesn't r

[Lldb-commits] [PATCH] D139252: [lldb/Plugins] Introduce Scripted Platform Plugin

2023-02-01 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib updated this revision to Diff 494107. mib added a comment. Small fixes CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139252/new/ https://reviews.llvm.org/D139252 Files: lldb/bindings/python/python-swigsafecast.swig lldb/bindings/python/python-wrapper.swig lldb/examples/python

[Lldb-commits] [PATCH] D139945: [lldb] Add scripted process launch/attach option to platform commands

2023-02-01 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib updated this revision to Diff 494110. mib added a comment. Rebase CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139945/new/ https://reviews.llvm.org/D139945 Files: lldb/bindings/interface/SBAttachInfo.i lldb/include/lldb/API/SBAttachInfo.h lldb/include/lldb/API/SBStructuredDa

[Lldb-commits] [PATCH] D143122: [lldb/python] Fix scripted_platform python module creation

2023-02-01 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib created this revision. mib added a reviewer: bulbazord. mib added a project: LLDB. Herald added a subscriber: JDevlieghere. Herald added a project: All. mib requested review of this revision. Herald added a subscriber: lldb-commits. This patch should fix the creation and addition of the `scrip

[Lldb-commits] [PATCH] D143104: [lldb/Plugins] Add Attach capabilities to ScriptedProcess

2023-02-02 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib requested review of this revision. mib added inline comments. Comment at: lldb/include/lldb/Utility/ProcessInfo.h:90-110 + bool IsScriptedProcess() const { +return !m_scripted_process_class_name.empty(); + } + + std::string GetScriptedProcessClassName() const { +re

[Lldb-commits] [PATCH] D143213: [lldb/Plugins] Introduce Multiplexer & ScriptedMultiplexer

2023-02-02 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib created this revision. mib added reviewers: JDevlieghere, jingham, labath. mib added a project: LLDB. Herald added a project: All. mib requested review of this revision. Herald added a subscriber: lldb-commits. This patch introduces a new core component to LLDB: Multiplexer. The goal of a mul

[Lldb-commits] [PATCH] D143104: [lldb/Plugins] Add Attach capabilities to ScriptedProcess

2023-02-02 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added inline comments. Comment at: lldb/include/lldb/Utility/ProcessInfo.h:90-110 + bool IsScriptedProcess() const { +return !m_scripted_process_class_name.empty(); + } + + std::string GetScriptedProcessClassName() const { +return m_scripted_process_class_name; +

[Lldb-commits] [PATCH] D143122: [lldb/python] Fix scripted_platform python module creation

2023-02-02 Thread Med Ismail Bennani via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG35ef899f94eb: [lldb/python] Fix scripted_platform python module creation (authored by mib). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143122/new/ https:

[Lldb-commits] [PATCH] D143236: [lldb] Add a way to get a scripted process implementation from the SBAPI

2023-02-02 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib created this revision. mib added reviewers: bulbazord, JDevlieghere, jingham. mib added a project: LLDB. Herald added a project: All. mib requested review of this revision. Herald added a subscriber: lldb-commits. This patch introduces a new `GetImplementation` method to the SBProcess class in

[Lldb-commits] [PATCH] D143236: [lldb] Add a way to get a scripted process implementation from the SBAPI

2023-02-02 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added a comment. In D143236#4101429 , @bulbazord wrote: > This is an interesting idea. > > I suppose I find it a little strange that something from the SB API is > passing a void * back to the caller instead of something more well defined > (like an

[Lldb-commits] [PATCH] D143236: [lldb] Add a way to get a scripted process implementation from the SBAPI

2023-02-02 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib updated this revision to Diff 494485. mib marked an inline comment as done. mib added a comment. Add docstring. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143236/new/ https://reviews.llvm.org/D143236 Files: lldb/bindings/interface/SBProcess.i lldb/bindings/python/python-type

[Lldb-commits] [PATCH] D142926: [lldb][RFC] Replace SB swig interfaces with API headers

2023-02-03 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added inline comments. Comment at: lldb/bindings/interface/SBAddressDocstrings.i:1-2 +%feature("docstring", +"A section + offset based address class. + kastiglione wrote: > How much of these header docs are specific to the API, but not specific to > Swig bin

[Lldb-commits] [PATCH] D143282: [lldb] Accept negative indexes in __getitem__

2023-02-03 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib accepted this revision. mib added a comment. This revision is now accepted and ready to land. This is nice although I wish there was a built way to do it. LGTM with a test :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143282/new/ https://rev

[Lldb-commits] [PATCH] D143282: [lldb] Accept negative indexes in __getitem__

2023-02-03 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added a comment. In D143282#4103165 , @kastiglione wrote: > I wondered what to do about tests. Should I pick one of these to test? Just > doesn't seem worth tests for each… Yeah, that sounds good to me :) Repository: rG LLVM Github Monorepo CHA

[Lldb-commits] [PATCH] D143236: [lldb] Add a way to get a scripted process implementation from the SBAPI

2023-02-03 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib updated this revision to Diff 494695. mib added a comment. Address @jingham comment. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143236/new/ https://reviews.llvm.org/D143236 Files: lldb/bindings/interface/SBProcess.i lldb/bindings/python/python-typemaps.swig lldb/include/ll

[Lldb-commits] [PATCH] D143236: [lldb] Add a way to get a scripted process implementation from the SBAPI

2023-02-03 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib updated this revision to Diff 494704. mib edited the summary of this revision. mib added a comment. Address @JDevlieghere feedback: - Rename API to `GetScriptedImplementation` - Add test for non scripted process plugins CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143236/new/ http

[Lldb-commits] [PATCH] D143236: [lldb] Add a way to get a scripted process implementation from the SBAPI

2023-02-03 Thread Med Ismail Bennani via Phabricator via lldb-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGc19280330474: [lldb] Add a way to get a scripted process implementation from the SBAPI (authored by mib). Repository: rG LLVM Github Monorepo CHA

[Lldb-commits] [PATCH] D143308: [lldb/Plugins] Fix method dispatch bug when using multiple scripted processes

2023-02-03 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib created this revision. mib added reviewers: JDevlieghere, bulbazord. mib added a project: LLDB. Herald added a project: All. mib requested review of this revision. Herald added a subscriber: lldb-commits. This patch should address a bug when a user have multiple scripted processes in the same

[Lldb-commits] [PATCH] D143308: [lldb/Plugins] Fix method dispatch bug when using multiple scripted processes

2023-02-03 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib updated this revision to Diff 494779. mib added a comment. Fix test failure CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143308/new/ https://reviews.llvm.org/D143308 Files: lldb/include/lldb/Interpreter/ScriptInterpreter.h lldb/include/lldb/Interpreter/ScriptedInterface.h ll

[Lldb-commits] [PATCH] D143012: Add a bit of error checking to SBProcess::ReadMemory to check if a nullptr destination buffer was provided, return error

2023-02-06 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib accepted this revision. mib added a comment. LGTM with @JDevlieghere comments. Comment at: lldb/source/API/SBProcess.cpp:807-811 + if (!dst) { +sb_error.SetErrorStringWithFormat( +"no buffer provided to read %zu bytes into", dst_len); +return 0; + } --

[Lldb-commits] [PATCH] D143308: [lldb/Plugins] Fix method dispatch bug when using multiple scripted processes

2023-02-06 Thread Med Ismail Bennani via Phabricator via lldb-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGa3d4f739eea3: [lldb/Plugins] Fix method dispatch bug when using multiple scripted processes (authored by mib). Changed prior to commit: https://re

[Lldb-commits] [PATCH] D143548: [lldb] Add the ability to remove diagnostic callbacks

2023-02-08 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added a comment. LGTM! Is there a simple way to test this ? Comment at: lldb/source/Utility/Diagnostics.cpp:55-58 + m_callbacks.erase( + std::remove_if(m_callbacks.begin(), m_callbacks.end(), + [id](const CallbackEntry &e) { return e.id == id; }),

[Lldb-commits] [PATCH] D141702: [lldb/crashlog] Make module loading use Scripted Process affordance

2023-02-08 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib updated this revision to Diff 495933. mib added a comment. Fixed module loading issue. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141702/new/ https://reviews.llvm.org/D141702 Files: lldb/examples/python/scripted_process/crashlog_scripted_process.py lldb/source/Plugins/Proces

[Lldb-commits] [PATCH] D141658: [lldb/crashlog] Make interactive mode the new default

2023-02-08 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib updated this revision to Diff 495938. mib added a comment. Address @JDevlieghere feedback: rename `legacy` loading mode into `batch`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141658/new/ https://reviews.llvm.org/D141658 Files: lldb/examples/python/crashlog.py lldb/test/Sh

[Lldb-commits] [PATCH] D141658: [lldb/crashlog] Make interactive mode the new default

2023-02-08 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib updated this revision to Diff 495939. mib edited the summary of this revision. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141658/new/ https://reviews.llvm.org/D141658 Files: lldb/examples/python/crashlog.py lldb/test/Shell/ScriptInterpreter/Python/Crashlog/app_specific_backtr

[Lldb-commits] [PATCH] D143104: [lldb/Plugins] Add Attach capabilities to ScriptedProcess

2023-02-08 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib updated this revision to Diff 495971. mib marked an inline comment as done. mib edited the summary of this revision. mib added a comment. Addressed @JDevlieghere comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143104/new/ https://reviews.llvm.org/D143104 Files: lldb/examp

[Lldb-commits] [PATCH] D143687: [lldb] Add an SB API to get progress events as SBStructuredData

2023-02-09 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added inline comments. Comment at: lldb/source/API/SBDebugger.cpp:175-186 + const ProgressEventData *progress_data = + ProgressEventData::GetEventDataFromEvent(event.get()); + if (!progress_data) +return {}; + + auto dictionary = std::make_unique(); + dictionary-

[Lldb-commits] [PATCH] D143690: [lldb] Add the ability to provide a message to a progress event update

2023-02-09 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added a comment. Makes sense! LGTM! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143690/new/ https://reviews.llvm.org/D143690 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-

[Lldb-commits] [PATCH] D143694: [lldb] Hoist code to create StructuredData into DiagnosticEventData (NFC)

2023-02-09 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib accepted this revision. mib added a comment. This revision is now accepted and ready to land. LGTM with some nitpicks. Comment at: lldb/source/API/SBDebugger.cpp:175 - const DiagnosticEventData *diagnostic_data = - DiagnosticEventData::GetEventDataFromEvent(event.ge

[Lldb-commits] [PATCH] D143792: [lldb] Fix image lookup crash

2023-02-10 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib accepted this revision. mib added a comment. This revision is now accepted and ready to land. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143792/new/ https://reviews.llvm.org/D143792 ___ lldb

[Lldb-commits] [PATCH] D143687: [lldb] Add an SB API to get progress events as SBStructuredData

2023-02-10 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib accepted this revision. mib added a comment. This revision is now accepted and ready to land. Thanks! LGTM! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143687/new/ https://reviews.llvm.org/D143687 ___ lldb-commits mailing list lldb-comm

[Lldb-commits] [PATCH] D135631: [lldb] Copy log files into diagnostic directory

2023-02-10 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib accepted this revision. mib added a comment. This revision is now accepted and ready to land. LGTM! Comment at: lldb/source/Core/Debugger.cpp:838 +std::error_code ec = +llvm::sys::fs::copy_file(entry.first(), destination.GetPath()); +

[Lldb-commits] [PATCH] D142926: [lldb] Replace SB swig interfaces with API headers

2023-02-14 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib accepted this revision. mib added a comment. This revision is now accepted and ready to land. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142926/new/ https://reviews.llvm.org/D142926 ___ lldb

[Lldb-commits] [PATCH] D144224: [lldb] Extend SWIG SBProcess interface with WriteCStringToMemory method

2023-02-16 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib created this revision. mib added a reviewer: bulbazord. mib added a project: LLDB. Herald added a subscriber: JDevlieghere. Herald added a project: All. mib requested review of this revision. Herald added a subscriber: lldb-commits. This patch tries to address an interoperability issue when wr

[Lldb-commits] [PATCH] D138618: [LLDB] Enable 64 bit debug/type offset

2023-02-16 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added a comment. Hi @ayermolo! This patch is causing some failure on the macOS lldb bot: https://green.lab.llvm.org/green/job/lldb-cmake/51257/ Could you take a look ? If you don't have the time, we can revert your patch until you manage to reproduce these failures. Let me know if you nee

[Lldb-commits] [PATCH] D144237: [lldb/Plugins] Add memory writing capabilities to Scripted Process

2023-02-16 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib created this revision. mib added reviewers: bulbazord, JDevlieghere. mib added a project: LLDB. Herald added a project: All. mib requested review of this revision. Herald added a subscriber: lldb-commits. This patch adds memory writing capabilities to the Scripted Process plugin. This allows

[Lldb-commits] [PATCH] D144224: [lldb] Extend SWIG SBProcess interface with WriteMemoryAsCString method

2023-02-16 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib updated this revision to Diff 498201. mib retitled this revision from "[lldb] Extend SWIG SBProcess interface with WriteCStringToMemory method" to "[lldb] Extend SWIG SBProcess interface with WriteMemoryAsCString method". mib edited the summary of this revision. CHANGES SINCE LAST ACTION h

[Lldb-commits] [PATCH] D144237: [lldb/Plugins] Add memory writing capabilities to Scripted Process

2023-02-16 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib updated this revision to Diff 498205. mib added a comment. Reformat CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144237/new/ https://reviews.llvm.org/D144237 Files: lldb/bindings/python/python-swigsafecast.swig lldb/examples/python/scripted_process/scripted_process.py lldb/i

[Lldb-commits] [PATCH] D144237: [lldb/Plugins] Add memory writing capabilities to Scripted Process

2023-02-16 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib updated this revision to Diff 498206. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144237/new/ https://reviews.llvm.org/D144237 Files: lldb/bindings/python/python-swigsafecast.swig lldb/examples/python/scripted_process/scripted_process.py lldb/include/lldb/Interpreter/Scripted

[Lldb-commits] [PATCH] D144237: [lldb/Plugins] Add memory writing capabilities to Scripted Process

2023-02-16 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib updated this revision to Diff 498207. mib added a comment. Fix typo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144237/new/ https://reviews.llvm.org/D144237 Files: lldb/bindings/python/python-swigsafecast.swig lldb/examples/python/scripted_process/scripted_process.py lldb/i

[Lldb-commits] [PATCH] D144237: [lldb/Plugins] Add memory writing capabilities to Scripted Process

2023-02-16 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib marked an inline comment as done. mib added inline comments. Comment at: lldb/source/Plugins/Process/scripted/ScriptedProcess.cpp:310-311 +size_t ScriptedProcess::DoWriteMemory(lldb::addr_t vm_addr, const void *buf, + size_t size, Status

[Lldb-commits] [PATCH] D144237: [lldb/Plugins] Add memory writing capabilities to Scripted Process

2023-02-16 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib updated this revision to Diff 498211. mib marked an inline comment as done. mib added a comment. Address @bulbazord comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144237/new/ https://reviews.llvm.org/D144237 Files: lldb/bindings/python/python-swigsafecast.swig lldb/exa

[Lldb-commits] [PATCH] D143104: [lldb/Plugins] Add Attach capabilities to ScriptedProcess

2023-02-16 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib marked 4 inline comments as done. mib added inline comments. Comment at: lldb/include/lldb/Utility/ProcessInfo.h:90 + bool IsScriptedProcess() const; + JDevlieghere wrote: > Can we not ask this from the ScriptedMetadata? I think this is fine to ask the `Pr

[Lldb-commits] [PATCH] D143104: [lldb/Plugins] Add Attach capabilities to ScriptedProcess

2023-02-16 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib updated this revision to Diff 498229. mib marked an inline comment as done. mib added a comment. Address @JDevlieghere feedback. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143104/new/ https://reviews.llvm.org/D143104 Files: lldb/examples/python/scripted_process/scripted_proces

[Lldb-commits] [PATCH] D144238: [lldb] StructuredData should not truncate uint64_t values

2023-02-16 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added a comment. Should we also add a negative integer to the dictionary to make sure this didn't cause a regression ? Comment at: lldb/test/API/python_api/sbstructureddata/TestStructuredDataAPI.py:25 s.Print( - "{\"key_dict\":{\"key_string\":\"STRING

[Lldb-commits] [PATCH] D144238: [lldb] StructuredData should not truncate uint64_t values

2023-02-16 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib accepted this revision. mib added a comment. This revision is now accepted and ready to land. LGTM then (with nits ;p) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144238/new/ https://reviews.llvm.org/D144238 _

[Lldb-commits] [PATCH] D143104: [lldb/Plugins] Add Attach capabilities to ScriptedProcess

2023-02-17 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added inline comments. Comment at: lldb/source/API/SBAttachInfo.cpp:273-278 + ScriptedMetadataSP metadata_sp = m_opaque_sp->GetScriptedMetadata(); - m_opaque_sp->SetScriptedProcessClassName(class_name); + if (!metadata_sp) +metadata_sp = std::make_shared(class_name,

[Lldb-commits] [PATCH] D144528: [lldb] Warn when Mach-O files have overlapping segments

2023-02-21 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib accepted this revision. mib added a comment. This revision is now accepted and ready to land. LGTM! May be we should throw an error when loading a binary with overlapping segments, instead of just showing an error. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://r

[Lldb-commits] [PATCH] D138618: [LLDB] Enable 64 bit debug/type offset

2023-02-22 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added a comment. In D138618#4145644 , @ayermolo wrote: > https://green.lab.llvm.org/green/job/lldb-cmake/51484/ passed. > There were other built bots failures, but looks like it was built failure > related to other diff that was part of testing. Sinc

[Lldb-commits] [PATCH] D144688: [lldb] Fix watchpoint command function stopping behavior

2023-02-23 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib created this revision. mib added a reviewer: bulbazord. mib added a project: LLDB. Herald added a subscriber: JDevlieghere. Herald added a project: All. mib requested review of this revision. Herald added a subscriber: lldb-commits. This patch fixes an issue where we would discard the return v

[Lldb-commits] [PATCH] D144688: [lldb] Fix watchpoint command function stopping behavior

2023-02-24 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added a subscriber: jingham. mib added inline comments. Comment at: lldb/source/Commands/CommandObjectWatchpointCommand.cpp:425 else if (!m_options.m_function_name.empty()) { -std::string oneliner(m_options.m_function_name); +std::string one

[Lldb-commits] [PATCH] D144688: [lldb] Fix watchpoint command function stopping behavior

2023-02-24 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added inline comments. Comment at: lldb/source/Commands/CommandObjectWatchpointCommand.cpp:425 else if (!m_options.m_function_name.empty()) { -std::string oneliner(m_options.m_function_name); +std::string oneliner("return "); +on

[Lldb-commits] [PATCH] D144688: [lldb] Fix watchpoint command function stopping behavior

2023-02-24 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added a comment. In D144688#4151164 , @jingham wrote: > IIUC, not removing elements from the internal dict will mean > cross-contamination between the python states when you have multiple > concurrent debuggers, which for instance Xcode does a lot.

<    1   2   3   4   5   6   7   8   9   10   >