[Lldb-commits] [PATCH] D131554: [LLDB][NFC] Reliability fixes for ObjectFileMachO.cpp

2022-08-10 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda accepted this revision. jasonmolenda added a comment. LGTM. fwiw it's nul-terminated ("NUL" being the '\0' character), not null-terminated ((void*)0). i don't really care, but nb. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131554/n

[Lldb-commits] [PATCH] D131328: [lldb] Support fetching symbols with dsymForUUID in the background

2022-08-10 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. This is an awesome enhancement for environments where the dSYM can be located programmatically --- downloading only the dSYMs that are actually being used in a debug session makes it low overhead versus grabbing everything, and it's great to have them loaded for yo

[Lldb-commits] [PATCH] D131741: [lldb] XFAIL target variable tests on Intel/Darwin when using Xcode 14

2022-08-11 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. I don't know if I support bothering with checking ld's version, I think these tests should be skipped on Darwin. Before macOS 12, if you built these tests arm64e, the address for something like `my_global_str` in lldb/test/API/commands/target/basic/globals.c would

[Lldb-commits] [PATCH] D131741: [lldb] Skip target variable tests on Darwin because of chained fixups

2022-08-12 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda accepted this revision. jasonmolenda added a comment. This revision is now accepted and ready to land. LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131741/new/ https://reviews.llvm.org/D131741 ___ lldb-commits mailing list

[Lldb-commits] [PATCH] D131328: [lldb] Support fetching symbols with dsymForUUID in the background

2022-08-15 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda accepted this revision. jasonmolenda added a comment. This revision is now accepted and ready to land. LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131328/new/ https://reviews.llvm.org/D131328 ___ lldb-commits mailing list

[Lldb-commits] [PATCH] D131407: [lldb] Flush the global thread pool in Debugger::Terminate

2022-08-15 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda accepted this revision. jasonmolenda added a comment. This revision is now accepted and ready to land. This looks good to me. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131407/new/ https://reviews.llvm.org/D131407 ___ lldb-com

[Lldb-commits] [PATCH] D132433: [lldb] Teach LLDB about filesets (WIP)

2022-08-23 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda accepted this revision. jasonmolenda added a comment. This revision is now accepted and ready to land. This all looks great. I am working on a patch that will build on this, but I will be working with a memory image which needs the `CreateMemoryInstance()` ObjectFile interface impl

[Lldb-commits] [PATCH] D132510: [RISCV][LLDB] Add initial SysV ABI support

2022-08-23 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. I think this DefaultUnwindPlan has the same problem that the previous patch did -- this looks like the unwind state on function entry. There is an `ABI::CreateFunctionEntryUnwindPlan()` for the unwind state on the first instruction of a function, but the idea of D

[Lldb-commits] [PATCH] D132510: [RISCV][LLDB] Add initial SysV ABI support

2022-08-24 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. In D132510#3745412 , @kasper81 wrote: > @jasonmolenda the problem with original review is that we were waiting for > the wholesale support for 3.5 years, and it rendered into an impossible task > for the author. I don't wan

[Lldb-commits] [PATCH] D122177: [lldb] Fix log & progress report for in-memory binaries

2022-03-21 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda accepted this revision. jasonmolenda added a comment. This revision is now accepted and ready to land. LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122177/new/ https://reviews.llvm.org/D122177 ___ lldb-commits mailing list

[Lldb-commits] [PATCH] D122349: [lldb] Don't persist the LINKEDIT slide in the indirect symbol offset

2022-03-23 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda accepted this revision. jasonmolenda added a comment. This revision is now accepted and ready to land. Ah, good catch. Yes this looks correct to me. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122349/new/ https://reviews.llvm.org/D122349

[Lldb-commits] [PATCH] D122373: [NFC] Be more lazy about looking up simulator SDKs on macs

2022-03-24 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda created this revision. jasonmolenda added a reviewer: aprantl. jasonmolenda added a project: LLDB. Herald added a subscriber: JDevlieghere. Herald added a project: All. jasonmolenda requested review of this revision. Herald added a subscriber: lldb-commits. This is a perf fix for when

[Lldb-commits] [PATCH] D122373: [NFC] Be more lazy about looking up simulator SDKs on macs

2022-03-24 Thread Jason Molenda via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG99515783a63c: Don't search for sim SDK path until we know we need it (authored by jasonmolenda). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122373/new/ h

[Lldb-commits] [PATCH] D122848: Reduce extraneous temp strings in debugserver, free objects when they're not longer needed

