This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gdb basic questions


On Sun, 15 Nov 2009 12:41:18 +0100, ranjith kumar wrote:
> 1) Is there any way to keep breakpoints at 1000 functions,  without
> typing ?( Assume I have saved all 1000 funcion names in a file)
+
> 2) Generally, is it possible to ask gdb to go and read 'gdb commands'
> from a file?

(gdb) help source
Read commands from a file named FILE.
Optional -v switch (before the filename) causes each command in
FILE to be echoed as it is executed.
Note that the file ".gdbinit" is read automatically in this way
when GDB is started.
Optional -p switch (before the filename) causes FILE to be evaluated
as Python code.


> 3) Another question. Sometimes gdb diplays a message like below and
> waits for user to type 'y or n'.
> "Make breakpoint pending on future shared library load? (y or [n]) "
> How to tell gdb to not to wait for input from user and assume that
> user has typed 'y' always ?

(gdb) set breakpoint pending on
(gdb) help set breakpoint pending 
Set debugger's behavior regarding pending breakpoints.
If on, an unrecognized breakpoint location will cause gdb to create a
pending breakpoint.  If off, an unrecognized breakpoint location results in
an error.  If auto, an unrecognized breakpoint location results in a
user-query to see if a pending breakpoint should be created.

In some other cases one needs:

(gdb) set confirm off 
(gdb) help set confirm 
Set whether to confirm potentially dangerous operations.


Regards,
Jan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]