From: Daniel Jacobowitz <drow@mvista.com>
To: gdb-patches@sources.redhat.com
Subject: RFA: complex numbers in c-valprint.c
Date: Wed, 30 Jan 2002 20:31:00 -0000 [thread overview]
Message-ID: <20020130233143.A21333@nevyn.them.org> (raw)
This patch fixes half of gdb/320. The other half is a bug in GCC 3.x, that
I just CC'd gdb@ about.
Is this OK to commit? Does anyone have a preference for {0, 0} vs. { re =
0, im = 0}? I used the former.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
2002-01-30 Daniel Jacobowitz <drow@mvista.com>
* c-valprint.c (c_val_print): Handle TYPE_CODE_COMPLEX.
Index: c-valprint.c
===================================================================
RCS file: /cvs/src/src/gdb/c-valprint.c,v
retrieving revision 1.11
diff -u -r1.11 c-valprint.c
--- c-valprint.c 2001/11/10 20:44:37 1.11
+++ c-valprint.c 2002/01/31 04:26:09
@@ -459,6 +459,29 @@
fprintf_filtered (stream, "<incomplete type>");
break;
+ case TYPE_CODE_COMPLEX:
+ fprintf_filtered (stream, "{");
+ if (format)
+ print_scalar_formatted (valaddr + embedded_offset,
+ TYPE_TARGET_TYPE (type),
+ format, 0, stream);
+ else
+ print_floating (valaddr + embedded_offset, TYPE_TARGET_TYPE (type),
+ stream);
+ fprintf_filtered (stream, ", ");
+ if (format)
+ print_scalar_formatted (valaddr + embedded_offset
+ + TYPE_LENGTH (TYPE_TARGET_TYPE (type)),
+ TYPE_TARGET_TYPE (type),
+ format, 0, stream);
+ else
+ print_floating (valaddr + embedded_offset
+ + TYPE_LENGTH (TYPE_TARGET_TYPE (type)),
+ TYPE_TARGET_TYPE (type),
+ stream);
+ fprintf_filtered (stream, "}");
+ break;
+
default:
error ("Invalid C/C++ type code %d in symbol table.", TYPE_CODE (type));
}
next reply other threads:[~2002-01-31 4:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-30 20:31 Daniel Jacobowitz [this message]
2002-02-03 14:43 ` Jim Blandy
2002-02-03 14:52 ` Daniel Jacobowitz
2002-02-05 11:24 ` Jim Blandy
2002-02-05 13:41 ` Daniel Jacobowitz
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=20020130233143.A21333@nevyn.them.org \
--to=drow@mvista.com \
--cc=gdb-patches@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