From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28830 invoked by alias); 5 Dec 2002 23:26:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 28804 invoked by uid 71); 5 Dec 2002 23:26:01 -0000 Date: Thu, 05 Dec 2002 15:26:00 -0000 Message-ID: <20021205232601.28803.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: "Joseph S. Myers" Subject: Re: debug/1621: Debugging with complex numbers Reply-To: "Joseph S. Myers" X-SW-Source: 2002-12/txt/msg00330.txt.bz2 List-Id: The following reply was made to PR debug/1621; it has been noted by GNATS. From: "Joseph S. Myers" To: , , Cc: Subject: Re: debug/1621: Debugging with complex numbers Date: Thu, 5 Dec 2002 23:24:36 +0000 (GMT) On 5 Dec 2002 bangerth@dealii.org wrote: > Joseph, this report is now almost 2 years old, and versions > 3.0 and 3.1/2 have happened in between. Unfortunately, there > are no testcases in the report, so I can't check the claims > myself, but do you know whether the situation has or has > not improved in the meantime? The testcase is at the URL given in the report : static __complex__ double x = 2.0 + 3.0i; int main(void) { return 0; } (gdb) p x $1 = Invalid C/C++ type code 20 in symbol table. (gdb) p x$real No symbol "x$real" in current context. (gdb) p x$imag No symbol "x$imag" in current context. (gdb) quit You'll also want to try a testcase with automatic variables: int main(void) { __complex__double x = 2.0 + 3.0i; return 0; } Both testcases should be tried with both stabs and DWARF2 debugging. The key part is that accessing the variable as a whole from GDB ought to work; if that works in all four cases, then the manual need no longer refer to "A future version of GDB", just say that GDB can handle debugging complex numbers (possibly keeping the description of what's done with stabs as information about the internals rather than the user interface). Some of the problem, if still there, may be a GDB problem, some may be a GCC problem. But as long as the manual is making claims about what GDB will do in future, the presence of such claims in the manual is a GCC problem unless there's some reason to suppose them to be accurate. (DWARF3 has support for complex floating point numbers, but not complex integers which aren't in C99. I don't really care about debugging for complex integers in any case, which have other known problems (division of complex integers doesn't work sensibly in GCC).) -- Joseph S. Myers jsm28@cam.ac.uk