How to check if .gdbinit macros have been loaded?

Martin Simmons qqxnjvamvxwx@dyxyl.com
Mon Aug 9 14:31:29 GMT 2021


>>>>> On Sun, 8 Aug 2021 13:28:32 +0000 (UTC), Mahmood Naderan via Gdb said:
> 
> Hi
> 
> I use a .gdbinit [1] file which is supposed to print some debug information when the program is being run. 
> When I run GDB, the first printf is written on the screen. So, that means the .gdbinit file has been loaded.
> However, I don't see the rest of the information that must be printed on the screen. There are a lot of printf for this purpose.

The other printfs are inside define ... end, so you will only see them
when the named command is used.

> How can I be sure that the rest of the macros are called? Maybe they hit errors and I am not able to see those errors.

What makes you think these commands (macros) will be called
automatically?  I think you have to call them yourself from the gdb
command line.

BTW, the "show user" command will tell you if a particular user defined
command exists.

__Martin


More information about the Gdb mailing list