Page MenuHomePhabricator

jasonmolenda (Jason Molenda)
User

Projects

User does not belong to any projects.

User Details

User Since
Sep 2 2014, 12:05 PM (317 w, 21 h)

Recent Activity

Mon, Sep 28

jasonmolenda added a comment to D88387: Create "skinny corefiles" for Mach-O with process save-core / reading.

The other thing to think about is using minidump files instead of mach-o core files. We have them in very good shape and they already have a built in notion of "all image infos". Many more things in there too. Let me know if you want to know more, but I'm not holding my breath! hhaha

Mon, Sep 28, 4:32 PM · Restricted Project
jasonmolenda added a comment to D88387: Create "skinny corefiles" for Mach-O with process save-core / reading.

Thanks for the suggestions Greg, solid ideas. Let me rework this a bit.

Mon, Sep 28, 3:20 PM · Restricted Project
jasonmolenda committed rG6e54918db7f4: Once we've found a firmware binary and loaded it, don't search more (authored by jasonmolenda).
Once we've found a firmware binary and loaded it, don't search more
Mon, Sep 28, 12:51 PM

Sun, Sep 27

jasonmolenda requested review of D88387: Create "skinny corefiles" for Mach-O with process save-core / reading.
Sun, Sep 27, 6:35 PM · Restricted Project

Fri, Sep 25

jasonmolenda committed rG1bec6eb3f5cb: Add support for firmware/standalone LC_NOTE "main bin spec" corefiles (authored by jasonmolenda).
Add support for firmware/standalone LC_NOTE "main bin spec" corefiles
Fri, Sep 25, 3:19 PM
jasonmolenda closed D88282: Add support for a "main bin spec" LC_NOTE for standalone/firmware corefile binaries in MachO corefiles.
Fri, Sep 25, 3:19 PM · Restricted Project
jasonmolenda added a comment to D88282: Add support for a "main bin spec" LC_NOTE for standalone/firmware corefile binaries in MachO corefiles.

Thanks for the feedback!

Fri, Sep 25, 2:07 PM · Restricted Project
jasonmolenda requested review of D88282: Add support for a "main bin spec" LC_NOTE for standalone/firmware corefile binaries in MachO corefiles.
Fri, Sep 25, 1:21 AM · Restricted Project

Wed, Sep 2

jasonmolenda accepted D86336: [debugserver] Fix that debugserver's stop reply packets always return signal code 0.

Ah sorry lost track of this one; that looks correct, thanks for the fix.

Wed, Sep 2, 1:45 AM · Restricted Project

Aug 29 2020

jasonmolenda added a comment to D86417: [lldb] do not propagate eTrapHandlerFrame repeatedly.

Hahaha I remember looking at this constructor and expecting to find an uninitialized ivar, but it was initialized correctly and I went to look for another place where the bug might be. I think I see why there's some confusion -- this change landed Thrusday:

Aug 29 2020, 1:03 PM · Restricted Project
jasonmolenda added a comment to D86417: [lldb] do not propagate eTrapHandlerFrame repeatedly.

Ah, so we've still got a bug in x86AssemblyInspectionEngine::AugmentUnwindPlanFromCallSite somehow for abort(). This method takes an UnwindPlan from eh_frame instructions (which says it is not a trap handler - correct), and adds some epilogue unwind rows at the end if needed and sets a couple of flags. I'm not sure how the trap handler lazybool is getting set to True in the process of this conversion. :/ I'll read through this method more closely Monday and try to spot how that is happening.

Aug 29 2020, 11:03 AM · Restricted Project

Aug 28 2020

jasonmolenda added a comment to D86417: [lldb] do not propagate eTrapHandlerFrame repeatedly.

Hi, could you try

Aug 28 2020, 8:57 PM · Restricted Project
jasonmolenda added a comment to D86667: [lldb/Target] Add custom interpreter option to `platform shell`.
In D86667#2243781, @mib wrote:

