Subject: Re: bug#40271: 26.3; gdb-mode fails to initialize if the target executable is built without symbols

From: Eli Zaretskii <[email-masked]>
Date: Sat, 28 Mar 2020 15:11:27 +0300

> From: Vladimir Nikishkin <[email-masked]>
> Date: Sat, 28 Mar 2020 19:51:40 +0800
> 
> The way to reproduce would be the following:
> 1)printf "program main\nend" > test.f90
> 2)gfortran test.f90
> 3)emacs -q
> 4)M-: (setq gdb-many-windows t) RET
> 5)gdb RET a.out RET
> 
> Observe that gdb-mode fails to initialize.

I cannot reproduce this on my system, debugging one of the programs in
the public /usr/bin/ directory (which are all stripped of the
debugging symbols).

> This happens because in gdb-mi.el.gz, line 4689, gdb-main-file gets
> a completely unrelated .S file name relative to the directory where
> distro authors compile glibc.

Please show all the related details (what regexp search fails, what
does it find, and what it ought to find instead), since otherwise it
will be very hard to fix this problem.