This is an archive of the discontinued LLVM Phabricator instance.

[lldb][AArch64] Add reading of TLS tpidr register from core files
ClosedPublic

Authored by DavidSpickett on Jul 24 2023, 6:08 AM.

Details

Summary

7e229217f4215b519b886e7881bae4da3742a7d2 did live processes, this does
core files. Pretty simple, there is an NT_ARM_TLS note that contains
at least tpidr, and on systems with the Scalable Matrix Extension (SME), tpidr2
as well.

tpidr2 will be handled in future patches for SME support.

This NT_ARM_TLS note has always been present but it seems convenient to
handle it as "optional" inside of LLDB. We'll probably want the flexibility
when supporting tpidr2.

Normally the C library would set tpidr but all our test sources build
without it. So I've updated the neon test program to write to tpidr
and regenerated the corefile.

I've removed the LLDB_PTRACE_NT_ARM_TLS that was unused, we get
what we need from llvm's defs instead.

Diff Detail

Event Timeline

DavidSpickett created this revision.Jul 24 2023, 6:08 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 24 2023, 6:08 AM
DavidSpickett requested review of this revision.Jul 24 2023, 6:08 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 24 2023, 6:08 AM

I wanted to add tpidr to the release notes and realised I left it half finished. Will update the release notes afterwards on branch or main depending on when this lands.

Lower stack limit when making corefile to shrink it some. 16k was about as low
as I could go before it failed to even get to the program itself.

Rebase, add release note before I forget.

Herald added a project: Restricted Project. · View Herald TranscriptJul 25 2023, 8:59 AM
omjavaid accepted this revision.Aug 3 2023, 4:39 AM

Looks legit. Thanks

This revision is now accepted and ready to land.Aug 3 2023, 4:39 AM
This revision was landed with ongoing or failed builds.Aug 3 2023, 5:06 AM
This revision was automatically updated to reflect the committed changes.