1) Запускаю gdb и сразу передаю ему исполняемый файл foo
$ gdb foo
2) Ставлю бряк на первую строчку и откуда ни возьмись наблюдаю hello.asm. Откуда?!
Shell
(gdb) b 1
Breakpoint 1 at 0x401000: file hello.asm, line 7.
Shell
(gdb) shell ls
foo
Shell
$ gdb foo
GNU gdb (Debian 10.1-1.7) 10.1.90.20210103-git
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from foo...
(gdb) b 1
Breakpoint 1 at 0x401000: file hello.asm, line 7.
(gdb) shell ls
foo
(gdb)