public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/23190] New: debug info omitted for uninitialized variables
@ 2005-08-02  0:34 dpatel at apple dot com
  2005-08-02  0:37 ` [Bug debug/23190] [4.0/4.1 Regression] debug info omitted for uninitialized variables (stabs) pinskia at gcc dot gnu dot org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: dpatel at apple dot com @ 2005-08-02  0:34 UTC (permalink / raw)
  To: gcc-bugs

$ cat t.c
static int foo;
int bar;
int main(void)
{
   foo += 3;
   bar *= 5;
   return 0;
}

$ xgcc -g  -O2 -o t t.c
$ cat gdbcmds
b main
ptype foo
ptype bar
p foo
p bar
$ gdb --batch -x gdbcmds t
Reading symbols for shared libraries ... done
Breakpoint 1 at 0x2d14: file t.c, line 6.
type = <unknown type>
type = <unknown type>
$1 = <unknown type>
$2 = <unknown type>

[ This was discussed in PR 21828 ]
>On Jul 22, 2005, at 4:43 PM, mark at codesourcery dot com wrote:
>
>First, your example was not the one in the original bug report.
>
>Second, you're using STABS, not DWARF-2.  I suspect the stabs debug 
>generator, or the GDB stabs reader is not as good as DWARF.
>
>On GNU/Linux, GDB knows that "bar" has type "int".  It still doesn't 
>know the type of "foo"; apparently too much of the debug information is 
>optimized away.  But, that's some other problem -- perhaps in GDB 
>itself.  The information is clearly there for it:
>
>        .uleb128 0x2    # (DIE (0x2d) DW_TAG_variable)
>         .ascii "foo\0"  # DW_AT_name
>         .byte   0x1     # DW_AT_decl_file
>         .byte   0x1     # DW_AT_decl_line
>         .long   0x38    # DW_AT_type
>         .uleb128 0x3    # (DIE (0x38) DW_TAG_base_type)
>         .ascii "int\0"  # DW_AT_name
>         .byte   0x4     # DW_AT_byte_size
>        .byte   0x5     # DW_AT_encoding


It seems this is related to order of cgraph_optimize() and writing globals. If globals are wrapped up 
before emitting code then debug info. is not emitted for uninitialized globals, because DECL_RTL is not 
set. C++ FE writes globals before doing cgraph_optimize(), but C FE optimizes first. This is why this is 
C specific only. This patch fixes this but it causes varpool-1.c test failure. With this patch, GDB know 
about foo as well as bar when DWARF is used.


Index: c-decl.c
===============================================================
====
RCS file: /cvs/gcc/gcc/gcc/c-decl.c,v
retrieving revision 1.677
diff -Idpatel.pbxuser -c -3 -p -r1.677 c-decl.c
*** c-decl.c    19 Jul 2005 20:19:09 -0000      1.677
--- c-decl.c    28 Jul 2005 19:22:47 -0000
*************** tree c_cont_label;
*** 131,136 ****
--- 131,139 ----
  
  static GTY(()) tree all_translation_units;
  
+ /* Outermost block. */
+ static GTY(()) tree ext_block;
+ 
  /* A list of decls to be made automatically visible in each file scope.  */
  static GTY(()) tree visible_builtins;
  
*************** c_write_global_declarations_1 (tree glob
*** 7570,7576 ****
  void
  c_write_global_declarations (void)
  {
!   tree ext_block, t;
  
    /* We don't want to do this if generating a PCH.  */
    if (pch_file)
--- 7573,7579 ----
  void
  c_write_global_declarations (void)
  {
!   tree t;
  
    /* We don't want to do this if generating a PCH.  */
    if (pch_file)
*************** c_write_global_declarations (void)
*** 7586,7591 ****
--- 7589,7598 ----
    external_scope = 0;
    gcc_assert (!current_scope);
  
+   /* We're done parsing; proceed to optimize and emit assembly.
+      FIXME: shouldn't be the front end's responsibility to call this.  */
+   cgraph_optimize ();
+ 
    /* Process all file scopes in this compilation, and the external_scope,
       through wrapup_global_declarations and check_global_declarations.  */
    for (t = all_translation_units; t; t = TREE_CHAIN (t))
*************** c_write_global_declarations (void)
*** 7608,7617 ****
       functions have magic names which are detected by collect2.  */
    build_cdtor ('I', static_ctors); static_ctors = 0;
    build_cdtor ('D', static_dtors); static_dtors = 0;
- 
-   /* We're done parsing; proceed to optimize and emit assembly.
-      FIXME: shouldn't be the front end's responsibility to call this.  */
-   cgraph_optimize ();
  }
  
  #include "gt-c-decl.h"
--- 7615,7620 ----

-- 
           Summary: debug info omitted for uninitialized variables
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dpatel at apple dot com
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23190


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug debug/23190] [4.0/4.1 Regression] debug info omitted for uninitialized variables (stabs)
  2005-08-02  0:34 [Bug debug/23190] New: debug info omitted for uninitialized variables dpatel at apple dot com
@ 2005-08-02  0:37 ` pinskia at gcc dot gnu dot org
  2005-08-02  0:41 ` pinskia at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-02  0:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-08-02 00:37 -------
Confirmed, this makes hard to debug on powerpc-darwin and powerpc-aix.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org, mmitchel at gcc dot gnu
                   |                            |dot org
           Severity|normal                      |critical
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |wrong-debug
   Last reconfirmed|0000-00-00 00:00:00         |2005-08-02 00:37:12
               date|                            |
            Summary|debug info omitted for      |[4.0/4.1 Regression] debug
                   |uninitialized variables     |info omitted for
                   |                            |uninitialized variables
                   |                            |(stabs)
   Target Milestone|---                         |4.0.2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23190


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug debug/23190] [4.0/4.1 Regression] debug info omitted for uninitialized variables (stabs)
  2005-08-02  0:34 [Bug debug/23190] New: debug info omitted for uninitialized variables dpatel at apple dot com
  2005-08-02  0:37 ` [Bug debug/23190] [4.0/4.1 Regression] debug info omitted for uninitialized variables (stabs) pinskia at gcc dot gnu dot org
