[Lldb-commits] [PATCH] D118812: [lldb] Add a setting to skip long mangled names

2022-02-02 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added a comment. Is it worth trying to come up with a limit that's not arbitrarily picked? Comment at: lldb/source/Symbol/Symtab.cpp:300 +const uint64_t mangling_limit = +ModuleList::GetGlobalModuleListProperties().GetDemanglingLimit(); ---

[Lldb-commits] [PATCH] D118814: [lldb] Don't keep demangled names in memory after indexing

2022-02-02 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added a comment. > the amount of memory we save here is well worth the small performance hit any numbers to share? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118814/new/ https://reviews.llvm.org/D118814 ___ lldb-commits mailin

[Lldb-commits] [PATCH] D119155: [lldb] Print message after loading 'crashlog' command

2022-02-07 Thread Dave Lee via Phabricator via lldb-commits
kastiglione created this revision. kastiglione added a reviewer: JDevlieghere. kastiglione requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. Previously, importing `crashlog` resulted in a message being printed. The message was about other com

[Lldb-commits] [PATCH] D119155: [lldb] Print message after loading 'crashlog' command

2022-02-07 Thread Dave Lee via Phabricator via lldb-commits
kastiglione updated this revision to Diff 406523. kastiglione added a comment. Update createPythonInit.py Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119155/new/ https://reviews.llvm.org/D119155 Files: lldb/bindings/python/createPythonInit.py

[Lldb-commits] [PATCH] D119155: [lldb] Print message after loading 'crashlog' command

2022-02-07 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added a comment. > We have (shell) tests that import the crashlog command. Can you add a check > line to make sure the message gets printed? The message isn't printed for a Python `import`, only for an lldb `command script import`. Repository: rG LLVM Github Monorepo CHANGES SI

[Lldb-commits] [PATCH] D119155: [lldb] Print message after loading 'crashlog' command

2022-02-07 Thread Dave Lee via Phabricator via lldb-commits
kastiglione updated this revision to Diff 406548. kastiglione added a comment. Update tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119155/new/ https://reviews.llvm.org/D119155 Files: lldb/bindings/python/createPythonInit.py lldb/example

[Lldb-commits] [PATCH] D119155: [lldb] Print message after loading 'crashlog' command

2022-02-07 Thread Dave Lee via Phabricator via lldb-commits
kastiglione updated this revision to Diff 406565. kastiglione added a comment. remove changes to createPythonInit.py Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119155/new/ https://reviews.llvm.org/D119155 Files: lldb/examples/python/crashlog.

[Lldb-commits] [PATCH] D119179: [lldb] Call __lldb_init_module from __init__

2022-02-07 Thread Dave Lee via Phabricator via lldb-commits
kastiglione created this revision. kastiglione added a reviewer: JDevlieghere. kastiglione requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. Update `__init__.py` generation to implement `__lldb_init_module`, which calls `__lldb_init_module` o

[Lldb-commits] [PATCH] D119155: [lldb] Print message after loading 'crashlog' command

2022-02-07 Thread Dave Lee via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf8d889a789e2: [lldb] Print message after loading 'crashlog' command (authored by kastiglione). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119155/new/ htt

[Lldb-commits] [PATCH] D119179: [lldb] Call __lldb_init_module from __init__

2022-02-07 Thread Dave Lee via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbf02586c57ce: [lldb] Call __lldb_init_module from __init__ (authored by kastiglione). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119179/new/ https://revi

[Lldb-commits] [PATCH] D119298: [lldb] Fix step-avoid-regexp logging

2022-02-08 Thread Dave Lee via Phabricator via lldb-commits
kastiglione created this revision. kastiglione added a reviewer: jingham. kastiglione requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. Ensure step-avoid-regexp logs are emitted in the case where the regex has no capture groups. Without this

[Lldb-commits] [PATCH] D118494: [lldb] Observe SG_READ_ONLY flag in MachO binaries

2022-02-08 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added inline comments. Comment at: lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp:1436 result |= ePermissionsReadable; - if (seg_cmd.initprot & VM_PROT_WRITE) + if ((seg_cmd.initprot & VM_PROT_WRITE) && !(seg_cmd.flags & SG_READ_ONLY)) result |=

[Lldb-commits] [PATCH] D119616: [lldb] Replace asserts on .Success() with assertSuccess()

2022-02-11 Thread Dave Lee via Phabricator via lldb-commits
kastiglione created this revision. kastiglione added a reviewer: jingham. Herald added a subscriber: wenlei. kastiglione requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. Replace forms of `assertTrue(x.Success())` with `assertSuccess(x)`. R

