I've updated Ubuntu to newest version. But when I use GDB to debug program found that when input s all the way, GDB will step into the implementation of system calls, printf()
, for example. So what to do to prevent GDB stepping into system calls when I input s?
Asked
Active
Viewed 80 times
0
-
It's not very clear why you consider this to be a problem, you're asking the debugger to single-step and somehow expecting it not to? Also, `printf()` is not a "system call", it's a call into the standard library. – unwind Apr 06 '16 at 09:55
-
yes that's what i mean,I don't want it to step into standard library functions.What to do?thanks~ – Michael Apr 06 '16 at 10:03
-
WOW! It seems that gdb cannot step over function calls? That would be incredibly lame:( – Martin James Apr 06 '16 at 10:31
-
Someone tell me it's not true:( – Martin James Apr 06 '16 at 10:40
-
@unwind 'It's not very clear why you consider this to be a problem' - you joketh, surely? Step in and step over are core functonalities for a debugger! – Martin James Apr 06 '16 at 10:44
-
OK 'next' does it, Relief.... – Martin James Apr 06 '16 at 10:58
-
before I update the OS,in GDB input 's' means step into,but won't step into the standard library.In the new GDB,input 's' can step into standard library functions which I don't want to,I just want to step into the user defined functions.So now when encounter standard library functions I must change 's' to 'n' and then change back to 's',which bothers me. – Michael Apr 06 '16 at 11:30
-
What version of Ubuntu? – Mark Plotnick Apr 06 '16 at 18:36