Page MenuHomePhabricator

jasonmolenda (Jason Molenda)
User

Projects

User does not belong to any projects.

User Details

User Since
Sep 2 2014, 12:05 PM (447 w, 4 d)

Recent Activity

Mon, Mar 13

jasonmolenda added a comment to D145580: [lldb] Show register fields using bitfield struct types.

This gdb_remote_client test looks real nice with this update.

Mon, Mar 13, 9:30 AM · Restricted Project, Restricted Project, Restricted Project

Thu, Mar 9

jasonmolenda planned changes to D142792: Add SBValue::GetValueAsAddress(), strip off ptrauth, TBI, MTE bits on AArch64 systems.

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 an NSObject object, you'll have a uint64_t that can be decoded to represent a small integer value without existing in memory. In ValueObject::GetPointerValue(), I clear non-addressable bits, which destroys the tagged pointer values. In the apple internal version of this, we have some additional code that checks the clang type of the ValueObject to see if pointer auth is used for this type before we clear them. But with TBI/MTE values, we need to clear it regardless of type. The correct fix is to audit the objc type formatters for uses of ValueObject::GetPointerValue and have them fetch an unsigned value if there's any possibility of a tagged pointer being used, this is probably going to be a little bit of work.

Thu, Mar 9, 6:41 PM · Restricted Project, Restricted Project
jasonmolenda accepted D145574: [lldb] Read register fields from target XML.

This looks good to me.

Thu, Mar 9, 3:49 PM · Restricted Project, Restricted Project
jasonmolenda accepted D145580: [lldb] Show register fields using bitfield struct types.

I'll mark it as accepted, I don't know if Jim or Pavel have any comments. I think this is good.

Thu, Mar 9, 3:28 PM · Restricted Project, Restricted Project, Restricted Project
jasonmolenda added a comment to D145580: [lldb] Show register fields using bitfield struct types.

This all looks good to me. the phab says there's a missing newline at the end of TestXMLRegisterFlags.py.

Thu, Mar 9, 3:25 PM · Restricted Project, Restricted Project, Restricted Project
jasonmolenda committed rG7f25c3e25f0a: Slight refinement to a change yesterday in metadata-added binaries (authored by jasonmolenda).
Slight refinement to a change yesterday in metadata-added binaries
Thu, Mar 9, 2:56 PM · Restricted Project
jasonmolenda accepted D145566: [lldb] Add RegisterFlags class.

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.

Thu, Mar 9, 1:55 PM · Restricted Project, Restricted Project
jasonmolenda accepted D145568: [lldb] Add dummy field to RegisterInfo for register flags use later.

LGTM.

Thu, Mar 9, 12:45 PM · Restricted Project, Restricted Project

Wed, Mar 8

jasonmolenda committed rG8db8a4e8eddf: Clean up conditional, don't set load binaries twice (authored by jasonmolenda).
Clean up conditional, don't set load binaries twice
Wed, Mar 8, 6:02 PM · Restricted Project
jasonmolenda committed rG794d2089cd74: Don't load non-kexts in darwin kernel debug; handle unslid segs (authored by jasonmolenda).
Don't load non-kexts in darwin kernel debug; handle unslid segs
Wed, Mar 8, 4:51 PM · Restricted Project
jasonmolenda closed D145547: When setting load addresses on darwin kernel kexts, handle case where in-memory load commands are not updated.
Wed, Mar 8, 4:51 PM · Restricted Project, Restricted Project
jasonmolenda updated the diff for D145547: When setting load addresses on darwin kernel kexts, handle case where in-memory load commands are not updated.

Update for Jonas' suggestions.

Wed, Mar 8, 4:48 PM · Restricted Project, Restricted Project
jasonmolenda added inline comments to D145547: When setting load addresses on darwin kernel kexts, handle case where in-memory load commands are not updated.
Wed, Mar 8, 4:43 PM · Restricted Project, Restricted Project
jasonmolenda updated the diff for D145547: When setting load addresses on darwin kernel kexts, handle case where in-memory load commands are not updated.

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, then we don't re-register it.

