Page MenuHomePhabricator

LLGS: support 32-bit on 64-bit hosts

Authored by compnerd on May 20 2019, 1:36 PM.



Enable the ARM emulation support on AArch64 which can execute ARM32 code. Similarly, handle MIPS 32 on 64.

Diff Detail


Event Timeline

compnerd created this revision.May 20 2019, 1:36 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 20 2019, 1:36 PM

Unsure about the MIPS one but the ARM/ARM64 one looks right to me.

compnerd updated this revision to Diff 200366.May 20 2019, 3:19 PM

Fix inclusion

clayborg accepted this revision.May 20 2019, 5:36 PM
This revision is now accepted and ready to land.May 20 2019, 5:36 PM
compnerd closed this revision.May 20 2019, 6:23 PM

SVN r361210

BTW, there's no fundamental reason why a 64-bit lldb-server has to use instruction emulation for debugging arm32 binaries. Since all arm64 chips support hardware single stepping, we could just teach the arm32 native register context to issue PTRACE_SINGLESTEP commands when build in 64-bit mode, and increase debugging reliability while decreasing lldb-server size. (The same is probably also true for a 32-bit lldb-server running on a 64-bit kernel, but that's something that we would have to detect at runtime.)

Anyway, just an idea, this patch is fine. I was under the impression that arm64 defines arm, but obviously I was wrong.