$ gdb -q --symbol=debug.dbg --exec=debug_release
Reading symbols from debug.dbg...done.
(gdb) r
Starting program: /home/guang/Develop/trainning/debug/debug_release
warning: Probes-based dynamic linker interface failed.
Reverting to original interface.
Hello world.
[Inferior 1 (process 3603) exited normally]
(gdb)
1.1.5 也可以将debug.dbg合并到debug_release文件中
guang@guang-ubuntu:~/Develop/trainning/debug$ gdb debug_release
GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3or later
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"forconfiguration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type"help".
Type"apropos word"to search for commands related to"word"...
Reading symbols from debug_release...Reading symbols from /home/guang/Develop/trainning/debug/debug.dbg...done.
done.
(gdb) r
Starting program: /home/guang/Develop/trainning/debug/debug_release
Hello world.
[Inferior 1 (process3679) exited normally]
(gdb)