[Lldb-commits] [PATCH] D119616: [lldb] Replace asserts on .Success() with assertSuccess()

2022-02-14 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added a comment. > That's probably because it was introduced only recently Thanks for adding it! I just learned about it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119616/new/ https://reviews.llvm.org/D119616 _

[Lldb-commits] [PATCH] D119616: [lldb] Replace asserts on .Success() with assertSuccess()

2022-02-14 Thread Dave Lee via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG779bbbf27fe6: [lldb] Replace asserts on .Success() with assertSuccess() (authored by kastiglione). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119616/new/

[Lldb-commits] [PATCH] D119737: [lldb] Add llvm_unreachable in RichManglingContext

2022-02-14 Thread Dave Lee via Phabricator via lldb-commits
kastiglione created this revision. kastiglione added a reviewer: JDevlieghere. kastiglione requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. Add `llvm_unreachable` to prevent warnings/errors in gcc and msvc. Repository: rG LLVM Github Mon

[Lldb-commits] [PATCH] D111634: [lldb] Print embedded nuls in char arrays (PR44649)

2022-02-17 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added a comment. > An exception to this rule is made for the nul character at the very end of > the string. @labath What do you think of hiding //all// trailing nul characters, not just the final one? For example consider: char buf[16] = "hello world"; # v buf # (char[16]) bu

[Lldb-commits] [PATCH] D119737: [lldb] Add llvm_unreachable in RichManglingContext

2022-02-18 Thread Dave Lee via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf20f9f5a32c0: [lldb] Add llvm_unreachable in RichManglingContext (authored by kastiglione). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119737/new/ https:

[Lldb-commits] [PATCH] D120292: [lldb] Add lldb.find helper function

2022-02-21 Thread Dave Lee via Phabricator via lldb-commits
kastiglione created this revision. kastiglione added reviewers: mib, JDevlieghere, jasonmolenda. kastiglione requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. Add `lldb.find()`, a function for interactive lookup and discovery of SB API. >Fro

[Lldb-commits] [PATCH] D120292: [lldb] Add lldb.find helper function

2022-02-22 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added a comment. @jasonmolenda one advantage this has over grepping is that the python specific extensions to SB are visible. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120292/new/ https://reviews.llvm.org/D120292 _

[Lldb-commits] [PATCH] D120292: [lldb] Add lldb.find helper function

2022-02-22 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added inline comments. Comment at: lldb/bindings/python/python-extensions.swig:528-533 +def find(pattern, flags=re.I): +""" +Find matching SB methods/properties. See also Python's builtin `help()`. +""" +import lldb +import re oh,

[Lldb-commits] [PATCH] D120292: [lldb] Add lldb.find helper function

2022-02-22 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added inline comments. Comment at: lldb/bindings/python/python-extensions.swig:528-533 +def find(pattern, flags=re.I): +""" +Find matching SB methods/properties. See also Python's builtin `help()`. +""" +import lldb +import re mib

[Lldb-commits] [PATCH] D120292: [lldb] Add lldb.find helper function

2022-02-24 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added a comment. It's too bad `script` doesn't have subcommands, because that might have been a natural place for such a command. Are there any commands you think this could be added? Or would this have to be a new top level command? A new top-level command seems unfortunate. Speak

[Lldb-commits] [PATCH] D120766: [lldb] Devirtualize IOHandler::{IsActive, SetIsDone, GetIsDone} (NFC)

2022-03-01 Thread Dave Lee via Phabricator via lldb-commits
kastiglione accepted this revision. kastiglione added a comment. This revision is now accepted and ready to land. good good CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120766/new/ https://reviews.llvm.org/D120766 ___ lldb-commits mailing li

[Lldb-commits] [PATCH] D120803: [lldb] Don't print *trailing* nuls in char arrays

2022-03-02 Thread Dave Lee via Phabricator via lldb-commits
kastiglione accepted this revision. kastiglione added a comment. This revision is now accepted and ready to land. thanks for doing this! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120803/new/ https://reviews.llvm.org/D120803 ___

[Lldb-commits] [PATCH] D120792: [lldb] Fix python errors in gdbremote.py

2022-03-02 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added inline comments. Comment at: lldb/examples/python/gdbremote.py:1224-1225 +print(json.dumps(json_tree, indent=4, separators=(',', ': '))) +except json.JSONDecodeError: +return I don't know this tool, but should it print the

[Lldb-commits] [PATCH] D120836: [LLDB] Remove cases of using namespace llvm:: from header file