Wed, Mar 8, 4:12 PM · Restricted Project, Restricted Project
jasonmolenda updated the diff for D145547: When setting load addresses on darwin kernel kexts, handle case where in-memory load commands are not updated.

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 DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule where I call !IsKernel() && !obj_macho->IsKext() to detect something in the list which isn't processed the standard way that kexts & the kernel are. Either one would work in this case.

Wed, Mar 8, 1:43 PM · Restricted Project, Restricted Project

Tue, Mar 7

jasonmolenda requested review of D145547: When setting load addresses on darwin kernel kexts, handle case where in-memory load commands are not updated.
Tue, Mar 7, 10:33 PM · Restricted Project, Restricted Project

Mar 2 2023

jasonmolenda reopened D142792: Add SBValue::GetValueAsAddress(), strip off ptrauth, TBI, MTE bits on AArch64 systems.
Mar 2 2023, 3:31 PM · Restricted Project, Restricted Project
jasonmolenda added a comment to D142792: Add SBValue::GetValueAsAddress(), strip off ptrauth, TBI, MTE bits on AArch64 systems.

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.

Mar 2 2023, 3:31 PM · Restricted Project, Restricted Project
jasonmolenda added a comment to D142792: Add SBValue::GetValueAsAddress(), strip off ptrauth, TBI, MTE bits on AArch64 systems.

Maybe the right answer is to use FixDataAddress. It's possible someone could make a AArch64 FixCodeAddress that clears the low 2 bits.

Mar 2 2023, 2:45 PM · Restricted Project, Restricted Project
jasonmolenda added a comment to D142792: Add SBValue::GetValueAsAddress(), strip off ptrauth, TBI, MTE bits on AArch64 systems.

Need to figure out something for the armv7 case before I try re-landing.

Mar 2 2023, 2:42 PM · Restricted Project, Restricted Project
jasonmolenda updated the diff for D142792: Add SBValue::GetValueAsAddress(), strip off ptrauth, TBI, MTE bits on AArch64 systems.

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,

Mar 2 2023, 2:40 PM · Restricted Project, Restricted Project
jasonmolenda added a reverting change for rG4d635be2dbad: Add SBValue::GetValueAsAddress API for removing non-addressing metadata: rG7e770f9c1713: Revert "Add SBValue::GetValueAsAddress API for removing non-addressing metadata".
Mar 2 2023, 2:38 PM · Restricted Project
jasonmolenda committed rG7e770f9c1713: Revert "Add SBValue::GetValueAsAddress API for removing non-addressing metadata" (authored by jasonmolenda).
Revert "Add SBValue::GetValueAsAddress API for removing non-addressing metadata"
Mar 2 2023, 2:38 PM · Restricted Project
jasonmolenda added a reverting change for D142792: Add SBValue::GetValueAsAddress(), strip off ptrauth, TBI, MTE bits on AArch64 systems: rG7e770f9c1713: Revert "Add SBValue::GetValueAsAddress API for removing non-addressing metadata".
Mar 2 2023, 2:37 PM · Restricted Project, Restricted Project
jasonmolenda committed rG4d635be2dbad: Add SBValue::GetValueAsAddress API for removing non-addressing metadata (authored by jasonmolenda).
Add SBValue::GetValueAsAddress API for removing non-addressing metadata
Mar 2 2023, 1:33 PM · Restricted Project
jasonmolenda closed D142792: Add SBValue::GetValueAsAddress(), strip off ptrauth, TBI, MTE bits on AArch64 systems.
Mar 2 2023, 1:32 PM · Restricted Project, Restricted Project

Mar 1 2023

