[Lldb-commits] [PATCH] D141629: Run address expression argument values through ABI::FixCodeAddress to strip TBI/pointer auth bytes on AArch64

2023-01-12 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda created this revision. jasonmolenda added a reviewer: DavidSpickett. jasonmolenda added a project: LLDB. Herald added subscribers: Michael137, kristof.beyls. Herald added a project: All. jasonmolenda requested review of this revision. Herald added a subscriber: lldb-commits. This is a

[Lldb-commits] [PATCH] D141972: Delay loading of qProcessInfo-informed binaries until later in the Process setup

2023-01-17 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda created this revision. jasonmolenda added a reviewer: jingham. 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. I handle two types of binar

[Lldb-commits] [PATCH] D141972: Delay loading of qProcessInfo-informed binaries until later in the Process setup

2023-01-18 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda updated this revision to Diff 490232. jasonmolenda added a comment. Add a comment about the intentional placement of binary loading/load address setting in DidLaunchOrAttach to address Jim's feedback. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[Lldb-commits] [PATCH] D141972: Delay loading of qProcessInfo-informed binaries until later in the Process setup

2023-01-18 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda updated this revision to Diff 490258. jasonmolenda added a comment. Thanks for the feedback Jonas, updated patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141972/new/ https://reviews.llvm.org/D141972 Files: lldb/source/Plugins/

[Lldb-commits] [PATCH] D141972: Delay loading of qProcessInfo-informed binaries until later in the Process setup

2023-01-18 Thread Jason Molenda via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdb223b7f01f7: Do qProcessInfo-hint binary loading later in Process setup (authored by jasonmolenda). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141972/new

[Lldb-commits] [PATCH] D142067: Remove the "help" subcommand - its undocumented, undiscoverable and doesn't work....

2023-01-19 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. Yeah this is a good cleanup, but fwiw maybe because using git, but I sometimes expect `break set --help` etc to work, forgetting which style lldb uses. just throwing it out there as something I get tripped up by once in a while, not really related to this change,

[Lldb-commits] [PATCH] D141629: Run address expression argument values through ABI::FixCodeAddress to strip TBI/pointer auth bytes on AArch64

2023-01-23 Thread Jason Molenda via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG484bc2bcc799: Run cmdline address expressions through ABI's FixAddress (authored by jasonmolenda). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141629/new/

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

2023-01-26 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda created this revision. jasonmolenda added reviewers: JDevlieghere, mib. jasonmolenda added a project: LLDB. Herald added a project: All. jasonmolenda requested review of this revision. Herald added a subscriber: lldb-commits. `ProcessMachCore::DoLoadCore` has an error check that if it

[Lldb-commits] [PATCH] D142663: Improve disable-language-runtime-unwindplans description to be more searchable

2023-01-26 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda created this revision. jasonmolenda added a reviewer: kastiglione. 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. The current description

[Lldb-commits] [PATCH] D142663: Improve disable-language-runtime-unwindplans description to be more searchable

2023-01-27 Thread Jason Molenda via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8112bd2cb484: disable-language-runtime-unwindplans desc rewrite to be searchable (authored by jasonmolenda). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D14

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

2023-01-27 Thread Jason Molenda via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG841b26f1d80f: Don't flag memory-only mach-o corefiles as invalid (authored by jasonmolenda). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142662/new/ https

[Lldb-commits] [PATCH] D142792: Add SBValue::GetValueAsAddress(), strip off ptrauth, TBI, MTE bits on AArch64 systems

2023-01-27 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda created this revision. jasonmolenda added a reviewer: DavidSpickett. jasonmolenda added a project: LLDB. Herald added subscribers: omjavaid, JDevlieghere, kristof.beyls. Herald added a project: All. jasonmolenda requested review of this revision. Herald added a subscriber: lldb-commits

[Lldb-commits] [PATCH] D142792: Add SBValue::GetValueAsAddress(), strip off ptrauth, TBI, MTE bits on AArch64 systems

2023-01-27 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. Thanks for the nits, good points. Comment at: lldb/source/API/SBValue.cpp:935-940 +ProcessSP process_sp = m_opaque_sp->GetProcessSP(); +if (!process_sp) + return ret_val; +ABISP abi_sp = process_sp->GetABI(); +if (abi_sp) +