@ 2005-08-02  0:41 ` pinskia at gcc dot gnu dot org
  2005-08-02  0:42 ` pinskia at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-02  0:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-08-02 00:40 -------
It is obvious the debug info is not being outputted for stabs.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23190


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug debug/23190] [4.0/4.1 Regression] debug info omitted for uninitialized variables (stabs)
  2005-08-02  0:34 [Bug debug/23190] New: debug info omitted for uninitialized variables dpatel at apple dot com
  2005-08-02  0:37 ` [Bug debug/23190] [4.0/4.1 Regression] debug info omitted for uninitialized variables (stabs) pinskia at gcc dot gnu dot org
  2005-08-02  0:41 ` pinskia at gcc dot gnu dot org
@ 2005-08-02  0:42 ` pinskia at gcc dot gnu dot org
  2005-08-02  3:25 ` mark at codesourcery dot com
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-02  0:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-08-02 00:42 -------
Actually the PR 21828 was orginally about stabs and not about dwarf-2:
"When using gdb-309 and gdb-370 on MacOS X 10.3.9, even the simplest queries seem broken." so 
really PR 21828 should never been closed until the stabs problem was fixed.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23190


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug debug/23190] [4.0/4.1 Regression] debug info omitted for uninitialized variables (stabs)
  2005-08-02  0:34 [Bug debug/23190] New: debug info omitted for uninitialized variables dpatel at apple dot com
                   ` (2 preceding siblings ...)
  2005-08-02  0:42 ` pinskia at gcc dot gnu dot org
@ 2005-08-02  3:25 ` mark at codesourcery dot com
  2005-08-02 16:52 ` dpatel at apple dot com
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: mark at codesourcery dot com @ 2005-08-02  3:25 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mark at codesourcery dot com  2005-08-02 03:25 -------
Subject: Re:  [4.0/4.1 Regression] debug info omitted for
 uninitialized variables (stabs)

pinskia at gcc dot gnu dot org wrote:
> ------- Additional Comments From pinskia at gcc dot gnu dot org  2005-08-02 00:42 -------
> Actually the PR 21828 was orginally about stabs and not about dwarf-2:
> "When using gdb-309 and gdb-370 on MacOS X 10.3.9, even the simplest queries seem broken." so 
> really PR 21828 should never been closed until the stabs problem was fixed.

Then the test case in the PR (which you provided) should not have used 
DWARF-2.  I rely on the bugmasters to reduce bugs -- and they do a great 
job.