Do people really call command-line shells interpreters? I would have thought --shell would be a better name. lldb already has its own command interpreter which is orthogonal to the shells, so it seems confusing to use the same term for both.

I think platform shell --shell sounds/looks repetitive so I opted for -i|--interpreter instead, as in Command-line Interpreter.

Yes, it is repetitive. OTOH:

  • the unix commands that take a shell as an argument (e.g., su, sudo), do so via a --shell/-s argument
  • we have a memory load --load command

Overall, I can understand where you're coming from, but I think I'd go with --shell nonetheless...

Aug 28 2020, 12:36 AM · Restricted Project
jasonmolenda added a comment to D86417: [lldb] do not propagate eTrapHandlerFrame repeatedly.

Hi, thanks so much for showing all the unwind plans, sorry for dropping off the thread for a day.

Aug 28 2020, 12:27 AM · Restricted Project

Aug 25 2020

jasonmolenda added a comment to D86417: [lldb] do not propagate eTrapHandlerFrame repeatedly.

Minor followup on the 'image show-unwind' output -- I just landed a patch to print when a function or unwindplan are marked as being a trap handler.

Aug 25 2020, 9:18 PM · Restricted Project
jasonmolenda committed rGb1e856d3a901: Ah, one test too many updated. This one should be unmodified. (authored by jasonmolenda).
Ah, one test too many updated. This one should be unmodified.
Aug 25 2020, 9:04 PM
jasonmolenda committed rG99d187a003c9: Update UnwindPlan dump to list if it is a trap handler func; also Command (authored by jasonmolenda).
Update UnwindPlan dump to list if it is a trap handler func; also Command
Aug 25 2020, 8:54 PM
jasonmolenda added a comment to D86417: [lldb] do not propagate eTrapHandlerFrame repeatedly.

separate from the fact that UnwindPlan::Dump does not print m_plan_is_for_signal_trap for an UnwindPlan, what we need to see from a real trap handler -- in lldb's terminology -- is that we have restore rules for all of the registers.

Aug 25 2020, 5:52 PM · Restricted Project
jasonmolenda added a comment to D86417: [lldb] do not propagate eTrapHandlerFrame repeatedly.

If I understand correctly, in

Aug 25 2020, 5:48 PM · Restricted Project
jasonmolenda added a comment to D86417: [lldb] do not propagate eTrapHandlerFrame repeatedly.

Hi, I'll review this problem / suggested patch in a bit but I think it might be helpful to outline what the intention of all this is. Let's say we have a stack of

Aug 25 2020, 3:45 PM · Restricted Project

Aug 24 2020

jasonmolenda accepted D86389: [lldb] Add a SymbolFileProvider to record and replay calls to dsymForUUID.

Looks good!

Aug 24 2020, 1:43 PM · Restricted Project
jasonmolenda accepted D86211: [lldb] Don't ask for QOS_CLASS_UNSPECIFIED queue in TestQueues.

LGTM, that call to dispatch_get_global_queue QOS_CLASS_UNSPECIFIED does not look valid.

Aug 24 2020, 12:10 PM · Restricted Project

Aug 19 2020

jasonmolenda accepted D86237: [lldb] Code sign binaries with entitlements.

LGTM

Aug 19 2020, 11:51 AM · Restricted Project
jasonmolenda accepted D85539: [lldb] Extend builder to pass the TRIPLE spec to Make.

This looks good to me, getting any logic out of the Makefile templates that we can, that's a good improvement for maintainability.

Aug 19 2020, 12:51 AM · Restricted Project

Aug 15 2020

jasonmolenda added a comment to D85284: [lldb] Remote disk file/directory completion for platform commands.
  1. Removed the unnecessary print line in GDBRemoteCommunicationServerPlatform.cpp;
  2. Updated the packet doc;
  3. Refactored the for-loop at line 359-364 in GDBRemoteCommunicationServerPlatform.cpp;
  4. Refactored the server-side test with str.encode().hex().