jasonmolenda updated the diff for D142792: Add SBValue::GetValueAsAddress(), strip off ptrauth, TBI, MTE bits on AArch64 systems.

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 pointer type. I think we're all done with this one.

Mar 1 2023, 10:43 AM · Restricted Project, Restricted Project

Feb 28 2023

jasonmolenda committed rGf136ca848309: Put the arch-dep debugserver files in main CMakeLists.txt (authored by jasonmolenda).
Put the arch-dep debugserver files in main CMakeLists.txt
Feb 28 2023, 4:57 PM · Restricted Project
jasonmolenda closed D145020: Hoist debugserver arch-dep sources out of a side CMakeLists into the debugserver main CMakeLists.
Feb 28 2023, 4:57 PM · Restricted Project, Restricted Project
jasonmolenda requested review of D145020: Hoist debugserver arch-dep sources out of a side CMakeLists into the debugserver main CMakeLists.
Feb 28 2023, 4:52 PM · Restricted Project, Restricted Project
jasonmolenda committed rGb22dcaf11328: Update debugserver xcode proj to build with c++17 (authored by jasonmolenda).
Update debugserver xcode proj to build with c++17
Feb 28 2023, 1:37 PM · Restricted Project
jasonmolenda added a comment to D144937: [LLDB] Expose several methods in SBWatchpoint.

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) and a shared pointer to the lldb private object that backs the class. e.g. see SBValue's ValueImpl, the definition is in SBValue.cpp.

Feb 28 2023, 12:42 PM · Restricted Project, Restricted Project
jasonmolenda added a comment to D144937: [LLDB] Expose several methods in SBWatchpoint.

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 private object, we traditionally add an Impl class which has the additional member(s) and a shared pointer to the lldb private object that backs the class. e.g. see SBValue's ValueImpl, the definition is in SBValue.cpp.

Feb 28 2023, 11:34 AM · Restricted Project, Restricted Project

Feb 23 2023

jasonmolenda accepted D144311: [debugserver] Add one additional sleep before attaching after waiting.

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 run a little extra to get past this is a good workaround.

Feb 23 2023, 11:21 AM · Restricted Project, Restricted Project

Feb 22 2023

jasonmolenda added a comment to D144528: [lldb] Warn when Mach-O files have overlapping segments.
Feb 22 2023, 1:20 PM · Restricted Project, Restricted Project
jasonmolenda accepted D144528: [lldb] Warn when Mach-O files have overlapping segments.

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 segment that is shared, and each binary's mach-o LC_SYMTAB/LC_DYSYMTAB load command will point to different part of that same LINKEDIT. From lldb's perspective, that means every Module in the shared cache has a LINKEDIT Section that overlaps with all the others.

Feb 22 2023, 1:06 PM · Restricted Project, Restricted Project

Feb 15 2023

jasonmolenda accepted D144142: [debugserver] Initialize logging earlier in the startup sequence.
Feb 15 2023, 3:03 PM · Restricted Project, Restricted Project
jasonmolenda added inline comments to D144142: [debugserver] Initialize logging earlier in the startup sequence.
Feb 15 2023, 2:58 PM · Restricted Project, Restricted Project

Feb 14 2023

jasonmolenda updated the diff for D142792: Add SBValue::GetValueAsAddress(), strip off ptrauth, TBI, MTE bits on AArch64 systems.

Updated patch to address David's feedback. Thanks David!

Feb 14 2023, 3:38 PM · Restricted Project, Restricted Project
jasonmolenda added inline comments to D142792: Add SBValue::GetValueAsAddress(), strip off ptrauth, TBI, MTE bits on AArch64 systems.
Feb 14 2023, 3:24 PM · Restricted Project, Restricted Project
jasonmolenda committed rGeaeb8ddd4a9d: [LLDB] add arch-specific watchpoint behavior defaults to lldb (authored by jasonmolenda).
[LLDB] add arch-specific watchpoint behavior defaults to lldb
Feb 14 2023, 11:36 AM · Restricted Project
jasonmolenda closed D143215: lldb can know architecture-dependent watchpoint behaviors, instead of depending on the remote stub.
Feb 14 2023, 11:36 AM · Restricted Project, Restricted Project