[Lldb-commits] [PATCH] D142792: Add SBValue::GetValueAsAddress(), strip off ptrauth, TBI, MTE bits on AArch64 systems

2023-01-27 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added inline comments. Comment at: lldb/source/API/SBValue.cpp:935-940 +ProcessSP process_sp = m_opaque_sp->GetProcessSP(); +if (!process_sp) + return ret_val; +ABISP abi_sp = process_sp->GetABI(); +if (abi_sp) + return abi_sp->FixCodeAddres

[Lldb-commits] [PATCH] D142792: Add SBValue::GetValueAsAddress(), strip off ptrauth, TBI, MTE bits on AArch64 systems

2023-01-27 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda updated this revision to Diff 492951. jasonmolenda added a comment. Fix the nits Jonas pointed out, thanks Jonas. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142792/new/ https://reviews.llvm.org/D142792 Files: lldb/bindings/interf

[Lldb-commits] [PATCH] D142793: Remove -py3 command line arg from swig invocation; generates warning with swig 4.1.1

2023-01-27 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 I touch the bindings and build with ninja, I see [5/15]

[Lldb-commits] [PATCH] D142793: Remove -py3 command line arg from swig invocation; generates warning with swig 4.1.1

2023-01-27 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda abandoned this revision. jasonmolenda added a comment. hasn't landed it, hasn't beaten me!!! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142793/new/ https://reviews.llvm.org/D142793 ___ ll

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

2023-01-31 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. I helped a developer using SB API yesterday who had a bug and t

[Lldb-commits] [PATCH] D143215: Separate Process::GetWatchpointSupportInfo into two methods to get the two separate pieces of information

2023-02-02 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda created this revision. jasonmolenda added a reviewer: jingham. 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. There are two

[Lldb-commits] [PATCH] D143215: Separate Process::GetWatchpointSupportInfo into two methods to get the two separate pieces of information

2023-02-02 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda updated this revision to Diff 494428. jasonmolenda added a comment. Ah, I wasn't paying close enough attention and got the logic for MIPS/PPC64 watchpoint exceptions backwards in my update to GDBRemoteCommunicationClient::GetWatchpointReportedAfter, update patch for that. Reposito

[Lldb-commits] [PATCH] D143215: Separate Process::GetWatchpointSupportInfo into two methods to get the two separate pieces of information

2023-02-02 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. tl;dr: watchpoints don't work on things like arm targets with a JTAG gdb stub that doesn't support `qWatchpointSupportInfo:` or `qHostInfo` with the `watchpoint_exceptions_received` key. Nearly all of this patch is mechanical, and IMO the question is whether I sho

[Lldb-commits] [PATCH] D143232: Return an error when the CFA resolves to no known register, instead of segfaulting

2023-02-02 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda created this revision. jasonmolenda added a reviewer: bulbazord. 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. I'm working on a bug repo

[Lldb-commits] [PATCH] D143232: Return an error when the CFA resolves to no known register, instead of segfaulting

2023-02-06 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. In D143232#4101396 , @bulbazord wrote: > LGTM. I wonder if there's a good way to exercise this with a test? Like maybe > we can create some bogus unwind information and see if LLDB falls over when > consuming it? I'm not s

[Lldb-commits] [PATCH] D143232: Return an error when the CFA resolves to no known register, instead of segfaulting

2023-02-06 Thread Jason Molenda via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG701030c3ecba: In InitializeZerothFrame check for a CFA/AFA or error out (authored by jasonmolenda). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143232/new/

[Lldb-commits] [PATCH] D143215: Separate Process::GetWatchpointSupportInfo into two methods to get the two separate pieces of information

2023-02-06 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda updated this revision to Diff 495385. jasonmolenda edited the summary of this revision. jasonmolenda added a comment. David's feedback was spot on, overhaul patch to address. Change Process::GetWatchpointSlotCount to return an optional count, for when it is available, instead of dep

[Lldb-commits] [PATCH] D143215: Separate Process::GetWatchpointSupportInfo into two methods to get the two separate pieces of information

2023-02-06 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. I phabracated wrong and the end of the last msg was truncated. I meant to end it with this: If the number of watchpoints could not be fetched with an lldb-extension packet, Process:GetWatchpointSupportInfo would not report whether breakpoints are received before

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

