public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Martin Simmons <qqxnjvamvxwx@dyxyl.com>
To: Mahmood Naderan <nt_mahmood@yahoo.com>
Cc: gdb@sourceware.org
Subject: Re: How to check if .gdbinit macros have been loaded?
Date: Mon, 09 Aug 2021 15:31:29 +0100	[thread overview]
Message-ID: <je5ywe7kqm.fsf@dyxyl.com> (raw)
In-Reply-To: <526939713.188425.1628429312671@mail.yahoo.com> (message from Mahmood Naderan via Gdb on Sun, 8 Aug 2021 13:28:32 +0000 (UTC))

>>>>> 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

  reply	other threads:[~2021-08-09 14:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <526939713.188425.1628429312671.ref@mail.yahoo.com>
2021-08-08 13:28 ` Mahmood Naderan
2021-08-09 14:31   ` Martin Simmons [this message]
2021-08-11 14:09     ` Mahmood Naderan
2021-08-12 15:03       ` Martin Simmons
2021-08-12 17:32         ` Mahmood Naderan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=je5ywe7kqm.fsf@dyxyl.com \
    --to=qqxnjvamvxwx@dyxyl.com \
    --cc=gdb@sourceware.org \
    --cc=nt_mahmood@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).