Feb 13 2023

jasonmolenda committed rGee88f1177003: Find SDK path more lazily in Apple Simulator platforms (authored by jasonmolenda).
Find SDK path more lazily in Apple Simulator platforms
Feb 13 2023, 3:17 PM · Restricted Project
jasonmolenda closed D143932: Further delay simulator SDK filepath discovery until needed.
Feb 13 2023, 3:17 PM · Restricted Project, Restricted Project
jasonmolenda requested review of D143932: Further delay simulator SDK filepath discovery until needed.
Feb 13 2023, 10:52 AM · Restricted Project, Restricted Project

Feb 9 2023

jasonmolenda committed rG49470f1eacca: Remove test case that tries to allocate impossible amounts (authored by jasonmolenda).
Remove test case that tries to allocate impossible amounts
Feb 9 2023, 10:45 AM · Restricted Project

Feb 8 2023

jasonmolenda updated the diff for D143215: lldb can know architecture-dependent watchpoint behaviors, instead of depending on the remote stub.

Update to fix David's second round of comments, rewrite the Title/Summary to more accurately reflect what I'm doing in this patch. I think we're about done here, but open to any comments.

Feb 8 2023, 4:02 PM · Restricted Project, Restricted Project
jasonmolenda added inline comments to D143215: lldb can know architecture-dependent watchpoint behaviors, instead of depending on the remote stub.
Feb 8 2023, 3:18 PM · Restricted Project, Restricted Project
jasonmolenda accepted D142715: [LLDB] Apply FixCodeAddress to all forms of address arguments.

LGTM.

Feb 8 2023, 1:10 PM · Restricted Project, Restricted Project

Feb 7 2023

jasonmolenda added a comment to D143215: lldb can know architecture-dependent watchpoint behaviors, instead of depending on the remote stub.

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 received before the instruction executes, and allow the remote gdb stub to override this behavior in its qHostInfo response". The rest is mechanical change.

Feb 7 2023, 7:40 PM · Restricted Project, Restricted Project
jasonmolenda updated the diff for D143215: lldb can know architecture-dependent watchpoint behaviors, instead of depending on the remote stub.

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 qHostInfo reply packet, so lldb had to use its knowledge of the target system to determine this.

Feb 7 2023, 4:57 PM · Restricted Project, Restricted Project
jasonmolenda committed rGb1d8f40484df: Only run the weird new try-to-read-too-much test on Darwin (authored by jasonmolenda).
Only run the weird new try-to-read-too-much test on Darwin
Feb 7 2023, 4:05 PM · Restricted Project
jasonmolenda committed rG4a8cc285e9f3: Fix TestProcessAPI.py to only allocate sys.maxsize buffer (authored by jasonmolenda).
Fix TestProcessAPI.py to only allocate sys.maxsize buffer
Feb 7 2023, 4:05 PM · Restricted Project
jasonmolenda committed rG62c747517cd9: Check if null buffer handed to SBProcess::ReadMemory (authored by jasonmolenda).
Check if null buffer handed to SBProcess::ReadMemory
Feb 7 2023, 2:16 PM · Restricted Project
jasonmolenda closed D143012: Add a bit of error checking to SBProcess::ReadMemory to check if a nullptr destination buffer was provided, return error.
Feb 7 2023, 2:16 PM · Restricted Project, Restricted Project
jasonmolenda updated the diff for D143012: Add a bit of error checking to SBProcess::ReadMemory to check if a nullptr destination buffer was provided, return error.

Update patch for Jonas' suggestions.

Feb 7 2023, 1:46 PM · Restricted Project, Restricted Project

Feb 6 2023