2022-03-31 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda created this revision. jasonmolenda added reviewers: jingham, JDevlieghere. jasonmolenda added a project: LLDB. Herald added a project: All. jasonmolenda requested review of this revision. Herald added a subscriber: lldb-commits. Looking at debugserver's memory use a bit, I noticed th

[Lldb-commits] [PATCH] D122848: Reduce extraneous temp strings in debugserver, free objects when they're not longer needed

2022-03-31 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added inline comments. Comment at: lldb/tools/debugserver/source/RNBRemote.cpp:588 + stream.str(std::string()); + stream.clear(); return SendPacket(payload); JDevlieghere wrote: > `clear` doesn't do what you think it does, it modifies the state

[Lldb-commits] [PATCH] D122848: Reduce extraneous temp strings in debugserver, free objects when they're not longer needed

2022-03-31 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. In D122848#3420581 , @JDevlieghere wrote: > If debugserver linked against libSupport we could have saved the additional > copy altogether by using `llvm::raw_string_ostream`: > > std::string str; > llvm::raw_string_ostr

[Lldb-commits] [PATCH] D122848: Reduce extraneous temp strings in debugserver, free objects when they're not longer needed

2022-03-31 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. I was chatting with Jonas about this a bit. The part of this patch which fixes all of the `SendPacket(outbuf.c_str())` calls, to avoid a temporary copy of the std::string, is clearly necessary and correct. The changes to clear the ostringstreams eagerly after we'

[Lldb-commits] [PATCH] D122848: Reduce extraneous temp strings in debugserver, free objects when they're not longer needed

2022-03-31 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda updated this revision to Diff 419637. jasonmolenda added a comment. Address Jonas' feedback by removing the parts of the patch that freed the ostringstream's after binary-escaped versions of them had been generated. Instead I'll add DumpEscaped methods to the JSONGenerator class.

[Lldb-commits] [PATCH] D122848: Reduce extraneous temp strings in debugserver, free objects when they're not longer needed

2022-03-31 Thread Jason Molenda 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 rGc04fdfa17e6d: Update callers to SendPacket with std::string's to not devolve to c-strs (authored by jasonmolenda). Reposi

[Lldb-commits] [PATCH] D122882: Add JSONGenerator::DumpBinaryEscaped method in debugserver, update most callers to use this, skip escaping step

2022-04-01 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda created this revision. jasonmolenda added reviewers: JDevlieghere, jingham. jasonmolenda added a project: LLDB. Herald added a project: All. jasonmolenda requested review of this revision. Herald added a subscriber: lldb-commits. Most packets which return JSON use JSONGenerator::Dump

[Lldb-commits] [PATCH] D122882: Add JSONGenerator::DumpBinaryEscaped method in debugserver, update most callers to use this, skip escaping step

2022-04-04 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda updated this revision to Diff 420303. jasonmolenda added a comment. Update patch to remove unnecessary temporary std::string when dumping a string into its JSON representation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122882/new/

[Lldb-commits] [PATCH] D122882: Add JSONGenerator::DumpBinaryEscaped method in debugserver, update most callers to use this, skip escaping step

2022-04-04 Thread Jason Molenda 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 rG7ebcd8891a7a: Add DumpBinaryEscaped method to JSONGenerator, avoid extra copy (authored by jasonmolenda). Repository: r

[Lldb-commits] [PATCH] D123098: [lldb] Fix undefined behavior: left shift of negative value

2022-04-04 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda accepted this revision. jasonmolenda added a comment. This revision is now accepted and ready to land. LGTM but `unobfuscated` is a uint64_t, does this cast do anything now? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123098/new/ https://reviews.llvm.org/D123098

[Lldb-commits] [PATCH] D123269: debugserver would never write modified xmm/ymm/zmm register values into the inferior

2022-04-06 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda created this revision. jasonmolenda added a project: LLDB. Herald added subscribers: JDevlieghere, pengfei. Herald added a project: All. jasonmolenda requested review of this revision. Herald added a subscriber: lldb-commits. A small mistake in the method that accepts new xmm/ymm/zmm

[Lldb-commits] [PATCH] D123269: debugserver would never write modified xmm/ymm/zmm register values into the inferior

2022-04-06 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda updated this revision to Diff 421044. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123269/new/ https://reviews.llvm.org/D123269 Files: lldb/test/Shell/Register/x86-64-write.test lldb/test/Shell/Register/x86-64-ymm-write.test lldb

[Lldb-commits] [PATCH] D123269: debugserver would never write modified xmm/ymm/zmm register values into the inferior

