[Lldb-commits] [PATCH] D108889: Use dSYM SymbolFile Sections file addr instead of ObjectFile Section file addr when they differ in ObjectFileMachO

2021-08-31 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda updated this revision to Diff 369653. jasonmolenda added a comment. Update patch to incorporate Greg's suggestion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108889/new/ https://reviews.llvm.org/D108889 Files: lldb/source/Plugins

[Lldb-commits] [PATCH] D108889: Use dSYM SymbolFile Sections file addr instead of ObjectFile Section file addr when they differ in ObjectFileMachO

2021-08-31 Thread Jason Molenda via Phabricator via lldb-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGc1184ca6eb97: Use dSYM's file addr for Sections when it doesn't match binary (authored by jasonmolenda). Repository: rG LLVM Github Monorepo CHAN

[Lldb-commits] [PATCH] D74244: [lldb] Delete register info definitions in the x86_64 ABI classes

2020-02-10 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. Nice elimination of duplication. Comment at: lldb/source/Target/ABI.cpp:249 + int eh = -1; + int dwarf = -1; + for (unsigned reg = 0; reg < m_mc_register_info_

[Lldb-commits] [PATCH] D74398: [lldb-server] jThreadsInfo returns stack memory

2020-02-12 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. Nice improvement. debugserver does a similar thing in our jThreadsInfo implementation as well as our ? packet response (T05, etc) where we include the current & caller stack frame, assuming the frame pointer and pc are saved to the stack, 1581545891.235902071 < 6

[Lldb-commits] [PATCH] D74398: [lldb-server] jThreadsInfo returns stack memory

2020-02-13 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. To be honest, I'm thinking of stealing your idea of sending the $fp - $sp memory region for frame 0 in debugserver, at least for the currently selected thread. I might add a check that it's not a huge amount of bytes in case there's a giant buffer or something tha

[Lldb-commits] [PATCH] D74585: Don't prefix error message from process launch with "process launch failed:" boilerplate in Target::Launch

2020-02-13 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda created this revision. jasonmolenda added reviewers: jingham, clayborg, labath. jasonmolenda added a project: LLDB. Herald added a subscriber: krytarowski. I wanted to put this up as a phab to collect any reactions instead of just landing it, I think it's not controversial but I coul

[Lldb-commits] [PATCH] D74585: Don't prefix error message from process launch with "process launch failed:" boilerplate in Target::Launch

2020-02-14 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda updated this revision to Diff 244799. jasonmolenda added a comment. Updated the test to match the new output (how did I miss that??), also for consistency removed the other occurrences of "process launch failed: " across lldb, two of which were only in log messages. CHANGES SINCE

[Lldb-commits] [PATCH] D74585: Don't prefix error message from process launch with "process launch failed:" boilerplate in Target::Launch

2020-02-14 Thread Jason Molenda via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG83bea6d99dd1: Remove 'process launch failed:' message prefix in Target::Launch (authored by jasonmolenda). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7458

[Lldb-commits] [PATCH] D75007: When unwinding out of a trap handler, fetch the saved pc even if there's a return address register defined

2020-02-21 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda created this revision. jasonmolenda added a project: LLDB. Herald added a subscriber: kristof.beyls. On targets with a return address register (e.g. $lr on arm), when the unwinder is asked to fetch the caller's pc, we rewrite that to fetch the return address value. However, when we

[Lldb-commits] [PATCH] D75007: When unwinding out of a trap handler, fetch the saved pc even if there's a return address register defined

2020-02-24 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 rGedc4f4c9c9d9: Unwind past an interrupt handler correctly on arm or at pc==0 (authored by jasonmolenda). Changed prior to

[Lldb-commits] [PATCH] D75680: [lldb] Delete UnwindMacOSXFrameBackchain

2020-03-05 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda accepted this revision. jasonmolenda added a comment. LGTM. The only time this plugin gets activated is when there's been some problem with the arch triple and we end up defaulting to this unwinder, which never works anyway. Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[Lldb-commits] [PATCH] D75696: Correctly detect iOS simulator processes.

2020-03-05 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. Overall looks fine, Fred's comment is correct, nb you want to test it with `#if TARGET_OS_OSX == 1`, it's always defined either to 0 or 1. Comment at: lldb/test/

[Lldb-commits] [PATCH] D75848: [lldb] Make UnwindLLDB a non-plugin

2020-03-09 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda accepted this revision. jasonmolenda added a comment. Thanks for doing this, lgtm. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75848/new/ https://reviews.llvm.org/D75848 ___ lldb-commits

[Lldb-commits] [PATCH] D75975: [lldb] Copy m_behaves_like_zeroth_frame on stack frame update

2020-03-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. Looks good to me, nice catch. Thanks for writing a test dase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75975/new/ https://revi

[Lldb-commits] [PATCH] D76163: [lldb/Reproducers] Decode run-length encoding in GDB replay server.

2020-03-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. lgtm. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76163/new/ https://reviews.llvm.org/D76163 ___ lldb-commits mailing list

[Lldb-commits] [PATCH] D76337: [lldb/DWARF] Use DW_AT_call_pc to determine artificial frame address

2020-03-17 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. Nice fix, this looks good to me but I haven't been following this area of code too closely before now. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76337/new/ https://reviews.llvm.org/D76337 ___ lldb-commits

[Lldb-commits] [PATCH] D76341: [lldb/MemoryHistoryAsan] Fix address resolution for recorded backtraces

2020-03-18 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/D76341/new/ https://reviews.llvm.org/D76341 __

[Lldb-commits] [PATCH] D76411: [debugserver] Implement hardware breakpoints for ARM64

2020-03-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. 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 do

[Lldb-commits] [PATCH] D76450: [lldb/PlatformDarwin] Always delete destination file first in PutFile

2020-03-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. nice catch, lgtm. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76450/new/ https://reviews.llvm.org/D76450 __

[Lldb-commits] [PATCH] D74398: [lldb-server] jThreadsInfo returns stack memory

2020-03-21 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. In D74398#1935043 , @jarin wrote: > 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

[Lldb-commits] [PATCH] D74398: [lldb-server] jThreadsInfo returns stack memory

2020-03-21 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. In D74398#1935431 , @jasonmolenda wrote: > In D74398#1935043 , @jarin wrote: > > > Regarding the packet savings - there are still things that worry me. > > > > First of all, when lldb

[Lldb-commits] [PATCH] D74398: [lldb-server] jThreadsInfo returns stack memory

2020-03-21 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. (and if you're still seeing mystery reads, put a breakpoint on ProcessGDBRemote::DoReadMemory and see who is doing it) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74398/new/ https://reviews.llvm.org/D74398 __

[Lldb-commits] [PATCH] D76758: Augment lldb's symbol table with external symbols in Mach-O's dyld trie

2020-03-24 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda created this revision. jasonmolenda added reviewers: clayborg, JDevlieghere, aprantl. jasonmolenda added a project: LLDB. Herald added a subscriber: mgrang. In addition to the traditional nlist records in Mach-O binaries, the dynamic linker dyld has a trie structure that it uses to r

[Lldb-commits] [PATCH] D76758: Augment lldb's symbol table with external symbols in Mach-O's dyld trie

2020-03-25 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda updated this revision to Diff 252756. jasonmolenda added a comment. Update patch with Adrian's suggestions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76758/new/ https://reviews.llvm.org/D76758 Files: lldb/source/Plugins/ObjectFi

[Lldb-commits] [PATCH] D76758: Augment lldb's symbol table with external symbols in Mach-O's dyld trie

2020-03-25 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda marked 11 inline comments as done. jasonmolenda added inline comments. Comment at: lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp:4499 +std::sort(external_sym_trie_entries.begin(), + external_sym_trie_entries.end(), sort_by_address); +

[Lldb-commits] [PATCH] D76758: Augment lldb's symbol table with external symbols in Mach-O's dyld trie

2020-03-25 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda marked 2 inline comments as done. jasonmolenda added a comment. 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. Comment

[Lldb-commits] [PATCH] D76758: Augment lldb's symbol table with external symbols in Mach-O's dyld trie

2020-03-26 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. In D76758#1944612 , @clayborg wrote: > 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 at > the top of ObjectFileMachO::ParseSymtab() and

[Lldb-commits] [PATCH] D76938: [lldb/PlatformMacOSX] Re-implement GetDeveloperDirectory

2020-03-27 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. Yea, this looks good, I don't think any of those other search methods were valid any longer. Repository: rLLDB LLDB CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76938/

[Lldb-commits] [PATCH] D76758: Augment lldb's symbol table with external symbols in Mach-O's dyld trie

2020-03-27 Thread Jason Molenda via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf0a5af906b41: Merge in symbols from Mach-O dyld trie to the symbol table (authored by jasonmolenda). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76758/new/

[Lldb-commits] [PATCH] D76758: Augment lldb's symbol table with external symbols in Mach-O's dyld trie

2020-03-27 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda updated this revision to Diff 253293. jasonmolenda added a comment. Updated the patch to incorporate Jonas and Greg's suggestions. Most importantly, Greg's suggestion to have a set of addresses added to the symbol table; now that we've added a third symbol source, this was a much c

[Lldb-commits] [PATCH] D77173: [PATCH] [debugserver/ARM64] Make sure watchpoints hit are attributed correctly.

2020-03-31 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 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 t

[Lldb-commits] [PATCH] D77369: Augment the symbol type classification for dyld trie exports with more detail

2020-04-02 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda created this revision. jasonmolenda added reviewers: labath, clayborg. jasonmolenda added a project: LLDB. My patch to augment the symbol table in Mach-O files with the dyld trie exports data structure only categorized symbols as code or data, but Greg Clayton had a patch to do some

[Lldb-commits] [PATCH] D77369: Augment the symbol type classification for dyld trie exports with more detail

2020-04-06 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 rG836534f99702: Add more detailed symbol type categorization, based on a swift patch by Greg… (authored by jasonmolenda). R

[Lldb-commits] [PATCH] D96829: Add "Undeclared registers are marked as Undefined" to UnwindPlan, adopt it in arch default unwind plans

2021-02-16 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda created this revision. jasonmolenda added a reviewer: labath. jasonmolenda added a project: LLDB. Herald added subscribers: JDevlieghere, pengfei, atanasyan, jrtc27, kbarton, kristof.beyls, nemanjai, sdardis. jasonmolenda requested review of this revision. The ABI plugins can provide

[Lldb-commits] [PATCH] D96829: Add "Undeclared registers are marked as Undefined" to UnwindPlan, adopt it in arch default unwind plans

2021-02-16 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. I marked Pavel as the reviewer for this because he's maybe the most likely to have an opinion about this change; I don't mean to sign you up for review work if you don't have time right now. I don't know if the specifics of the patch are especially interesting, bu

[Lldb-commits] [PATCH] D96839: Add a callout to the LanguageRuntime to override the normal UnwindPlan used for a frame

2021-02-16 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda created this revision. jasonmolenda added a reviewer: jasonmolenda. jasonmolenda added a project: LLDB. Herald added a subscriber: JDevlieghere. jasonmolenda requested review of this revision. Swift is gaining asynchronous functions, which may not be executing when a function they ca

[Lldb-commits] [PATCH] D96839: Add a callout to the LanguageRuntime to override the normal UnwindPlan used for a frame

2021-02-17 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added inline comments. Comment at: lldb/include/lldb/Target/LanguageRuntime.h:187 + static lldb::UnwindPlanSP + GetAsyncedFrameUnwindPlan(lldb_private::Thread &thread, +lldb_private::RegisterContext *regctx); jingham wro

[Lldb-commits] [PATCH] D96839: Add a callout to the LanguageRuntime to override the normal UnwindPlan used for a frame

2021-02-17 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added inline comments. Comment at: lldb/include/lldb/Target/LanguageRuntime.h:188 + GetAsyncedFrameUnwindPlan(lldb_private::Thread &thread, +lldb_private::RegisterContext *regctx); + clayborg wrote: > Any reason we are pa

[Lldb-commits] [PATCH] D96829: Add "Undeclared registers are marked as Undefined" to UnwindPlan, adopt it in arch default unwind plans

2021-02-17 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 landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGfcdef15d77bd: Add a new Row setting to mark all un-declared regs a

[Lldb-commits] [PATCH] D96939: [lldb] Add a note to the core file loading error message that mentions archives

2021-02-18 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. Thanks for taking time to deal with this annoying error message. Should we just remove the "Unable to find process plug-in for core file" text altogether? It means nothing unless you work on lldb and understand the plugin system. "Unrecognized core file format"

[Lldb-commits] [PATCH] D96939: [lldb] Add a note to the core file loading error message that mentions archives

2021-02-18 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. I mean, I'm also fine with suggesting that the file might be compressed, because this is a REAL common source of an unrecognized core file format. But also we can more clearly say "Doesn't look like a core file to me" and also noting that compression is something

[Lldb-commits] [PATCH] D96939: [lldb] Add a note to the core file loading error message that mentions archives

2021-02-18 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. In D96939#2570830 , @teemperor wrote: > What about: > > error: Couldn't recognise core file format of . > note: If the file is a core file in a compressed file archive, it first > needs to be manually extracted before it

[Lldb-commits] [PATCH] D96939: [lldb] Add a note to the core file loading error message that mentions archives

2021-02-18 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. In D96939#2570834 , @teemperor wrote: > In D96939#2570831 , @jasonmolenda > wrote: > >> In D96939#2570830 , @teemperor >> wrote: >> >>> What a

[Lldb-commits] [PATCH] D96839: Add a callout to the LanguageRuntime to override the normal UnwindPlan used for a frame

2021-02-18 Thread Jason Molenda via Phabricator via lldb-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGd82ecb0ac722: LanguageRuntime can provide an UnwindPlan for special occasions (authored by jasonmolenda). Changed prior to commit: https://reviews

[Lldb-commits] [PATCH] D97441: [debugserver] Fix logic to extract app bundle from file path

2021-02-24 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. Nice, LGTM. Comment at: lldb/tools/debugserver/source/MacOSX/MachProcess.mm:3174 +DNBLogThreadedIf(LOG_PROCESS, "Failed to launch '%s' with FBS", +

[Lldb-commits] [PATCH] D97644: Allow RegisterContext to track if behaves-like-frame-0, allow LanguageRuntime for above frame 0

2021-02-28 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda created this revision. jasonmolenda added a reviewer: clayborg. jasonmolenda added a project: LLDB. Herald added a subscriber: JDevlieghere. jasonmolenda requested review of this revision. This patch allows a RegisterContext to record if it behaves like a 0th frame -- where its pc va

[Lldb-commits] [PATCH] D97644: Allow RegisterContext to track if behaves-like-frame-0, allow LanguageRuntime for above frame 0

2021-02-28 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. Another alternative to RegisterContext::BehavesLikeZerothFrame that I've thought of is RegisterContext::GetPCForSymbolication, similar to GetPC() today. I think everyone who is decrementing $pc is doing it for symbolication, so having this hint and then leaving it

[Lldb-commits] [PATCH] D97644: Allow RegisterContext to track if behaves-like-frame-0, allow LanguageRuntime for above frame 0

2021-03-03 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda updated this revision to Diff 327930. jasonmolenda added a comment. Rewrite patch to expose "get pc for symbolication" APIs instead of "behaves like zeroth frame" APIs so that we don't have different parts of lldb decrementing the pc for symbolication. Doing a final round of tests

[Lldb-commits] [PATCH] D97644: Allow RegisterContext to track if behaves-like-frame-0, allow LanguageRuntime for above frame 0

2021-03-03 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added inline comments. Comment at: lldb/source/Target/RegisterContext.cpp:162 + if (!BehavesLikeZerothFrame()) +pc--; + const bool allow_section_end = true; clayborg wrote: > Can we decrement the PC by the minimum instruction size? If we can ge

[Lldb-commits] [PATCH] D97644: Allow RegisterContext to track if behaves-like-frame-0, allow LanguageRuntime for above frame 0

2021-03-03 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added inline comments. Comment at: lldb/source/Target/StackFrame.cpp:217-226 + Address lookup_addr(GetFrameCodeAddress()); + if (!lookup_addr.IsValid()) +return lookup_addr; + if (m_behaves_like_zeroth_frame) +return lookup_addr; + + addr_t offset = looku

[Lldb-commits] [PATCH] D97644: Allow RegisterContext to track if behaves-like-frame-0, allow LanguageRuntime for above frame 0

2021-03-03 Thread Jason Molenda via Phabricator via lldb-commits
This revision was not accepted when it landed; it landed in state "Needs Revision". This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG266bb78f7d13: LanguageRuntime for 0th frame unwind, simplify get

[Lldb-commits] [PATCH] D98529: [lldb] Strip pointer authentication codes from aarch64 pc.

2021-03-16 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. Sorry for not replying to this earlier. Yeah, correct number of bits to mask off must be determined dynamically at runtime, by looking at the CPU's TCR_EL0.T0SZ value (or TCR_EL1.T0SZ for EL1 code like a kernel), which is the inverse of the number of bits used for

[Lldb-commits] [PATCH] D98529: [lldb] Strip pointer authentication codes from aarch64 pc.

2021-03-16 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. I added a Mach-O LC_NOTE which allows us to encode the number of bits used in addressing: (I really need to create a docs/lc-notes.md to document these) "addrable bits" LC_NOTE "addrable bits" (number of bits used for addressing) data payload is a structure: stru

[Lldb-commits] [PATCH] D98529: [lldb] Strip pointer authentication codes from aarch64 pc.

2021-03-17 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. In D98529#2631946 , @DavidSpickett wrote: > TCR_ELx begins at 1 (see `D13.2.123 TCR_EL1, Translation Control Register > (EL1)` in the armarm) and covers EL0 and 1. Looking at the pseudocode access > to this is undefined at

[Lldb-commits] [PATCH] D98529: [lldb] Strip pointer authentication codes from aarch64 pc.

2021-03-17 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. In D98529#2631876 , @amccarth wrote: > Before reading Jason's response, I was independently wondering whether it > makes sense to temporarily introduce a variable to let the user set the mask, > just until the workaround is

[Lldb-commits] [PATCH] D98529: [lldb] Strip pointer authentication codes from aarch64 pc.

2021-03-17 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. In D98529#2631860 , @justincohen wrote: > In the meantime, I'll look into adding something to the Crashpad minidump > format to store an `addrable bits` mask, although I'm not clear how to grab > this in userspace. Should `

[Lldb-commits] [PATCH] D98529: [lldb] Strip pointer authentication codes from aarch64 pc.

2021-03-17 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. In D98529#2632424 , @justincohen wrote: > uint32_t addressing_bits; > size_t len = sizeof (uint32_t); > ret = sysctlbyname("machdep.virtual_address_size", &addressing_bits, &len, > NULL, 0); > > returns ret == -1 on an

[Lldb-commits] [PATCH] D98996: Teach DWARFExpression about DWARF 4+ Location Descriptions

2021-03-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. This fits with my reading of the DWARF5 doc; LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98996/new/ https://reviews.llvm.org/D98996 __

[Lldb-commits] [PATCH] D98529: [lldb] Strip pointer authentication codes from aarch64 pc.

2021-03-23 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. In D98529#2631946 , @DavidSpickett wrote: > TCR_ELx begins at 1 (see `D13.2.123 TCR_EL1, Translation Control Register > (EL1)` in the armarm) and covers EL0 and 1. Looking at the pseudocode access > to this is undefined at

[Lldb-commits] [PATCH] D98529: [lldb] Strip pointer authentication codes from aarch64 pc.

2021-03-25 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. In D98529#2651468 , @justincohen wrote: > > Were you able to confirm if sysctlbyname "machdep.virtual_address_size" works > on iOS? I'm currently hard coding this information in minidump creation, as > it's failing for m

[Lldb-commits] [PATCH] D99571: Update ProcessMachCore::DoLoadCore to handle binary hints with and without addresses

2021-03-30 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda created this revision. jasonmolenda added a project: LLDB. Herald added a subscriber: JDevlieghere. jasonmolenda requested review of this revision. ProcessMachCore::DoLoadCore was implemented to handle the two LC_NOTEs "kern ver str" and "main bin spec" with only certain combinations

[Lldb-commits] [PATCH] D99571: Update ProcessMachCore::DoLoadCore to handle binary hints with and without addresses

2021-04-01 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. Thanks for the feedback Shafik, updated the patch and landing in a sec. Comment at: lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp:214 + if (FileSystem::Instance().Exists(module_spec.GetFileSpec())) { +module_sp.reset(new Mo

[Lldb-commits] [PATCH] D99571: Update ProcessMachCore::DoLoadCore to handle binary hints with and without addresses

2021-04-01 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 landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG78a1412845b5: Handle all standalone combinations of LC_NOTEs w/ &

[Lldb-commits] [PATCH] D99828: Create setting to disable LanguageRuntime provided UnwindPlans

2021-04-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 a subscriber: JDevlieghere. jasonmolenda requested review of this revision. When developing LanguageRuntime plugin unwind plans, it is sometimes helpful to work with the co

[Lldb-commits] [PATCH] D99828: Create setting to disable LanguageRuntime provided UnwindPlans

2021-04-08 Thread Jason Molenda via Phabricator via lldb-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGdd453a1389b6: Add setting to disable LanguageRuntime UnwindPlans (authored by jasonmolenda). Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[Lldb-commits] [PATCH] D100164: Don't treat corefile binaries like dylibs in the shared cache, even if they say they are

2021-04-09 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda created this revision. jasonmolenda added a reviewer: friss. jasonmolenda added a project: LLDB. Herald added a subscriber: JDevlieghere. jasonmolenda requested review of this revision. There is a corefile writer that is including uninitialized data in the Mach-O header 'flags' field

[Lldb-commits] [PATCH] D99944: [LLDB] AArch64 PAC elf-core stack unwinder support

2021-04-12 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. Hi Omair, sorry for the delay in looking at this. It seems like we have two overlapping patches here, @justincohen patch in https://reviews.llvm.org/D98886 and this one. I'm not convinced that we'll see a target where we have noncontiguous bits used for addressi

[Lldb-commits] [PATCH] D100338: Add a setting that enables memory to be read from the file cache instead of process when the section LLDB is reading from is read-only

2021-04-12 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. In D100338#2684550 , @aprantl wrote: > Another question for @jasonmolenda: Do you happen to know if the existing > `prefer_file_cache` mechanism applies relocations? We can test it to make sure like % cat >a.c char *gl

[Lldb-commits] [PATCH] D100338: Add a setting that enables memory to be read from the file cache instead of process when the section LLDB is reading from is read-only

2021-04-12 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. I'm not super convinced on the setting. It seems like something you'd add some people could work around a mistake we've made here. I think we have two cases: Someone calls Target::ReadMemory prefer_file_cache=true on a writable section. This is an easy mistake f

[Lldb-commits] [PATCH] D100338: Add a setting that enables memory to be read from the file cache instead of process when the section LLDB is reading from is read-only

2021-04-12 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. Hm, a little more thinking. Target::ReadMemory prefers a file cache if it is available. Process::ReadMemory only uses live memory. But Process::ReadMemory doesn't work when we have run lldb on a file and not run yet. e.g. % lldb (lldb) tar cr -d /tmp/b.out

[Lldb-commits] [PATCH] D99944: [LLDB] AArch64 PAC elf-core stack unwinder support

2021-04-12 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. I think this will come down to, who wants to implement a patch that can set/get either form through Process API. The mask might be a more general format, so if Justin is willing to update his patch to that we can add Omair's test case to his patch? CHANGES SINCE

[Lldb-commits] [PATCH] D100338: Add a setting that enables memory to be read from the file cache instead of process when the section LLDB is reading from is read-only

2021-04-12 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added subscribers: jingham, clayborg. jasonmolenda added a comment. Trying to reword my thinking a little more clearly. Process::ReadMemory - only works when you have a Process. Always reads directly from memory. Target::ReadMemory - can be used with or without a Process. 1. If f

[Lldb-commits] [PATCH] D100338: Add a setting that enables memory to be read from the file cache instead of process when the section LLDB is reading from is read-only

2021-04-13 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. I should say, my suggestion of changing Target::ReadMemory is just an opinion, please do feel free to disagree! I think if you look at the callers, I suspect all (or nearly all) of them are passing prefer_file_cache == true right now, which is the force_live_memor

[Lldb-commits] [PATCH] D100338: Add a setting that enables memory to be read from the file cache instead of process when the section LLDB is reading from is read-only

2021-04-13 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. In D100338#2686410 , @augusto2112 wrote: > Thanks for the input @jasonmolenda. FWIW I also think it's worth implementing > this correctly. > > Could you help me figure out which callers I should change to > `force_live_mem

[Lldb-commits] [PATCH] D100338: Add a setting that enables memory to be read from the file cache instead of process when the section LLDB is reading from is read-only

2021-04-14 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. In D100338#2689846 , @augusto2112 wrote: > @jasonmolenda I've updated all the function calls to prefer the file cache > (except the one you pointed out), but I'm a little worried about this, since > I changed a lot of func

[Lldb-commits] [PATCH] D100515: [lldb] Add GetCodeAddressMask and GetDataAddressMask to Process

2021-04-14 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. Thanks Jonas, I think this change to Process can cover Omair's use case, where the number of bits are used hardcoded. The Darwin use case were ProcessGDBRemote, DynamicLoaderDarwinKernel, and ProcessMachCore can all set the number of bits used in addressing

[Lldb-commits] [PATCH] D100500: Add setting to artifically delay communication with the debug server, in order ro simulate slow network conditions

2021-04-14 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. Hi Augusto, this is an interesting idea. This would simulate a slow serial connection well, but over a modern USB or Wifi or Bluetooth connection, we find the packet size is nearly irrelevant to performance -- but the number of packets is absolutely critical. If

[Lldb-commits] [PATCH] D100515: [lldb] Add GetCodeAddressMask and GetDataAddressMask to Process

2021-04-15 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. In D100515#2690972 , @omjavaid wrote: > > This looks very good and I have couple of highlights to make from > Linux/AArch64 perspective: > qHostInfo is not sufficient for mask calculation on Linux because both > data/co

[Lldb-commits] [PATCH] D100515: [lldb] Add GetCodeAddressMask and GetDataAddressMask to Process

2021-04-15 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added inline comments. Comment at: lldb/source/Target/Process.cpp:5569-5570 + + if (m_code_address_mask == 0) +return -1; // All bits are used for addressing. + pcc wrote: > Is this part correct? (Same below.) In D100521 you have > ``` > if (p

[Lldb-commits] [PATCH] D100515: [lldb] Add GetCodeAddressMask and GetDataAddressMask to Process

2021-04-15 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda accepted this revision. jasonmolenda added a comment. I think we've heard from everyone involved with this & it's good to land. Thanks for bringing this home. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100515/new/ https://reviews.llvm.org/D100515 _

[Lldb-commits] [PATCH] D100521: [lldb] Fix up code addresses in RegisterContextUnwind

2021-04-15 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda accepted this revision. jasonmolenda added a comment. This revision is now accepted and ready to land. This looks good. Jonas, what do you think about having FixDataAddress() methods in the ABI's. We're going to be quickly sprinkling FixCodeAddress calls throughout lldb at places

[Lldb-commits] [PATCH] D100515: [lldb] Add GetCodeAddressMask and GetDataAddressMask to Process

2021-04-16 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added inline comments. Comment at: lldb/source/Target/Process.cpp:5569-5570 + + if (m_code_address_mask == 0) +return -1; // All bits are used for addressing. + pcc wrote: > JDevlieghere wrote: > > jasonmolenda wrote: > > > pcc wrote: > > > > Is

[Lldb-commits] [PATCH] D100338: Add a setting that enables memory to be read from the file cache instead of process when the section LLDB is reading from is read-only

2021-04-16 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, thanks for doing this! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100338/new/ https://reviews.llvm.org/D100338

[Lldb-commits] [PATCH] D100520: [lldb] Set code and data address mask from qHostInfo

2021-04-16 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. Looks good! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100520/new/ https://reviews.llvm.org/D100520 ___ lldb-commits mailin

[Lldb-commits] [PATCH] D100515: [lldb] Add GetCodeAddressMask and GetDataAddressMask to Process

2021-04-16 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. In D100515#2695559 , @JDevlieghere wrote: > In D100515#2695395 , @justincohen > wrote: > >> Out of curiosity: Typically should one be able to set >> target.process.virtual-addressa

[Lldb-commits] [PATCH] D100338: Add a setting that enables memory to be read from the file cache instead of process when the section LLDB is reading from is read-only

2021-04-16 Thread Jason Molenda via Phabricator via lldb-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGe9fe788d3260: Target::ReadMemory read from read-only binary file Section, not memory (authored by jasonmolenda). Changed prior to commit: https://

[Lldb-commits] [PATCH] D100850: Fix reading from file cache using address instead of resolved address for getting a section

2021-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. Ach, I should have noticed that during review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100850/new/ https://reviews.llvm.org/D1

[Lldb-commits] [PATCH] D100850: Fix reading from file cache using address instead of resolved address for getting a section

2021-04-20 Thread Jason Molenda via Phabricator via lldb-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGf2da1f68d815: Get Section from resolved_addr in Target::ReadMemory (authored by jasonmolenda). Repository: rG LLVM Github Monorepo CHANGES SINCE

[Lldb-commits] [PATCH] D100931: Set binaries-loaded/unloaded breakpoint on a name, not an address on macOS

2021-04-21 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. jasonmolenda requested review of this revision. I don't know what I was thinking when I wrote this; setting this on an addr_t just removes infor

[Lldb-commits] [PATCH] D100931: Set binaries-loaded/unloaded breakpoint on a name, not an address on macOS

2021-04-24 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. Jim whispered to me that he thinks this patch is awesome. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100931/new/ https://reviews.llvm.org/D100931 ___ lldb-commits mailing

[Lldb-commits] [PATCH] D100931: Set binaries-loaded/unloaded breakpoint on a name, not an address on macOS

2021-04-24 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 landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG6fca18953251: Simplify the breakpoint setting in DynamicLoaderMacO

[Lldb-commits] [PATCH] D101153: [lldb][NFC] Specify guidelines for API tests

2021-04-26 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. Nice addition, these are great guidelines. I'd do a s/just// pass over the text, there's some extraneous "just"s that could go. This is a very bad habit of my own lately, I re-read emails I write, and try to remove "justs" that snuck into the text I typed before

[Lldb-commits] [PATCH] D101596: [debugserver] Use add_lldb_library

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

[Lldb-commits] [PATCH] D101655: [debugserver] Include LLDB_VERSION_SUFFIX in debugserver version

2021-05-03 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda accepted this revision. jasonmolenda added a comment. This revision is now accepted and ready to land. Yep looks good. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101655/new/ https://reviews.llvm.org/D101655 ___ lldb-commits ma

[Lldb-commits] [PATCH] D101390: Change Target::ReadMemory to ensure the amount of memory read from the file-cache is the amount requested.

2021-05-11 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda accepted this revision. jasonmolenda added a comment. This revision is now accepted and ready to land. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101390/new/ https://reviews.llvm.org/D101390 __

[Lldb-commits] [PATCH] D102833: [debugserver]Add platform cache support to improve performance.Under BigSur 11.3 this function causes a performance loss of 0.68s per execution.

2021-05-20 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda accepted this revision. jasonmolenda added a comment. LGTM, thanks for doing this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102833/new/ https://reviews.llvm.org/D102833 ___ lldb-commits

[Lldb-commits] [PATCH] D84263: [debugserver/Apple Silicon] Handoff connections when attaching to translated processes

2020-07-21 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. 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/

[Lldb-commits] [PATCH] D85396: Fix a small memory leak in VectorType.cpp and BlockPointer.cpp

2020-08-05 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda created this revision. jasonmolenda added reviewers: jingham, davide. jasonmolenda added a project: LLDB. Herald added a subscriber: JDevlieghere. jasonmolenda requested review of this revision. Looking over the clang static analyzer, came across this old memory leak - looks like it'

[Lldb-commits] [PATCH] D85396: Fix a small memory leak in VectorType.cpp and BlockPointer.cpp

2020-08-05 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda updated this revision to Diff 283484. jasonmolenda added a comment. Made the change in Xcode and the indentation was off. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85396/new/ https://reviews.llvm.org/D85396 Files: lldb/source/Da

[Lldb-commits] [PATCH] D85396: Fix a small memory leak in VectorType.cpp and BlockPointer.cpp

2020-08-05 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda updated this revision to Diff 283489. jasonmolenda added a comment. Update to std::unique_ptr -- thanks for the reminder! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85396/new/ https://reviews.llvm.org/D85396 Files: lldb/source/Da

<    3   4   5   6   7   8   9   10   >