I have an executable that is dynamically linked with a .so
file, both compiled with debug symbols.
Now when I start the process with a gdb and step over it - the step
command does not step into functions (defined in a .so
) unless I set the step-mode on
.
Sources are available and gdb certainly can find them.
Why is it happening?
Here is the corresponding debug output enabled via set debug infrun 1
:
34 assert_se(calendar_spec_from_string(input, &c) >= 0);
infrun: infrun_async(0)
(gdb) s
infrun: clear_proceed_status_thread (Thread 0x7ffff7fb3900 (LWP 7009))
infrun: proceed (addr=0xffffffffffffffff, signal=GDB_SIGNAL_DEFAULT)
infrun: proceed: resuming Thread 0x7ffff7fb3900 (LWP 7009)
infrun: resume (step=1, signal=GDB_SIGNAL_0), trap_expected=0, current thread [Thread 0x7ffff7fb3900 (LWP 7009)] at 0x100000e0d
infrun: infrun_async(1)
infrun: prepare_to_wait
infrun: target_wait (-1.0.0, status) =
infrun: 7009.7009.0 [Thread 0x7ffff7fb3900 (LWP 7009)],
infrun: status->kind = stopped, signal = GDB_SIGNAL_TRAP
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x100000e11
infrun: stepping inside range [0x100000e0d-0x100000e4f]
infrun: resume (step=1, signal=GDB_SIGNAL_0), trap_expected=0, current thread [Thread 0x7ffff7fb3900 (LWP 7009)] at 0x100000e11
infrun: prepare_to_wait
infrun: target_wait (-1.0.0, status) =
infrun: 7009.7009.0 [Thread 0x7ffff7fb3900 (LWP 7009)],
infrun: status->kind = stopped, signal = GDB_SIGNAL_TRAP
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x100000e15
infrun: stepping inside range [0x100000e0d-0x100000e4f]
infrun: resume (step=1, signal=GDB_SIGNAL_0), trap_expected=0, current thread [Thread 0x7ffff7fb3900 (LWP 7009)] at 0x100000e15
infrun: prepare_to_wait
infrun: target_wait (-1.0.0, status) =
infrun: 7009.7009.0 [Thread 0x7ffff7fb3900 (LWP 7009)],
infrun: status->kind = stopped, signal = GDB_SIGNAL_TRAP
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x100000e18
infrun: stepping inside range [0x100000e0d-0x100000e4f]
infrun: resume (step=1, signal=GDB_SIGNAL_0), trap_expected=0, current thread [Thread 0x7ffff7fb3900 (LWP 7009)] at 0x100000e18
infrun: prepare_to_wait
infrun: target_wait (-1.0.0, status) =
infrun: 7009.7009.0 [Thread 0x7ffff7fb3900 (LWP 7009)],
infrun: status->kind = stopped, signal = GDB_SIGNAL_TRAP
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x100000e1b
infrun: stepping inside range [0x100000e0d-0x100000e4f]
infrun: resume (step=1, signal=GDB_SIGNAL_0), trap_expected=0, current thread [Thread 0x7ffff7fb3900 (LWP 7009)] at 0x100000e1b
infrun: prepare_to_wait
infrun: target_wait (-1.0.0, status) =
infrun: 7009.7009.0 [Thread 0x7ffff7fb3900 (LWP 7009)],
infrun: status->kind = stopped, signal = GDB_SIGNAL_TRAP
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x100000c08
infrun: stepped into subroutine
infrun: inserting step-resume breakpoint at 0x100000e20
infrun: resume (step=0, signal=GDB_SIGNAL_0), trap_expected=0, current thread [Thread 0x7ffff7fb3900 (LWP 7009)] at 0x100000c08
infrun: prepare_to_wait
infrun: target_wait (-1.0.0, status) =
infrun: 7009.7009.0 [Thread 0x7ffff7fb3900 (LWP 7009)],
infrun: status->kind = stopped, signal = GDB_SIGNAL_TRAP
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x100000e20
infrun: BPSTAT_WHAT_STEP_RESUME
infrun: stepping inside range [0x100000e0d-0x100000e4f]
infrun: resume (step=1, signal=GDB_SIGNAL_0), trap_expected=0, current thread [Thread 0x7ffff7fb3900 (LWP 7009)] at 0x100000e20
infrun: prepare_to_wait
infrun: target_wait (-1.0.0, status) =
infrun: 7009.7009.0 [Thread 0x7ffff7fb3900 (LWP 7009)],
infrun: status->kind = stopped, signal = GDB_SIGNAL_TRAP
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x100000e23
infrun: stepping inside range [0x100000e0d-0x100000e4f]
infrun: resume (step=1, signal=GDB_SIGNAL_0), trap_expected=0, current thread [Thread 0x7ffff7fb3900 (LWP 7009)] at 0x100000e23
infrun: prepare_to_wait
infrun: target_wait (-1.0.0, status) =
infrun: 7009.7009.0 [Thread 0x7ffff7fb3900 (LWP 7009)],
infrun: status->kind = stopped, signal = GDB_SIGNAL_TRAP
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x100000e26
infrun: stepping inside range [0x100000e0d-0x100000e4f]
infrun: resume (step=1, signal=GDB_SIGNAL_0), trap_expected=0, current thread [Thread 0x7ffff7fb3900 (LWP 7009)] at 0x100000e26
infrun: prepare_to_wait
infrun: target_wait (-1.0.0, status) =
infrun: 7009.7009.0 [Thread 0x7ffff7fb3900 (LWP 7009)],
infrun: status->kind = stopped, signal = GDB_SIGNAL_TRAP
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x100000e29
infrun: stepping inside range [0x100000e0d-0x100000e4f]
infrun: resume (step=1, signal=GDB_SIGNAL_0), trap_expected=0, current thread [Thread 0x7ffff7fb3900 (LWP 7009)] at 0x100000e29
infrun: prepare_to_wait
infrun: target_wait (-1.0.0, status) =
infrun: 7009.7009.0 [Thread 0x7ffff7fb3900 (LWP 7009)],
infrun: status->kind = stopped, signal = GDB_SIGNAL_TRAP
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x100000e4f
infrun: stepped to a different line
infrun: stop_waiting
infrun: clear_step_over_info
infrun: stop_all_threads
infrun: stop_all_threads, pass=0, iterations=0
infrun: Thread 0x7ffff7fb3900 (LWP 7009) not executing
infrun: stop_all_threads, pass=1, iterations=1
infrun: Thread 0x7ffff7fb3900 (LWP 7009) not executing
infrun: stop_all_threads done
36 assert_se(calendar_spec_to_string(c, &p) >= 0);
infrun: infrun_async(0)
(gdb) s
infrun: clear_proceed_status_thread (Thread 0x7ffff7fb3900 (LWP 7009))
infrun: proceed (addr=0xffffffffffffffff, signal=GDB_SIGNAL_DEFAULT)
infrun: proceed: resuming Thread 0x7ffff7fb3900 (LWP 7009)
infrun: resume (step=1, signal=GDB_SIGNAL_0), trap_expected=0, current thread [Thread 0x7ffff7fb3900 (LWP 7009)] at 0x100000e4f
infrun: infrun_async(1)
infrun: prepare_to_wait
infrun: target_wait (-1.0.0, status) =
infrun: 7009.7009.0 [Thread 0x7ffff7fb3900 (LWP 7009)],
infrun: status->kind = stopped, signal = GDB_SIGNAL_TRAP
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x100000e53
infrun: stepping inside range [0x100000e4f-0x100000e91]
infrun: resume (step=1, signal=GDB_SIGNAL_0), trap_expected=0, current thread [Thread 0x7ffff7fb3900 (LWP 7009)] at 0x100000e53
infrun: prepare_to_wait
infrun: target_wait (-1.0.0, status) =
infrun: -1.0.0 [process -1],
infrun: status->kind = ignore
infrun: TARGET_WAITKIND_IGNORE
infrun: prepare_to_wait
infrun: target_wait (-1.0.0, status) =
infrun: 7009.7009.0 [Thread 0x7ffff7fb3900 (LWP 7009)],
infrun: status->kind = stopped, signal = GDB_SIGNAL_TRAP
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x100000e57
infrun: stepping inside range [0x100000e4f-0x100000e91]
infrun: resume (step=1, signal=GDB_SIGNAL_0), trap_expected=0, current thread [Thread 0x7ffff7fb3900 (LWP 7009)] at 0x100000e57
infrun: prepare_to_wait
infrun: target_wait (-1.0.0, status) =
infrun: -1.0.0 [process -1],
infrun: status->kind = ignore
infrun: TARGET_WAITKIND_IGNORE
infrun: prepare_to_wait
infrun: target_wait (-1.0.0, status) =
infrun: 7009.7009.0 [Thread 0x7ffff7fb3900 (LWP 7009)],
infrun: status->kind = stopped, signal = GDB_SIGNAL_TRAP
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x100000e5a
infrun: stepping inside range [0x100000e4f-0x100000e91]
infrun: resume (step=1, signal=GDB_SIGNAL_0), trap_expected=0, current thread [Thread 0x7ffff7fb3900 (LWP 7009)] at 0x100000e5a
infrun: prepare_to_wait
infrun: target_wait (-1.0.0, status) =
infrun: -1.0.0 [process -1],
infrun: status->kind = ignore
infrun: TARGET_WAITKIND_IGNORE
infrun: prepare_to_wait
infrun: target_wait (-1.0.0, status) =
infrun: 7009.7009.0 [Thread 0x7ffff7fb3900 (LWP 7009)],
infrun: status->kind = stopped, signal = GDB_SIGNAL_TRAP
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x100000e5d
infrun: stepping inside range [0x100000e4f-0x100000e91]
infrun: resume (step=1, signal=GDB_SIGNAL_0), trap_expected=0, current thread [Thread 0x7ffff7fb3900 (LWP 7009)] at 0x100000e5d
infrun: prepare_to_wait
infrun: target_wait (-1.0.0, status) =
infrun: -1.0.0 [process -1],
infrun: status->kind = ignore
infrun: TARGET_WAITKIND_IGNORE
infrun: prepare_to_wait
infrun: target_wait (-1.0.0, status) =
infrun: 7009.7009.0 [Thread 0x7ffff7fb3900 (LWP 7009)],
infrun: status->kind = stopped, signal = GDB_SIGNAL_TRAP
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x100000c48
infrun: stepped into subroutine
infrun: inserting step-resume breakpoint at 0x100000e62
infrun: resume (step=0, signal=GDB_SIGNAL_0), trap_expected=0, current thread [Thread 0x7ffff7fb3900 (LWP 7009)] at 0x100000c48
infrun: prepare_to_wait
infrun: target_wait (-1.0.0, status) =
infrun: -1.0.0 [process -1],
infrun: status->kind = ignore
infrun: TARGET_WAITKIND_IGNORE
infrun: prepare_to_wait
infrun: target_wait (-1.0.0, status) =
infrun: 7009.7009.0 [Thread 0x7ffff7fb3900 (LWP 7009)],
infrun: status->kind = stopped, signal = GDB_SIGNAL_TRAP
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x100000e62
infrun: BPSTAT_WHAT_STEP_RESUME
infrun: stepping inside range [0x100000e4f-0x100000e91]
infrun: resume (step=1, signal=GDB_SIGNAL_0), trap_expected=0, current thread [Thread 0x7ffff7fb3900 (LWP 7009)] at 0x100000e62
infrun: prepare_to_wait
infrun: target_wait (-1.0.0, status) =
infrun: -1.0.0 [process -1],
infrun: status->kind = ignore
infrun: TARGET_WAITKIND_IGNORE
infrun: prepare_to_wait
infrun: target_wait (-1.0.0, status) =
infrun: 7009.7009.0 [Thread 0x7ffff7fb3900 (LWP 7009)],
infrun: status->kind = stopped, signal = GDB_SIGNAL_TRAP
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x100000e65
infrun: stepping inside range [0x100000e4f-0x100000e91]
infrun: resume (step=1, signal=GDB_SIGNAL_0), trap_expected=0, current thread [Thread 0x7ffff7fb3900 (LWP 7009)] at 0x100000e65
infrun: prepare_to_wait
infrun: target_wait (-1.0.0, status) =
infrun: -1.0.0 [process -1],
infrun: status->kind = ignore
infrun: TARGET_WAITKIND_IGNORE
infrun: prepare_to_wait
infrun: target_wait (-1.0.0, status) =
infrun: 7009.7009.0 [Thread 0x7ffff7fb3900 (LWP 7009)],
infrun: status->kind = stopped, signal = GDB_SIGNAL_TRAP
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x100000e68
infrun: stepping inside range [0x100000e4f-0x100000e91]
infrun: resume (step=1, signal=GDB_SIGNAL_0), trap_expected=0, current thread [Thread 0x7ffff7fb3900 (LWP 7009)] at 0x100000e68
infrun: prepare_to_wait
infrun: target_wait (-1.0.0, status) =
infrun: 7009.7009.0 [Thread 0x7ffff7fb3900 (LWP 7009)],
infrun: status->kind = stopped, signal = GDB_SIGNAL_TRAP
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x100000e6b
infrun: stepping inside range [0x100000e4f-0x100000e91]
infrun: resume (step=1, signal=GDB_SIGNAL_0), trap_expected=0, current thread [Thread 0x7ffff7fb3900 (LWP 7009)] at 0x100000e6b
infrun: prepare_to_wait
infrun: target_wait (-1.0.0, status) =
infrun: -1.0.0 [process -1],
infrun: status->kind = ignore
infrun: TARGET_WAITKIND_IGNORE
infrun: prepare_to_wait
infrun: target_wait (-1.0.0, status) =
infrun: 7009.7009.0 [Thread 0x7ffff7fb3900 (LWP 7009)],
infrun: status->kind = stopped, signal = GDB_SIGNAL_TRAP
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x100000e91
infrun: stepped to a different line
infrun: stop_waiting
infrun: clear_step_over_info
infrun: stop_all_threads
infrun: stop_all_threads, pass=0, iterations=0
infrun: Thread 0x7ffff7fb3900 (LWP 7009) not executing
infrun: stop_all_threads, pass=1, iterations=1
infrun: Thread 0x7ffff7fb3900 (LWP 7009) not executing
infrun: stop_all_threads done
37 printf("\"%s\" → \"%s\"\n", input, p);
infrun: infrun_async(0)