2022-04-06 Thread Jason Molenda via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4d3cc2783138: Correct debugserver to write xmm/ymm/zmm reg values (authored by jasonmolenda). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123269/new/ http

[Lldb-commits] [PATCH] D123616: [debugserver] Add HAVE_LIBCOMPRESSION guards

2022-04-12 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda accepted this revision. jasonmolenda added a comment. This revision is now accepted and ready to land. I think we only support building debugserver on macOS systems that have libcompression. Was there a configuration where this resulted in an error? lldb needs to test for libcompr

[Lldb-commits] [PATCH] D123616: [debugserver] Add HAVE_LIBCOMPRESSION guards

2022-04-12 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. fwiw, commit 681f6c2f552fb9b57380f4bfd453e1fc9b6a099e Author: Jason Molenda Date: Tue Dec 18 22:21:48 2018 + Un-conditionalize use of libcompression. debugserver only builds on Darwin systems and libcompression has been in the OS for over

[Lldb-commits] [PATCH] D123616: [debugserver] Add HAVE_LIBCOMPRESSION guards

2022-04-12 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. Sounds good. I think it's test-and-use for lldb, and debugserver ended up structure the same way. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123616/new/ https://reviews.llvm.org/D123616 ___ lldb-commits maili

[Lldb-commits] [PATCH] D123743: [lldb] Show the DBGError if dsymForUUID can't find a dSYM

2022-04-14 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda accepted this revision. jasonmolenda added a comment. This revision is now accepted and ready to land. LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123743/new/ https://reviews.llvm.org/D123743 ___ lldb-commits mailing list

[Lldb-commits] [PATCH] D124198: [LLDB][Unwind] Add stack scanning as fallback unwind plan if no symbol file is available.

2022-04-21 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. This is obviously building on Pavel's work of https://reviews.llvm.org/D66638 for Win32 systems. What problem with that existing patchset is this addressing? Pavel's original patch assumes that we can retrieve a function's expected stack frame size, and the size

[Lldb-commits] [PATCH] D124198: [LLDB][Unwind] Add stack scanning as fallback unwind plan if no symbol file is available.

2022-04-21 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. I guess the other comment I would make is whether we should have a new ivar, instead of using the unused 0th bit of search_offset. fwiw I wasn't real clear in my previous comment. As you say in the title of this, you're trying to backtrace through a case where you

[Lldb-commits] [PATCH] D111209: Don't push null ExecutionContext on CommandInterpreter exectx stack

2022-04-25 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. Herald added a project: All. Hi all, getting back to this one after six months, hah. Reading through Jim's thoughts on this, I think we're OK to add this refinement. Tatyana also thought that removing this altogether would be an option, but this has been sitting

[Lldb-commits] [PATCH] D124492: Update CFA to be in terms of $sp instead of $fp when $fp is overwritten in epilogue on AArch64

2022-04-26 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda created this revision. jasonmolenda added reviewers: jingham, JDevlieghere. jasonmolenda added a project: LLDB. Herald added a subscriber: kristof.beyls. Herald added a project: All. jasonmolenda requested review of this revision. Herald added a subscriber: lldb-commits. When we can t

[Lldb-commits] [PATCH] D121631: Introduce new symbol on-demand for debug info

2022-04-26 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. Hi, I noticed that we have two tests with the same name, lldb/test/API/lang/c/shared_lib/TestSharedLib.py lldb/test/API/symbol_ondemand/shared_library/TestSharedLib.py Can you rename your newly added test? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[Lldb-commits] [PATCH] D121631: Introduce new symbol on-demand for debug info

2022-04-26 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. Thanks! Yeah, I only noticed because lldb-dotest threw an error when I was trying to run a test case earlier. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121631/new/ https://reviews.llvm.org/D121631 __

[Lldb-commits] [PATCH] D111209: Don't push null ExecutionContext on CommandInterpreter exectx stack

2022-04-26 Thread Jason Molenda 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 rGa2681c43308c: Don't push null ExecutionContext on CommandInterp exectx stack (authored by jasonmolenda). Changed prior to

[Lldb-commits] [PATCH] D124597: Select the correct DWARF location list entry when looking for variable locations

2022-04-28 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda created this revision. jasonmolenda added reviewers: jingham, JDevlieghere. jasonmolenda added a project: LLDB. Herald added subscribers: pengfei, kristof.beyls. Herald added a project: All. jasonmolenda requested review of this revision. Herald added a subscriber: lldb-commits. When

