Asked 12 years, 10 months ago modified 2 years, 5 months ago viewed 208k times List linenum print lines centered around line number linenum in the current source file List function print lines centered around the beginning of function function If the last lines printed were printed with a list command, this prints lines following the last lines printed However, if the last line printed was a solitary line printed as part of displaying a stack. The filename may be omitted
Set listsize <count> set how many lines to show in „list“. Examining the stack backtrace display the current call stack (can be used after a runtime error, eg Segfault) gabrielle singh cadieux, 2017 Specifies line number of the current source file When a list command has two linespecs, this refers to the same source file as the first linespec. Gdb list command the list command shows you the source code around the current line
Show source code to show the entire source file List <filename> stepping through code step into a function step this command steps into a function call Step over and step out next steps over the. If you were to have the line x = getvalue(y) and used s, you would go into the getvalue(y) function Finish/f executes the rest of the current function Will step out of the current function
L/list prints the area around the current line in the current source file Where displays the current line and the function stack of calls that got you there. How do i check the current line number that i'm stopped in when debugging with gdb I would have thought this would be obvious (and maybe it is) but i don't see it on the gdb cheat sheet.
OPEN