public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/12869] New: Bad stabs for bitsize fields
@ 2003-11-01 11:05 gcc at microbizz dot nl
2003-11-02 21:57 ` [Bug debug/12869] " pinskia at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 9+ messages in thread
From: gcc at microbizz dot nl @ 2003-11-01 11:05 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12869
Summary: Bad stabs for bitsize fields
Product: gcc
Version: 3.3.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: debug
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gcc at microbizz dot nl
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: powerpc-apple-darwin (and other platforms)
GCC host triplet: powerpc-apple-darwin (and other platforms)
GCC target triplet: powerpc-apple-darwin (and other platforms)
-gstabs+ generates bad stabs for bitsize fields.
-gstabs (without GNU extensions) does not have this problem.
Please note that on some platforms -gstabs+ is the default.
Consequently, -g and -ggdb will produce the same error.
Consider the following type definition, taken from the GNU Pascal runtime
library (time.pas)
const
DateTimeLength = 11; { MUST match constants.h }
type
DateTimeString = String (DateTimeLength);
GPC_TimeStamp = packed record
DateValid,
TimeValid : Boolean;
Year : Integer;
Month : 1 .. 12;
Day : 1 .. 31;
DayOfWeek : 0 .. 6; { 0 means Sunday }
Hour : 0 .. 23;
Minute : 0 .. 59;
Second : 0 .. 61; { to allow for leap seconds }
MicroSecond: 0 .. 999999;
TimeZone : Integer; { in seconds east of UTC }
DST : Boolean;
TZName1,
TZName2 : String (32);
end;
Through the runtime library, GPC_TimeStamp is included in the debug information
for hello.pas.
[G4:~/gnu/testgpc/adriaan] adriaan% gpc -v
Reading specs from
/Developer/Pascal/gpc332d1/lib/gcc-lib/powerpc-apple-darwin/3.3.2/specs
Configured with: ../gpc-332d1/configure --enable-languages=pascal,c
--prefix=/Developer/Pascal/gpc332d1 --enable-threads=posix
--target=powerpc-apple-darwin
Thread model: posix
gpc version 20030830, based on gcc-3.3.2
[G4:~/gnu/testgpc/adriaan] adriaan% gpc -c -o hello.o hello.pas -g
[G4:~/gnu/testgpc/adriaan] adriaan% objdump hello.o -g
hello.o: file format mach-o-be
Bad stab:
Datevalid:(0,5)=@s8;-16;,0,1;Timevalid:(0,5),1,1;Year:(0,1),2,32;Month:(0,6)=r(0,1);1;12;,34,4;Day:(0,7)=r(0,1);1;31;,38,5;Dayofweek:(0,8)=r(0,1);0;6;,43,3;Hour:(0,9)=r(0,1);0;23;,46,5;Minute:(0,10)=r(0,1);0;59;,51,6;Second:(0,11)=r(0,1);0;61;,57,6;Microsecond:(0,12)=r(0,1);0;999999;,63,20;Timezone:(0,1),83,32;Dst:(0,5),115,1;Tzname1:(0,13)=s44Capacity:(0,14)=r(0,14);0000000000000;0037777777777;,0,32;length:(0,14),32,32;_p_Schema_:(0,15)=ar(0,1);1;33;(0,2),64,264;;,128,352;Tzname2:(0,16)=s44Capacity:(0,14),0,32;length:(0,14),32,32;_p_Schema_:(0,17)=ar(0,1);1;33;(0,2),64,264;;,480,352;;
Last stabs entries before error:
n_type n_desc n_value string
SO 0 0000000000000000 /Users/adriaan/gnu/testgpc/adriaan/
SO 0 0000000000000000 hello.pas
OPT 0 0000000000000000 gcc2_compiled.
LSYM 0 0000000000000000 integer:t(0,1)=r(0,1);-2147483648;2147483647;
LSYM 0 0000000000000000 char:t(0,2)=@s8;-20;
LSYM 0 0000000000000000 Complex:t(0,3)=R4;16;0;
LSYM 0 0000000000000000
Timestamp:t(0,4)=s104Datevalid:(0,5)=@s8;-16;,0,1;Timevalid:(0,5),1,1;Year:(0,1),2,32;Month:(0,6)=r(0,1);1;12;,34,4;Day:(0,7)=r(0,1);1;31;,38,5;Dayofweek:(0,8)=r(0,1);0;6;,43,3;Hour:(0,9)=r(0,1);0;23;,46,5;Minute:(0,10)=r(0,1);0;59;,51,6;Second:(0,11)=r(0,1);0;61;,57,6;Microsecond:(0,12)=r(0,1);0;999999;,63,20;Timezone:(0,1),83,32;Dst:(0,5),115,1;Tzname1:(0,13)=s44Capacity:(0,14)=r(0,14);0000000000000;0037777777777;,0,32;length:(0,14),32,32;_p_Schema_:(0,15)=ar(0,1);1;33;(0,2),64,264;;,128,352;Tzname2:(0,16)=s44Capacity:(0,14),0,32;length:(0,14),32,32;_p_Schema_:(0,17)=ar(0,1);1;33;(0,2),64,264;;,480,352;;
...
The problem is the semicolon after "=@s8;-16" that should not be there.
Waldek Hebisch has provided a patch that solves the problem:
diff -ru gcc-3.3.2.orig/gcc/dbxout.c gcc-3.3.2/gcc/dbxout.c
--- gcc-3.3.2.orig/gcc/dbxout.c Fri Oct 31 21:23:40 2003
+++ gcc-3.3.2/gcc/dbxout.c Sat Nov 1 00:08:30 2003
@@ -1375,7 +1375,7 @@
fputs ("@s", asmfile);
CHARS (2);
print_wide_int (BITS_PER_UNIT * int_size_in_bytes (type));
- fputs (";-20;", asmfile);
+ fputs (";-20", asmfile);
CHARS (4);
}
else
@@ -1397,7 +1397,7 @@
fputs ("@s", asmfile);
CHARS (2);
print_wide_int (BITS_PER_UNIT * int_size_in_bytes (type));
- fputs (";-16;", asmfile);
+ fputs (";-16", asmfile);
CHARS (4);
}
else /* Define as enumeral type (False, True) */
Regards,
Adriaan van Os
www.microbizz.nl/gpc.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug debug/12869] Bad stabs for bitsize fields
2003-11-01 11:05 [Bug debug/12869] New: Bad stabs for bitsize fields gcc at microbizz dot nl
@ 2003-11-02 21:57 ` pinskia at gcc dot gnu dot org
2003-11-03 14:39 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-11-02 21:57 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12869
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-11-02 21:57 -------
Could you update the patch to the mainline and submit it gcc-patches@gcc.gnu.org with a
changelog?
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug debug/12869] Bad stabs for bitsize fields
2003-11-01 11:05 [Bug debug/12869] New: Bad stabs for bitsize fields gcc at microbizz dot nl
2003-11-02 21:57 ` [Bug debug/12869] " pinskia at gcc dot gnu dot org
@ 2003-11-03 14:39 ` pinskia at gcc dot gnu dot org
2004-05-21 23:35 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-11-03 14:39 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12869
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |patch
Last reconfirmed|0000-00-00 00:00:00 |2003-11-03 14:39:52
date| |
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-11-03 14:39 -------
The patch was posted here: <http://gcc.gnu.org/ml/gcc-patches/2003-11/msg00129.html>
.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug debug/12869] Bad stabs for bitsize fields
2003-11-01 11:05 [Bug debug/12869] New: Bad stabs for bitsize fields gcc at microbizz dot nl
2003-11-02 21:57 ` [Bug debug/12869] " pinskia at gcc dot gnu dot org
2003-11-03 14:39 ` pinskia at gcc dot gnu dot org
@ 2004-05-21 23:35 ` pinskia at gcc dot gnu dot org
2004-08-19 2:49 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-21 23:35 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-05-20 22:47 -------
Note darwin now supports dwarf2 (except you have to have a newer gdb).
--
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2003-11-03 14:39:52 |2004-05-20 22:47:47
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12869
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug debug/12869] Bad stabs for bitsize fields
2003-11-01 11:05 [Bug debug/12869] New: Bad stabs for bitsize fields gcc at microbizz dot nl
` (2 preceding siblings ...)
2004-05-21 23:35 ` pinskia at gcc dot gnu dot org
@ 2004-08-19 2:49 ` pinskia at gcc dot gnu dot org
2004-08-25 15:25 ` drow at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-19 2:49 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-08-19 02:49 -------
Actually I disagree with the patch as no other TYPE needs this patch, are you sure that this is not a gdb
problem? Also I will note that GPC cannot be compiled on the mainline at all where a bug fix would go
first so closing as invalid.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12869
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug debug/12869] Bad stabs for bitsize fields
2003-11-01 11:05 [Bug debug/12869] New: Bad stabs for bitsize fields gcc at microbizz dot nl
` (3 preceding siblings ...)
2004-08-19 2:49 ` pinskia at gcc dot gnu dot org
@ 2004-08-25 15:25 ` drow at gcc dot gnu dot org
2004-08-25 17:41 ` gcc at microbizz dot nl
2005-06-13 3:36 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 9+ messages in thread
From: drow at gcc dot gnu dot org @ 2004-08-25 15:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From drow at gcc dot gnu dot org 2004-08-25 15:25 -------
Andrew, that comment doesn't make any sense. The code only occurs for two
types, so of course no other type needs it.
The bad bit of stabs is:
Datevalid:(0,5)=@s8;-16;,0,1;Timevalid:(0,5),1,1;...
(0,5),1,1 is valid for a field. It's TYPENAME,BITOFFSET,BITLEN.
"@s8;-16" is a valid TYPENAME; the "@s8;" prefix is consumed
and the type is "-16". "@s8;-16;" is not a valid TYPENAME; types
do not end in a semicolon.
I'm sure you could reproduce this in some other language if you tried.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12869
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug debug/12869] Bad stabs for bitsize fields
2003-11-01 11:05 [Bug debug/12869] New: Bad stabs for bitsize fields gcc at microbizz dot nl
` (4 preceding siblings ...)
2004-08-25 15:25 ` drow at gcc dot gnu dot org
@ 2004-08-25 17:41 ` gcc at microbizz dot nl
2005-06-13 3:36 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 9+ messages in thread
From: gcc at microbizz dot nl @ 2004-08-25 17:41 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From gcc at microbizz dot nl 2004-08-25 17:41 -------
Subject: Re: Bad stabs for bitsize fields
Thanks Daniel for your additional comment.
I regret that the gpc compiler currently doesn't compile on the
mainline. Tree SSA has broken more than one frontend. We have to catch
up first. Once we have, it will be reproducable again in Pascal also.
Regards,
Adriaan van Os
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12869
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug debug/12869] Bad stabs for bitsize fields
2003-11-01 11:05 [Bug debug/12869] New: Bad stabs for bitsize fields gcc at microbizz dot nl
` (5 preceding siblings ...)
2004-08-25 17:41 ` gcc at microbizz dot nl
@ 2005-06-13 3:36 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-13 3:36 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12869
^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <bug-12869-4@http.gcc.gnu.org/bugzilla/>]
end of thread, other threads:[~2022-12-01 1:27 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-01 11:05 [Bug debug/12869] New: Bad stabs for bitsize fields gcc at microbizz dot nl
2003-11-02 21:57 ` [Bug debug/12869] " pinskia at gcc dot gnu dot org
2003-11-03 14:39 ` pinskia at gcc dot gnu dot org
2004-05-21 23:35 ` pinskia at gcc dot gnu dot org
2004-08-19 2:49 ` pinskia at gcc dot gnu dot org
2004-08-25 15:25 ` drow at gcc dot gnu dot org
2004-08-25 17:41 ` gcc at microbizz dot nl
2005-06-13 3:36 ` pinskia at gcc dot gnu dot org
[not found] <bug-12869-4@http.gcc.gnu.org/bugzilla/>
2022-12-01 1:27 ` pinskia at gcc dot gnu.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).