[Lldb-commits] [PATCH] D124492: Update CFA to be in terms of $sp instead of $fp when $fp is overwritten in epilogue on AArch64

2022-04-28 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda updated this revision to Diff 425901. jasonmolenda added a comment. cleanup patch to remove an unintended diff. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124492/new/ https://reviews.llvm.org/D124492 Files: lldb/source/Plugins/U

[Lldb-commits] [PATCH] D124597: Select the correct DWARF location list entry when looking for variable locations

2022-04-29 Thread Jason Molenda via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6e56c4961a10: Decr pc when looking for DWARF loc list entry mid-stack (authored by jasonmolenda). Changed prior to commit: https://reviews.llvm.org/D124597?vs=425703&id=426166#toc Repository: rG LLVM

[Lldb-commits] [PATCH] D124597: Select the correct DWARF location list entry when looking for variable locations

2022-04-29 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. In D124597#3483197 , @clayborg wrote: > I wonder if this will help optimized code debugging at all!? Good catch It came up in a kernel debugging session iirc; it was the case of a function doing a noreturn call, and when yo

[Lldb-commits] [PATCH] D124814: Fix debugserver translation check

2022-05-02 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. Ah, I see what you're doing. You've got a shell running x86_64 or something (maybe started lldb as x86_64) so everything that is spawned from that is x86_64 -- debugserver and the inferior process -- and so you hit this. let me look more closely later tonight, bu

[Lldb-commits] [PATCH] D124814: Fix debugserver translation check

2022-05-02 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. (tbh every case I've seen, it's someone who checked "Run in Rosetta" on the Xcode.app bundle with Finder, and are running their entire IDE as x86_64) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124814/new/ https

[Lldb-commits] [PATCH] D124814: Fix debugserver translation check