In any case, the problem is now either in the C front end or in the DBX 
generator.  Since the DWARF-2 generators do something reasonable, 
AFAICT, I would guess the problem is in either the DBX generator, or the 
  GDB reader for STABS, or in the STABS format itself.



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23190


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug debug/23190] [4.0/4.1 Regression] debug info omitted for uninitialized variables (stabs)
  2005-08-02  0:34 [Bug debug/23190] New: debug info omitted for uninitialized variables dpatel at apple dot com
                   ` (3 preceding siblings ...)
  2005-08-02  3:25 ` mark at codesourcery dot com
@ 2005-08-02 16:52 ` dpatel at apple dot com
  2005-08-02 17:01 ` mmitchel at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: dpatel at apple dot com @ 2005-08-02 16:52 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dpatel at apple dot com  2005-08-02 16:52 -------
Subject: Re:  [4.0/4.1 Regression] debug info omitted for uninitialized variables (stabs)


On Aug 1, 2005, at 8:25 PM, mark at codesourcery dot com wrote:

> In any case, the problem is now either in the C front end or in the  
> DBX
> generator.  Since the DWARF-2 generators do something reasonable,
> AFAICT, I would guess the problem is in either the DBX generator,  
> or the
>   GDB reader for STABS, or in the STABS format itself.

This does not look like STABS or DWARF-2 specific. Right now it
does work even in DWARF-2 mode also. With the attached patch it DWARF-2
also works.

GCC Mainline ===

Using stabs ===
Reading symbols for shared libraries .. done
Breakpoint 1 at 0x1d9c: file /tmp/t.c, line 6.
type = <unknown type>
type = <unknown type>
$1 = <unknown type>
$2 = <unknown type>

Using DWARF ===
Reading symbols for shared libraries .. done
Breakpoint 1 at 0x2d04: file /tmp/t.c, line 6.
type = <unknown type>
type = int
$1 = <unknown type>
$2 = 0

GCC Mainline with fix===

Using stabs ===
Reading symbols for shared libraries .. done
Breakpoint 1 at 0x1d9c: file /tmp/t.c, line 6.
type = int
type = int
$1 = 0
$2 = 0

Using DWARF ===
Reading symbols for shared libraries .. done
Breakpoint 1 at 0x2d04: file /tmp/t.c, line 6.
type = int
type = int
$1 = 0
$2 = 0


-
Devang



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23190


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug debug/23190] [4.0/4.1 Regression] debug info omitted for uninitialized variables (stabs)
  2005-08-02  0:34 [Bug debug/23190] New: debug info omitted for uninitialized variables dpatel at apple dot com
                   ` (4 preceding siblings ...)
  2005-08-02 16:52 ` dpatel at apple dot com
@ 2005-08-02 17:01 ` mmitchel at gcc dot gnu dot org
  2005-08-02 17:12 ` dpatel at apple dot com
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-08-02 17:01 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2005-08-02 17:00 -------
Devang --

The DWARF-2 information looks correct to me, from the section of DWARF-2 code
that you posted in the original report for this bug.  I know GDB doesn't print
the variable, but I don't think that's the compiler's fault; the information
looks OK.  Is there something wrong with the DWARF-2 generated, or is this just
a GDB bug?

I'm not oppposed to making the kind of change you're proposing for the C front
end; I suggested the same thing.  But, it is a complex change; as you've noted,
there are regressions when you try it.

-- Mark

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23190


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug debug/23190] [4.0/4.1 Regression] debug info omitted for uninitialized variables (stabs)
  2005-08-02  0:34 [Bug debug/23190] New: debug info omitted for uninitialized variables dpatel at apple dot com
                   ` (5 preceding siblings ...)
  2005-08-02 17:01 ` mmitchel at gcc dot gnu dot org
@ 2005-08-02 17:12 ` dpatel at apple dot com
  2005-08-02 17:16 ` mark at codesourcery dot com
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: dpatel at apple dot com @ 2005-08-02 17:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dpatel at apple dot com  2005-08-02 17:12 -------
Subject: Re:  [4.0/4.1 Regression] debug info omitted for uninitialized variables (stabs)


On Aug 2, 2005, at 10:00 AM, mmitchel at gcc dot gnu dot org wrote:

>
> ------- Additional Comments From mmitchel at gcc dot gnu dot org   
> 2005-08-02 17:00 -------
> Devang --
>
> The DWARF-2 information looks correct to me, from the section of  
> DWARF-2 code
> that you posted in the original report for this bug.  I know GDB  
> doesn't print
> the variable, but I don't think that's the compiler's fault; the  
> information
> looks OK.  Is there something wrong with the DWARF-2 generated, or  
> is this just
> a GDB bug?

Without the patch, GCC does not emit DW_OP_addr and DW_AT_location.

> I'm not oppposed to making the kind of change you're proposing for  
> the C front
> end; I suggested the same thing.  But, it is a complex change; as  
> you've noted,
> there are regressions when you try it.

There is only one regression. One way to avoid it is to split  
wrapup_global...
in two halves. One to emit code and second to generate debug info.  
This allows
C front end to put cgraph_optimize() after writing globals but before
generating debug info.

thoughts ?
-
Devang



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23190


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug debug/23190] [4.0/4.1 Regression] debug info omitted for uninitialized variables (stabs)
  2005-08-02  0:34 [Bug debug/23190] New: debug info omitted for uninitialized variables dpatel at apple dot com
                   ` (6 preceding siblings ...)
  2005-08-02 17:12 ` dpatel at apple dot com
@ 2005-08-02 17:16 ` mark at codesourcery dot com
  2005-08-02 17:21 ` dpatel at apple dot com
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: mark at codesourcery dot com @ 2005-08-02 17:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mark at codesourcery dot com  2005-08-02 17:16 -------
Subject: Re:  [4.0/4.1 Regression] debug info omitted for
 uninitialized variables (stabs)

dpatel at apple dot com wrote:
> ------- Additional Comments From dpatel at apple dot com  2005-08-02 17:12 -------
> Subject: Re:  [4.0/4.1 Regression] debug info omitted for uninitialized variables (stabs)
> 
> 
> On Aug 2, 2005, at 10:00 AM, mmitchel at gcc dot gnu dot org wrote:
> 
> 
>>------- Additional Comments From mmitchel at gcc dot gnu dot org   
>>2005-08-02 17:00 -------
>>Devang --
>>
>>The DWARF-2 information looks correct to me, from the section of  
>>DWARF-2 code
>>that you posted in the original report for this bug.  I know GDB  
>>doesn't print
>>the variable, but I don't think that's the compiler's fault; the  
>>information
>>looks OK.  Is there something wrong with the DWARF-2 generated, or  
>>is this just
>>a GDB bug?
> 
> 
> Without the patch, GCC does not emit DW_OP_addr and DW_AT_location.

Yes -- but that's no excuse for GDB not being able to show us the type!

> There is only one regression. One way to avoid it is to split  
> wrapup_global...
> in two halves. One to emit code and second to generate debug info.  
> This allows
> C front end to put cgraph_optimize() after writing globals but before
> generating debug info.

It sounds sensible enough, but I really haven't studied how the C front 
end does things well enough to know for sure.  I would ask Joseph and RTH.



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23190


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug debug/23190] [4.0/4.1 Regression] debug info omitted for uninitialized variables (stabs)
  2005-08-02  0:34 [Bug debug/23190] New: debug info omitted for uninitialized variables dpatel at apple dot com
                   ` (7 preceding siblings ...)
  2005-08-02 17:16 ` mark at codesourcery dot com
@ 2005-08-02 17:21 ` dpatel at apple dot com
  2005-09-08  2:39 ` rth at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: dpatel at apple dot com @ 2005-08-02 17:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dpatel at apple dot com  2005-08-02 17:21 -------
Subject: Re:  [4.0/4.1 Regression] debug info omitted for uninitialized variables (stabs)


On Aug 2, 2005, at 10:16 AM, mark at codesourcery dot com wrote:

> It sounds sensible enough, but I really haven't studied how the C  
> front
> end does things well enough to know for sure.  I would ask Joseph  
> and RTH.

OK.




-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23190


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug debug/23190] [4.0/4.1 Regression] debug info omitted for uninitialized variables (stabs)
  2005-08-02  0:34 [Bug debug/23190] New: debug info omitted for uninitialized variables dpatel at apple dot com
                   ` (8 preceding siblings ...)
  2005-08-02 17:21 ` dpatel at apple dot com
