Skip to content

set step-mode off 无效 #22

@lc168

Description

@lc168

我阅读了“step-and-next-function.md” 以后,
如果函数没有调试信息,我就希望step不要进入函数里面去,
可是,我执行set step-mode off 以后,却发现step,依旧可以进入printf,printf是没有调试信息的函数,
请问是为啥呢?有什么办法可以,让step不要进入没有调试信息的函数里面去吗?

(gdb) set step-mode off 
(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/lc/Desktop/a.out 

Breakpoint 1, main () at ss.c:13
13	int main(void) {
(gdb) s
14	        ex_st st = {1, 2, 3, 4, PTHREAD_MUTEX_INITIALIZER};
(gdb) 
15	        printf("%d,%d,%d,%d\n", st.a, st.b, st.c, st.d);
(gdb) 
__printf (format=0x4006d4 "%d,%d,%d,%d\n") at printf.c:28
28	printf.c: No such file or directory.
(gdb) 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions