Re: [PATCH] Always fetch Ada "main" name from the executable

Pedro Alves <[email protected]> Fri, 31 Jul 2026 11:48:34 +0100
Newsgroups gmane.comp.gdb.patches
Message-ID <[email protected]>
FWIW, I was intrigued by the subject, so I took a look, and ...

On 2026-07-30 18:03, Tom Tromey wrote:
> The gdb.ada/file-then-restart.exp test was failing with gnat-llvm.  I
> tracked this down to the "main" name not being stored in a readonly
> section, meaning that the code in ada_main_name using trust_readonly
> did not work.
> 
> However, it seems to me that gdb should always prefer the data from
> the executable in this particular case.  So, rather than relying on
> trust_readonly, this patch changes gdb to do this directly.

... this LGTM.

Approved-By: Pedro Alves <[email protected]>