2023-02-07 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda updated this revision to Diff 495634. jasonmolenda added a comment. Update patch for Jonas' suggestions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143012/new/ https://reviews.llvm.org/D143012 Files: lldb/source/API/SBProcess.cpp

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

2023-02-07 Thread Jason Molenda via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG62c747517cd9: Check if null buffer handed to SBProcess::ReadMemory (authored by jasonmolenda). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143012/new/ htt

[Lldb-commits] [PATCH] D143215: Separate Process::GetWatchpointSupportInfo into two methods to get the two separate pieces of information

2023-02-07 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda updated this revision to Diff 495686. jasonmolenda added a comment. Went over the rewrite one more time, fixing up comments, fixing a couple of logic bugs I wrote, and having tested it with a debugserver I hacked to remove the `watchpoint_exceptions_received:before;` key in the qHos

[Lldb-commits] [PATCH] D143215: Separate Process::GetWatchpointSupportInfo into two methods to get the two separate pieces of information

2023-02-07 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. If I was going to describe this patch briefly at this point, I would say: "Change lldb from depending on the remote gdb stub to tell it whether watchpoints are received before or after the instruction, to knowing the architectures where watchpoint exceptions are re

[Lldb-commits] [PATCH] D142715: [LLDB] Apply FixCodeAddress to all forms of address arguments

2023-02-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. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142715/new/ https://reviews.llvm.org/D142715 __

[Lldb-commits] [PATCH] D143215: Separate Process::GetWatchpointSupportInfo into two methods to get the two separate pieces of information

2023-02-08 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added inline comments. Comment at: lldb/source/Target/Process.cpp:2373 +reported_after = false; + return reported_after; +} Emmmer wrote: > DavidSpickett wrote: > > DavidSpickett wrote: > > > Would this be any clearer with multiple returns? Or o

[Lldb-commits] [PATCH] D143215: lldb can know architecture-dependent watchpoint behaviors, instead of depending on the remote stub

2023-02-08 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda updated this revision to Diff 495976. jasonmolenda retitled this revision from "Separate Process::GetWatchpointSupportInfo into two methods to get the two separate pieces of information" to "lldb can know architecture-dependent watchpoint behaviors, instead of depending on the remot

[Lldb-commits] [PATCH] D143932: Further delay simulator SDK filepath discovery until needed

2023-02-13 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. In https://reviews.llvm.org

[Lldb-commits] [PATCH] D143932: Further delay simulator SDK filepath discovery until needed

2023-02-13 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 rGee88f1177003: Find SDK path more lazily in Apple Simulator platforms (authored by jasonmolenda). Changed prior to commit:

[Lldb-commits] [PATCH] D143215: lldb can know architecture-dependent watchpoint behaviors, instead of depending on the remote stub

2023-02-14 Thread Jason Molenda via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGeaeb8ddd4a9d: [LLDB] add arch-specific watchpoint behavior defaults to lldb (authored by jasonmolenda). Changed prior to commit: https://reviews.llvm.org/D143215?vs=495976&id=497401#toc Repository: r

[Lldb-commits] [PATCH] D142792: Add SBValue::GetValueAsAddress(), strip off ptrauth, TBI, MTE bits on AArch64 systems

2023-02-14 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added inline comments. Comment at: lldb/source/API/SBValue.cpp:936 + if (ABISP abi_sp = process_sp->GetABI()) +return abi_sp->FixCodeAddress(ret_val); +return ret_val; DavidSpickett wrote: > We've talked about this before, and for no

[Lldb-commits] [PATCH] D142792: Add SBValue::GetValueAsAddress(), strip off ptrauth, TBI, MTE bits on AArch64 systems

2023-02-14 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda updated this revision to Diff 497461. jasonmolenda added a comment. Updated patch to address David's feedback. Thanks David! Updated comments and SB API doc to conform to English. Not decided on whether we should use FixCodeAddress for our strippings here; the difference between

[Lldb-commits] [PATCH] D144142: [debugserver] Initialize logging earlier in the startup sequence

2023-02-15 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added inline comments. Comment at: lldb/tools/debugserver/source/debugserver.cpp:1342 DNBLogSetLogMask(log_flags); } Should this be moved out of this `log_file != NULL` block so that the logging flags are set based on `-f` value? Otherwis

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

