public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/21946] New: Invalid DWARF2 debug info emitted
@ 2005-06-07 8:40 jakub at gcc dot gnu dot org
2005-06-07 8:41 ` [Bug debug/21946] " jakub at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-06-07 8:40 UTC (permalink / raw)
To: gcc-bugs
On ppc32:
/* { dg-options "-m32 -O2 -g" } */
extern int m;
struct A { unsigned char a; };
struct B { void *b; };
extern struct B *fn (int x);
struct C { struct C *c; };
static unsigned char *d;
typedef int (*T) (struct C *, void *);
struct C *foo (struct C *, T, void *);
int fx (struct C *, void *);
static struct C *
bar (struct C *x, unsigned char y, unsigned char z)
{
unsigned char v[2] = { y, z };
return foo (x, fx, v);
}
struct C *
baz (struct A *x, long long int y)
{
struct B *b;
struct C *c;
long long int z;
if (!(m == 4 || m == 2))
return 0;
z = x->a;
b = fn (z);
if (!b)
return 0;
c = (struct C *) b->b;
if (!c)
return 0;
if (m == 2 && z >= 240)
z -= 240;
else if (d)
z = d[z];
if (z == 255)
return 0;
return bar (c->c, z, y);
}
emits:
emits in one range for the y variable (DImode, i.e. 2 hard registers):
.4byte .LVL0-.Ltext0 # Location list begin address (*.LLST2)
.4byte .LVL2-.Ltext0 # Location list end address (*.LLST2)
.2byte 0x6 # Location expression size
.byte 0x55 # DW_OP_reg5
.byte 0x93 # DW_OP_piece
.byte 0x4 # uleb128 0x4
.byte 0x56 # DW_OP_reg6
.byte 0x93 # DW_OP_piece
.byte 0x4 # uleb128 0x4
.4byte .LVL2-.Ltext0 # Location list begin address (*.LLST2)
.4byte .LVL3-.Ltext0 # Location list end address (*.LLST2)
.2byte 0xb # Location expression size
.byte 0x55 # DW_OP_reg5
.byte 0x93 # DW_OP_piece
.byte 0x4 # uleb128 0x4
.byte 0x56 # DW_OP_reg6
.byte 0x93 # DW_OP_piece
.byte 0x4 # uleb128 0x4
.byte 0x93 # DW_OP_piece
.byte 0x8 # uleb128 0x8
.byte 0x56 # DW_OP_reg6
.byte 0x93 # DW_OP_piece
.byte 0x4 # uleb128 0x4
...
Similar problems occur even on little-endian targets, although less often:
0xffffffff8014ebb0..0xffffffff8014ebc2 [ 0] fbreg 160
[ 3] piece 4
[ 5] fbreg 164
[ 8] piece 4
0xffffffff8014ebc2..0xffffffff8014ebc4 [ 0] fbreg 160
0xffffffff8014ebc4..0xffffffff8014ebd6 [ 0] fbreg 160
[ 3] piece 8 <-- BAD
[ 5] fbreg 164
[ 8] piece 4
(64-bit variable).
Not a regression, as -fvar-tracking is new in GCC 4.0, though one might say
that before we at least were not generating invalid debug info.
--
Summary: Invalid DWARF2 debug info emitted
Product: gcc
Version: 4.0.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: debug
AssignedTo: jakub at gcc dot gnu dot org
ReportedBy: jakub at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: ppc-linux, x86_64-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21946
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug debug/21946] Invalid DWARF2 debug info emitted
2005-06-07 8:40 [Bug debug/21946] New: Invalid DWARF2 debug info emitted jakub at gcc dot gnu dot org
@ 2005-06-07 8:41 ` jakub at gcc dot gnu dot org
2005-06-07 10:17 ` cvs-commit at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-06-07 8:41 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
URL| |http://gcc.gnu.org/ml/gcc-
| |patches/2005-
| |06/msg00312.html
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-06-07 08:41:52
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21946
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug debug/21946] Invalid DWARF2 debug info emitted
2005-06-07 8:40 [Bug debug/21946] New: Invalid DWARF2 debug info emitted jakub at gcc dot gnu dot org
2005-06-07 8:41 ` [Bug debug/21946] " jakub at gcc dot gnu dot org
@ 2005-06-07 10:17 ` cvs-commit at gcc dot gnu dot org
2005-06-07 15:20 ` [Bug debug/21946] [4.0 Regression] " pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-06-07 10:17 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-06-07 10:17 -------
Subject: Bug 21946
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: jakub@gcc.gnu.org 2005-06-07 10:17:36
Modified files:
gcc : ChangeLog dwarf2out.c var-tracking.c
Makefile.in
Log message:
PR debug/21946
* dwarf2out.c (add_loc_descr_op_piece): New function.
(multiple_reg_loc_descriptor, concat_loc_descriptor,
loc_descriptor): Use it.
* var-tracking.c: Include regs.h and expr.h.
(emit_note_insn_var_location): Skip over pieces where offset
is smaller than previous offset plus previous piece mode size.
Optimize adjacent hard registers or memory locations.
* Makefile.in (var-tracking.o): Depend on $(REGS_H) and $(EXPR_H).
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9065&r2=2.9066
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/dwarf2out.c.diff?cvsroot=gcc&r1=1.597&r2=1.598
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/var-tracking.c.diff?cvsroot=gcc&r1=2.28&r2=2.29
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/Makefile.in.diff?cvsroot=gcc&r1=1.1498&r2=1.1499
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21946
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug debug/21946] [4.0 Regression] Invalid DWARF2 debug info emitted
2005-06-07 8:40 [Bug debug/21946] New: Invalid DWARF2 debug info emitted jakub at gcc dot gnu dot org
2005-06-07 8:41 ` [Bug debug/21946] " jakub at gcc dot gnu dot org
2005-06-07 10:17 ` cvs-commit at gcc dot gnu dot org
@ 2005-06-07 15:20 ` pinskia at gcc dot gnu dot org
2005-06-08 7:49 ` cvs-commit at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-07 15:20 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-debug
Known to work| |4.1.0
Last reconfirmed|2005-06-07 08:41:52 |2005-06-07 15:20:16
date| |
Summary|Invalid DWARF2 debug info |[4.0 Regression] Invalid
|emitted |DWARF2 debug info emitted
Target Milestone|--- |4.0.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21946
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug debug/21946] [4.0 Regression] Invalid DWARF2 debug info emitted
2005-06-07 8:40 [Bug debug/21946] New: Invalid DWARF2 debug info emitted jakub at gcc dot gnu dot org
` (2 preceding siblings ...)
2005-06-07 15:20 ` [Bug debug/21946] [4.0 Regression] " pinskia at gcc dot gnu dot org
@ 2005-06-08 7:49 ` cvs-commit at gcc dot gnu dot org
2005-07-08 1:34 ` mmitchel at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-06-08 7:49 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-06-08 07:48 -------
Subject: Bug 21946
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: ebotcazou@gcc.gnu.org 2005-06-08 07:48:28
Modified files:
gcc : ChangeLog dwarf2out.c
Log message:
PR debug/21946
* dwarf2out.c (add_loc_descr_op_piece): Move to the
DWARF2_DEBUGGING_INFO section.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9086&r2=2.9087
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/dwarf2out.c.diff?cvsroot=gcc&r1=1.599&r2=1.600
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21946
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug debug/21946] [4.0 Regression] Invalid DWARF2 debug info emitted
2005-06-07 8:40 [Bug debug/21946] New: Invalid DWARF2 debug info emitted jakub at gcc dot gnu dot org
` (3 preceding siblings ...)
2005-06-08 7:49 ` cvs-commit at gcc dot gnu dot org
@ 2005-07-08 1:34 ` mmitchel at gcc dot gnu dot org
2005-07-09 8:46 ` cvs-commit at gcc dot gnu dot org
2005-07-09 15:28 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-07-08 1:34 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.0.1 |4.0.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21946
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug debug/21946] [4.0 Regression] Invalid DWARF2 debug info emitted
2005-06-07 8:40 [Bug debug/21946] New: Invalid DWARF2 debug info emitted jakub at gcc dot gnu dot org
` (4 preceding siblings ...)
2005-07-08 1:34 ` mmitchel at gcc dot gnu dot org
@ 2005-07-09 8:46 ` cvs-commit at gcc dot gnu dot org
2005-07-09 15:28 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-07-09 8:46 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-07-09 08:44 -------
Subject: Bug 21946
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-4_0-branch
Changes by: jakub@gcc.gnu.org 2005-07-09 08:44:27
Modified files:
gcc : ChangeLog Makefile.in dwarf2out.c
var-tracking.c
Log message:
Backport from the mainline:
2005-06-08 Eric Botcazou <ebotcazou@libertysurf.fr>
PR debug/21946
* dwarf2out.c (add_loc_descr_op_piece): Move to the
DWARF2_DEBUGGING_INFO section.
2005-06-07 Jakub Jelinek <jakub@redhat.com>
PR debug/21946
* dwarf2out.c (add_loc_descr_op_piece): New function.
(multiple_reg_loc_descriptor, concat_loc_descriptor,
loc_descriptor): Use it.
* var-tracking.c: Include regs.h and expr.h.
(emit_note_insn_var_location): Skip over pieces where offset
is smaller than previous offset plus previous piece mode size.
Optimize adjacent hard registers or memory locations.
* Makefile.in (var-tracking.o): Depend on $(REGS_H) and $(EXPR_H).
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.7592.2.306&r2=2.7592.2.307
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/Makefile.in.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.1447.2.1&r2=1.1447.2.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/dwarf2out.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.570.2.8&r2=1.570.2.9
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/var-tracking.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.26&r2=2.26.10.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21946
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug debug/21946] [4.0 Regression] Invalid DWARF2 debug info emitted
2005-06-07 8:40 [Bug debug/21946] New: Invalid DWARF2 debug info emitted jakub at gcc dot gnu dot org
` (5 preceding siblings ...)
2005-07-09 8:46 ` cvs-commit at gcc dot gnu dot org
@ 2005-07-09 15:28 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-09 15:28 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-09 15:13 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21946
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2005-07-09 15:13 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-07 8:40 [Bug debug/21946] New: Invalid DWARF2 debug info emitted jakub at gcc dot gnu dot org
2005-06-07 8:41 ` [Bug debug/21946] " jakub at gcc dot gnu dot org
2005-06-07 10:17 ` cvs-commit at gcc dot gnu dot org
2005-06-07 15:20 ` [Bug debug/21946] [4.0 Regression] " pinskia at gcc dot gnu dot org
2005-06-08 7:49 ` cvs-commit at gcc dot gnu dot org
2005-07-08 1:34 ` mmitchel at gcc dot gnu dot org
2005-07-09 8:46 ` cvs-commit at gcc dot gnu dot org
2005-07-09 15:28 ` pinskia 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).