If we need to response for qPathComplete with empty match result. I think we could provide a char like R or what as the response. The match result is encoded into hex-bytes, so it might be easy to resolve the error symbol from the result IMHO.

What if the response is "matches:<ASCIIHEX>[,<ASCIIHEX>]" and if there are no matches, just "matches:"? We don't want to send an empty string because that means "packet not known" in the remote serial protocol.

"matches:" takes up 8 chars, maybe we can just use a 'M' as vFile:size uses 'F', so it may look like: "M<ASCIIHEX>[,<ASCIIHEX>]". What do you think?

Aug 15 2020, 2:43 PM · Restricted Project

Aug 14 2020

jasonmolenda added a comment to D85284: [lldb] Remote disk file/directory completion for platform commands.
  1. Removed the unnecessary print line in GDBRemoteCommunicationServerPlatform.cpp;
  2. Updated the packet doc;
  3. Refactored the for-loop at line 359-364 in GDBRemoteCommunicationServerPlatform.cpp;
  4. Refactored the server-side test with str.encode().hex().

If we need to response for qPathComplete with empty match result. I think we could provide a char like R or what as the response. The match result is encoded into hex-bytes, so it might be easy to resolve the error symbol from the result IMHO.

Aug 14 2020, 10:38 PM · Restricted Project

Aug 10 2020

jasonmolenda added a comment to D85284: [lldb] Remote disk file/directory completion for platform commands.

Nice set of changes, and you're right it should be a lower-case "q" packet, not an upper-case "Q" packet like I suggested, it's just querying information from the remote side.

Aug 10 2020, 11:53 PM · Restricted Project
jasonmolenda added a comment to D85284: [lldb] Remote disk file/directory completion for platform commands.

This is mostly fine. You need to escape the completed filenames you send back. You should have a test case where multiple matches are returned, like "a" matches "abc1" and "abc2".

Aug 10 2020, 2:56 PM · Restricted Project

Aug 6 2020

jasonmolenda accepted D85049: Unify the code that updates the ArchSpec after finding a fat binary with how it is done for a lean binary.

LGTM, it's hard to keep all the supported behaviors in my head but I think this is right.

Aug 6 2020, 1:15 PM · Restricted Project
jasonmolenda added inline comments to D85049: Unify the code that updates the ArchSpec after finding a fat binary with how it is done for a lean binary.
Aug 6 2020, 1:13 PM · Restricted Project

Aug 5 2020

jasonmolenda updated the diff for D85396: Fix a small memory leak in VectorType.cpp and BlockPointer.cpp.

Update to std::unique_ptr -- thanks for the reminder!

Aug 5 2020, 10:52 PM · Restricted Project
jasonmolenda updated the diff for D85396: Fix a small memory leak in VectorType.cpp and BlockPointer.cpp.

Made the change in Xcode and the indentation was off.

Aug 5 2020, 9:49 PM · Restricted Project
jasonmolenda requested review of D85396: Fix a small memory leak in VectorType.cpp and BlockPointer.cpp.
Aug 5 2020, 9:44 PM · Restricted Project

Jul 30 2020

jasonmolenda committed rGabf546dd4f83: debguserver's type sniffer to only treat .app things that end in .app (authored by jasonmolenda).
debguserver's type sniffer to only treat .app things that end in .app
Jul 30 2020, 9:16 PM

Jul 21 2020

jasonmolenda added a comment to D84263: [debugserver/Apple Silicon] Handoff connections when attaching to translated processes.

With this patch, debugging a translated app will only work when we invoke debugserver with --fd for its communication back to lldb. e.g. running 'debugserver localhost:2000 --attach=translated-app' will pass -fd=-1 as a command line argument to /Library/Apple/usr/libexec/oah/debugserver. Doing this properly would involve passing the same hostspec:portnum that debugserver received in this case -- but could we at least error out in DNBProcessAttach if communcation_fd==-1 so it's clear that this is not yet a supported workflow?

