This is an archive of the discontinued LLVM Phabricator instance.

AArch64: emit @llvm.debugtrap as `brk 0xf000` on all platforms
AcceptedPublic

Authored by t.p.northover on Jul 17 2020, 3:41 AM.

Details

Reviewers
t.p.northover
Summary

It's useful for debuggers to be able to distinguish between a @llvm.trap (noreturn, so resuming would be a bad idea) and a @llvm.debugtrap (a call for attention, resumable).

This is implemented for Windows at the moment, where trap compiles to brk #1 but debugtrap to brk #0xf000. As far as I can tell there's no precedent on other platforms (GCC doesn't have __builtin_debugtrap) so I saw no reason to add unneeded platform divergence here and just removed the restriction.

Diff Detail

Event Timeline

t.p.northover created this revision.Jul 17 2020, 3:41 AM
Gerolf added a subscriber: Gerolf.Jul 17 2020, 4:02 PM

Synced with the LLDB team. LGTM.

t.p.northover accepted this revision.Jul 20 2020, 2:31 AM

Thanks Gerolf. Committed as 88464a55b4e

This revision is now accepted and ready to land.Jul 20 2020, 2:31 AM
mib added a subscriber: mib.Sep 6 2021, 2:12 PM