From: Daniel Jacobowitz <drow@false.org>
To: Peter Jay Salzman <p@dirac.org>
Cc: Gdb Mailing List <gdb@sources.redhat.com>
Subject: Re: gdb segfaults when printing long double complex variables
Date: Thu, 10 Jun 2004 19:39:00 -0000 [thread overview]
Message-ID: <20040610193919.GA32564@nevyn.them.org> (raw)
In-Reply-To: <20040610192828.GA13125@dirac.org>
On Thu, Jun 10, 2004 at 12:28:29PM -0700, Peter Jay Salzman wrote:
> Bug: GDB segfaults when printing long double complex variables.
>
> Sample Code:
>
> 1 #include <tgmath.h>
> 2 #include <stdio.h>
> 3
> 4 int main(void)
> 5 {
> 6 complex a;
> 7 double complex b;
> 8 long double complex c;
> 9
> 10 a = 5 + 2I;
> 11 printf("%f + %fi\n", __real__ a, __imag__ a);
> 12
> 13 b = 5.0 + 2.0I;
> 14 printf("%f + %fi\n", __real__ b, __imag__ b);
> 15
> 16 c = 5.0L + 2.0LI;
> 17 printf("%Lf + %Lfi\n", __real__ c, __imag__ c);
> 18
> 19 return 0;
> 20 }
GDB doesn't really support complex long double. The entire type
infrastructure for complex types is hokey and special-cases based on
the size of the type; it expects 128-bit long double rather than x86's
96-bit.
Look in dwarf2read.c for the code setting TYPE_TARGET_TYPE if you want
to work around it.
--
Daniel Jacobowitz
next prev parent reply other threads:[~2004-06-10 19:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-10 19:30 Peter Jay Salzman
2004-06-10 19:39 ` Daniel Jacobowitz [this message]
2004-06-10 19:59 ` Peter Jay Salzman
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=20040610193919.GA32564@nevyn.them.org \
--to=drow@false.org \
--cc=gdb@sources.redhat.com \
--cc=p@dirac.org \
/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