jasonmolenda added a comment to D143215: lldb can know architecture-dependent watchpoint behaviors, instead of depending on the remote stub.

I phabracated wrong and the end of the last msg was truncated. I meant to end it with this:

Feb 6 2023, 11:36 PM · Restricted Project, Restricted Project
jasonmolenda updated the diff for D143215: lldb can know architecture-dependent watchpoint behaviors, instead of depending on the remote stub.

David's feedback was spot on, overhaul patch to address.

Feb 6 2023, 11:01 PM · Restricted Project, Restricted Project
jasonmolenda added a reviewer for D143012: Add a bit of error checking to SBProcess::ReadMemory to check if a nullptr destination buffer was provided, return error: mib.
Feb 6 2023, 3:00 PM · Restricted Project, Restricted Project
jasonmolenda committed rG701030c3ecba: In InitializeZerothFrame check for a CFA/AFA or error out (authored by jasonmolenda).
In InitializeZerothFrame check for a CFA/AFA or error out
Feb 6 2023, 2:54 PM · Restricted Project
jasonmolenda closed D143232: Return an error when the CFA resolves to no known register, instead of segfaulting.
Feb 6 2023, 2:54 PM · Restricted Project, Restricted Project
jasonmolenda added a comment to D143232: Return an error when the CFA resolves to no known register, instead of segfaulting.

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?

Feb 6 2023, 2:45 PM · Restricted Project, Restricted Project

Feb 2 2023

jasonmolenda requested review of D143232: Return an error when the CFA resolves to no known register, instead of segfaulting.
Feb 2 2023, 4:48 PM · Restricted Project, Restricted Project
jasonmolenda added a comment to D143215: lldb can know architecture-dependent watchpoint behaviors, instead of depending on the remote stub.

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.

Feb 2 2023, 2:04 PM · Restricted Project, Restricted Project
jasonmolenda updated the diff for D143215: lldb can know architecture-dependent watchpoint behaviors, instead of depending on the remote stub.

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.

Feb 2 2023, 1:49 PM · Restricted Project, Restricted Project
jasonmolenda requested review of D143215: lldb can know architecture-dependent watchpoint behaviors, instead of depending on the remote stub.
Feb 2 2023, 1:46 PM · Restricted Project, Restricted Project

Jan 31 2023

jasonmolenda requested review of D143012: Add a bit of error checking to SBProcess::ReadMemory to check if a nullptr destination buffer was provided, return error.
Jan 31 2023, 1:39 PM · Restricted Project, Restricted Project

Jan 27 2023

jasonmolenda abandoned D142793: Remove -py3 command line arg from swig invocation; generates warning with swig 4.1.1.

hasn't landed it, hasn't beaten me!!!

Jan 27 2023, 5:14 PM · Restricted Project, Restricted Project
jasonmolenda requested review of D142793: Remove -py3 command line arg from swig invocation; generates warning with swig 4.1.1.
Jan 27 2023, 5:05 PM · Restricted Project, Restricted Project
jasonmolenda updated the diff for D142792: Add SBValue::GetValueAsAddress(), strip off ptrauth, TBI, MTE bits on AArch64 systems.

Fix the nits Jonas pointed out, thanks Jonas.

Jan 27 2023, 5:01 PM · Restricted Project, Restricted Project
jasonmolenda added inline comments to D142792: Add SBValue::GetValueAsAddress(), strip off ptrauth, TBI, MTE bits on AArch64 systems.
Jan 27 2023, 4:54 PM · Restricted Project, Restricted Project
jasonmolenda added a comment to D142792: Add SBValue::GetValueAsAddress(), strip off ptrauth, TBI, MTE bits on AArch64 systems.

Thanks for the nits, good points.