2022-05-03 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda accepted this revision. jasonmolenda added a comment. This revision is now accepted and ready to land. LGTM. I see how your workflow is set up. Yeah, you return an error if someone tries to run debugserver in translation (and the inferior isn't x86_64) - that's what we need to do,

[Lldb-commits] [PATCH] D124957: When picking a row from an UnwindPlan on a mid-stack frame, decr pc to get within bounds of the CALL instruction

2022-05-04 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda created this revision. jasonmolenda added reviewers: labath, clayborg. jasonmolenda added a project: LLDB. Herald added a subscriber: JDevlieghere. Herald added a project: All. jasonmolenda requested review of this revision. Herald added a subscriber: lldb-commits. This is addressing

[Lldb-commits] [PATCH] D124492: Update CFA to be in terms of $sp instead of $fp when $fp is overwritten in epilogue on AArch64

2022-05-04 Thread Jason Molenda via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdf552edb08c4: Update the CFA to use $sp when $fp is restored on arm64 (authored by jasonmolenda). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124492/new/

[Lldb-commits] [PATCH] D124957: When picking a row from an UnwindPlan on a mid-stack frame, decr pc to get within bounds of the CALL instruction

2022-05-04 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. Ah, I can't share the binary/corefile that led me to this issue but I can show what it looks like. I have a function with a noreturn call, it's a crashing scenario where (as always) this is the most important bit to get right, to show the crash, 0xfff02

[Lldb-commits] [PATCH] D124957: When picking a row from an UnwindPlan on a mid-stack frame, decr pc to get within bounds of the CALL instruction

2022-05-05 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added inline comments. Comment at: lldb/source/Target/RegisterContextUnwind.cpp:642-643 m_full_unwind_plan_sp = GetFullUnwindPlanForFrame(); int valid_offset = -1; if (IsUnwindPlanValidForCurrentPC(m_full_unwind_plan_sp, valid_offset)) { + active_

[Lldb-commits] [PATCH] D124957: When picking a row from an UnwindPlan on a mid-stack frame, decr pc to get within bounds of the CALL instruction

2022-05-05 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda updated this revision to Diff 427437. jasonmolenda added a comment. Update to address Greg's feedback. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124957/new/ https://reviews.llvm.org/D124957 Files: lldb/examples/python/crashlog.p

[Lldb-commits] [PATCH] D124957: When picking a row from an UnwindPlan on a mid-stack frame, decr pc to get within bounds of the CALL instruction

2022-05-05 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added inline comments. Comment at: lldb/source/Target/RegisterContextUnwind.cpp:642-643 m_full_unwind_plan_sp = GetFullUnwindPlanForFrame(); int valid_offset = -1; if (IsUnwindPlanValidForCurrentPC(m_full_unwind_plan_sp, valid_offset)) { + active_

[Lldb-commits] [PATCH] D124957: When picking a row from an UnwindPlan on a mid-stack frame, decr pc to get within bounds of the CALL instruction

2022-05-05 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda updated this revision to Diff 427441. jasonmolenda added a comment. Accidentally included an unrelated change in the last update. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124957/new/ https://reviews.llvm.org/D124957 Files: lldb

[Lldb-commits] [PATCH] D125042: have crashlog.py insert a stack frame with $lr when stack frame 0 is address 0

2022-05-05 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda created this revision. jasonmolenda added a reviewer: kastiglione. jasonmolenda added a project: LLDB. Herald added subscribers: JDevlieghere, kristof.beyls. Herald added a project: All. jasonmolenda requested review of this revision. Herald added a subscriber: lldb-commits. A common

[Lldb-commits] [PATCH] D124957: When picking a row from an UnwindPlan on a mid-stack frame, decr pc to get within bounds of the CALL instruction

2022-05-05 Thread Jason Molenda 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 rGb6388e4a0050: Decr return pc mid-stack when picking UnwindPlan row (authored by jasonmolenda). Repository: rG LLVM Gith

[Lldb-commits] [PATCH] D124957: When picking a row from an UnwindPlan on a mid-stack frame, decr pc to get within bounds of the CALL instruction

2022-05-05 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added inline comments. Comment at: lldb/source/Target/RegisterContextUnwind.cpp:90 // check if m_current_pc is valid if (unwind_plan_sp->PlanValidAtAddress(m_current_pc)) { // yes - current offset can be used as is clayborg wrote: > Don't

[Lldb-commits] [PATCH] D125042: have crashlog.py insert a stack frame with $lr when stack frame 0 is address 0

2022-05-05 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. In D125042#3495475 , @JDevlieghere wrote: > Does that mean that the interactive crashlogs (`crashlog -i`) do this > correctly? I didn't look at that when I wrote the patch; asked @mib and it sounded like he was going to d

[Lldb-commits] [PATCH] D125042: have crashlog.py insert a stack frame with $lr when stack frame 0 is address 0

2022-05-05 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added inline comments. Comment at: lldb/examples/python/crashlog.py:520 + +# on arm64 systems, if jump through a null function pointer, +# we end up at address 0 and the crash reporter unwinder kastiglione wrote: > (minor) I

[Lldb-commits] [PATCH] D125042: have crashlog.py insert a stack frame with $lr when stack frame 0 is address 0

2022-05-05 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda updated this revision to Diff 427501. jasonmolenda added a comment. update to incorporate dave's suggestions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125042/new/ https://reviews.llvm.org/D125042 Files: lldb/examples/python/cra

[Lldb-commits] [PATCH] D125042: have crashlog.py insert a stack frame with $lr when stack frame 0 is address 0

2022-05-05 Thread Jason Molenda 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 rG2be791e32af3: Insert crashing stack frame when call to null func ptr (authored by jasonmolenda). Repository: rG LLVM Github Monorepo CHANGES SINC

[Lldb-commits] [PATCH] D125434: Make a more convenient way to allow Darwin users to ignore certain Mach Exceptions

2022-05-12 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda accepted this revision. jasonmolenda added a comment. This revision is now accepted and ready to land. This is a nice piece of work, and a good cleanup, LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125434/new/ https://reviews.ll

[Lldb-commits] [PATCH] D125505: Cache tilde expansions to avoid redundant lookups

2022-05-12 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda created this revision. jasonmolenda added a reviewer: JDevlieghere. jasonmolenda added a project: LLDB. Herald added a project: All. jasonmolenda requested review of this revision. Herald added a subscriber: lldb-commits. We have tilde's in our dSYMs internally, and expanding these ca

[Lldb-commits] [PATCH] D125505: Cache tilde expansions to avoid redundant lookups

2022-05-12 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. Yeah, you're right. And as I walk through in my head what I'm solving with this -- it's not the really expensive part of this whole operation, I don't think. I should check more carefully but it's the stat's over NFS partitions that are impacting performance, and

[Lldb-commits] [PATCH] D125616: [NFC] two small perf fixes for when using a DebugSymbols DBGShellCommands to find a dSYM

2022-05-14 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda created this revision. jasonmolenda added a reviewer: JDevlieghere. jasonmolenda added a project: LLDB. Herald added a project: All. jasonmolenda requested review of this revision. Herald added a subscriber: lldb-commits. `SymbolVendorMacOSX::CreateInstance()` calls `LocateMacOSXFile

[Lldb-commits] [PATCH] D125616: [NFC] two small perf fixes for when using a DebugSymbols DBGShellCommands to find a dSYM

2022-05-16 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added inline comments. Comment at: lldb/source/Symbol/LocateSymbolFileMacOSX.cpp:154-155 + // Check to see if we have the file on the local filesystem. + if (!module_spec.GetFileSpec().GetPath().empty() && + FileSystem::Instance().Exist

[Lldb-commits] [PATCH] D125616: [NFC] two small perf fixes for when using a DebugSymbols DBGShellCommands to find a dSYM

2022-05-16 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda updated this revision to Diff 429782. jasonmolenda added a comment. Update to address Jonas' comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125616/new/ https://reviews.llvm.org/D125616 Files: lldb/source/Plugins/SymbolVendo

[Lldb-commits] [PATCH] D125616: [NFC] two small perf fixes for when using a DebugSymbols DBGShellCommands to find a dSYM

2022-05-16 Thread Jason Molenda via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd2f3b6020fbf: [NFC] Don't bother with unstripped binary w/ dSYM, don't DebugSymbols twice (authored by jasonmolenda). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[Lldb-commits] [PATCH] D126076: [lldb] Set correct register number for cpsr (GENERIC_REGNUM_FLAGS)

2022-05-20 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda accepted this revision. jasonmolenda added a comment. This revision is now accepted and ready to land. Ah, good catch! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126076/new/ https://reviews.llvm.org/D126076 ___ lldb-commits ma

[Lldb-commits] [PATCH] D126435: NFC delay tilde expansion on source path remappings until we are opening a source file

2022-05-25 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda created this revision. jasonmolenda added reviewers: JDevlieghere, jingham. jasonmolenda added a project: LLDB. Herald added a project: All. jasonmolenda requested review of this revision. Herald added a subscriber: lldb-commits. Internal to Apple, we have dSYMs that include source pa

[Lldb-commits] [PATCH] D126435: NFC delay tilde expansion on source path remappings until we are opening a source file

2022-05-25 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda updated this revision to Diff 432199. jasonmolenda added a comment. Address Jonas' feedback. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126435/new/ https://reviews.llvm.org/D126435 Files: lldb/source/Core/SourceManager.cpp lldb

[Lldb-commits] [PATCH] D126435: NFC delay tilde expansion on source path remappings until we are opening a source file

2022-05-26 Thread Jason Molenda via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc274b6e5830e: Defer source path remap tilde expansion until source file use (authored by jasonmolenda). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126435/

[Lldb-commits] [PATCH] D126435: NFC delay tilde expansion on source path remappings until we are opening a source file

2022-05-26 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. Temporarily reverted for an x86_64 debian bot failure. Probably my comparison of the first character of the FileSpec path with '~' in resolve_tilde() is crashing with some code path that hands us an empty/uninitialized FileSpec. Will try again tomorrow after looki

[Lldb-commits] [PATCH] D127247: On Darwin systems, follow transition from on-disk dyld to shared-cache dyld at process launch

2022-06-07 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda created this revision. jasonmolenda added a reviewer: JDevlieghere. jasonmolenda added a project: LLDB. Herald added a project: All. jasonmolenda requested review of this revision. Herald added a subscriber: lldb-commits. In macOS Ventura et al, the dynamic linker, dyld, has moved int

[Lldb-commits] [PATCH] D127247: On Darwin systems, follow transition from on-disk dyld to shared-cache dyld at process launch

2022-06-07 Thread Jason Molenda via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8d5a6007f968: Track transition from launch dyld to shared-cache dyld (authored by jasonmolenda). Changed prior to commit: https://reviews.llvm.org/D127247?vs=434921&id=434936#toc Repository: rG LLVM

[Lldb-commits] [PATCH] D127331: [lldb] Update TestModuleLoadedNotifys.py for macOS Ventura

2022-06-08 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda accepted this revision. jasonmolenda added a comment. This revision is now accepted and ready to land. LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127331/new/ https://reviews.llvm.org/D127331 ___ lldb-commits mailing list

[Lldb-commits] [PATCH] D127997: Remember whether all owners of the site we hit were internal in StopInfoBreakpoint

2022-06-16 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. Thanks for getting to the bottom of this one! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127997/new/ https://reviews.llvm.org/D127997 ___ lldb-commits mailing list lldb-c

[Lldb-commits] [PATCH] D139054: Delay calling ObjC class list read utility functions very early in process startup

2022-12-05 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda updated this revision to Diff 480277. jasonmolenda added a comment. Update patch to use Jonas' suggested wording of the warning we will issue when the objc class scanner functions cannot run yet, to make it clearer that they will run later and to match the style of the other warning

[Lldb-commits] [PATCH] D139054: Delay calling ObjC class list read utility functions very early in process startup

2022-12-06 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added inline comments. Comment at: lldb/tools/debugserver/source/RNBRemote.h:111-139 +prefix_reg_packets_with_tid,// 'QPrefixRegisterPacketsWithThreadID +set_logging_mode, // 'QSetLogging:' +set_ignored_exceptions, // 'QSetIgnore

[Lldb-commits] [PATCH] D139453: Switch to a different library-loaded notification function breakpoint in Darwin dyld

2022-12-06 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda created this revision. jasonmolenda added reviewers: jingham, JDevlieghere. jasonmolenda added a project: LLDB. Herald added a subscriber: kristof.beyls. Herald added a project: All. jasonmolenda requested review of this revision. Herald added a subscriber: lldb-commits. Darwin's dyna

[Lldb-commits] [PATCH] D139453: Switch to a different library-loaded notification function breakpoint in Darwin dyld

2022-12-06 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. oops, slight misstatement from not reading the patch when I wrote the description. The function we currently use has an array of uint64_t's, the one I am switching to is given an array of dyld_image_info objects, the first element has the ptrsize address of the ma

[Lldb-commits] [PATCH] D128465: [llvm] add zstd to `llvm::compression` namespace

2022-12-06 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. In D128465#3652525 , @ckissane wrote: > In D128465#3651025 , @aemerson > wrote: > >> I just reverted this in 6e6be5f9504d >>

[Lldb-commits] [PATCH] D139054: Delay calling ObjC class list read utility functions very early in process startup

2022-12-13 Thread Jason Molenda via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGee11ef6dc0b2: Launch state discoverable in Darwin, use for SafeToCallFunctions (authored by jasonmolenda). Changed prior to commit: https://reviews.llvm.org/D139054?vs=480277&id=482575#toc Repository:

[Lldb-commits] [PATCH] D140066: Add a final fallback technique to the old Darwin dynamic loader plugin to find the dyld_all_image_infos structure

2022-12-14 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda created this revision. jasonmolenda added a reviewer: JDevlieghere. jasonmolenda added a project: LLDB. Herald added a project: All. jasonmolenda requested review of this revision. Herald added a subscriber: lldb-commits. When lldb is running on a userland corefile (the only case wher

[Lldb-commits] [PATCH] D140067: Fix an ASAN bug I introduced in debugserver, accessing off the end of an array intentionally

2022-12-14 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda created this revision. jasonmolenda added reviewers: aprantl, JDevlieghere. jasonmolenda added a project: LLDB. Herald added a subscriber: kristof.beyls. Herald added a project: All. jasonmolenda requested review of this revision. Herald added a subscriber: lldb-commits. In https://re

[Lldb-commits] [PATCH] D140067: Fix an ASAN bug I introduced in debugserver, accessing off the end of an array intentionally

2022-12-15 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added inline comments. Comment at: lldb/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.cpp:2026-2037 +if (reg == gpr_pc) + value->value.uint64 = clear_pac_bits( + reinterpret_cast(m_state.context.gpr.__opaque_pc)); +else

[Lldb-commits] [PATCH] D140067: Fix an ASAN bug I introduced in debugserver, accessing off the end of an array intentionally

2022-12-15 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added inline comments. Comment at: lldb/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.cpp:2026-2037 +if (reg == gpr_pc) + value->value.uint64 = clear_pac_bits( + reinterpret_cast(m_state.context.gpr.__opaque_pc)); +else

[Lldb-commits] [PATCH] D140249: [lldb] Do not deallocate memory after exec

2022-12-16 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added inline comments. Comment at: lldb/source/Target/Memory.cpp:337 std::lock_guard guard(m_mutex); - if (m_process.IsAlive()) { + if (m_process.IsAlive() && !did_exec) { PermissionsToBlockMap::iterator pos, end = m_memory_map.end(); Shoul

[Lldb-commits] [PATCH] D136938: [LLDB] Fix code breakpoints on tagged addresses

2022-12-16 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. Hi David, thanks for the ping sorry for not replying earlier to this. I looked at this a little bit today but want to look at how I solved the same issue a while ago (but never upstreamed, which is my bad, I need to clean those up). (I did solved this in OptionAr

[Lldb-commits] [PATCH] D136938: [LLDB] Fix code breakpoints on tagged addresses

2022-12-19 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. I have a little example of a function pointer using ptrath in an arm64e (ARMv8.3) program, to show what I was talking about, * thread #1, queue = 'com.apple.main-thread', stop reason = instruction step into frame #0: 0x00013fa0 a.out`main + 40 at a.

[Lldb-commits] [PATCH] D136938: [LLDB] Fix code breakpoints on tagged addresses

2022-12-19 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. In D136938#4005138 , @DavidSpickett wrote: >> What do you think about locating this change in ToAddress instead of >> Target::GetBreakableLoadAddress? It looks like the one caller to >> GetBreakableLoadAddress is Target::C

[Lldb-commits] [PATCH] D136938: [LLDB] Fix code breakpoints on tagged addresses

2022-12-19 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda accepted this revision. jasonmolenda added a comment. This revision is now accepted and ready to land. I think we both agree that OptionArgParser::ToAddress needs to fix the address, but I don't have an opinion about whether we should also do it in GetBreakableLoadAddress. I'm fine

[Lldb-commits] [PATCH] D140067: Fix an ASAN bug I introduced in debugserver, accessing off the end of an array intentionally

2023-01-04 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda updated this revision to Diff 486385. jasonmolenda added a comment. Update the patch to use a case statement for fp/sp/lr/pc instead of conditionals; both Adrian and Jonas preferred it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140

[Lldb-commits] [PATCH] D140067: Fix an ASAN bug I introduced in debugserver, accessing off the end of an array intentionally

2023-01-04 Thread Jason Molenda via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGda4e82753f31: Don't read off end of GPR register array to access fp/sp/lr/pc (authored by jasonmolenda). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140067

[Lldb-commits] [PATCH] D140066: Add a final fallback technique to the old Darwin dynamic loader plugin to find the dyld_all_image_infos structure

2023-01-06 Thread Jason Molenda via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG75d268d1fa60: When loading mach-o corefile, new fallback for finding images (authored by jasonmolenda). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140066/

[Lldb-commits] [PATCH] D68655: Trust the arange accelerator tables in dSYMs

2023-01-09 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. I agree with landing this change. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68655/new/ https://reviews.llvm.org/D68655 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[Lldb-commits] [PATCH] D141330: [lldb] Limit 8b259fe573e1 to dSYMs

2023-01-11 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. In D141330#4043397 , @labath wrote: > In D141330#4037932 , @JDevlieghere > wrote: > >> In D141330#4037925 , @aprantl >> wrote: >> >>> Shoul

[Lldb-commits] [PATCH] D140249: [lldb] Do not deallocate memory after exec

2023-01-11 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda accepted this revision. jasonmolenda added a comment. LGTM. Jim? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140249/new/ https://reviews.llvm.org/D140249 ___ lldb-commits mailing list lld

[Lldb-commits] [PATCH] D140253: [debugserver] Clear memory allocations after exec

2023-01-11 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda accepted this revision. jasonmolenda 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/D140253/new/ https://reviews.llvm.org/D140253 __

[Lldb-commits] [PATCH] D68655: Trust the arange accelerator tables in dSYMs

2023-01-11 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. In D68655#4045423 , @clayborg wrote: > There have also been some bugs in .debug_aranges and some folks want to get > rid of .debug_aranges all together and rely only upon the > DW_TAG_compile_unit's DW_AT_ranges. Tons of det

[Lldb-commits] [PATCH] D68655: Trust the arange accelerator tables in dSYMs

2023-01-11 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. I know this is all moot because the dSYM-specific patch landed, but I am curious about this part, In D68655#4045561 , @clayborg wrote: > > Different things are included in DW_AT_ranges, like address ranges for global >

[Lldb-commits] [PATCH] D68655: Trust the arange accelerator tables in dSYMs

2023-01-11 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. I guess to say it shorter. If I have a dwarf_aranges, that means the dwarf linker created it. And if it created it, surely its at least based off of the subprogram address ranges or the line table -- that is, the text address ranges. If I have a DW_TAG_compile_u

[Lldb-commits] [PATCH] D68655: Trust the arange accelerator tables in dSYMs

2023-01-12 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. In D68655#4047126 , @labath wrote: > In D68655#4045895 , @jasonmolenda > wrote: > >> Both have to be written by the dwarf linker to be correct, but only the >> former is written ONLY

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