Re: How to check if .gdbinit macros have been loaded?

Martin Simmons <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
>>>>> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.