2023-02-22 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda accepted this revision. jasonmolenda added a comment. I'm OK with giving this a try. SectionLoadList::SetSectionLoadAddress specifically notes that there are cases were sections overlap in the virtual address space. All of the binaries in the shared cache have a single LINKEDIT s

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

2023-02-22 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. In D144528#4145610 , @bulbazord wrote: > In D144528#4145593 , @jasonmolenda > wrote: > >> >> tl;dr it's fine if LINKEDIT's "overlap" because lldb will never need to take >> an a

[Lldb-commits] [PATCH] D144311: [debugserver] Add one additional sleep before attaching after waiting

2023-02-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, sorry I missed this one, LGTM. Attaching to a process very early in startup during this transition between dyld's is especially difficult to recover from; letting the process

[Lldb-commits] [PATCH] D144937: [LLDB] Expose several methods in SBWatchpoint

2023-02-28 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. Hi Dan, I hadn't looked this over very closely but one thing that jumped out is that you're adding a member to SBWatchpoint, and we can't do that, it's an API breaking change. In cases where we need to store additional information than a weak pointer to an lldb pr

[Lldb-commits] [PATCH] D144937: [LLDB] Expose several methods in SBWatchpoint

2023-02-28 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. In D144937#4159324 , @jasonmolenda wrote: > In cases where we need to store additional information than a weak pointer to > an lldb private object, we traditionally add an Impl class which has the > additional member(s) an

[Lldb-commits] [PATCH] D145020: Hoist debugserver arch-dep sources out of a side CMakeLists into the debugserver main CMakeLists

2023-02-28 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 subscriber: kristof.beyls. Herald added a project: All. jasonmolenda requested review of this revision. Herald added a subscriber: lldb-commits. There was historical

[Lldb-commits] [PATCH] D145020: Hoist debugserver arch-dep sources out of a side CMakeLists into the debugserver main CMakeLists

2023-02-28 Thread Jason Molenda via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf136ca848309: Put the arch-dep debugserver files in main CMakeLists.txt (authored by jasonmolenda). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145020/new/

[Lldb-commits] [PATCH] D142792: Add SBValue::GetValueAsAddress(), strip off ptrauth, TBI, MTE bits on AArch64 systems

2023-03-01 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda updated this revision to Diff 501574. jasonmolenda added a comment. Clean up the test case - the C file and python file - to address David's feedback and test it more thoroughly. Fix `ValueObjectPrinter::PrintValueAndSummaryIfNeeded()` to only add the `actual=hex` if this is a poi

[Lldb-commits] [PATCH] D142792: Add SBValue::GetValueAsAddress(), strip off ptrauth, TBI, MTE bits on AArch64 systems

2023-03-02 Thread Jason Molenda via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4d635be2dbad: Add SBValue::GetValueAsAddress API for removing non-addressing metadata (authored by jasonmolenda). Changed prior to commit: https://reviews.llvm.org/D142792?vs=501574&id=501962#toc Repos

[Lldb-commits] [PATCH] D142792: Add SBValue::GetValueAsAddress(), strip off ptrauth, TBI, MTE bits on AArch64 systems

2023-03-02 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda updated this revision to Diff 501995. jasonmolenda added a comment. Updating patch with the final version, barring some fix for the armv7 ubuntu bot and TestDataFormatterSmartArray.py line 229 where it has a c-string pointer that gets its 0th bit cleared, Got output: (char *) s

[Lldb-commits] [PATCH] D142792: Add SBValue::GetValueAsAddress(), strip off ptrauth, TBI, MTE bits on AArch64 systems

2023-03-02 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. Need to figure out something for the armv7 case before I try re-landing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142792/new/ https://reviews.llvm.org/D142792 ___ lldb-

[Lldb-commits] [PATCH] D142792: Add SBValue::GetValueAsAddress(), strip off ptrauth, TBI, MTE bits on AArch64 systems

2023-03-02 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. Maybe the right answer is to use FixDataAddress. It's possible someone could make a AArch64 FixCodeAddress that clears the low 2 bits. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142792/new/ https://reviews.llvm.or

[Lldb-commits] [PATCH] D142792: Add SBValue::GetValueAsAddress(), strip off ptrauth, TBI, MTE bits on AArch64 systems

