GNU gdb how to show source file name and lines of a symbol

Viewed 18829

when use GNU gdb to debug a c process.

list command will print the lines but not telling me the file name.

set breakpoints can display all the line and file info I want but I don't want to set a breakpoint and have to disable or delete it.

(gdb) b oyss_funtion
Breakpoint 13 at 0x8049130: file main.c, line 119.

Is there a gdb command or settings can show me the file line info of a function(symbol) without setting a breakpoint there?

1 Answers
Related