调试as时,会自动下断点,什么原理?
# gdb as-new
GNU gdb (GDB) 7.0
Copyright (C) 2009 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 "i686-pc-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /root/binutils-2.18/gas/as-new...done.
Breakpoint 1 at 0x805c460: file messages.c, line 187.
Breakpoint 2 at 0x805c4aa: file messages.c, line 225.
Breakpoint 3 at 0x805c5a1: file messages.c, line 288.
Breakpoint 4 at 0x805c5e2: file messages.c, line 323.
Breakpoint 5 at 0x805c622: file messages.c, line 360.
Breakpoint 6 at 0x805c6a3: file messages.c, line 396.
Breakpoint 7 at 0x805c754: file messages.c, line 413.
Breakpoint 8 at 0x8049240
(gdb) i b
Num Type Disp Enb Address What
1 breakpoint keep y 0x0805c460 in as_warn at messages.c:187
2 breakpoint keep y 0x0805c4aa in as_warn_where at messages.c:225
3 breakpoint keep y 0x0805c5a1 in as_bad at messages.c:288
4 breakpoint keep y 0x0805c5e2 in as_bad_where at messages.c:323
5 breakpoint keep y 0x0805c622 in as_fatal at messages.c:360
6 breakpoint keep y 0x0805c6a3 in as_assert at messages.c:396
7 breakpoint keep y 0x0805c754 in as_abort at messages.c:413
8 breakpoint keep y 0x08049240 <abort@plt>
(gdb)
build 目录下有一个 .gdbinit 。 果然是的,谢谢
页:
[1]