什么会导致 gdb 不在断点处停止?
What can cause gdb to not stop on a breakpoint?
我在 gdb 的函数标签上放置了一个断点。
此断点被击中多次,但这是最后一次 - 未命中并发生分段错误。
什么会导致 gdb 不在断点处停止?
为什么上次没停在1018行?
(gdb) b ambl_test_event_processor
Breakpoint 1 at 0x5852d6e0: file code/comn/ambl/ambltest.c, line 1018.
(gdb) c
Continuing.
[LWP 1139 exited]
[Switching to LWP 1148]
Thread 39 "Metaswitch_0_3" hit Breakpoint 1, ambl_test_event_processor (ambl_data=0x72f97b28, mib_data=0x7922b8f4, req_data=0x7280e784, row_cb=0x0,
rc=1, ambl_replication=0 '[=10=]0') at code/comn/ambl/ambltest.c:1018
1018 code/comn/ambl/ambltest.c: No such file or directory.
(gdb) c
Continuing.
[Switching to LWP 1151]
Thread 42 "Metaswitch_0_6" hit Breakpoint 1, ambl_test_event_processor (ambl_data=0x72ff9508, mib_data=0x7932bda0, req_data=0x7280e71c, row_cb=0x0,
rc=1, ambl_replication=0 '[=10=]0') at code/comn/ambl/ambltest.c:1018
1018 in code/comn/ambl/ambltest.c
(gdb) c
Continuing.
[Switching to LWP 1145]
Thread 36 "Metaswitch_0_0" hit Breakpoint 1, ambl_test_event_processor (ambl_data=0x72efb544, mib_data=0x7280b4e4, req_data=0x7280e6e8, row_cb=0x0,
rc=1, ambl_replication=0 '[=10=]0') at code/comn/ambl/ambltest.c:1018
1018 in code/comn/ambl/ambltest.c
(gdb) c
Continuing.
[Switching to LWP 1150]
Thread 41 "Metaswitch_0_5" hit Breakpoint 1, ambl_test_event_processor (ambl_data=0x72ffbc8c, mib_data=0x79622694, req_data=0x7280e750, row_cb=0x0,
rc=1, ambl_replication=0 '[=10=]0') at code/comn/ambl/ambltest.c:1018
1018 in code/comn/ambl/ambltest.c
(gdb)
Continuing.
Thread 42 "Metaswitch_0_6" received signal SIGSEGV, Segmentation fault.
[Switching to LWP 1151]
0x5852d996 in ambl_test_event_processor (ambl_data=0x0, mib_data=0x7932bda0, req_data=0x7280e71c, row_cb=<optimized out>, rc=<optimized out>,
ambl_replication=0 '[=10=]0') at code/comn/ambl/ambltest.c:1568
1568 in code/comn/ambl/ambltest.c
What could cause gdb to not stop on a breakpoint? Why didn't it stop on line 1018 this last time?
你没有提供任何证据证明它没有。
你有:
Thread 42 "Metaswitch_0_6" hit Breakpoint 1
Thread 36 "Metaswitch_0_0" hit Breakpoint 1,
Thread 41 "Metaswitch_0_5" hit Breakpoint 1,
Thread 42 "Metaswitch_0_6" received signal SIGSEGV
有没有指示线程42在它命中断点后已经完成运行ambl_test_event_processor()
,然后不知何故跳过了那个断点,然后崩溃了。
更有可能是它打了断点(然后其他一些线程也打了它,但这无关紧要),然后崩溃了。
我在 gdb 的函数标签上放置了一个断点。 此断点被击中多次,但这是最后一次 - 未命中并发生分段错误。
什么会导致 gdb 不在断点处停止? 为什么上次没停在1018行?
(gdb) b ambl_test_event_processor
Breakpoint 1 at 0x5852d6e0: file code/comn/ambl/ambltest.c, line 1018.
(gdb) c
Continuing.
[LWP 1139 exited]
[Switching to LWP 1148]
Thread 39 "Metaswitch_0_3" hit Breakpoint 1, ambl_test_event_processor (ambl_data=0x72f97b28, mib_data=0x7922b8f4, req_data=0x7280e784, row_cb=0x0,
rc=1, ambl_replication=0 '[=10=]0') at code/comn/ambl/ambltest.c:1018
1018 code/comn/ambl/ambltest.c: No such file or directory.
(gdb) c
Continuing.
[Switching to LWP 1151]
Thread 42 "Metaswitch_0_6" hit Breakpoint 1, ambl_test_event_processor (ambl_data=0x72ff9508, mib_data=0x7932bda0, req_data=0x7280e71c, row_cb=0x0,
rc=1, ambl_replication=0 '[=10=]0') at code/comn/ambl/ambltest.c:1018
1018 in code/comn/ambl/ambltest.c
(gdb) c
Continuing.
[Switching to LWP 1145]
Thread 36 "Metaswitch_0_0" hit Breakpoint 1, ambl_test_event_processor (ambl_data=0x72efb544, mib_data=0x7280b4e4, req_data=0x7280e6e8, row_cb=0x0,
rc=1, ambl_replication=0 '[=10=]0') at code/comn/ambl/ambltest.c:1018
1018 in code/comn/ambl/ambltest.c
(gdb) c
Continuing.
[Switching to LWP 1150]
Thread 41 "Metaswitch_0_5" hit Breakpoint 1, ambl_test_event_processor (ambl_data=0x72ffbc8c, mib_data=0x79622694, req_data=0x7280e750, row_cb=0x0,
rc=1, ambl_replication=0 '[=10=]0') at code/comn/ambl/ambltest.c:1018
1018 in code/comn/ambl/ambltest.c
(gdb)
Continuing.
Thread 42 "Metaswitch_0_6" received signal SIGSEGV, Segmentation fault.
[Switching to LWP 1151]
0x5852d996 in ambl_test_event_processor (ambl_data=0x0, mib_data=0x7932bda0, req_data=0x7280e71c, row_cb=<optimized out>, rc=<optimized out>,
ambl_replication=0 '[=10=]0') at code/comn/ambl/ambltest.c:1568
1568 in code/comn/ambl/ambltest.c
What could cause gdb to not stop on a breakpoint? Why didn't it stop on line 1018 this last time?
你没有提供任何证据证明它没有。
你有:
Thread 42 "Metaswitch_0_6" hit Breakpoint 1
Thread 36 "Metaswitch_0_0" hit Breakpoint 1,
Thread 41 "Metaswitch_0_5" hit Breakpoint 1,
Thread 42 "Metaswitch_0_6" received signal SIGSEGV
有没有指示线程42在它命中断点后已经完成运行ambl_test_event_processor()
,然后不知何故跳过了那个断点,然后崩溃了。
更有可能是它打了断点(然后其他一些线程也打了它,但这无关紧要),然后崩溃了。