Jul 21 2020, 2:26 PM

Jul 15 2020

jasonmolenda accepted D83023: [lldb/ObjectFileMachO] Fetch shared cache images from our own shared cache.

The rewrite of the ObjectFileMachO parts is very nice. LGTM.

Jul 15 2020, 6:01 PM · Restricted Project, Restricted Project

Jul 14 2020

GitHub <noreply@github.com> committed rG6dcf3e1184f7: Upstream two performance monitor collectors to MachTask (#1343) (authored by jasonmolenda).
Upstream two performance monitor collectors to MachTask (#1343)
Jul 14 2020, 4:54 PM
jasonmolenda committed rGb6311ca0fbbd: Quote error string from qLaunchSuccess (authored by jasonmolenda).
Quote error string from qLaunchSuccess
Jul 14 2020, 4:50 PM
jasonmolenda committed rG88b544f2ce6e: Add a new lockdownd plist for launching posix processes (authored by jasonmolenda).
Add a new lockdownd plist for launching posix processes
Jul 14 2020, 4:49 PM
jasonmolenda committed rGee76034d2238: Log the NSError str and object description on app launch fail (authored by jasonmolenda).
Log the NSError str and object description on app launch fail
Jul 14 2020, 4:49 PM
GitHub <noreply@github.com> committed rGf1a1c4b8c0ca: Remove attach-failed-due-to-SIP checks which were not working (#1092) (authored by jasonmolenda).
Remove attach-failed-due-to-SIP checks which were not working (#1092)
Jul 14 2020, 4:43 PM
GitHub <noreply@github.com> committed rG1be5d83869c5: Bug where insn-based unwind plans on arm64 could be wrong (#1082) (authored by jasonmolenda).
Bug where insn-based unwind plans on arm64 could be wrong (#1082)
Jul 14 2020, 4:43 PM
GitHub <noreply@github.com> committed rG79bb1dce92f9: Remove the old SecTaskAccess entry from debugserver's plist (#1041) (authored by jasonmolenda).
Remove the old SecTaskAccess entry from debugserver's plist (#1041)
Jul 14 2020, 4:40 PM
GitHub <noreply@github.com> committed rG13508282d930: Don't fail step out if remote server doesn't implement qMemoryRegionInfo (#1040) (authored by jasonmolenda).
Don't fail step out if remote server doesn't implement qMemoryRegionInfo (#1040)
Jul 14 2020, 4:40 PM
GitHub <noreply@github.com> committed rG645573a1ea5c: Re-land Unwind past an interrupt handler correctly on arm or at pc==0 (#833) (authored by jasonmolenda).
Re-land Unwind past an interrupt handler correctly on arm or at pc==0 (#833)
Jul 14 2020, 4:29 PM
GitHub <noreply@github.com> committed rGbf76e214daed: Attach error message improvements (#770) (authored by jasonmolenda).
Attach error message improvements (#770)
Jul 14 2020, 4:23 PM
GitHub <noreply@github.com> committed rGda8fcf2e0ed3: Add new attach failure detectors, emit meaningful msgs (#745) (authored by jasonmolenda).
Add new attach failure detectors, emit meaningful msgs (#745)
Jul 14 2020, 4:21 PM
jasonmolenda committed rGfee6a7a0fa86: Fix an over-suspend bug with LaunchInNewTerminalWithAppleScript sessions (authored by jasonmolenda).
Fix an over-suspend bug with LaunchInNewTerminalWithAppleScript sessions
Jul 14 2020, 4:15 PM
GitHub <noreply@github.com> committed rG11c1d1c62c19: Merge pull request #616 from jasonmolenda/r29760580-launch-in-term-fix-bbranch (authored by jasonmolenda).
Merge pull request #616 from jasonmolenda/r29760580-launch-in-term-fix-bbranch
Jul 14 2020, 4:15 PM
GitHub <noreply@github.com> committed rG187f080ac96c: Merge pull request #565 from jasonmolenda/r49953304-bday-branch-pick (authored by jasonmolenda).
Merge pull request #565 from jasonmolenda/r49953304-bday-branch-pick
Jul 14 2020, 4:13 PM
GitHub <noreply@github.com> committed rGa208b31114ce: Merge pull request #566 from jasonmolenda/r49537922-bday-branch-cherrypick (authored by jasonmolenda).
Merge pull request #566 from jasonmolenda/r49537922-bday-branch-cherrypick
Jul 14 2020, 4:13 PM
jasonmolenda committed rGc5943e6d6813: Save more descriptive error msg from FBS/BKS, relay it up to lldb. (authored by jasonmolenda).
Save more descriptive error msg from FBS/BKS, relay it up to lldb.
Jul 14 2020, 4:13 PM
jasonmolenda committed rG7a6ff83870e0: When reading Aux file in chunks, read consecutive byte ranges (authored by jasonmolenda).
When reading Aux file in chunks, read consecutive byte ranges
Jul 14 2020, 4:13 PM

Jun 29 2020

jasonmolenda accepted D82616: Improve the detection of iOS/tvOS/watchOS simulator binaries in debugserver and lldb.

Sorry for the delay, this looks good to me.

Jun 29 2020, 11:04 PM · Restricted Project
jasonmolenda committed rGc48ccb6b4e51: Simplify conditionals in DNBArchMachARM64::EnableHardwareSingleStep (authored by jasonmolenda).
Simplify conditionals in DNBArchMachARM64::EnableHardwareSingleStep
Jun 29 2020, 2:13 PM

Jun 26 2020

jasonmolenda accepted D82378: [lldb/Unwind] Use eh_frame plan directly when it doesn't need to be augmented.

Sorry yes this patch is fine. To be honest, on x86_64 at least, as you've pointed out, maybe we should just live on eh_frame completely without going through any of these augmentation checks at all. AFAIK gdb is living off of eh_frame exclusively, it may be that all the compilers have caught on to that and are emitting asynchronous unwind information in eh_frame.

Jun 26 2020, 1:04 AM · Restricted Project

Jun 25 2020

jasonmolenda added a comment to D82378: [lldb/Unwind] Use eh_frame plan directly when it doesn't need to be augmented.

Hi Pavel, sorry I've been doing a bunch of random things today and haven't really had a chance to look at this yet. eh_frame is so problematic for lldb, we never know what we're getting. I keep thinking we should take over a few augmentation string characters so that the producer can definitively indicate one of:

Jun 25 2020, 1:03 AM · Restricted Project

Jun 24 2020

jasonmolenda accepted D82493: [Apple Silicon] Debugging of process under Rosetta is supported.

Yep.

Jun 24 2020, 12:29 PM
jasonmolenda accepted D82491: [Apple Silicon] Initial support for Rosetta.

LGTM. With p_flag, we only need to evaluate (processInfo.kp_proc.p_flag & P_TRANSLATED) as a boolean, but that's a style pref as much as anything.

Jun 24 2020, 12:28 PM

Jun 15 2020

jasonmolenda committed rG480a383551e9: Upstream two performance monitor collectors to MachTask (authored by jasonmolenda).
Upstream two performance monitor collectors to MachTask
Jun 15 2020, 5:09 PM

Jun 4 2020

jasonmolenda added a comment to D81119: [lldb] Fix SLEB128 decoding.

Hi Jan, I noticed our sanitizer bot started getting failures in

Jun 4 2020, 4:36 PM · Restricted Project

Jun 1 2020

jasonmolenda added a comment to D80955: Fix UB in EmulateInstructionARM64.cpp.

Nice cleanup of a long standing undefined behavior warning.

Jun 1 2020, 3:11 PM · Restricted Project

May 28 2020

jasonmolenda accepted D80724: [lldb] Only set the executable module for a target once.

This looks good to me, thanks Raphael.

May 28 2020, 2:19 PM · Restricted Project

May 21 2020

jasonmolenda added a comment to D80350: Handle the case where a thread exits while we were running a function on it.

I skimmed it, I guess the one question that comes to mind is how this will behave if we an operating system thread provider plugin active, where it may not actually list all of the threads that exist -- where we try to be tolerant of threads disappearing and then re-appearing later -- and the thread running an inferior function call got scheduled out while the function call was still happening. Pretty unlikely scenario, but I thought I'd throw it out there.

May 21 2020, 3:11 PM · Restricted Project

May 11 2020

jasonmolenda committed rG2b8b783b1ab4: Quote error string from qLaunchSuccess (authored by jasonmolenda).
Quote error string from qLaunchSuccess
May 11 2020, 8:32 PM
jasonmolenda closed D79614: Fix error reporting for qLaunchSuccess, check for fix/enable it via qSupported.
May 11 2020, 8:31 PM · Restricted Project
jasonmolenda added a comment to D79614: Fix error reporting for qLaunchSuccess, check for fix/enable it via qSupported.

Thanks for the feedback.

May 11 2020, 7:27 PM · Restricted Project

May 9 2020

jasonmolenda added a comment to D79614: Fix error reporting for qLaunchSuccess, check for fix/enable it via qSupported.

Why not just fix qLaunchSuccess by passing the string through a "escape_string(...)" function? Any packet that can return a string with unknown content should be escaped correctly. Adding a new packet doesn't really fix the problem in older debugserver/lldb-server binaries anyway.

lldb wouldn't know whether to decode the returned error string or not -- short of using a debugserver version #. We'll need to interoperate with debugservers that send the unescaped qLaunchSuccess error messages for years to come.

It should always decode a raw string so I don't see what you mean here. Any packet that returns a normal string, not hex ascii encoded, must escape the string. The only bug here is that we are not escaping the string that debugserver sends back. No need for the hex ASCII stuff if we escape any special characters right?

May 9 2020, 9:48 PM · Restricted Project

May 8 2020

jasonmolenda added a comment to D79614: Fix error reporting for qLaunchSuccess, check for fix/enable it via qSupported.

Why not just fix qLaunchSuccess by passing the string through a "escape_string(...)" function? Any packet that can return a string with unknown content should be escaped correctly. Adding a new packet doesn't really fix the problem in older debugserver/lldb-server binaries anyway.

May 8 2020, 6:49 PM · Restricted Project
jasonmolenda added a comment to D79614: Fix error reporting for qLaunchSuccess, check for fix/enable it via qSupported.

Why not just fix qLaunchSuccess by passing the string through a "escape_string(...)" function? Any packet that can return a string with unknown content should be escaped correctly. Adding a new packet doesn't really fix the problem in older debugserver/lldb-server binaries anyway.

May 8 2020, 6:49 PM · Restricted Project

May 7 2020

jasonmolenda created D79614: Fix error reporting for qLaunchSuccess, check for fix/enable it via qSupported.
May 7 2020, 9:40 PM · Restricted Project
jasonmolenda committed rG2ea7187ab9b7: Add a new lockdownd plist for launching posix processes (authored by jasonmolenda).
Add a new lockdownd plist for launching posix processes
May 7 2020, 7:00 PM

May 5 2020

jasonmolenda committed rG5034102b249f: Log the NSError str and object description on app launch fail (authored by jasonmolenda).
Log the NSError str and object description on app launch fail
May 5 2020, 4:13 PM

Apr 16 2020

jasonmolenda committed rG7fa342bd2a6b: Remove attach-failed-due-to-SIP checks which were not working (authored by jasonmolenda).
Remove attach-failed-due-to-SIP checks which were not working
Apr 16 2020, 3:39 PM

Apr 14 2020

jasonmolenda committed rG1cd92e480c12: Bug where insn-based unwind plans on arm64 could be wrong (authored by jasonmolenda).
Bug where insn-based unwind plans on arm64 could be wrong
Apr 14 2020, 5:26 PM
jasonmolenda closed D78077: Fix bug in UnwindAssemblyInstEmulation with fp-using codegen and mid-function epilogues.
Apr 14 2020, 5:26 PM · Restricted Project
jasonmolenda updated the diff for D78077: Fix bug in UnwindAssemblyInstEmulation with fp-using codegen and mid-function epilogues.

Update to address mistake Greg identified; also remove two unused variables that were in this method before my changes.

Apr 14 2020, 4:52 PM · Restricted Project
jasonmolenda added a comment to D78077: Fix bug in UnwindAssemblyInstEmulation with fp-using codegen and mid-function epilogues.

If you test worked, then there is something wrong with this test? See inline comment for copy and paste error

Apr 14 2020, 2:04 PM · Restricted Project

Apr 13 2020

jasonmolenda created D78077: Fix bug in UnwindAssemblyInstEmulation with fp-using codegen and mid-function epilogues.
Apr 13 2020, 9:10 PM · Restricted Project

Apr 6 2020

jasonmolenda committed rG836534f99702: Add more detailed symbol type categorization, based on a swift patch by Greg… (authored by jasonmolenda).
Add more detailed symbol type categorization, based on a swift patch by Greg…
Apr 6 2020, 2:13 PM
jasonmolenda closed D77369: Augment the symbol type classification for dyld trie exports with more detail.
Apr 6 2020, 2:12 PM · Restricted Project

Apr 2 2020

jasonmolenda created D77369: Augment the symbol type classification for dyld trie exports with more detail.
Apr 2 2020, 10:45 PM · Restricted Project

Mar 31 2020

jasonmolenda accepted D77173: [PATCH] [debugserver/ARM64] Make sure watchpoints hit are attributed correctly..

I was a little worried about the case where we have an 8-byte region being watched that is 4-byte aligned (so it's spanning two 8-byte watchpoints), but a quick test of that with this patch shows it works correctly. This is fine with me.

Mar 31 2020, 3:27 PM · Restricted Project

Mar 27 2020

jasonmolenda committed rGf0a5af906b41: Merge in symbols from Mach-O dyld trie to the symbol table (authored by jasonmolenda).
Merge in symbols from Mach-O dyld trie to the symbol table
Mar 27 2020, 11:06 PM
jasonmolenda closed D76758: Augment lldb's symbol table with external symbols in Mach-O's dyld trie.
Mar 27 2020, 11:06 PM · Restricted Project
jasonmolenda updated the diff for D76758: Augment lldb's symbol table with external symbols in Mach-O's dyld trie.

Updated the patch to incorporate Jonas and Greg's suggestions.

Mar 27 2020, 11:05 PM · Restricted Project
jasonmolenda accepted D76938: [lldb/PlatformMacOSX] Re-implement GetDeveloperDirectory.

Yea, this looks good, I don't think any of those other search methods were valid any longer.

Mar 27 2020, 12:36 PM · Restricted Project

Mar 26 2020

jasonmolenda added a comment to D76758: Augment lldb's symbol table with external symbols in Mach-O's dyld trie.

So I know the mach-o symbol table parsing code is a mess already, but it seems like this patch can be simpler if we make a std::set<lldb:addr_t> at the top of ObjectFileMachO::ParseSymtab() and every time we add a symbol that has a valid address value, add the file addr to this set. This will avoid the need to do any sorting. This std::set can be used to not add LC_FUNCTION_START entries that already have a symbol at the address, and it can be used to only add TrieEntry values that have symbols. Thoughts?

Mar 26 2020, 2:42 PM · Restricted Project

Mar 25 2020

jasonmolenda added inline comments to D76758: Augment lldb's symbol table with external symbols in Mach-O's dyld trie.
Mar 25 2020, 11:58 PM · Restricted Project
jasonmolenda added a comment to D76758: Augment lldb's symbol table with external symbols in Mach-O's dyld trie.

Thanks Adrian, great comments, incorporated most of them. The use of the block to search the trie entries when eliminating duplication between nlist/tries was a good idea, much cleaner now.

Mar 25 2020, 11:58 PM · Restricted Project
jasonmolenda updated the diff for D76758: Augment lldb's symbol table with external symbols in Mach-O's dyld trie.

Update patch with Adrian's suggestions.

Mar 25 2020, 11:58 PM · Restricted Project

Mar 24 2020

jasonmolenda created D76758: Augment lldb's symbol table with external symbols in Mach-O's dyld trie.
Mar 24 2020, 11:57 PM · Restricted Project

Mar 21 2020

jasonmolenda added a comment to D74398: [lldb-server] jThreadsInfo returns stack memory.

(and if you're still seeing mystery reads, put a breakpoint on ProcessGDBRemote::DoReadMemory and see who is doing it)

Mar 21 2020, 10:25 PM · Restricted Project
jasonmolenda added a comment to D74398: [lldb-server] jThreadsInfo returns stack memory.

Regarding the packet savings - there are still things that worry me.

First of all, when lldb CLI stops on a breakpoint, it will first unwind top of the stack of each thread as part of ThreadList::ShouldStop. This sends lots of "x" packets to lldb-server and only then issues jThreadInfo, which then replies with the stack memory uselessly (with my patch). I am yet to investigate why the CLI does that.

I haven't looked into this, but this sound like the difference between a "private stop" and a "public stop". When you do a source-level "next" command, lldb will put breakpoints on branches/function calls, run to those, then instruction step those instructions, etc. Each time it stops at these breakpoints or instruction-steps. Each of these stops are called private stops - the UI layer (lldb command line driver or the SB API driver) never hear about these. When we've completed executing the instructions for that source line, then we declare this to be a "public stop" - this is when lldb driver or SB API driver, and the user, are notified that execution has stopped.

Mar 21 2020, 10:25 PM · Restricted Project
jasonmolenda added a comment to D74398: [lldb-server] jThreadsInfo returns stack memory.

Regarding the packet savings - there are still things that worry me.

First of all, when lldb CLI stops on a breakpoint, it will first unwind top of the stack of each thread as part of ThreadList::ShouldStop. This sends lots of "x" packets to lldb-server and only then issues jThreadInfo, which then replies with the stack memory uselessly (with my patch). I am yet to investigate why the CLI does that.

Mar 21 2020, 9:22 PM · Restricted Project

Mar 19 2020

jasonmolenda accepted D76450: [lldb/PlatformDarwin] Always delete destination file first in PutFile.

nice catch, lgtm.

Mar 19 2020, 2:15 PM · Restricted Project
jasonmolenda accepted D76411: [debugserver] Implement hardware breakpoints for ARM64.

Nice patch, thanks for doing this. I wouldn't have added the fallback code in DNBArchMachARM64::NumSupportedHardwareBreakpoints to handle the case where the sysctl fails - it doesn't fail - but there's no harm in it.

Mar 19 2020, 11:59 AM · Restricted Project

Mar 18 2020

jasonmolenda committed rG5d881dd8a8b8: Update so debugserver can be built on macos again with xcodebuild. (authored by jasonmolenda).
Update so debugserver can be built on macos again with xcodebuild.
Mar 18 2020, 10:15 PM
jasonmolenda accepted D76341: [lldb/MemoryHistoryAsan] Fix address resolution for recorded backtraces.

LGTM.

Mar 18 2020, 11:58 AM · Restricted Project

Mar 17 2020

jasonmolenda added a comment to D76337: [lldb/DWARF] Use DW_AT_call_pc to determine artificial frame address.

Nice fix, this looks good to me but I haven't been following this area of code too closely before now.

Mar 17 2020, 6:57 PM · Restricted Project