2023-03-02 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. Hm, I've also got some problems with some ObjC tagged pointers in the testsuite, regardless of the FixCodeAddress/FixDataAddress issue. Need to look at this a bit more. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[Lldb-commits] [PATCH] D145547: When setting load addresses on darwin kernel kexts, handle case where in-memory load commands are not updated

2023-03-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. The Darwin kernel has a number of kernel extensions, kexts, aki

[Lldb-commits] [PATCH] D145547: When setting load addresses on darwin kernel kexts, handle case where in-memory load commands are not updated

2023-03-08 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda updated this revision to Diff 503497. jasonmolenda added a comment. Show an alternate approach, where we check the file types of everything in the kernel+kext list, and if something is not a kernel/kext, don't try to load it at all. v. the first change in `DynamicLoaderDarwinKerne

[Lldb-commits] [PATCH] D145547: When setting load addresses on darwin kernel kexts, handle case where in-memory load commands are not updated

2023-03-08 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda updated this revision to Diff 503550. jasonmolenda added a comment. Add an additional bit to the "don't load non-kexts, non-kernels" addition. I refined this by checking to see if the binary is already registered in the Target, and already has a load address set. If the binary is,

[Lldb-commits] [PATCH] D145547: When setting load addresses on darwin kernel kexts, handle case where in-memory load commands are not updated

2023-03-08 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda marked an inline comment as done. jasonmolenda added inline comments. Comment at: lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp:835 + m_name.c_str(), m_uuid.GetAsString().c_str()); +m_module_sp.reset()

[Lldb-commits] [PATCH] D145547: When setting load addresses on darwin kernel kexts, handle case where in-memory load commands are not updated

2023-03-08 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda updated this revision to Diff 503569. jasonmolenda marked an inline comment as done. jasonmolenda added a comment. Update for Jonas' suggestions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145547/new/ https://reviews.llvm.org/D14554

[Lldb-commits] [PATCH] D145547: When setting load addresses on darwin kernel kexts, handle case where in-memory load commands are not updated

2023-03-08 Thread Jason Molenda via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG794d2089cd74: Don't load non-kexts in darwin kernel debug; handle unslid segs (authored by jasonmolenda). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D14554

[Lldb-commits] [PATCH] D145568: [lldb] Add dummy field to RegisterInfo for register flags use later

2023-03-09 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/D145568/new/ https://reviews.llvm.org/D145568 __

[Lldb-commits] [PATCH] D145566: [lldb] Add RegisterFlags class

2023-03-09 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'm not really advocating to changing `m_type` to be an enum, but curious how that might fit into the total context of this feature, and if it makes any sense. ==

[Lldb-commits] [PATCH] D145580: [lldb] Show register fields using bitfield struct types

2023-03-09 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. This all looks good to me. the phab says there's a missing newline at the end of TestXMLRegisterFlags.py. Given that we can construct fake debug sessions with a gdb_remote_client test, do you think it would be worth having a test that's says it's a big-endian tar

[Lldb-commits] [PATCH] D145580: [lldb] Show register fields using bitfield struct types

2023-03-09 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'll mark it as accepted, I don't know if Jim or Pavel have any comments. I think this is good. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[Lldb-commits] [PATCH] D145574: [lldb] Read register fields from target XML

2023-03-09 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. Comment at: lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp:4066 +"ProcessGDBRemote::ParseFlags Invalid start %

[Lldb-commits] [PATCH] D142792: Add SBValue::GetValueAsAddress(), strip off ptrauth, TBI, MTE bits on AArch64 systems

2023-03-09 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda planned changes to this revision. jasonmolenda added a comment. OK, I understand the objc testsuite failures. ObjC has tagged pointers, where the address of an object is either a virtual address, or a big old bag of bits that can contain a small value, like instead of a pointer to

[Lldb-commits] [PATCH] D145580: [lldb] Show register fields using bitfield struct types

2023-03-13 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. This gdb_remote_client test looks real nice with this update. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145580/new/ https://reviews.llvm.org/D145580 ___ lldb-commits mai

[Lldb-commits] [PATCH] D147462: Use kernel's global variable indicating how many bits are used in addressing when loading Darwin xnu kernel

