public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: Christian Jaeger <christian@jaeger.mine.nu>
To: nobody@sources.redhat.com
Cc: gdb-prs@sources.redhat.com,
Subject: Re: macros/2483: not even the macro debugging example from the documentation works
Date: Fri, 25 Jul 2008 17:18:00 -0000	[thread overview]
Message-ID: <20080725171801.28456.qmail@sourceware.org> (raw)

The following reply was made to PR macros/2483; it has been noted by GNATS.

From: Christian Jaeger <christian@jaeger.mine.nu>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-gnats@sources.redhat.com, nobody@sources.redhat.com, 
 gdb-prs@sources.redhat.com
Subject: Re: macros/2483: not even the macro debugging example from the documentation
 works
Date: Fri, 25 Jul 2008 19:08:25 +0200

 Tom Tromey wrote:
 > I tried this on Fedora 8 and it works for me.
 >
 > Maybe your version of gcc is emitting the wrong information?
 > What version of gcc are you using?
 >
 > FWIW, gcc 4.3 had a bug in this area.
 >   
 
 Yes, it's gcc 4.3 (I did mention under "*Environment"):*
 
 $ gcc -v
 Using built-in specs.
 Target: x86_64-linux-gnu
 Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.1-2' 
 --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs 
 --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr 
 --enable-shared --with-system-zlib --libexecdir=/usr/lib 
 --without-included-gettext --enable-threads=posix --enable-nls 
 --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 
 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc 
 --enable-mpfr --enable-cld --enable-checking=release 
 --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
 Thread model: posix
 gcc version 4.3.1 (Debian 4.3.1-2)
 
 > You can look at the macro info with "objdump -W sample".
 > That might prove interesting.
 >   
 
 I've attached the output of that.
 
 $ objdump -v
 GNU objdump (GNU Binutils for Debian) 2.18.0.20080103
 (...)
 
 
 $ gcc-4.2 -gdwarf-2 -g3 sample.c -o sample
 
 $ gdb sample
 ...
 (gdb) info macro Q
 Defined at /tmp/chris/sample.h:1
 included at /tmp/chris/sample.c:2
 #define Q <
 
 ...
 (gdb) macro expand N Q M
 expands to: 28 < 42
 
 Also, macro expansion works when compiling 'my' application using gcc-4.2.
 So yes it seems a bug in the current stable gcc version (as released 1.5 
 months ago).
 
 What do you recommend me to do, tell the Debian maintainers to apply a 
 patch? (Well, I guess I'll just report a bug to the Debian bugtracker 
 and let them decide.)
 
 Thanks,
 Christian.
 


             reply	other threads:[~2008-07-25 17:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-25 17:18 Christian Jaeger [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-07-25 18:48 tromey
2008-07-25 17:58 Daniel Jacobowitz
2008-07-25 17:48 Tom Tromey
2008-07-25 17:18 Christian Jaeger
2008-07-25 15:18 Tom Tromey
2008-07-25  0:18 christian

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=20080725171801.28456.qmail@sourceware.org \
    --to=christian@jaeger.mine.nu \
    --cc=gdb-prs@sources.redhat.com \
    --cc=nobody@sources.redhat.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).