0

i am using gcc 4.4.3 on ubuntu 10.4 32bit machine. i use 'gdb' to debug my code. Since few days i am seeing that whenever i debug code gdb steps into the c library functions used in the code also(like printf,fgets etc). This shows a long list of calls from one function to other.see the attached screen shot. Previously gdb was working fine just stepping over my own code. Maybe i am being novice !! But it is sometimes really irritating when gdb shows me numerous lines which i am not interested in the present context.

If someone can guide me as in how to turn off/on this feature and what can be cause of it being switched on on its own(i don't remember doing anything). Many thanks.enter image description here

2
  • 2
    Did you use the step command, which steps into function calls, or the next command which skips over function calls? To step out of a function, you can use the finish command. Commented Mar 31, 2012 at 19:43
  • i used the 'step' command after reaching a breakpoint. i used to do that previously also but then it never went into any of the lib functions. Commented Mar 31, 2012 at 19:53

1 Answer 1

4

i used to do that previously also but then it never went into any of the lib functions

You (or someone) have installed libc6-dbg package. Before that, GDB couldn't step into libc functions, because they didn't have any debug info. Now they do, and it can.

Either get out of the habit of typing step when you want next, or un-install libc6-dbg.

Sign up to request clarification or add additional context in comments.

2 Comments

@ Employed Russian.. thanks for the reason behind this. i had installed valgrind some days back maybe that installed the libc6.dbg with it...
Yes: valgrind indeed requires libc6-dbg on Ubuntu -- Valgrind needs to know about internals of ld-linux.so.2, and that info is only available from libc6-dbg.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.