2023-04-03 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. The Darwin xnu kernel has a global variable which has the numbe

[Lldb-commits] [PATCH] D147462: Use kernel's global variable indicating how many bits are used in addressing when loading Darwin xnu kernel

2023-04-03 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added inline comments. Comment at: lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp:1093 + // don't mark those as addressable. + m_process->SetVirtualAddressableBits((wordsize * 8) - 9); + addr_t sym_addr = sym

[Lldb-commits] [PATCH] D147462: Use kernel's global variable indicating how many bits are used in addressing when loading Darwin xnu kernel

2023-04-03 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda updated this revision to Diff 510586. jasonmolenda added a comment. Update patch to address some of Jonas' comments. I was adding a check that the ptrsize of the architecture was 64-bit, but we don't work on 32-bit xnu kernels for a few years now; we can assume 64-bit safely. I am

[Lldb-commits] [PATCH] D147462: Use kernel's global variable indicating how many bits are used in addressing when loading Darwin xnu kernel

2023-04-03 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. Yeah, I agree that messing with the global setting of addressable bits here is not ideal, but at this point in time the fact that we probably have an un-set/invalid value means it won't make things worse. Comment at: lldb/source/Plugins/DynamicL

[Lldb-commits] [PATCH] D147462: Use kernel's global variable indicating how many bits are used in addressing when loading Darwin xnu kernel

2023-04-03 Thread Jason Molenda via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8b092714c304: Using global variable in xnu kernel, set # of addressable bits (authored by jasonmolenda). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147462

[Lldb-commits] [PATCH] D147674: Interpret ESR/FAR bits directly on watchpoint exceptions in debugserver, clarify how watchpoint descriptions in stop packets work

2023-04-05 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda created this revision. jasonmolenda added reviewers: labath, JDevlieghere, omjavaid, DavidSpickett. jasonmolenda added a project: LLDB. Herald added subscribers: atanasyan, kristof.beyls, arichardson, sdardis. Herald added a project: All. jasonmolenda requested review of this revision.

[Lldb-commits] [PATCH] D147674: Interpret ESR/FAR bits directly on watchpoint exceptions in debugserver, clarify how watchpoint descriptions in stop packets work

2023-04-05 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. One possible criticism I have of the current reason:watchpoint + description-up-to-three-integers is that we should add key-value pairs to the stop-info packet `wp-address:` `wp-index:` `wp-hit-address` and honestly, `silently-continue:` instead of doing an archite

[Lldb-commits] [PATCH] D147482: [lldb] Add an overload to SetModuleLoadAddress that takes an unsigned value

2023-04-06 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. We can detect this This is one of those cases where I'd like to mark SBTarget::SetModuleLoadAddress as deprecated. I like that you detect this situation in SBTarget::SetLo

[Lldb-commits] [PATCH] D147816: Clarify how watchpoint description in stop packets work, fix AArch64 unintended behavior

2023-04-07 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda created this revision. jasonmolenda added reviewers: labath, omjavaid, DavidSpickett. jasonmolenda added a project: LLDB. Herald added subscribers: JDevlieghere, atanasyan, kristof.beyls, arichardson, sdardis. Herald added a project: All. jasonmolenda requested review of this revision

[Lldb-commits] [PATCH] D147820: debugserver: move AArch64 watchpoint traps within a watchpointed region, parse ESR flags and send them to lldb

2023-04-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 subscribers: omjavaid, atanasyan, kristof.beyls, arichardson, sdardis. Herald added a project: All. jasonmolenda requested review of this revision. Herald added a subsc

[Lldb-commits] [PATCH] D147674: Interpret ESR/FAR bits directly on watchpoint exceptions in debugserver, clarify how watchpoint descriptions in stop packets work

2023-04-07 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda abandoned this revision. jasonmolenda added a comment. Intermixing generic/linux AArch64 lldb watchpoint StopInfo changes in with a change to debugserver made this a difficult patch to ask anyone to review in total. I've separated it into one phab for the lldb watchpoint StopInfo

[Lldb-commits] [PATCH] D147816: Clarify how watchpoint description in stop packets work, fix AArch64 unintended behavior

2023-04-07 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. Thanks Omair! Yeah we have the same problem on Darwin - AArch64 doesn't require that the address we get on a watchpoint trap in the FAR register point within the address range we are watching. I never fixed this on Darwin so I know the failure mode - lldb says "t

[Lldb-commits] [PATCH] D147833: [lldb] Change return type of EventData::GetFlavor

2023-04-07 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. Am I missing something, how does this work when we have uses like `event_data->GetFlavor() == TargetEventData::GetFlavorString()` - is this changing from a one-time construction of a ConstString to a construction of a ConstString every time it's called by implicit

[Lldb-commits] [PATCH] D147833: [lldb] Change return type of EventData::GetFlavor

2023-04-07 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. In D147833#4252681 , @bulbazord wrote: > In D147833#4252651 , @jasonmolenda > wrote: > >> Am I missing something, how does this work when we have uses like >> `event_data->GetFlavor

[Lldb-commits] [PATCH] D147833: [lldb] Change return type of EventData::GetFlavor

2023-04-08 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. idk maybe I'm over-thinking it, but this does make me a little uncomfortable. We have at least one instance where someone did `platform_sp->GetPluginName() == "ios-simulator"` in ClangExpressionSourceCode.cpp (probably to avoid a dependency on an an apple platform

[Lldb-commits] [PATCH] D147833: [lldb] Change return type of EventData::GetFlavor

2023-04-08 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. In D147833#4253416 , @jasonmolenda wrote: > idk maybe I'm over-thinking it, but this does make me a little uncomfortable. > We have at least one instance where someone did > `platform_sp->GetPluginName() == "ios-simulator

[Lldb-commits] [PATCH] D147833: [lldb] Change return type of EventData::GetFlavor

2023-04-08 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. In D147833#4253499 , @bulbazord wrote: > > Yes, we definitely do that in many places. I see your point though, comparing > const c-string pointers can get pretty tricky if somebody refactors this in > the future. In tha

[Lldb-commits] [PATCH] D147820: debugserver: move AArch64 watchpoint traps within a watchpointed region, parse ESR flags and send them to lldb

