I want to debug some program. I need backtraces from all calls to some function, e.g. puts.
Now I use such gdb script:
set width 0
set h
Try this instead:
set width 0
set height 0
set verbose off
start # runs to main, so shared libraries are loaded
# after you reach main, GDB should have libc symbols, "puts" among them
break puts
commands 1
backtrace
continue
end
If this doesn't work, please state operating system version.
EDIT: as osgx correctly points out, the other alternative is to add
set breakpoint pending on
before break puts