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

2021-03-12 Thread Justin Cohen via Phabricator via lldb-commits
justincohen created this revision. Herald added subscribers: omjavaid, danielkiss, kristof.beyls. justincohen requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D98529 Files: l

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

2021-03-12 Thread Justin Cohen via Phabricator via lldb-commits
justincohen updated this revision to Diff 330331. justincohen added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98529/new/ https://reviews.llvm.org/D98529 Files: lldb/source/Plugins/ABI/AArch64/ABIAArch64.cpp lldb/source/Pl

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

2021-03-15 Thread Justin Cohen via Phabricator via lldb-commits
justincohen updated this revision to Diff 330665. justincohen added a comment. Move logic to ABIMacOSX_arm64.h Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98529/new/ https://reviews.llvm.org/D98529 Files: lldb/source/Plugins/ABI/AArch64/ABIAAr

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

2021-03-15 Thread Justin Cohen via Phabricator via lldb-commits
justincohen added inline comments. Comment at: lldb/source/Plugins/ABI/AArch64/ABIAArch64.cpp:63 + // should be removed once full PAC support is added. + return pc & 0x000F; +} DavidSpickett wrote: > omjavaid wrote: > > How did you come up with this

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

2021-03-15 Thread Justin Cohen via Phabricator via lldb-commits
justincohen updated this revision to Diff 330667. justincohen added a comment. squash Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98529/new/ https://reviews.llvm.org/D98529 Files: lldb/source/Plugins/ABI/AArch64/ABIMacOSX_arm64.h Index: lldb

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

2021-03-16 Thread Justin Cohen via Phabricator via lldb-commits
justincohen added a comment. How does this work for a core dump? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98529/new/ https://reviews.llvm.org/D98529 ___ lldb-commits mailing list lldb-commits@lists.

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

2021-03-16 Thread Justin Cohen via Phabricator via lldb-commits
justincohen added a comment. Breakpad/Crashpad are not transporting mach-o core files, they are using minidumps. minidumps don't contain any indication of the number of bits in the address. Apple Xcode lldb is still able to work with these minidumps correctly, while trunk lldb is not. How is it

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

2021-03-17 Thread Justin Cohen via Phabricator via lldb-commits
justincohen added a comment. 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 `sysctl machdep.virtual_address_size` work on iOS? Can I grab TCR_ELx.T0SZ directly? R

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

2021-03-17 Thread Justin Cohen via Phabricator via lldb-commits
justincohen added a comment. 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 iOS 14.4 device. I do see this work on an m1 mac. Repository: rG LLVM Github Monorepo CH

[Lldb-commits] [PATCH] D98886: Strip pointer authentication codes from MacOSX arc pc.

2021-03-18 Thread Justin Cohen via Phabricator via lldb-commits
justincohen created this revision. justincohen requested review of this revision. Herald added projects: LLDB, LLVM. Herald added subscribers: llvm-commits, lldb-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D98886 Files: lldb/include/lldb/Target/Process.h lldb/sour

[Lldb-commits] [PATCH] D98886: Strip pointer authentication codes from MacOSX arc pc.

2021-03-22 Thread Justin Cohen via Phabricator via lldb-commits
justincohen updated this revision to Diff 332374. justincohen edited the summary of this revision. justincohen added a comment. Fix length of crashpad structure / use ulittleXX Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98886/new/ https://review

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

2021-03-25 Thread Justin Cohen via Phabricator via lldb-commits
justincohen added a comment. > OK we may need to retain the manual setting when I upstream this, instead of > going with the pure Process-maintained value determined dynamically by gdb > packet or corefile metadata. If this is something you need for your own > FixCodeAddress prelim patch, I ca

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

2021-03-25 Thread Justin Cohen via Phabricator via lldb-commits
justincohen added a comment. > Clearing PAC bits is a little more complicated than just clearing the bits, > though. Bit 55 tells us whether the high bits are all 0's or all 1's (on > Darwin, in EL0 processes they're all 0's, in EL1, all 1's). If we had a > setting to provide a mask instead

[Lldb-commits] [PATCH] D98886: Pass pointer authentication code mask from minidump and use to strip pac from pc.

2021-03-26 Thread Justin Cohen via Phabricator via lldb-commits
justincohen updated this revision to Diff 333601. justincohen added a comment. Inverted mask. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98886/new/ https://reviews.llvm.org/D98886 Files: lldb/include/lldb/Target/Process.h lldb/source/Plugin

[Lldb-commits] [PATCH] D98886: Pass pointer authentication code mask from minidump and use to strip pac from pc.

2021-03-26 Thread Justin Cohen via Phabricator via lldb-commits
justincohen updated this revision to Diff 333608. justincohen added a comment. Check CrashpadInfo version. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98886/new/ https://reviews.llvm.org/D98886 Files: lldb/include/lldb/Target/Process.h lldb/

[Lldb-commits] [PATCH] D98886: Pass pointer authentication code mask from minidump and use to strip pac from pc.

2021-03-26 Thread Justin Cohen via Phabricator via lldb-commits
justincohen marked 2 inline comments as done. justincohen added inline comments. Comment at: lldb/source/Plugins/Process/minidump/MinidumpTypes.h:113 + +struct CrashpadInfo { + llvm::support::ulittle32_t version; markmentovai wrote: > Ensure alignment is compati

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

2021-03-29 Thread Justin Cohen via Phabricator via lldb-commits
justincohen added a comment. Can we move comments over to --> https://reviews.llvm.org/D98886, which has these changes implemented? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98529/new/ https://reviews.llvm.org/D98529 _

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

2021-04-12 Thread Justin Cohen via Phabricator via lldb-commits
justincohen added a comment. In D99944#2684280 , @jasonmolenda wrote: > Omair, Justin, what do you think here? I don't think it's especially hard to > accept this in terms of # of bits OR a mask, and we should use the more > general internal rep in lld

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

2021-04-15 Thread Justin Cohen via Phabricator via lldb-commits
justincohen accepted this revision. justincohen added a comment. This revision is now accepted and ready to land. > On Darwin, we use the same number of bits for both code and data, but given > the way ptrace() behaves on Linux, I'm guessing this may not be the case > everywhere. Should we stor

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

2021-04-16 Thread Justin Cohen via Phabricator via lldb-commits
justincohen added a comment. Out of curiosity: Typically should one be able to set target.process.virtual-addressable-bits after the target has been created? Or is it expected that users will need to run in the following order only: settings set target.process.virtual-addressable-bits ...