[Lldb-commits] [PATCH] D84555: [lldb-vscode ]Add Syntax Highlighting to Disassembly View

2020-08-03 Thread walter erquinigo via Phabricator via lldb-commits
wallace added a comment. Move the sample files to the syntaxes folder. Besides, the path /llvm/syntaxes/disassembly.json should just be syntaxes/disassembly.json. There's no need to have that llvm subfolder there Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[Lldb-commits] [PATCH] D85158: [intel-pt] Refactor 3: refactor PTDecoder into SBPTProcess

2020-08-03 Thread walter erquinigo via Phabricator via lldb-commits
wallace created this revision. wallace added reviewers: clayborg, kusmour. Herald added subscribers: lldb-commits, mgorny. Herald added a project: LLDB. wallace requested review of this revision. Herald added a subscriber: JDevlieghere. Depends on D85070 . I don't

[Lldb-commits] [PATCH] D84810: [intel-pt] Simplify Python API configuration

2020-08-03 Thread walter erquinigo via Phabricator via lldb-commits
wallace abandoned this revision. wallace added a comment. Herald added a subscriber: JDevlieghere. After syncing up with Greg, we decided to redo this in a different way Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84810/new/ https://reviews.llvm.

[Lldb-commits] [PATCH] D85068: [intel-pt] Refactor 1: rename the namespace

2020-08-03 Thread walter erquinigo via Phabricator via lldb-commits
wallace abandoned this revision. wallace added a comment. After syncing up with Greg, we decided to redo this in a different way Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85068/new/ https://reviews.llvm.org/D85068 _

[Lldb-commits] [PATCH] D85158: [intel-pt] Refactor 3: refactor PTDecoder into SBPTProcess

2020-08-03 Thread walter erquinigo via Phabricator via lldb-commits
wallace abandoned this revision. wallace added a comment. After syncing up with Greg, we decided to redo this in a different way Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85158/new/ https://reviews.llvm.org/D85158 _

[Lldb-commits] [PATCH] D85070: [intel-pt] Refactor 2: create a new folder structure

2020-08-03 Thread walter erquinigo via Phabricator via lldb-commits
wallace abandoned this revision. wallace added a comment. After syncing up with Greg, we decided to redo this in a different way Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85070/new/ https://reviews.llvm.org/D85070 _

[Lldb-commits] [PATCH] D84791: [intel-pt] Fix python support and add a full python test

2020-08-03 Thread walter erquinigo via Phabricator via lldb-commits
wallace abandoned this revision. wallace added a comment. Herald added a subscriber: JDevlieghere. After syncing up with Greg, we decided to redo this in a different way Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84791/new/ https://reviews.llvm.

[Lldb-commits] [PATCH] D84555: [lldb-vscode ]Add Syntax Highlighting to Disassembly View

2020-08-03 Thread walter erquinigo via Phabricator via lldb-commits
wallace added a comment. I don't think there's any easy way to test this. I was reading the VSCode documentation and there's no nice test framework for this. So at this point I'm okay with it without test, as it's very easy to check that it works by visual inspection. Repository: rG LLVM Gi

[Lldb-commits] [PATCH] D85241: [intel-pt] Disable/Enable tracing to guarantee the trace is correct

2020-08-04 Thread walter erquinigo via Phabricator via lldb-commits
wallace created this revision. wallace added a reviewer: clayborg. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. wallace requested review of this revision. Herald added a subscriber: JDevlieghere. As mentioned in the comment inside the code, the Intel documentation states

[Lldb-commits] [PATCH] D85241: [intel-pt] Disable/Enable tracing to guarantee the trace is correct

2020-08-04 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 283009. wallace added a comment. remove an empty line Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85241/new/ https://reviews.llvm.org/D85241 Files: lldb/source/Plugins/Process/Linux/ProcessorTrace.cpp In

[Lldb-commits] [PATCH] D85705: Add a "Trace" plug-in to LLDB to add process trace support in stages.

2020-08-12 Thread walter erquinigo via Phabricator via lldb-commits
wallace added a comment. Thanks for doing this. There are some basic bits to make this that I was unaware of, so this saves a lot of time for me :) I'll take over this patch next week and fill it with intel-pt stuff, I already have a good amount of code that is quite mergeable with this patch.

[Lldb-commits] [PATCH] D86261: Add hashing of the .text section to ProcessMinidump.

