Created attachment 14755 [details] gdb.output Cannot debug simple hello world with gdb 13.1 or gdb built on commit bf8d2f92356768d329430c08dc81025243db636d (note that it includes the last commit fixing https://sourceware.org/bugzilla/show_bug.cgi?id=26761). Gdb 12.1 which comes with ubuntu 22.04 works fine. If that matters, it happens on ubuntu installed in parallels on mac.
I think this is being addressed here: https://inbox.sourceware.org/gdb-patches/20230316103904.1947447-1-luis.machado@arm.com/
Just to confirm, does the target machine support Pointer Authentication? When you say mac, is this M2-based?
For the record, I've seen this particular internal error happening in other cases, so it may not be exactly the issue with pauth handling for the aarch64 backend, hence why I wanted to confirm.
I use Apple M1 Max. According to [1], Pointer Authentication is disabled by default and I didn't enable it. The document says it should work inside a linux VM anyway. Disasm for main or _start doesn't contain any pacio/autia instructions. [1]: https://github.com/lelegard/arm-cpusysregs/blob/main/docs/arm64e-on-macos.md
Thanks for the info. For the pauth-related problem, a fix is under review and should hopefully make its way to master and gdb 13 soon.
I've pushed a fix to gdb master and gdb 13 for the pauth issue. Could you please verify it works now (if this is the bug you were hitting).
Tried the commit 6967633c8b4902a7576e64c4ecf2ab6098c888f0, and it works! Thank you!
Great. I'm closing this one then. Please let us know if you see something off.
Setting the target milestone to 13.2 as a way to record that this fix was included in the upcoming GDB 13.2 release.