2023-04-10 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. Thanks for the review. Will update the patch. Comment at: lldb/tools/debugserver/source/MacOSX/MachException.cpp:162-169 + if (exc_type == EXC_BREAKPOINT && exc_data[0] == EXC_ARM_DA_DEBUG && + exc_data.size() > 1) { +stop_info->reason =

[Lldb-commits] [PATCH] D147820: debugserver: move AArch64 watchpoint traps within a watchpointed region, parse ESR flags and send them to lldb

2023-04-10 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added inline comments. Comment at: lldb/tools/debugserver/source/MacOSX/MachException.cpp:162-169 + if (exc_type == EXC_BREAKPOINT && exc_data[0] == EXC_ARM_DA_DEBUG && + exc_data.size() > 1) { +stop_info->reason = eStopTypeWatchpoint; +stop_info->detai

[Lldb-commits] [PATCH] D147820: debugserver: move AArch64 watchpoint traps within a watchpointed region, parse ESR flags and send them to lldb

2023-04-11 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added inline comments. Comment at: lldb/test/API/commands/watchpoints/unaligned-watchpoint/main.c:8-11 + printf("%lld %lld\n", (*u64_p)++, (*u64_p)++); + printf("%lld %lld\n", (*u64_p)++, (*u64_p)++); + printf("%lld %lld\n", (*u64_p)++, (*u64_p)++); + printf(

[Lldb-commits] [PATCH] D147820: debugserver: move AArch64 watchpoint traps within a watchpointed region, parse ESR flags and send them to lldb

2023-04-11 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda updated this revision to Diff 512577. jasonmolenda added a comment. Update patch to incorporate Jonas' & David's feedback. I'm holding this patch until I can get the lldb changes to fix the reason:watchpoint `description` handling corrected, or the test case in this patch will fail

[Lldb-commits] [PATCH] D147816: Clarify how watchpoint description in stop packets work, fix AArch64 unintended behavior

2023-04-11 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added inline comments. Comment at: lldb/docs/lldb-gdb-remote.txt:1609 +// There may be false-positive watchpoint hits on AArch64 as well, +// in the SVE Streaming Mode, but that is less common (v. ESR +// register flag "WPF", "Watchpoin

[Lldb-commits] [PATCH] D147816: Clarify how watchpoint description in stop packets work, fix AArch64 unintended behavior

2023-04-11 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda updated this revision to Diff 512610. jasonmolenda added a comment. Update the patch to incorporate David's first feedback. I know this is a bit of a tricky patch to review because it is 95% comments/documentation/renaming of variables, followed by the one key change of removing `c

[Lldb-commits] [PATCH] D147816: Clarify how watchpoint description in stop packets work, fix AArch64 unintended behavior

2023-04-12 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. FWIW to show the motivation for this patch (which, again comes down to removing `core >= ArchSpec::eCore_arm_generic && core <= ArchSpec::eCore_arm_aarch64` when creating the StopInfo from the watchpoint description), the test case I wrote in https://reviews.llvm.o

[Lldb-commits] [PATCH] D147816: Clarify how watchpoint description in stop packets work, fix AArch64 unintended behavior

2023-04-12 Thread Jason Molenda via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe38b0fa83a93: Remove AArch64 out of MIPS watchpoint-skip, doc wp description (authored by jasonmolenda). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147816

[Lldb-commits] [PATCH] D147820: debugserver: move AArch64 watchpoint traps within a watchpointed region, parse ESR flags and send them to lldb

2023-04-12 Thread Jason Molenda via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe76cfaca70be: AArch64 debugserver parse ESR register for watchpoints (authored by jasonmolenda). Changed prior to commit: https://reviews.llvm.org/D147820?vs=512577&id=513036#toc Repository: rG LLVM

[Lldb-commits] [PATCH] D148175: [lldb] Add `operator StringRef` to ConstString

2023-04-13 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. In D148175#4263217 , @aprantl wrote: > I understand that the opposite direction is explicit because actual work is > being done. In this d

[Lldb-commits] [PATCH] D148603: Remove hardcoding of addressing bits in ABIMacOSX_arm64

2023-04-17 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda created this revision. jasonmolenda added a reviewer: JDevlieghere. jasonmolenda added a project: LLDB. Herald added subscribers: kristof.beyls, arichardson. Herald added a project: All. jasonmolenda requested review of this revision. Herald added a subscriber: lldb-commits. Early in

[Lldb-commits] [PATCH] D148603: Remove hardcoding of addressing bits in ABIMacOSX_arm64

2023-04-18 Thread Jason Molenda via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG53430bfd5c9d: Remove hardcoded address bits in ABIMacOS_arm64 (authored by jasonmolenda). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148603/new/ https://

[Lldb-commits] [PATCH] D148715: [LLDB] Discard register flags where the size doesn't match the register

2023-04-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. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148715/new/ https://reviews.llvm.org/D148715 __

[Lldb-commits] [PATCH] D148790: [LLDB] Don't print register fields when asked for a specific format

2023-04-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. This seems fine to me; it's nice to have a way to quiet these when they get in the way, even if it's maybe not the first thing you'd look for, it's an uncommon enough use case that

[Lldb-commits] [PATCH] D149040: Refactor and generalize debugserver code for setting hardware watchpoints on AArch64

2023-04-23 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 subscriber: kristof.beyls. Herald added a project: All. jasonmolenda requested review of this revision. Herald added a subscriber: lldb-commits. I am adding MASK (pow

[Lldb-commits] [PATCH] D149111: [lldb] Add support for specifying language when setting watchpoint by expression

2023-04-25 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. Comment at: lldb/source/Interpreter/OptionGroupWatchpoint.cpp:67 + "Number of bytes to use to watch a region."}, +{LLDB_OPT_SET_2, + false,

[Lldb-commits] [PATCH] D149224: Fix an off-by-one error with armv7 mach-o corefile register contexts (LC_THREADs)

2023-04-25 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda created this revision. jasonmolenda added reviewers: fixathon, JDevlieghere. jasonmolenda added a project: LLDB. Herald added subscribers: omjavaid, kristof.beyls. Herald added a project: All. jasonmolenda requested review of this revision. Herald added a subscriber: lldb-commits. Sla

[Lldb-commits] [PATCH] D149284: [lldb] Fix finding .Bundle directories in PlatformDarwinKernel

2023-04-26 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. I added this in 2016 via 243bd763ecad466fac748b565ea52c661107684d and I have no idea what it is for. I know of no such prefix related to kernel debugging. Let's remove it instead. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

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