2022-03-02 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added a comment. For the .cpp files with hundreds of lines modified, what do you think about adding `using namespace llvm::dwarf;` to those? For starters `DWARFExpression.cpp`, `DWARFAbbreviationDeclaration.cpp`, and `SymbolFileDWARF.cpp`. CHANGES SINCE LAST ACTION https://revie

[Lldb-commits] [PATCH] D120836: [LLDB] Remove cases of using namespace llvm:: from header file

2022-03-02 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added a comment. sorry Shafik I see that you've asked that very question. I'll give a +1 to making use of `using namespace` within .cpp files, especially where a namespace is used pervasively. When a file uses it only a namespace infrequently, I think explicit is reasonable. CHANG

[Lldb-commits] [PATCH] D120792: [lldb] Fix python errors in gdbremote.py

2022-03-02 Thread Dave Lee via Phabricator via lldb-commits
kastiglione accepted this revision. kastiglione added a comment. This revision is now accepted and ready to land. other than the comment about the json, looks all good to me! Comment at: lldb/examples/python/gdbremote.py:1224-1225 +print(json.dumps(json_tree, indent=4,

[Lldb-commits] [PATCH] D120917: Make the breakpoint log channel more useful

2022-03-03 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added inline comments. Comment at: lldb/source/Utility/Broadcaster.cpp:211-215 + Log *log = GetLog(LLDBLog::Events); + if (!log && event_sp->GetData()) +log = event_sp->GetData()->GetLogChannel(); + + if (log) { should this log to both channels

[Lldb-commits] [PATCH] D120917: Make the breakpoint log channel more useful

2022-03-03 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added inline comments. Comment at: lldb/source/Breakpoint/Breakpoint.cpp:1063-1065 + break_id_t bkpt_id = GetBreakpoint()->GetID(); + s->Format("bkpt: {0} type: {1}", bkpt_id, + BreakpointEventTypeAsCString(event_type)); For the location event

[Lldb-commits] [PATCH] D120917: Make the breakpoint log channel more useful

2022-03-03 Thread Dave Lee via Phabricator via lldb-commits
kastiglione accepted this revision. kastiglione added inline comments. This revision is now accepted and ready to land. Comment at: lldb/source/Utility/Broadcaster.cpp:211-215 + Log *log = GetLog(LLDBLog::Events); + if (!log && event_sp->GetData()) +log = event_sp->GetData(

[Lldb-commits] [PATCH] D121226: [lldb] Removed scoped timer from ReadMemoryFromFileCache

2022-03-08 Thread Dave Lee via Phabricator via lldb-commits
kastiglione created this revision. kastiglione added reviewers: aprantl, JDevlieghere, augusto2112. Herald added a project: All. kastiglione requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. `ReadMemoryFromFileCache` can be called at a high r

[Lldb-commits] [PATCH] D121252: [lldb] Add SBType::IsAggregateType

2022-03-08 Thread Dave Lee via Phabricator via lldb-commits
kastiglione created this revision. kastiglione added a reviewer: JDevlieghere. Herald added a project: All. kastiglione requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. Add `IsAggregateType` to the SB API. I'd like to use this from tests, a

[Lldb-commits] [PATCH] D121252: [lldb] Add SBType::IsAggregateType

2022-03-09 Thread Dave Lee via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG704001e90b3d: [lldb] Add SBType::IsAggregateType (authored by kastiglione). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121252/new/ https://reviews.llvm.o

[Lldb-commits] [PATCH] D119298: [lldb] Fix step-avoid-regexp logging

2022-03-09 Thread Dave Lee via Phabricator via lldb-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rG02def06e6036: [lldb] Fix step-avoid-regexp logging (authored by kastiglione). Herald added a project: All. Repository:

[Lldb-commits] [PATCH] D96655: [lldb] Call ThreadPlan::DiscardPlan from Thread::DiscardPlan

2022-03-10 Thread Dave Lee via Phabricator via lldb-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG47f652d69517: [lldb] Call ThreadPlan::DiscardPlan from Thread::Dis

[Lldb-commits] [PATCH] D121480: [lldb] Move Module::FindTypes scoped timer to SymbolFileDWARFDebugMap

2022-03-11 Thread Dave Lee via Phabricator via lldb-commits
kastiglione created this revision. kastiglione added reviewers: aprantl, augusto2112, JDevlieghere. kastiglione added projects: All, LLDB. kastiglione requested review of this revision. When debugging via debug map, `Module::FindTypes` is called for very frequently due to lookups happening over th

[Lldb-commits] [PATCH] D121481: Applying clang-tidy modernize-use-default-member-init over LLDB

2022-03-11 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added inline comments. Comment at: lldb/source/API/SBQueue.cpp:33 QueueImpl(const lldb::QueueSP &queue_sp) - : m_thread_list_fetched(false), m_pending_items_fetched(false) { + { m_queue_wp = queue_sp; should you also run clang-forma

[Lldb-commits] [PATCH] D121226: [lldb] Removed scoped timer from ReadMemoryFromFileCache

2022-03-11 Thread Dave Lee via Phabricator via lldb-commits
kastiglione closed this revision. kastiglione added a comment. Merged in rG3ca91adef8e885d89658a540860d3cee8746b1d9 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121226/new/ htt

[Lldb-commits] [PATCH] D121480: [lldb] Move Module::FindTypes scoped timer to SymbolFileDWARFDebugMap

2022-03-11 Thread Dave Lee via Phabricator via lldb-commits
kastiglione closed this revision. kastiglione added a comment. Merged in rG3ca91adef8e885d89658a540860d3cee8746b1d9 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121480/new/ htt

[Lldb-commits] [PATCH] D121226: [lldb] Removed scoped timer from ReadMemoryFromFileCache

2022-03-11 Thread Dave Lee via Phabricator via lldb-commits
kastiglione reopened this revision. kastiglione added a comment. This revision is now accepted and ready to land. Ignore previous comment, wrong diff. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121226/new/ https://reviews.llvm.org/D121226 _

[Lldb-commits] [PATCH] D121226: [lldb] Removed scoped timer from ReadMemoryFromFileCache

2022-03-11 Thread Dave Lee via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG94bda3aaa121: [lldb] Removed scoped timer from ReadMemoryFromFileCache (authored by kastiglione). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121226/new/

[Lldb-commits] [PATCH] D129456: [lldb] Add image dump pcm command

2022-07-10 Thread Dave Lee via Phabricator via lldb-commits
kastiglione created this revision. kastiglione added reviewers: JDevlieghere, mib, augusto2112. Herald added subscribers: kbarton, nemanjai. Herald added a project: All. kastiglione requested review of this revision. Herald added projects: clang, LLDB. Herald added subscribers: lldb-commits, cfe-co

[Lldb-commits] [PATCH] D129456: [lldb] Add image dump pcm command

2022-07-10 Thread Dave Lee via Phabricator via lldb-commits
kastiglione updated this revision to Diff 443531. kastiglione added a comment. add @skipUnlessDarwin Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129456/new/ https://reviews.llvm.org/D129456 Files: clang/include/clang/Frontend/FrontendActions.h

[Lldb-commits] [PATCH] D129456: [lldb] Add image dump pcm command

2022-07-10 Thread Dave Lee via Phabricator via lldb-commits
kastiglione updated this revision to Diff 443532. kastiglione added a comment. remove commented-out code in test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129456/new/ https://reviews.llvm.org/D129456 Files: clang/include/clang/Frontend/Front

[Lldb-commits] [PATCH] D129456: [lldb] Add image dump pcm-info command

2022-07-11 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added a reviewer: Michael137. kastiglione added inline comments. Comment at: lldb/test/API/commands/target/dump-pcm-info/TestDumpPCMInfo.py:37 + +breakpoint() +self.expect( mib wrote: > Left over ? yep thanks! Repository: rG LLVM G

[Lldb-commits] [PATCH] D129456: [lldb] Add image dump pcm-info command

2022-07-11 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added a comment. @JDevlieghere I had it as `dump pcm` at first, but switched it to `pcm-info` for two reasons 1. it doesn't dump the whole pcm, the actual ast itself is not dumped 2. to match the clang flag `-module-file-info` I agree that `pcm` is better, but I was worried it would

[Lldb-commits] [PATCH] D129456: [lldb] Add image dump pcm-info command

2022-07-11 Thread Dave Lee via Phabricator via lldb-commits
kastiglione updated this revision to Diff 443830. kastiglione added a comment. added error handling Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129456/new/ https://reviews.llvm.org/D129456 Files: clang/include/clang/Frontend/FrontendActions.h

[Lldb-commits] [PATCH] D129456: [lldb] Add image dump pcm-info command

2022-07-12 Thread Dave Lee via Phabricator via lldb-commits
kastiglione updated this revision to Diff 444057. kastiglione added a comment. simplify error handling by checking for .pcm extension Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129456/new/ https://reviews.llvm.org/D129456 Files: clang/include

[Lldb-commits] [PATCH] D129614: [lldb/crashlog] Surface error using SBCommandReturnObject argument

2022-07-13 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added inline comments. Comment at: lldb/examples/python/crashlog.py:1013-1015 +nonlocal result +result.SetError(sb_error, "error: %s" % message) +return Is this `error` function needed? `SetError` prepends the string "error: ".

[Lldb-commits] [PATCH] D129456: [lldb] Add image dump pcm-info command

2022-07-13 Thread Dave Lee 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 rGb5ccfeb6bfbb: [lldb] Add image dump pcm-info command (authored by kastiglione). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION h

[Lldb-commits] [PATCH] D131032: [lldb/crashlog] Update frame regex matcher

2022-08-03 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added inline comments. Comment at: lldb/examples/python/crashlog.py:604 + r'(' +version+ r')?' # img_version + r'(0x[0-9a-fA-F]{7}[0-9a-fA-F]*)' # addr + r' +(.*)'

[Lldb-commits] [PATCH] D129614: [lldb/crashlog] Surface error using SBCommandReturnObject argument

2022-08-03 Thread Dave Lee via Phabricator via lldb-commits
kastiglione accepted this revision. kastiglione added a comment. This revision is now accepted and ready to land. lgtm Comment at: lldb/examples/python/crashlog.py:1251-1253 +err = lldb.SBError() +err.SetErrorString(str(e)) +

[Lldb-commits] [PATCH] D131085: [lldb/crashlog] Refactor the CrashLogParser logic

2022-08-03 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added inline comments. Comment at: lldb/examples/python/crashlog.py:418-422 +def __new__(cls, debugger, path, verbose, *args, **kwargs): try: -return JSONCrashLogParser(debugger, path, verbose).parse() +return super(CrashLogParser,

[Lldb-commits] [PATCH] D131033: [lldb/crashlog] Fix parsing issue with `procPath`

2022-08-03 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added inline comments. Comment at: lldb/examples/python/crashlog.py:472-473 self.crashlog.process_identifier = json_data['procName'] -self.crashlog.process_path = json_data['procPath'] +if 'procPath' in json_data: +self.crashlog.pr

[Lldb-commits] [PATCH] D131138: [lldb] Dynamically generate enum names in lldbutil

2022-08-03 Thread Dave Lee via Phabricator via lldb-commits
kastiglione created this revision. kastiglione added reviewers: mib, JDevlieghere. Herald added a project: All. kastiglione requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. Change the `_to_str` functions in lldbutil to be dynamic. Instead o

[Lldb-commits] [PATCH] D131083: [lldb] Add assertStopReason helper function

2022-08-03 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added inline comments. Herald added a subscriber: Michael137. Comment at: lldb/packages/Python/lldbsuite/test/lldbutil.py:269-272 +elif enum == lldb.eStopReasonInstrumentation: +return "instrumentation" +elif enum == lldb.eStopReasonProcessorTrace: +

[Lldb-commits] [PATCH] D131138: [lldb] Dynamically generate enum names in lldbutil

2022-08-05 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added a comment. @mib I like that idea. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131138/new/ https://reviews.llvm.org/D131138 ___ lldb-commits mailing list lldb-commits@lists.llvm.org ht

[Lldb-commits] [PATCH] D131138: [lldb] Dynamically generate enum names in lldbutil

2022-08-05 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added a comment. I wonder how much breakage there would be if you implemented a bunch of the dunder methods. Ex: class StopReason: def __int__(self) -> int: ... def __eq__(self, other: StopReason | int) -> bool: ... # ... This would cover many cases, but not all.

[Lldb-commits] [PATCH] D131138: [lldb] Dynamically generate enum names in lldbutil

2022-08-05 Thread Dave Lee via Phabricator via lldb-commits
kastiglione updated this revision to Diff 450434. kastiglione added a comment. Fix bug; Add type annotations Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131138/new/ https://reviews.llvm.org/D131138 Files: lldb/packages/Python/lldbsuite/test/ll

[Lldb-commits] [PATCH] D131138: [lldb] Dynamically generate enum names in lldbutil

2022-08-05 Thread Dave Lee via Phabricator via lldb-commits
kastiglione requested review of this revision. kastiglione added a comment. @JDevlieghere @mib what do you think of introducing type annotations as code is being touched? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131138/new/ https://reviews.ll

[Lldb-commits] [PATCH] D131304: [lldb] Remove uses of six module (NFC)

2022-08-05 Thread Dave Lee via Phabricator via lldb-commits
kastiglione created this revision. kastiglione added reviewers: JDevlieghere, mib, jingham. Herald added a project: All. kastiglione requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. With lldb (& llvm) requiring Python 3.6+, use of the `six`

[Lldb-commits] [PATCH] D131304: [lldb] Remove uses of six module (NFC)

2022-08-05 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added inline comments. Comment at: lldb/packages/Python/lldbsuite/support/encoded_file.py:17-25 -def _encoded_read(old_read, encoding): -def impl(size): -result = old_read(size) -# If this is Python 2 then we need to convert the resulting `unicode`

[Lldb-commits] [PATCH] D131304: [lldb] Remove uses of six module (NFC)

2022-08-05 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added a comment. I left `third_party/Python/module/six`, in case there are any lldb scripts that depend on the existence of `six`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131304/new/ https://reviews.llvm.org/D131304

[Lldb-commits] [PATCH] D131304: [lldb] Remove uses of six module (NFC)

2022-08-05 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added inline comments. Comment at: lldb/packages/Python/lldbsuite/test/lldbtest.py:2278-2281 +assert not isinstance(patterns, str), \ "patterns must be a collection of strings" -assert not isinstance(substrs, six.string_types), \ +

[Lldb-commits] [PATCH] D131304: [lldb] Remove uses of six module (NFC)

2022-08-05 Thread Dave Lee via Phabricator via lldb-commits
kastiglione updated this revision to Diff 450444. kastiglione added a comment. Restore some "str" variable names Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131304/new/ https://reviews.llvm.org/D131304 Files: lldb/bindings/interface/SBData.i

[Lldb-commits] [PATCH] D131304: [lldb] Remove uses of six module (NFC)

2022-08-05 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added a comment. @mib the tests pass on my machine. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131304/new/ https://reviews.llvm.org/D131304 ___ lldb-commits mailing list lldb-commits@lists

[Lldb-commits] [PATCH] D131305: [lldb] Tidy some regex in crashlog.py (NFC)

2022-08-05 Thread Dave Lee via Phabricator via lldb-commits
kastiglione created this revision. kastiglione added reviewers: JDevlieghere, mib. Herald added a project: All. kastiglione requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. A spiritual follow up to D131032 .

[Lldb-commits] [PATCH] D131305: [lldb] Tidy some regex in crashlog.py (NFC)

2022-08-05 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added a comment. this includes changes in D131032 and so depends on it merging first. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131305/new/ https://reviews.llvm.org/D131305 __

[Lldb-commits] [PATCH] D131138: [lldb] Dynamically generate enum names in lldbutil

2022-08-07 Thread Dave Lee via Phabricator via lldb-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGe49c1568b616: [lldb] Dynamically generate enum names in lldbutil (

[Lldb-commits] [PATCH] D131304: [lldb] Remove uses of six module (NFC)

2022-08-07 Thread Dave Lee via Phabricator via lldb-commits
kastiglione updated this revision to Diff 450668. kastiglione added a comment. Missed a restore of `str` variable name Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131304/new/ https://reviews.llvm.org/D131304 Files: lldb/bindings/interface/SBDa

[Lldb-commits] [PATCH] D131304: [lldb] Remove uses of six module (NFC)

2022-08-08 Thread Dave Lee via Phabricator via lldb-commits
kastiglione updated this revision to Diff 450843. kastiglione added a comment. Herald added a subscriber: mgorny. remove LLDB_USE_SYSTEM_SIX Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131304/new/ https://reviews.llvm.org/D131304 Files: lldb/b

[Lldb-commits] [PATCH] D131304: [lldb] Remove uses of six module (NFC)

2022-08-08 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added inline comments. Comment at: lldb/bindings/python/CMakeLists.txt:63-68 - if(NOT LLDB_USE_SYSTEM_SIX) -add_custom_command(TARGET ${swig_target} POST_BUILD VERBATIM - COMMAND ${CMAKE_COMMAND} -E copy -"${LLDB_SOURCE_DIR}/third_party/Python/module

[Lldb-commits] [PATCH] D131085: [lldb/crashlog] Refactor the CrashLogParser logic

2022-08-08 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added inline comments. Comment at: lldb/examples/python/crashlog.py:422-425 +# When `__new__` is overriden, if the returned type is the same +# as the class type, or related to it, the `__init__` method is +# automatically called after `__new__

[Lldb-commits] [PATCH] D131085: [lldb/crashlog] Refactor the CrashLogParser logic

2022-08-08 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added inline comments. Comment at: lldb/examples/python/crashlog.py:447 +class JSONCrashLogParser(CrashLogParser): +def __new__(cls, debugger, path, verbose): +with open(path, 'r') as f: can this be an `__init__`? CHANGES SINCE LAST ACTI

[Lldb-commits] [PATCH] D131085: [lldb/crashlog] Refactor the CrashLogParser logic

2022-08-09 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added inline comments. Comment at: lldb/examples/python/crashlog.py:434 except CrashLogFormatException: -return TextCrashLogParser(debugger, path, verbose).parse() +return object().__new__(TextCrashLogParser) mib wr

[Lldb-commits] [PATCH] D131085: [lldb/crashlog] Refactor the CrashLogParser logic

2022-08-09 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added inline comments. Comment at: lldb/examples/python/crashlog.py:434 except CrashLogFormatException: -return TextCrashLogParser(debugger, path, verbose).parse() +return object().__new__(TextCrashLogParser) mib wr

[Lldb-commits] [PATCH] D131085: [lldb/crashlog] Refactor the CrashLogParser logic

2022-08-09 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added inline comments. Comment at: lldb/examples/python/crashlog.py:434 except CrashLogFormatException: -return TextCrashLogParser(debugger, path, verbose).parse() +return object().__new__(TextCrashLogParser) kastig

[Lldb-commits] [PATCH] D131085: [lldb/crashlog] Refactor the CrashLogParser logic

2022-08-09 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added a comment. was the chmod intentional? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131085/new/ https://reviews.llvm.org/D131085 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[Lldb-commits] [PATCH] D131085: [lldb/crashlog] Refactor the CrashLogParser logic

2022-08-09 Thread Dave Lee via Phabricator via lldb-commits
kastiglione accepted this revision. kastiglione added a comment. This revision is now accepted and ready to land. thanks for having patience with us reviewers, lgtm with one comment about python versions Comment at: lldb/examples/python/crashlog.py:421 +def __new__(cls, de

[Lldb-commits] [PATCH] D131539: [lldb] Make sure all Python API tests are marked as NO_DEBUG_INFO_TESTCASE

2022-08-09 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added a comment. this diff has made me wonder: should we have a `NoDebugInfoTestCase` that can be used by any test, and would replace assigning to `NO_DEBUG_INFO_TESTCASE`? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131539/new/ https://reviews.llvm.org/D131539 _

[Lldb-commits] [PATCH] D131305: [lldb] Tidy some regex in crashlog.py (NFC)

2022-08-11 Thread Dave Lee via Phabricator via lldb-commits
kastiglione updated this revision to Diff 451983. kastiglione added a comment. Fix one crashlog test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131305/new/ https://reviews.llvm.org/D131305 Files: lldb/examples/python/crashlog.py lldb/test/S

[Lldb-commits] [PATCH] D131719: [lldb/crashlog] Adapt raw text crashlog exception to json format

2022-08-11 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added inline comments. Comment at: lldb/examples/python/crashlog.py:628 ) +exception_type_regex = re.compile(r'^Exception Type:\s+(EXC_.*) \s*\((.*)\)') +exception_codes_regex = re.compile(r'^Exception Codes:\s+(0x[0-9a-fA-F

[Lldb-commits] [PATCH] D131719: [lldb/crashlog] Adapt raw text crashlog exception to json format

2022-08-11 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added inline comments. Comment at: lldb/examples/python/crashlog.py:708-709 +if exception_extra_match: +if not self.crashlog.exception['type']: +return +self.crashlog.exception['message'] = exception_ext

[Lldb-commits] [PATCH] D131305: [lldb] Tidy some regex in crashlog.py (NFC)

2022-08-11 Thread Dave Lee 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 rG28d0c0c2c8e8: [lldb] Tidy some regex in crashlog.py (NFC) (authored by kastiglione). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[Lldb-commits] [PATCH] D131304: [lldb] Remove uses of six module (NFC)

2022-08-11 Thread Dave Lee via Phabricator via lldb-commits
kastiglione updated this revision to Diff 452007. kastiglione added a comment. Restore LLDB_USE_SYSTEM_SIX Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131304/new/ https://reviews.llvm.org/D131304 Files: lldb/bindings/interface/SBData.i lldb/

[Lldb-commits] [PATCH] D131719: [lldb/crashlog] Adapt raw text crashlog exception to json format

2022-08-11 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added inline comments. Comment at: lldb/examples/python/crashlog.py:343 self.errors = list() +self.exception = None self.crashed_thread_idx = -1 should this be initialized to `{}`? Comment at: lldb/examples

[Lldb-commits] [PATCH] D131719: [lldb/crashlog] Adapt raw text crashlog exception to json format

2022-08-11 Thread Dave Lee via Phabricator via lldb-commits
kastiglione accepted this revision. kastiglione added a comment. This revision is now accepted and ready to land. one typo to fix, but otherwise looks good Comment at: lldb/examples/python/crashlog.py:690-691 +self.crashlog.thread_exception_subtype = line[18:].strip

[Lldb-commits] [PATCH] D131304: [lldb] Remove uses of six module (NFC)

2022-08-11 Thread Dave Lee 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 rG56f9cfe30c44: [lldb] Remove uses of six module (NFC) (authored by kastiglione). Changed prior to commit: https://reviews.llvm.org/D131304?vs=45200

[Lldb-commits] [PATCH] D131772: [LLDB] Remove __future__ imports from examples

2022-08-12 Thread Dave Lee via Phabricator via lldb-commits
kastiglione accepted this revision. kastiglione added a comment. This revision is now accepted and ready to land. thanks I had the same thought Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131772/new/ https://reviews.llvm.org/D131772

[Lldb-commits] [PATCH] D131761: [LLDB] Remove __future__ imports from tests

2022-08-12 Thread Dave Lee via Phabricator via lldb-commits
kastiglione accepted this revision. kastiglione added a comment. This revision is now accepted and ready to land. 👍 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131761/new/ https://reviews.llvm.org/D131761

[Lldb-commits] [PATCH] D117383: [lldb] Expose std::pair children for unordered_map

2022-08-12 Thread Dave Lee via Phabricator via lldb-commits
kastiglione updated this revision to Diff 452364. kastiglione added a comment. Use backend's type name to differentiate between unordered_{map,set} Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117383/new/ https://reviews.llvm.org/D117383 Files:

[Lldb-commits] [PATCH] D117383: [lldb] Expose std::pair children for unordered_map

2022-08-12 Thread Dave Lee via Phabricator via lldb-commits
kastiglione updated this revision to Diff 452365. kastiglione added a comment. Ignore the internal field name and use type names for conditions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117383/new/ https://reviews.llvm.org/D117383 Files: lld

[Lldb-commits] [PATCH] D117383: [lldb] Expose std::pair children for unordered_map

2022-08-12 Thread Dave Lee via Phabricator via lldb-commits
kastiglione updated this revision to Diff 452366. kastiglione added a comment. Handle GetTypeName() returning strings both with and without std:: namespace Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117383/new/ https://reviews.llvm.org/D117383

[Lldb-commits] [PATCH] D117383: [lldb] Expose std::pair children for unordered_map

2022-08-12 Thread Dave Lee via Phabricator via lldb-commits
kastiglione updated this revision to Diff 452367. kastiglione added a comment. fix comment grammar Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117383/new/ https://reviews.llvm.org/D117383 Files: lldb/source/Plugins/Language/CPlusPlus/LibCxxUno

[Lldb-commits] [PATCH] D131996: Use a SmallPtrSet rather than a SmallVector in ClusterManager.

2022-08-16 Thread Dave Lee via Phabricator via lldb-commits
kastiglione accepted this revision. kastiglione added a comment. This revision is now accepted and ready to land. +1 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131996/new/ https://reviews.llvm.org/D131996 ___

[Lldb-commits] [PATCH] D132307: [lldb] Switch RegularExpression from llvm::Regex to std::regex

2022-08-20 Thread Dave Lee via Phabricator via lldb-commits
kastiglione created this revision. kastiglione added reviewers: JDevlieghere, jingham, mib, aprantl. Herald added a subscriber: mgorny. Herald added a project: All. kastiglione requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. Use `std::regex

[Lldb-commits] [PATCH] D132307: [lldb] Switch RegularExpression from llvm::Regex to std::regex

2022-08-20 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added inline comments. Comment at: lldb/source/Utility/CMakeLists.txt:29 + PROPERTIES COMPILE_OPTIONS + "-fcxx-exceptions" +) the `std::regex` constructor throws `std::regex_error` if the pattern is invalid. For this reason, exceptions are enabled

[Lldb-commits] [PATCH] D132307: [lldb] Switch RegularExpression from llvm::Regex to std::regex

2022-08-20 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added inline comments. Comment at: lldb/include/lldb/Utility/RegularExpression.h:92 + std::regex m_regex; + std::optional m_regex_error; }; JDevlieghere wrote: > There's an ongoing discussion on the forums [1] to replace `llvm::Optional` > with `s

<    1   2   3   4   5   6   7   8   >