@ 2005-09-08  2:39 ` rth at gcc dot gnu dot org
  2005-09-08  2:42 ` rth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: rth at gcc dot gnu dot org @ 2005-09-08  2:39 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rth at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2005-08-02 00:37:12         |2005-09-08 02:39:32
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23190


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug debug/23190] [4.0/4.1 Regression] debug info omitted for uninitialized variables (stabs)
  2005-08-02  0:34 [Bug debug/23190] New: debug info omitted for uninitialized variables dpatel at apple dot com
                   ` (9 preceding siblings ...)
  2005-09-08  2:39 ` rth at gcc dot gnu dot org
@ 2005-09-08  2:42 ` rth at gcc dot gnu dot org
  2005-09-09  0:47 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: rth at gcc dot gnu dot org @ 2005-09-08  2:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rth at gcc dot gnu dot org  2005-09-08 02:42 -------
A more severe example is gdb.base/call-ar-st.c wherein the local static variable
"double_array" is not put to the debug info at all.  Not even its name as in the
example here.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23190


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug debug/23190] [4.0/4.1 Regression] debug info omitted for uninitialized variables (stabs)
  2005-08-02  0:34 [Bug debug/23190] New: debug info omitted for uninitialized variables dpatel at apple dot com
                   ` (10 preceding siblings ...)
  2005-09-08  2:42 ` rth at gcc dot gnu dot org
@ 2005-09-09  0:47 ` cvs-commit at gcc dot gnu dot org
  2005-09-09  0:52 ` cvs-commit at gcc dot gnu dot org
  2005-09-09  1:08 ` rth at gcc dot gnu dot org
  13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-09-09  0:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-09-09 00:47 -------
Subject: Bug 23190

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	rth@gcc.gnu.org	2005-09-09 00:47:05

Modified files:
	gcc            : ChangeLog c-decl.c cgraphunit.c langhooks.c 
	                 passes.c toplev.c toplev.h 
	gcc/cp         : ChangeLog decl.c decl2.c 
Added files:
	gcc/testsuite/gcc.dg/debug: 20050907-1.c 
	gcc/testsuite/gcc.dg/debug/dwarf2: var1.c var2.c 

Log message:
	PR debug/23190
	* toplev.c (wrapup_global_declaration_1): Split out ...
	(wrapup_global_declaration_2): ... from ...
	(wrapup_global_declarations): ... here.  Return bool.
	(check_global_declaration_1): Split out ...
	(check_global_declarations): from here.
	(emit_debug_global_declarations): New.
	* toplev.h (wrapup_global_declaration_1, wrapup_global_declaration_2,
	check_global_declaration_1, emit_debug_global_declarations): Declare.
	* c-decl.c (c_write_global_declarations_1): Don't create a vector
	of decls.  Call wrapup_global_declaration_1,
	wrapup_global_declaration_2, check_global_declaration_1 directly.
	(c_write_global_declarations_2): New.
	(ext_block): New.
	(c_write_global_declarations): Call c_write_global_declarations_2.
	* langhooks.c (write_global_declarations): Call
	emit_debug_global_declarations.
	* cgraphunit.c (cgraph_varpool_remove_unreferenced_decls): Don't
	remove decls that have DECL_RTL_SET_P.
	* passes.c (rest_of_decl_compilation): Invoke
	cgraph_varpool_finalize_decl for all but functions.
	cp/
	* decl.c (wrapup_globals_for_namespace): Call
	emit_debug_global_declarations.
	* decl2.c (cp_finish_file): Likewise.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9920&r2=2.9921
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-decl.c.diff?cvsroot=gcc&r1=1.683&r2=1.684
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cgraphunit.c.diff?cvsroot=gcc&r1=1.127&r2=1.128
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/langhooks.c.diff?cvsroot=gcc&r1=1.84&r2=1.85
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/passes.c.diff?cvsroot=gcc&r1=2.110&r2=2.111
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/toplev.c.diff?cvsroot=gcc&r1=1.974&r2=1.975
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/toplev.h.diff?cvsroot=gcc&r1=1.141&r2=1.142
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4879&r2=1.4880
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&r1=1.1423&r2=1.1424
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl2.c.diff?cvsroot=gcc&r1=1.798&r2=1.799
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/debug/20050907-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/debug/dwarf2/var1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/debug/dwarf2/var2.c.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23190


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug debug/23190] [4.0/4.1 Regression] debug info omitted for uninitialized variables (stabs)
  2005-08-02  0:34 [Bug debug/23190] New: debug info omitted for uninitialized variables dpatel at apple dot com
                   ` (11 preceding siblings ...)
  2005-09-09  0:47 ` cvs-commit at gcc dot gnu dot org