Jan 27 2023, 4:53 PM · Restricted Project, Restricted Project
jasonmolenda requested review of D142792: Add SBValue::GetValueAsAddress(), strip off ptrauth, TBI, MTE bits on AArch64 systems.
Jan 27 2023, 4:41 PM · Restricted Project, Restricted Project
jasonmolenda committed rG8112bd2cb484: disable-language-runtime-unwindplans desc rewrite to be searchable (authored by jasonmolenda).
disable-language-runtime-unwindplans desc rewrite to be searchable
Jan 27 2023, 9:41 AM · Restricted Project
jasonmolenda committed rG841b26f1d80f: Don't flag memory-only mach-o corefiles as invalid (authored by jasonmolenda).
Don't flag memory-only mach-o corefiles as invalid
Jan 27 2023, 9:41 AM · Restricted Project
jasonmolenda closed D142663: Improve disable-language-runtime-unwindplans description to be more searchable.
Jan 27 2023, 9:41 AM · Restricted Project, Restricted Project
jasonmolenda closed D142662: Allow bytes-only mach-o corefile to load into lldb.
Jan 27 2023, 9:41 AM · Restricted Project, Restricted Project

Jan 26 2023

jasonmolenda requested review of D142663: Improve disable-language-runtime-unwindplans description to be more searchable.
Jan 26 2023, 1:33 PM · Restricted Project, Restricted Project
jasonmolenda requested review of D142662: Allow bytes-only mach-o corefile to load into lldb.
Jan 26 2023, 1:11 PM · Restricted Project, Restricted Project

Jan 23 2023

jasonmolenda committed rG484bc2bcc799: Run cmdline address expressions through ABI's FixAddress (authored by jasonmolenda).
Run cmdline address expressions through ABI's FixAddress
Jan 23 2023, 10:44 AM · Restricted Project
jasonmolenda closed D141629: Run address expression argument values through ABI::FixCodeAddress to strip TBI/pointer auth bytes on AArch64.
Jan 23 2023, 10:44 AM · Restricted Project, Restricted Project

Jan 19 2023

jasonmolenda added a comment to D142067: Remove the "help" subcommand - its undocumented, undiscoverable and doesn't work.....

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, but I can appreciate where the original author thought they were going with it.

Jan 19 2023, 10:48 AM · Restricted Project, Restricted Project

Jan 18 2023

jasonmolenda committed rGdb223b7f01f7: Do qProcessInfo-hint binary loading later in Process setup (authored by jasonmolenda).
Do qProcessInfo-hint binary loading later in Process setup
Jan 18 2023, 12:33 PM · Restricted Project
jasonmolenda closed D141972: Delay loading of qProcessInfo-informed binaries until later in the Process setup.
Jan 18 2023, 12:33 PM · Restricted Project, Restricted Project
jasonmolenda updated the diff for D141972: Delay loading of qProcessInfo-informed binaries until later in the Process setup.

Thanks for the feedback Jonas, updated patch.

Jan 18 2023, 11:28 AM · Restricted Project, Restricted Project
jasonmolenda updated the diff for D141972: Delay loading of qProcessInfo-informed binaries until later in the Process setup.

Add a comment about the intentional placement of binary loading/load address setting in DidLaunchOrAttach to address Jim's feedback.

Jan 18 2023, 10:40 AM · Restricted Project, Restricted Project

Jan 17 2023

jasonmolenda requested review of D141972: Delay loading of qProcessInfo-informed binaries until later in the Process setup.
Jan 17 2023, 3:22 PM · Restricted Project, Restricted Project

Jan 12 2023

jasonmolenda requested review of D141629: Run address expression argument values through ABI::FixCodeAddress to strip TBI/pointer auth bytes on AArch64.
Jan 12 2023, 12:58 PM · Restricted Project, Restricted Project
jasonmolenda added a comment to D68655: Trust the arange accelerator tables in dSYMs.

Both have to be written by the dwarf linker to be correct, but only the former is written ONLY by the dwarf linker.

I don't think that's right:

$ clang -c -x c - -o - -gdwarf-aranges -g <<<"void f(){}" | llvm-readelf - --sections | grep aranges
  [ 6] .debug_aranges    PROGBITS        0000000000000000 0000a0 000030 00      0   0  1
  [ 7] .rela.debug_aranges RELA          0000000000000000 000380 000030 18   I 20   6  8
Jan 12 2023, 9:47 AM · Restricted Project, Restricted Project

Jan 11 2023

jasonmolenda added a comment to D68655: Trust the arange accelerator tables in dSYMs.

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_unit DW_AT_ranges, either the compiler (to the .o file) created it, in which case I really am suspicious of those ranges because the compiler can't know which symbols will end up in the final executable, and the addresses in the ranges were simply translated to the final executable address equivalents. Or it was rewritten by a dwarf linker that parsed the DWARF and knew how to correctly calculate the addresses that correspond to that compile unit.

Jan 11 2023, 7:09 PM · Restricted Project, Restricted Project
jasonmolenda added a comment to D68655: Trust the arange accelerator tables in dSYMs.

I know this is all moot because the dSYM-specific patch landed, but I am curious about this part,

Jan 11 2023, 6:46 PM · Restricted Project, Restricted Project
jasonmolenda added a comment to D68655: Trust the arange accelerator tables in dSYMs.

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 details in this patch:

https://reviews.llvm.org/D136395

So long story short, some people believe we should not produce or use .debug_aranges anymore, and want LLDB changed to ignore it.

Jan 11 2023, 3:46 PM · Restricted Project, Restricted Project
jasonmolenda accepted D140253: [debugserver] Clear memory allocations after exec.

LGTM.

Jan 11 2023, 12:58 PM · Restricted Project, Restricted Project
jasonmolenda accepted D140249: [lldb] Do not deallocate memory after exec.

LGTM. Jim?

Jan 11 2023, 11:03 AM · Restricted Project, Restricted Project
jasonmolenda added a comment to D141330: [lldb] Limit 8b259fe573e1 to dSYMs .

Should this be true for a fully linked ELF executable, too?

Sounds reasonable, but adding @labath and @DavidSpickett to confirm. This is trivial to extend later.

It sounds like this is depends on whoever produced the file, not on the file format.

Jan 11 2023, 7:55 AM · Restricted Project, Restricted Project

Jan 9 2023

jasonmolenda added a comment to D141330: [lldb] Limit 8b259fe573e1 to dSYMs .

Yeah I'd add a comment explaining that this returns true if the DWARF dwarf_aranges accelerator table can be trusted to be complete by lldb. which it is with dsymutil created dSYM files. Otherwise lldb will confirm that every CU mentioned in the debug_info is included in dwarf_aranges, and for any that are not, it will scan the debug_info for that compile unit looking to make sure there aren't any subprograms that were omitted. Anyway, LGTM.

Jan 9 2023, 3:20 PM · Restricted Project, Restricted Project
jasonmolenda added a comment to D68655: Trust the arange accelerator tables in dSYMs.

I agree with landing this change.

Jan 9 2023, 12:58 PM · Restricted Project, Restricted Project

Jan 6 2023

jasonmolenda committed rG75d268d1fa60: When loading mach-o corefile, new fallback for finding images (authored by jasonmolenda).
When loading mach-o corefile, new fallback for finding images
Jan 6 2023, 10:47 AM · Restricted Project
jasonmolenda closed D140066: Add a final fallback technique to the old Darwin dynamic loader plugin to find the dyld_all_image_infos structure.
Jan 6 2023, 10:46 AM · Restricted Project, Restricted Project

Jan 4 2023

jasonmolenda committed rG0dc7ecb1a70e: Fix typeo in LoadBinariesViaExhaustiveSearch when looking for kernel (authored by jasonmolenda).
Fix typeo in LoadBinariesViaExhaustiveSearch when looking for kernel
Jan 4 2023, 4:12 PM · Restricted Project