public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/14328] New: gcc3.2.2 generates incorrect debugging enum values
@ 2004-02-28 0:56 tjruwase at stanfordalumni dot org
2004-02-28 1:17 ` [Bug debug/14328] [3.3/3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: tjruwase at stanfordalumni dot org @ 2004-02-28 0:56 UTC (permalink / raw)
To: gcc-bugs
gcc3.2.2 generates negative values [-128 ... -1] as debugging symbols for enum
entries which have values in the range [128 ... 255]. Therefore attempts to
view such entries under gdb returns bogus values. The following source file and
gdb session demonstrate this problem. gcc-2.9.6 doesnt exhibit this behavour.
/* enum_err.c */
#include <stdio.h>
#include <stdlib.h>
typedef enum {
ENTRY_126 = 126,ENTRY_127,ENTRY_128,ENTRY_129
} entries_t;
int
main(int argc, char **argv)
{
entries_t x,y;
x = ENTRY_127;
y = ENTRY_128;
printf("hello world %d %d \n",((entries_t)x==ENTRY_127),(y==ENTRY_128));
printf("more %x %x \n",ENTRY_127,ENTRY_128);
return 0;
}
$ gcc -o enum_err enum_err.c -g -Wall
$ gdb enum_err
GNU gdb Red Hat Linux (5.2-2)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
(gdb) ptype entries_t
type = enum {ENTRY_126 = 126, ENTRY_127, ENTRY_128 = -128, ENTRY_129}
(gdb) p/d ENTRY_127
$1 = 127
(gdb) p/d ENTRY_128
$2 = -128
(gdb) p/d ENTRY_129
$3 = -127
(gdb)
--
Summary: gcc3.2.2 generates incorrect debugging enum values
Product: gcc
Version: 3.2.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: debug
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tjruwase at stanfordalumni dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14328
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug debug/14328] [3.3/3.4/3.5 Regression] gcc3.2.2 generates incorrect debugging enum values
2004-02-28 0:56 [Bug debug/14328] New: gcc3.2.2 generates incorrect debugging enum values tjruwase at stanfordalumni dot org
@ 2004-02-28 1:17 ` pinskia at gcc dot gnu dot org
2004-03-01 4:07 ` cvs-commit at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-28 1:17 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-02-28 01:17 -------
Confirmed in 3.0.4 (with -gdwarf-2), 3.3.1, 3.5.0, the problem is that drawf-2 is misrepesenting the
enum for some reason.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |wrong-debug
Last reconfirmed|0000-00-00 00:00:00 |2004-02-28 01:17:02
date| |
Summary|gcc3.2.2 generates incorrect|[3.3/3.4/3.5 Regression]
|debugging enum values |gcc3.2.2 generates incorrect
| |debugging enum values
Target Milestone|--- |3.3.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14328
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug debug/14328] [3.3/3.4/3.5 Regression] gcc3.2.2 generates incorrect debugging enum values
2004-02-28 0:56 [Bug debug/14328] New: gcc3.2.2 generates incorrect debugging enum values tjruwase at stanfordalumni dot org
2004-02-28 1:17 ` [Bug debug/14328] [3.3/3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
@ 2004-03-01 4:07 ` cvs-commit at gcc dot gnu dot org
2004-03-01 4:08 ` cvs-commit at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-03-01 4:07 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-03-01 04:07 -------
Subject: Bug 14328
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: mmitchel@gcc.gnu.org 2004-03-01 04:07:37
Modified files:
gcc : ChangeLog dwarf2out.c
Log message:
PR debug/14328
* dwarf2out.c (gen_enumeration_type_die): Output all enumeration
constants as signed values.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.2979&r2=2.2980
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/dwarf2out.c.diff?cvsroot=gcc&r1=1.497&r2=1.498
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14328
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug debug/14328] [3.3/3.4/3.5 Regression] gcc3.2.2 generates incorrect debugging enum values
2004-02-28 0:56 [Bug debug/14328] New: gcc3.2.2 generates incorrect debugging enum values tjruwase at stanfordalumni dot org
2004-02-28 1:17 ` [Bug debug/14328] [3.3/3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
2004-03-01 4:07 ` cvs-commit at gcc dot gnu dot org
@ 2004-03-01 4:08 ` cvs-commit at gcc dot gnu dot org
2004-03-01 4:11 ` [Bug debug/14328] [3.3 " mmitchel at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-03-01 4:08 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-03-01 04:08 -------
Subject: Bug 14328
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_4-branch
Changes by: mmitchel@gcc.gnu.org 2004-03-01 04:08:06
Modified files:
gcc : ChangeLog dwarf2out.c
Log message:
PR debug/14328
* dwarf2out.c (gen_enumeration_type_die): Output all enumeration
constants as signed values.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.268&r2=2.2326.2.269
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/dwarf2out.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.478.2.5&r2=1.478.2.6
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14328
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug debug/14328] [3.3 Regression] gcc3.2.2 generates incorrect debugging enum values
2004-02-28 0:56 [Bug debug/14328] New: gcc3.2.2 generates incorrect debugging enum values tjruwase at stanfordalumni dot org
` (2 preceding siblings ...)
2004-03-01 4:08 ` cvs-commit at gcc dot gnu dot org
@ 2004-03-01 4:11 ` mmitchel at gcc dot gnu dot org
2004-03-02 13:47 ` cvs-commit at gcc dot gnu dot org
2004-03-02 13:51 ` gdr at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-03-01 4:11 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-03-01 04:11 -------
Fixed in GCC 3.4 and GCC 3.5.
--
What |Removed |Added
----------------------------------------------------------------------------
Summary|[3.3/3.4/3.5 Regression] |[3.3 Regression] gcc3.2.2
|gcc3.2.2 generates incorrect|generates incorrect
|debugging enum values |debugging enum values
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14328
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug debug/14328] [3.3 Regression] gcc3.2.2 generates incorrect debugging enum values
2004-02-28 0:56 [Bug debug/14328] New: gcc3.2.2 generates incorrect debugging enum values tjruwase at stanfordalumni dot org
` (3 preceding siblings ...)
2004-03-01 4:11 ` [Bug debug/14328] [3.3 " mmitchel at gcc dot gnu dot org
@ 2004-03-02 13:47 ` cvs-commit at gcc dot gnu dot org
2004-03-02 13:51 ` gdr at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-03-02 13:47 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-03-02 13:47 -------
Subject: Bug 14328
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_3-branch
Changes by: gdr@gcc.gnu.org 2004-03-02 13:47:28
Modified files:
gcc : ChangeLog dwarf2out.c reload1.c
Log message:
Backport from 3.4.0:
2004-02-29 Mark Mitchell <mark@codesourcery.com>
PR debug/14328
* dwarf2out.c (gen_enumeration_type_die): Output all
enumeration
constants as signed values.
2004-01-16 J"orn Rennecke <joern.rennecke@superh.com>
PR optimization/11864
* reload1.c (reload_cse_simplify_operands): Don't remove
implicit extension from LOAD_EXTEND_OP.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.914&r2=1.16114.2.915
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/dwarf2out.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.390.2.10&r2=1.390.2.11
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/reload1.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.366.2.7&r2=1.366.2.8
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14328
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug debug/14328] [3.3 Regression] gcc3.2.2 generates incorrect debugging enum values
2004-02-28 0:56 [Bug debug/14328] New: gcc3.2.2 generates incorrect debugging enum values tjruwase at stanfordalumni dot org
` (4 preceding siblings ...)
2004-03-02 13:47 ` cvs-commit at gcc dot gnu dot org
@ 2004-03-02 13:51 ` gdr at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: gdr at gcc dot gnu dot org @ 2004-03-02 13:51 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From gdr at gcc dot gnu dot org 2004-03-02 13:51 -------
Applied patch
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14328
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2004-03-02 13:51 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-28 0:56 [Bug debug/14328] New: gcc3.2.2 generates incorrect debugging enum values tjruwase at stanfordalumni dot org
2004-02-28 1:17 ` [Bug debug/14328] [3.3/3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
2004-03-01 4:07 ` cvs-commit at gcc dot gnu dot org
2004-03-01 4:08 ` cvs-commit at gcc dot gnu dot org
2004-03-01 4:11 ` [Bug debug/14328] [3.3 " mmitchel at gcc dot gnu dot org
2004-03-02 13:47 ` cvs-commit at gcc dot gnu dot org
2004-03-02 13:51 ` gdr at gcc dot gnu dot org
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).