public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/23205] New: [C++] debug info omitted for global variables
@ 2005-08-02 18:43 dpatel at apple dot com
2005-08-02 19:02 ` [Bug c++/23205] [4.0/4.1 Regression] [C++/unit-at-a-time] stabs debug info omitted for global const variables pinskia at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 10+ messages in thread
From: dpatel at apple dot com @ 2005-08-02 18:43 UTC (permalink / raw)
To: gcc-bugs
GCC does not emit debug info for variable 'j' in following example, when stabs debugging format is
used.
const int j = 4;
int foo ()
{
return j + 1;
}
int main()
{
int i;
i = foo();
return i;
}
--
Summary: [C++] debug info omitted for global 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=23205
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/23205] [4.0/4.1 Regression] [C++/unit-at-a-time] stabs debug info omitted for global const variables
2005-08-02 18:43 [Bug debug/23205] New: [C++] debug info omitted for global variables dpatel at apple dot com
@ 2005-08-02 19:02 ` pinskia at gcc dot gnu dot org
2005-08-13 0:33 ` wilson at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-02 19:02 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-02 19:02 -------
I forgot to mention this works just fine for dwarf-2 because we emit the debug info even though the
variable is not emitted.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23205
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/23205] [4.0/4.1 Regression] [C++/unit-at-a-time] stabs debug info omitted for global const variables
2005-08-02 18:43 [Bug debug/23205] New: [C++] debug info omitted for global variables dpatel at apple dot com
2005-08-02 19:02 ` [Bug c++/23205] [4.0/4.1 Regression] [C++/unit-at-a-time] stabs debug info omitted for global const variables pinskia at gcc dot gnu dot org
@ 2005-08-13 0:33 ` wilson at gcc dot gnu dot org
2005-08-17 20:44 ` tomas dot vanek at fbl dot cz
` (3 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: wilson at gcc dot gnu dot org @ 2005-08-13 0:33 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From wilson at gcc dot gnu dot org 2005-08-13 00:33 -------
The problem here is the DECL_RTL_SET_P tests in dbxout_global_decl and
dbxout_symbol. Constants have a NULL DECL_RTL, and hence fail this test. This
is OK, because we don't use the DECL_RTL when emitting debug info for a
constant. However, everything else does need to have a valid DECL_RTL. It
looks like deleting the redundant test in dbxout_global_decl and repositioning
the test after the check for constants in dbxout_symbol case VAR_DECL would work.
Writing and testing the patch is left as an exercise for the reader.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23205
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/23205] [4.0/4.1 Regression] [C++/unit-at-a-time] stabs debug info omitted for global const variables
2005-08-02 18:43 [Bug debug/23205] New: [C++] debug info omitted for global variables dpatel at apple dot com
2005-08-02 19:02 ` [Bug c++/23205] [4.0/4.1 Regression] [C++/unit-at-a-time] stabs debug info omitted for global const variables pinskia at gcc dot gnu dot org
2005-08-13 0:33 ` wilson at gcc dot gnu dot org
@ 2005-08-17 20:44 ` tomas dot vanek at fbl dot cz
2005-08-17 21:08 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: tomas dot vanek at fbl dot cz @ 2005-08-17 20:44 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tomas dot vanek at fbl dot cz 2005-08-17 20:35 -------
It seems the same bug is in generating stabs for any global variable too.
Very easy test code var.c :-)
int var;
gcc -S -gstabs var.c
generates
.stabs "var:G(0,1)",32,0,0,0
gcc -S -gstabs -funit-at-a-time var.c
generates only .comm or .skip and does no stabs for the variable.
Tested i386 gcc 4.0.0 and cross avr-gcc 4.0.1.
Still to be left as an exercise for the reader?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23205
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/23205] [4.0/4.1 Regression] [C++/unit-at-a-time] stabs debug info omitted for global const variables
2005-08-02 18:43 [Bug debug/23205] New: [C++] debug info omitted for global variables dpatel at apple dot com
` (2 preceding siblings ...)
2005-08-17 20:44 ` tomas dot vanek at fbl dot cz
@ 2005-08-17 21:08 ` pinskia at gcc dot gnu dot org
2005-09-18 2:18 ` pinskia at gcc dot gnu dot org
2005-09-27 15:58 ` mmitchel at gcc dot gnu dot org
5 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-17 21:08 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-17 21:06 -------
(In reply to comment #5)
> Still to be left as an exercise for the reader?
That is a different bug, see PR 23190.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |tomas dot vanek at fbl dot
| |cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23205
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/23205] [4.0/4.1 Regression] [C++/unit-at-a-time] stabs debug info omitted for global const variables
2005-08-02 18:43 [Bug debug/23205] New: [C++] debug info omitted for global variables dpatel at apple dot com
` (3 preceding siblings ...)
2005-08-17 21:08 ` pinskia at gcc dot gnu dot org
@ 2005-09-18 2:18 ` pinskia at gcc dot gnu dot org
2005-09-27 15:58 ` mmitchel at gcc dot gnu dot org
5 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-18 2:18 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-18 02:18 -------
This is really a bug in the front-end where we don't keep a reference to j still.
--
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2005-08-02 18:57:31 |2005-09-18 02:18:32
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23205
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/23205] [4.0/4.1 Regression] [C++/unit-at-a-time] stabs debug info omitted for global const variables
2005-08-02 18:43 [Bug debug/23205] New: [C++] debug info omitted for global variables dpatel at apple dot com
` (4 preceding siblings ...)
2005-09-18 2:18 ` pinskia at gcc dot gnu dot org
@ 2005-09-27 15:58 ` mmitchel at gcc dot gnu dot org
5 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-09-27 15:58 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.0.2 |4.0.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23205
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2007-02-03 15:35 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-23205-690@http.gcc.gnu.org/bugzilla/>
2005-10-06 0:47 ` [Bug c++/23205] [4.0/4.1 Regression] [C++/unit-at-a-time] stabs debug info omitted for global const variables cvs-commit at gcc dot gnu dot org
2005-10-06 1:17 ` [Bug debug/23205] [4.0 " pinskia at gcc dot gnu dot org
2006-03-11 3:22 ` mmitchel at gcc dot gnu dot org
2007-02-03 15:35 ` gdr at gcc dot gnu dot org
2005-08-02 18:43 [Bug debug/23205] New: [C++] debug info omitted for global variables dpatel at apple dot com
2005-08-02 19:02 ` [Bug c++/23205] [4.0/4.1 Regression] [C++/unit-at-a-time] stabs debug info omitted for global const variables pinskia at gcc dot gnu dot org
2005-08-13 0:33 ` wilson at gcc dot gnu dot org
2005-08-17 20:44 ` tomas dot vanek at fbl dot cz
2005-08-17 21:08 ` pinskia at gcc dot gnu dot org
2005-09-18 2:18 ` pinskia at gcc dot gnu dot org
2005-09-27 15:58 ` mmitchel 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).