2020-08-20 Thread walter erquinigo via Phabricator via lldb-commits
wallace accepted this revision. wallace added inline comments. This revision is now accepted and ready to land. Comment at: lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp:559-560 if (!match) { + // Breakpad might put a hash of the up to the first page

[Lldb-commits] [PATCH] D84974: Enable Launching the Debugee in VSCode Terminal

2020-08-20 Thread walter erquinigo via Phabricator via lldb-commits
wallace commandeered this revision. wallace edited reviewers, added: aelitashen; removed: wallace. wallace added a comment. We found a very strange issue with lldb not stopping at any breakpoint after attaching. I'll figure that out Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[Lldb-commits] [PATCH] D85705: Add a "Trace" plug-in to LLDB to add process trace support in stages.

2020-08-21 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 287079. wallace added a comment. - Added libipt as a dependency to build the new intel pt plugin. It's merely a copy paste of what the old intel pt plugin does. - Added a test with a sample trace.json definition file. It includes a simple a.out object file,

[Lldb-commits] [PATCH] D85705: Add a "Trace" plug-in to LLDB to add process trace support in stages.

2020-08-24 Thread walter erquinigo via Phabricator via lldb-commits
wallace marked 12 inline comments as done. wallace added inline comments. Comment at: lldb/source/Target/Trace.cpp:109 + StringRef load_address_str; + if (!module->GetValueForKeyAsString("loadAddress", load_address_str)) +return SetMissingFieldError(error, "loadAddress", "s

[Lldb-commits] [PATCH] D85705: Add a "Trace" plug-in to LLDB to add process trace support in stages.

2020-08-24 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 287518. wallace added a comment. - Addressed comments. - Added schemas for both the base class and the implementation plugins. - Added two tests checking the error messages along with the schema when parsing failed. - Made some general clean up of the code

[Lldb-commits] [PATCH] D85705: Add a "Trace" plug-in to LLDB to add process trace support in stages.

2020-08-24 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 287527. wallace added a comment. - Added a command that shows the schema of a given trace plugin. - Added a test for such command Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85705/new/ https://reviews.llvm.or

[Lldb-commits] [PATCH] D85705: Add a "Trace" plug-in to LLDB to add process trace support in stages.

2020-08-25 Thread walter erquinigo via Phabricator via lldb-commits
wallace added a comment. That's a very good idea! I'll revisit this patch then. I was not fond of doing the manual parsing but I hadn't found a more automated way. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85705/new/ https://reviews.llvm.org/D

[Lldb-commits] [PATCH] D85705: Add a "Trace" plug-in to LLDB to add process trace support in stages.

2020-08-26 Thread walter erquinigo via Phabricator via lldb-commits
wallace added a comment. Given that this feature is intended to be used by non debugger developers, I want to stick to using JSON as a default input format, as it's more ubiquitous than YAML and I prefer to make this decision based on the user experience than on the technical solution. I like

[Lldb-commits] [PATCH] D86662: Simplify Symbol Status Message to Only Debug Info Size

2020-08-26 Thread walter erquinigo via Phabricator via lldb-commits
wallace requested changes to this revision. wallace added a comment. This revision now requires changes to proceed. For the record, this came out of discussion in which the consensus was to display less characters and maximize the relevant information, which in this case is just the debug info s

[Lldb-commits] [PATCH] D86662: Simplify Symbol Status Message to Only Debug Info Size

2020-08-26 Thread walter erquinigo via Phabricator via lldb-commits
wallace added inline comments. Comment at: lldb/test/API/tools/lldb-vscode/module/TestVSCode_module.py:44 +# symbol_regex = re.compile(r"Symbols loaded. \([0-9]+(\.[0-9]*)?[KMG]?B\)") +symbol_regex = re.compile(r"[0-9]+(\.[0-9]*)?[KMG]?B") re

[Lldb-commits] [PATCH] D85705: Add a "Trace" plug-in to LLDB to add process trace support in stages.

2020-08-26 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 288145. wallace added a comment. - As error messaging is important when parsing, I create a new set of functions in StructuredData for parsing that return an llvm::Expected. This allowed me to move the helper functions for parsing from the Trace file to Str

[Lldb-commits] [PATCH] D86670: [intel-pt] Add a basic implementation of the dump command

2020-08-26 Thread walter erquinigo via Phabricator via lldb-commits
wallace created this revision. wallace added a reviewer: clayborg. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. wallace requested review of this revision. Herald added a subscriber: JDevlieghere. Depends on D85705 . The previous diff left

[Lldb-commits] [PATCH] D86670: [intel-pt] Add a basic implementation of the dump command

2020-08-26 Thread walter erquinigo via Phabricator via lldb-commits
wallace added inline comments. Comment at: lldb/include/lldb/Target/Target.h:1105 + void SetTrace(const lldb::TraceSP &trace_sp); + JDevlieghere wrote: > Who owns the trace? If there's a 1:1 relationship between a trace and a > target, can we make the target

[Lldb-commits] [PATCH] D85705: Add a "Trace" plug-in to LLDB to add process trace support in stages.

2020-08-26 Thread walter erquinigo via Phabricator via lldb-commits
wallace added a comment. Thanks for the review! Those are very useful comments. So, I'll split the parsing out from the Trace object. Regarding a possible inconsistent state, you are right. That could happen. The targets, modules and processes used in the parsing are all created there, and it s

[Lldb-commits] [PATCH] D86670: [intel-pt] Add a basic implementation of the dump command

2020-08-26 Thread walter erquinigo via Phabricator via lldb-commits
wallace added inline comments. Comment at: lldb/include/lldb/Target/Target.h:1105 + void SetTrace(const lldb::TraceSP &trace_sp); + wallace wrote: > JDevlieghere wrote: > > Who owns the trace? If there's a 1:1 relationship between a trace and a > > target, ca

[Lldb-commits] [PATCH] D86662: Simplify Symbol Status Message to Only Debug Info Size

2020-08-27 Thread walter erquinigo via Phabricator via lldb-commits
wallace added a comment. All module information is only displayed in our custom VSCode. Vanilla VSCode doesn't have support for displaying modules. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86662/new/ https://reviews.llvm.org/D86662 _

[Lldb-commits] [PATCH] D85705: Add a "Trace" plug-in to LLDB to add process trace support in stages.

2020-08-27 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 288496. wallace added a comment. Addressed comments - Now using StringRef correctly whenever possible. - Revert back to using "traceFile" only inside the thread section. That's how intel-pt works at the moment and, as Greg suggested, we can change the schema

[Lldb-commits] [PATCH] D85705: Add a "Trace" plug-in to LLDB to add process trace support in stages.

2020-08-28 Thread walter erquinigo via Phabricator via lldb-commits
wallace added a comment. You changed my mind. I'll move to Support/JSON.h Comment at: lldb/test/API/commands/trace/intelpt-trace/trace.json:11 + }, + "triple": "x86_64-*-linux", + "processes": [ labath wrote: > What if one of the processes is 64-bit and the

[Lldb-commits] [PATCH] D86670: [intel-pt] Add a basic implementation of the dump command

2020-08-28 Thread walter erquinigo via Phabricator via lldb-commits
wallace marked an inline comment as not done. wallace added a comment. I agree with that Greg said. > So it would simplify things right now if we say that "trace dump" dumps the > trace data for the currently selected target right now. That will map well > with the stepping commands that will s

[Lldb-commits] [PATCH] D85705: Add a "Trace" plug-in to LLDB to add process trace support in stages.

2020-08-28 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 288739. wallace added a comment. Herald added subscribers: llvm-commits, danielkiss, hiraditya. Herald added a project: LLVM. Addressed all comments. - Wwitched to using llvm::json instead of StructuredData. Fortunately, the logic is pretty much the same. -

[Lldb-commits] [PATCH] D85705: Add a "Trace" plug-in to LLDB to add process trace support in stages.

2020-08-28 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 288747. wallace added a comment. fix typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85705/new/ https://reviews.llvm.org/D85705 Files: lldb/include/lldb/Core/PluginManager.h lldb/include/lldb/Target/Tra

[Lldb-commits] [PATCH] D86670: [intel-pt] Add a basic implementation of the dump command

2020-08-28 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 288751. wallace added a comment. Herald added subscribers: dang, danielkiss. Addressed comments - Now the "dump" command specifically refers to the currently selected thread. That will be aligned with the future stepping commands we will be adding. - The for

[Lldb-commits] [PATCH] D85705: Add a "Trace" plug-in to LLDB to add process trace support in stages.

2020-08-29 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 288788. wallace added a comment. - Removed whitespace only changes. - Simplified the way a SettingsParser is created, now there's no need to passinga a pointer around. - Fixed the forward declaration in lldb-private-interfaces. This should address all commen

[Lldb-commits] [PATCH] D86670: [intel-pt] Add a basic implementation of the dump command

2020-08-31 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 289011. wallace added a comment. Rebase. Had to add several const qualifiers to match the const of Dump, which is a good thing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86670/new/ https://reviews.llvm.org

[Lldb-commits] [PATCH] D86899: [trace][RFC] create skeleton for thread decoder

2020-08-31 Thread walter erquinigo via Phabricator via lldb-commits
wallace created this revision. wallace added a reviewer: clayborg. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. wallace requested review of this revision. Herald added a subscriber: JDevlieghere. Depends on D86670 . I first just want to g

[Lldb-commits] [PATCH] D85705: Add a "Trace" plug-in to LLDB to add process trace support in stages.

2020-09-01 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 289285. wallace added a comment. fix nit. Waiting for an additional approval Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85705/new/ https://reviews.llvm.org/D85705 Files: lldb/include/lldb/Core/PluginManag

[Lldb-commits] [PATCH] D86670: [intel-pt] Add a basic implementation of the dump command

2020-09-01 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 289300. wallace added a comment. - Now using the TraceDumpOptions struct Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86670/new/ https://reviews.llvm.org/D86670 Files: lldb/include/lldb/Target/Target.h ll

[Lldb-commits] [PATCH] D85705: Add a "Trace" plug-in to LLDB to add process trace support in stages.

2020-09-01 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 289301. wallace added a comment. fix header c++ declaration Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85705/new/ https://reviews.llvm.org/D85705 Files: lldb/include/lldb/Core/PluginManager.h lldb/inclu

[Lldb-commits] [PATCH] D84974: Enable Launching the Debugee in VSCode Terminal

2020-09-02 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 289542. wallace added a comment. Now this feature is fully functional. Besiding adding a test, I was able to debug LLDB from an integrated terminal in VSCode. Stdin and stdout work correctly. I'm attaching asynchronously to the inferior using the wait-for l

[Lldb-commits] [PATCH] D86670: [intel-pt] Add a basic implementation of the dump command

2020-09-04 Thread walter erquinigo via Phabricator via lldb-commits
wallace added a comment. Fair enough. I'll work on a document. Hopefully the feedback is going to be good :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86670/new/ https://reviews.llvm.org/D86670 ___

[Lldb-commits] [PATCH] D85705: Add a "Trace" plug-in to LLDB to add process trace support in stages.

2020-09-08 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 290603. wallace added a comment. - Moved the JSON changes to another diff. - Addressed all the comments so far. As a side note, I'll work on a RFC for the LLDB mailing list to get feedback on the overall design of the feature, as @labath suggested. However,

[Lldb-commits] [PATCH] D86670: [intel-pt] Add a basic implementation of the dump command

2020-09-08 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 290605. wallace added a comment. Addresses Greg's comments. As a side note, I'll work on a RFC for the LLDB mailing list to get feedback on the overall design of the feature, as @labath suggested. However, Greg and I want to get these patches in, as we need

[Lldb-commits] [PATCH] D86670: [intel-pt] Add a basic implementation of the dump command

2020-09-08 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 290607. wallace added a comment. - format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86670/new/ https://reviews.llvm.org/D86670 Files: lldb/include/lldb/Target/Target.h lldb/include/lldb/Target/Trace.h

[Lldb-commits] [PATCH] D87589: [intel-pt] Add the instruction decoding functionality

2020-09-13 Thread walter erquinigo via Phabricator via lldb-commits
wallace created this revision. wallace added a reviewer: clayborg. Herald added subscribers: lldb-commits, dang, aaron.ballman, mgorny. Herald added a reviewer: JDevlieghere. Herald added a project: LLDB. wallace requested review of this revision. Depends on D86670

[Lldb-commits] [PATCH] D87730: [intel-pt] Pretty print the instruction list

2020-09-15 Thread walter erquinigo via Phabricator via lldb-commits
wallace created this revision. wallace added a reviewer: clayborg. Herald added subscribers: lldb-commits, dang. Herald added a reviewer: JDevlieghere. Herald added a project: LLDB. wallace requested review of this revision. Depends on D87589 . In D87589

[Lldb-commits] [PATCH] D87730: [intel-pt] Pretty print the instruction list

2020-09-15 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 292060. wallace added a comment. remove whitespace changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87730/new/ https://reviews.llvm.org/D87730 Files: lldb/include/lldb/Target/Trace.h lldb/source/Comma

[Lldb-commits] [PATCH] D85705: Add a "Trace" plug-in to LLDB to add process trace support in stages.

2020-09-18 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 292922. wallace added a comment. Based on the discussion from D87335 , I'm moving all the JSON utilities as non-member functions to the settings parser file. Eventually this can be refactored if that patch moves forward. The

[Lldb-commits] [PATCH] D85705: Add a "Trace" plug-in to LLDB to add process trace support in stages.

2020-09-21 Thread walter erquinigo via Phabricator via lldb-commits
wallace marked an inline comment as done. wallace added inline comments. Comment at: lldb/source/Target/TraceSettingsParser.cpp:128 +std::string plugin_schema(GetPluginSchema()); +plugin_schema = std::regex_replace(plugin_schema, std::regex("\n"), "\n "); +schema_bu

[Lldb-commits] [PATCH] D62732: [RISCV] Add SystemV ABI

2020-09-23 Thread walter erquinigo via Phabricator via lldb-commits
wallace added a comment. @luismarques , what's the recommended gdb-server implementation you recommend for me to try this on a riscv machine? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62732/new/ https://reviews.llvm.org/D62732 ___

[Lldb-commits] [PATCH] D88264: [intel-pt] Refactor the JSON parsing

2020-09-24 Thread walter erquinigo via Phabricator via lldb-commits
wallace created this revision. Herald added a reviewer: JDevlieghere. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. wallace requested review of this revision. Recently https://reviews.llvm.org/D88103 introduced a nice API for converting a JSON object into C++ types, which

[Lldb-commits] [PATCH] D88513: [lldb-vscode] Allow an empty 'breakpoints' field to clear breakpoints.

2020-09-29 Thread walter erquinigo via Phabricator via lldb-commits
wallace accepted this revision. wallace added a comment. This revision is now accepted and ready to land. Very good! Thank you Comment at: lldb/test/API/tools/lldb-vscode/breakpoint/TestVSCode_setBreakpoints.py:228 + empty one.''' +lines = [line_number('main.

[Lldb-commits] [PATCH] D86670: [intel-pt] Add a basic implementation of the dump command

2020-09-29 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 295145. wallace added a comment. Herald added a reviewer: JDevlieghere. Rebased and did some code cleanup. The output of the dump command looks like this Settings directory: /home/wallace/llvm-sand/external/llvm-project/lldb/test/API/commands/trace/intel

[Lldb-commits] [PATCH] D86670: [intel-pt] Add a basic implementation of the dump command

2020-10-01 Thread walter erquinigo via Phabricator via lldb-commits
wallace marked 21 inline comments as done. wallace added inline comments. Comment at: lldb/include/lldb/Target/Target.h:32 #include "lldb/Target/ThreadSpec.h" +#include "lldb/Target/Trace.h" #include "lldb/Utility/ArchSpec.h" clayborg wrote: > You don't need th

[Lldb-commits] [PATCH] D86670: [intel-pt] Add a basic implementation of the dump command

2020-10-01 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 295655. wallace added a comment. comments addressed Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86670/new/ https://reviews.llvm.org/D86670 Files: lldb/include/lldb/Target/Target.h lldb/include/lldb/Targe

[Lldb-commits] [PATCH] D86670: [intel-pt] Add a basic implementation of the dump command

2020-10-01 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 295656. wallace added a comment. format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86670/new/ https://reviews.llvm.org/D86670 Files: lldb/include/lldb/Target/Target.h lldb/include/lldb/Target/Trace.h

[Lldb-commits] [PATCH] D88769: [trace] Scaffold "thread trace dump instructions"

2020-10-02 Thread walter erquinigo via Phabricator via lldb-commits
wallace created this revision. wallace added reviewers: clayborg, labath. Herald added subscribers: lldb-commits, dang, mgorny. Herald added a reviewer: JDevlieghere. Herald added a project: LLDB. wallace requested review of this revision. As per the discussion in the RFC, we'll implement both

[Lldb-commits] [PATCH] D86670: [intel-pt] Add a basic implementation of the dump command

2020-10-03 Thread walter erquinigo via Phabricator via lldb-commits
wallace abandoned this revision. wallace added a comment. I'm redoing this in https://reviews.llvm.org/D88769 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86670/new/ https://reviews.llvm.org/D86670 ___

[Lldb-commits] [PATCH] D88769: [trace] Scaffold "thread trace dump instructions"

2020-10-05 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 296106. wallace added a comment. Herald added a subscriber: dexonsmith. Address comments: - Created a basic ThreadTrace class instead of using HistoryThread. I'll modify this class later when I add the decoding functionality and refactor the json file parsi

[Lldb-commits] [PATCH] D88841: [intel pt] Refactor parsing

2020-10-05 Thread walter erquinigo via Phabricator via lldb-commits
wallace created this revision. wallace added reviewers: clayborg, labath. Herald added subscribers: lldb-commits, mgorny. Herald added a reviewer: JDevlieghere. Herald added a project: LLDB. wallace requested review of this revision. With the feedback I was getting in different diffs, I realized t

[Lldb-commits] [PATCH] D88769: [trace] Scaffold "thread trace dump instructions"

2020-10-05 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 296254. wallace added a comment. Rebased on top of https://reviews.llvm.org/D88841 - Comments on the architecture of classes are in that diff - I was able to get rid of cross-plug-in dependencies Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

[Lldb-commits] [PATCH] D88841: [intel pt] Refactor parsing

2020-10-06 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 296562. wallace marked 10 inline comments as done. wallace added a comment. Address issues based on this diff's comments and from conversations with Greg. - I'm still keeping the TraceSessionFile name instead of TraceSettings, as later there'll be actual tra

[Lldb-commits] [PATCH] D88769: [trace] Scaffold "thread trace dump instructions"

2020-10-06 Thread walter erquinigo via Phabricator via lldb-commits
wallace added inline comments. Comment at: lldb/source/Plugins/Process/Trace/ProcessTrace.h:18 + +class ProcessTrace : public lldb_private::Process { +public: tatyana-krasnukha wrote: > clayborg wrote: > > So one issue is how do we eventually deal with debugging

[Lldb-commits] [PATCH] D88769: [trace] Scaffold "thread trace dump instructions"

2020-10-07 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 296866. wallace edited the summary of this revision. wallace added a comment. Addressed comments, which includse: - Implemented the requested repeat command logic, including tests - Now showing the total number of instructions as part of the dump command, w

[Lldb-commits] [PATCH] D88841: [intel pt] Refactor parsing

2020-10-08 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 297075. wallace added a comment. - Added “trace schema all”, following the pattern from "trace all", and added a test for this. - Created a non-static version of GetSchema in Trace.h - Cannot delete Trace() {}, as there’s a compilation error. Could be becaus

[Lldb-commits] [PATCH] D88769: [trace] Scaffold "thread trace dump instructions"

2020-10-08 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 297127. wallace added a comment. Rebase and made some cosmetic fixes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88769/new/ https://reviews.llvm.org/D88769 Files: lldb/include/lldb/Target/Target.h lldb/

[Lldb-commits] [PATCH] D88769: [trace] Scaffold "thread trace dump instructions"

2020-10-09 Thread walter erquinigo via Phabricator via lldb-commits
wallace added inline comments. Comment at: lldb/source/Target/Thread.cpp:1617-1627 +void Thread::DumpTraceInstructions(Stream &s, size_t count, + size_t start_position) const { + if (!GetProcess()->GetTarget().GetTrace()) { +s << "error: no

[Lldb-commits] [PATCH] D88769: [trace] Scaffold "thread trace dump instructions"

2020-10-09 Thread walter erquinigo via Phabricator via lldb-commits
wallace marked 3 inline comments as done. wallace added inline comments. Comment at: lldb/source/Plugins/Trace/intel-pt/TraceIntelPT.cpp:61 + const std::vector &targets) { + TraceSP trace_instance(new TraceIntelPT(pt_cpu, targets)); + for (co

[Lldb-commits] [PATCH] D88769: [trace] Scaffold "thread trace dump instructions"

2020-10-09 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 297373. wallace added a comment. - Moved the thread dumping logic to Trace.h. - Did the small fixes that were requested. - Left a comment regarding the shared_ptr instantiation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[Lldb-commits] [PATCH] D89283: [trace][intel-pt] Implement the basic decoding functionality

2020-10-12 Thread walter erquinigo via Phabricator via lldb-commits
wallace created this revision. Herald added subscribers: lldb-commits, mgorny. Herald added a reviewer: JDevlieghere. Herald added a project: LLDB. wallace requested review of this revision. This diff finally implements trace decoding! The current interface is $ trace load /path/to/trace/sessi

[Lldb-commits] [PATCH] D89283: [trace][intel-pt] Implement the basic decoding functionality

2020-10-12 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 297736. wallace added a comment. nits Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89283/new/ https://reviews.llvm.org/D89283 Files: lldb/include/lldb/Target/Trace.h lldb/include/lldb/Target/TraceSessionF

[Lldb-commits] [PATCH] D89283: [trace][intel-pt] Implement the basic decoding functionality

2020-10-14 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 298052. wallace marked 11 inline comments as done. wallace added a comment. Changes: - Changed the callback signature of ForEachInstruction to receive an Expected - Use Expected more ubiquitously in IntelPTDecoder - Use MemoryBuffer to read the trace file -

[Lldb-commits] [PATCH] D89408: [trace] rename ThreadIntelPT into TraceTrace

2020-10-14 Thread walter erquinigo via Phabricator via lldb-commits
wallace created this revision. wallace added reviewers: labath, clayborg. Herald added subscribers: lldb-commits, mgorny. Herald added a project: LLDB. wallace requested review of this revision. Herald added a subscriber: JDevlieghere. Renamed ThreadIntelPT to TreaceThread, making it a top-level c

[Lldb-commits] [PATCH] D89408: [trace] rename ThreadIntelPT to TraceTrace

2020-10-14 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 298208. wallace added a comment. some cleanup Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89408/new/ https://reviews.llvm.org/D89408 Files: lldb/include/lldb/Target/TraceSessionFileParser.h lldb/include/

[Lldb-commits] [PATCH] D89408: [trace] rename ThreadIntelPT to TraceThread

2020-10-14 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 298211. wallace added a comment. nits Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89408/new/ https://reviews.llvm.org/D89408 Files: lldb/include/lldb/Target/TraceSessionFileParser.h lldb/include/lldb/Tar

[Lldb-commits] [PATCH] D89283: [trace][intel-pt] Implement the basic decoding functionality

2020-10-14 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 298253. wallace added a comment. - Moved the non intel-pt changes to D89408 - Added some more complex tests: - A multifile case in which even the dynamic linker code is decoded - A variation of that case that doesn't decla

[Lldb-commits] [PATCH] D89283: [trace][intel-pt] Implement the basic decoding functionality

2020-10-14 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 298311. wallace added a comment. cleanup Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89283/new/ https://reviews.llvm.org/D89283 Files: lldb/include/lldb/Target/Trace.h lldb/source/Plugins/Process/Trace/P

[Lldb-commits] [PATCH] D89408: [trace] rename ThreadIntelPT to TraceThread

2020-10-15 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 298493. wallace added a comment. Herald added a reviewer: JDevlieghere. Addressed the issues that @labath pointed out regarding the TraceProcess and TraceThread: - These classes were not together - TraceProcess was an optional plug-in, which would break the

[Lldb-commits] [PATCH] D89283: [trace][intel-pt] Implement the basic decoding functionality

2020-10-15 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 298495. wallace added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89283/new/ https://reviews.llvm.org/D89283 Files: lldb/include/lldb/Target/Trace.h lldb/include/lldb/Target/TraceProces

[Lldb-commits] [PATCH] D89408: [trace] rename ThreadIntelPT to TraceThread

2020-10-16 Thread walter erquinigo via Phabricator via lldb-commits
wallace marked 4 inline comments as done. wallace added inline comments. Comment at: lldb/source/Target/TraceProcess.cpp:40 +bool TraceProcess::CanDebug(TargetSP target_sp, bool plugin_specified_by_name) { return plugin_specified_by_name; } labath wrote: > M

[Lldb-commits] [PATCH] D89408: [trace] rename ThreadIntelPT to TraceThread

2020-10-16 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 298671. wallace marked an inline comment as done. wallace added a comment. Herald added a subscriber: dexonsmith. Address all comments, including the renaming of the classes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

[Lldb-commits] [PATCH] D89283: [trace][intel-pt] Implement the basic decoding functionality

2020-10-16 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 298673. wallace added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89283/new/ https://reviews.llvm.org/D89283 Files: lldb/include/lldb/Target/ProcessTrace.h lldb/include/lldb/Target/Trac

[Lldb-commits] [PATCH] D89283: [trace][intel-pt] Implement the basic decoding functionality

2020-10-16 Thread walter erquinigo via Phabricator via lldb-commits
wallace marked 8 inline comments as done. wallace added a comment. > When you are dumping instructions we are only showing one hex value. Is this > the instruction address or the opcode itself? That's the instruction load address. In a later diff I'll implement pretty-printing similar to the "d

[Lldb-commits] [PATCH] D89283: [trace][intel-pt] Implement the basic decoding functionality

2020-10-16 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 298751. wallace marked 2 inline comments as done. wallace added a comment. Herald added a project: LLVM. Herald added a subscriber: llvm-commits. - C hanged the instruction iterator to the proposed signature - Added SupportsInstructionsCount to determine wheth

[Lldb-commits] [PATCH] D89283: [trace][intel-pt] Implement the basic decoding functionality

2020-10-16 Thread walter erquinigo via Phabricator via lldb-commits
wallace added a comment. nvm, libipt does report the addresses that failed to read, I'll quickly fix it Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89283/new/ https://reviews.llvm.org/D89283 ___ lldb-c

[Lldb-commits] [PATCH] D89283: [trace][intel-pt] Implement the basic decoding functionality

2020-10-16 Thread walter erquinigo via Phabricator via lldb-commits
wallace marked 2 inline comments as done. wallace added inline comments. Comment at: lldb/test/API/commands/trace/TestTraceDumpInstructions.py:142-143 +substrs=['''thread #1: tid = 3842849, total instructions = 2 + [0] no memory mapped at this address + [1] no memor

[Lldb-commits] [PATCH] D89283: [trace][intel-pt] Implement the basic decoding functionality

2020-10-16 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 298762. wallace added a comment. Figured out how to show the addressed that failed to decode. Now the output in those cases is something like [ 4] no memory mapped at this address: 0x77df1950 This should address all of Greg's comments Repository:

[Lldb-commits] [PATCH] D89408: [trace] rename ThreadIntelPT to ThreadTrace

2020-10-16 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 298766. wallace added a comment. address comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89408/new/ https://reviews.llvm.org/D89408 Files: lldb/include/lldb/Target/ProcessTrace.h lldb/include/lldb/Ta

[Lldb-commits] [PATCH] D89408: [trace] rename ThreadIntelPT to ThreadTrace

2020-10-16 Thread walter erquinigo via Phabricator via lldb-commits
wallace added inline comments. Comment at: lldb/include/lldb/Target/ThreadTrace.h:34 + /// this thread was being executed. + ThreadTrace(Process &process, lldb::tid_t tid, const FileSpec trace_file) + : Thread(process, tid), m_trace_file(trace_file) {}

[Lldb-commits] [PATCH] D89283: [trace][intel-pt] Implement the basic decoding functionality

2020-10-16 Thread walter erquinigo via Phabricator via lldb-commits
wallace added inline comments. Comment at: lldb/tools/intel-features/intel-pt/Decoder.cpp:301 + std::ofstream of("/tmp/multi-file.trace", std::ios::binary | std::ios::out); + for (auto bait : pt_buffer) vsk wrote: > Not sure what this is in aid of? I erroneou

[Lldb-commits] [PATCH] D89283: [trace][intel-pt] Implement the basic decoding functionality

2020-10-16 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 298768. wallace added a comment. removing unwanted changes in lldb/tools/intel-features/intel-pt/Decoder.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89283/new/ https://reviews.llvm.org/D89283 Files: ll

[Lldb-commits] [PATCH] D89283: [trace][intel-pt] Implement the basic decoding functionality

2020-10-16 Thread walter erquinigo via Phabricator via lldb-commits
wallace added a comment. @vsk, I agree with you regarding the files. At the moment our implementation of intel-pt tracing doesn't support collecting a trace, but soon we'll do so. Then, we'll be able to generate these trace files on the fly as the tests run, so I imagine I'll be deleting these

[Lldb-commits] [PATCH] D89283: [trace][intel-pt] Implement the basic decoding functionality

2020-10-16 Thread walter erquinigo via Phabricator via lldb-commits
wallace added inline comments. Comment at: llvm/include/llvm/Support/Error.h:1016 +/// expected-producer might be more clearly refactored to return an Optional. +template inline void consumeExpected(Expected E) { + if (!E) vsk wrote: > Probably best to not add

[Lldb-commits] [PATCH] D89283: [trace][intel-pt] Implement the basic decoding functionality

2020-10-16 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 298771. wallace added a comment. - Remove the llvm::consumeExpected function, as @vsk suggested. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89283/new/ https://reviews.llvm.org/D89283 Files: lldb/include/l

[Lldb-commits] [PATCH] D68289: [lldb-server/android] Show more processes and package name when necessary

2019-10-01 Thread walter erquinigo via Phabricator via lldb-commits
wallace created this revision. wallace added reviewers: clayborg, aadsm, labath, xiaobai. Herald added subscribers: lldb-commits, kristof.beyls, krytarowski, srhines. Herald added a project: LLDB. By default `platform process list` only shows the processes of the current user that lldb-server can

[Lldb-commits] [PATCH] D68289: [lldb-server/android] Show more processes and package name when necessary

2019-10-01 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 222671. wallace added a comment. remove file accidentally included Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68289/new/ https://reviews.llvm.org/D68289 Files: lldb/source/Host/linux/Host.cpp Index: lldb

[Lldb-commits] [PATCH] D68289: [lldb-server/android] Show more processes and package name when necessary

2019-10-01 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 222673. wallace added a comment. - [process list] make the TRIPLE column wider Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68289/new/ https://reviews.llvm.org/D68289 Files: lldb/source/Host/linux/Host.cpp

[Lldb-commits] [PATCH] D68289: [lldb-server/android] Show more processes and package name when necessary

2019-10-01 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 222674. wallace added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68289/new/ https://reviews.llvm.org/D68289 Files: lldb/source/Host/linux/Host.cpp Index: lldb/source/Host/linux/Host.cpp

[Lldb-commits] [PATCH] D68291: [process list] make the TRIPLE column wider

2019-10-01 Thread walter erquinigo via Phabricator via lldb-commits
wallace created this revision. wallace added reviewers: clayborg, labath, xiaobai, aadsm. Herald added subscribers: lldb-commits, kristof.beyls. Herald added a project: LLDB. Now that `process list` works better on the android platform, the arch aarch64-unknown-linux-android appears quite often.

[Lldb-commits] [PATCH] D68293: [android/process list] support showing process arguments

2019-10-01 Thread walter erquinigo via Phabricator via lldb-commits
wallace created this revision. wallace added reviewers: clayborg, aadsm, labath, xiaobai. Herald added subscribers: lldb-commits, atanasyan, JDevlieghere, kristof.beyls, arichardson, sdardis. Herald added a project: LLDB. wallace edited the summary of this revision. The qfProcessInfo and qsProces

<    3   4   5   6   7   8   9   10   >