@ 2005-09-09  0:52 ` cvs-commit at gcc dot gnu dot org
  2005-09-09  1:08 ` rth at gcc dot gnu dot org
  13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-09-09  0:52 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-09-09 00:52 -------
Subject: Bug 23190

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	rth@gcc.gnu.org	2005-09-09 00:51:59

Modified files:
	gcc            : ChangeLog c-decl.c langhooks.c toplev.c 
	                 toplev.h 
	gcc/cp         : ChangeLog decl.c decl2.c 
Added files:
	gcc/testsuite/gcc.dg/debug: 20050907-1.c 
	gcc/testsuite/gcc.dg/debug/dwarf2: var1.c var2.c 

Log message:
	PR debug/23190
	* toplev.c (wrapup_global_declaration_1): Split out ...
	(wrapup_global_declaration_2): ... from ...
	(wrapup_global_declarations): ... here.  Return bool.
	(check_global_declaration_1): Split out ...
	(check_global_declarations): from here.
	(emit_debug_global_declarations): New.
	* toplev.h (wrapup_global_declaration_1, wrapup_global_declaration_2,
	check_global_declaration_1, emit_debug_global_declarations): Declare.
	* c-decl.c (c_write_global_declarations_1): Don't create a vector
	of decls.  Call wrapup_global_declaration_1,
	wrapup_global_declaration_2, check_global_declaration_1 directly.
	(c_write_global_declarations_2): New.
	(ext_block): New.
	(c_write_global_declarations): Call c_write_global_declarations_2.
	* langhooks.c (write_global_declarations): Call
	emit_debug_global_declarations.
	cp/
	* decl.c (wrapup_globals_for_namespace): Call
	emit_debug_global_declarations.
	* decl2.c (cp_finish_file): Likewise.

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.420&r2=2.7592.2.421
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-decl.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.630.6.17&r2=1.630.6.18
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/langhooks.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.81.2.1&r2=1.81.2.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/toplev.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.944.2.5&r2=1.944.2.6
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/toplev.h.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.133&r2=1.133.8.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.4648.2.96&r2=1.4648.2.97
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.1371.2.21&r2=1.1371.2.22
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl2.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.770.2.6&r2=1.770.2.7
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/debug/20050907-1.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/debug/dwarf2/var1.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/debug/dwarf2/var2.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23190


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug debug/23190] [4.0/4.1 Regression] debug info omitted for uninitialized variables (stabs)
  2005-08-02  0:34 [Bug debug/23190] New: debug info omitted for uninitialized variables dpatel at apple dot com
                   ` (12 preceding siblings ...)
  2005-09-09  0:52 ` cvs-commit at gcc dot gnu dot org
@ 2005-09-09  1:08 ` rth at gcc dot gnu dot org
  13 siblings, 0 replies; 15+ messages in thread
From: rth at gcc dot gnu dot org @ 2005-09-09  1:08 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rth at gcc dot gnu dot org  2005-09-09 01:08 -------
Fixed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23190


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2005-09-09  1:08 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-02  0:34 [Bug debug/23190] New: debug info omitted for uninitialized variables dpatel at apple dot com
2005-08-02  0:37 ` [Bug debug/23190] [4.0/4.1 Regression] debug info omitted for uninitialized variables (stabs) pinskia at gcc dot gnu dot org
2005-08-02  0:41 ` pinskia at gcc dot gnu dot org
2005-08-02  0:42 ` pinskia at gcc dot gnu dot org
2005-08-02  3:25 ` mark at codesourcery dot com
2005-08-02 16:52 ` dpatel at apple dot com
2005-08-02 17:01 ` mmitchel at gcc dot gnu dot org
2005-08-02 17:12 ` dpatel at apple dot com
2005-08-02 17:16 ` mark at codesourcery dot com
2005-08-02 17:21 ` dpatel at apple dot com
2005-09-08  2:39 ` rth at gcc dot gnu dot org
2005-09-08  2:42 ` rth at gcc dot gnu dot org
2005-09-09  0:47 ` cvs-commit at gcc dot gnu dot org
2005-09-09  0:52 ` cvs-commit at gcc dot gnu dot org
2005-09-09  1:08 ` rth 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).