When I use GDB command add-symbol-file
to load the symbol, GDB always asks me 'y or n', like this:
gdb> add-symbol-file mydrv.ko 0xa0070000
add symbol table from file "mydrv.ko" at
.text_addr = 0xa0070000
(y or n)
How to make it not ask and execute quietly?
Best Answer
gdb will ask you to confirm certain commands, if the value of the
confirm
setting ison
. From Optional Warnings and Messages:That's a single global setting for
confirm
. In case you want to disable confirmation just for theadd-symbol-file
command, you can define two hooks, which will run before and after the command:If you want to disable confirmation just for a single invocation of a command, precede it with the
server
keyword, which is part of gdb's annotation system.