public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/41736] missing DW_TAG_template_*_ in some cases
2009-10-17 8:00 [Bug debug/41736] New: missing DW_TAG_template_*_ in some cases dodji at gcc dot gnu dot org
@ 2009-10-17 8:00 ` dodji at gcc dot gnu dot org
2009-10-17 11:42 ` dodji at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 12+ messages in thread
From: dodji at gcc dot gnu dot org @ 2009-10-17 8:00 UTC (permalink / raw)
To: gcc-bugs
--
dodji at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |dodji at gcc dot gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-10-17 08:00:00
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41736
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug debug/41736] New: missing DW_TAG_template_*_ in some cases
@ 2009-10-17 8:00 dodji at gcc dot gnu dot org
2009-10-17 8:00 ` [Bug debug/41736] " dodji at gcc dot gnu dot org
` (4 more replies)
0 siblings, 5 replies; 12+ messages in thread
From: dodji at gcc dot gnu dot org @ 2009-10-17 8:00 UTC (permalink / raw)
To: gcc-bugs
Consider the short snippet:
template <int I> struct S {};
S<2> *s = 0;
The debug info generated for the S<2> type looks like:
~=~
.uleb128 0x2 # (DIE (0x2d) DW_TAG_structure_type)
.long .LASF3 # DW_AT_name: "S<2>"
.byte 0x1 # DW_AT_declaration
~=~
There is no DW_TAG_template_value_param generated for it, for instance.
--
Summary: missing DW_TAG_template_*_ in some cases
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: debug
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dodji at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41736
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug debug/41736] missing DW_TAG_template_*_ in some cases
2009-10-17 8:00 [Bug debug/41736] New: missing DW_TAG_template_*_ in some cases dodji at gcc dot gnu dot org
2009-10-17 8:00 ` [Bug debug/41736] " dodji at gcc dot gnu dot org
@ 2009-10-17 11:42 ` dodji at gcc dot gnu dot org
2009-10-21 13:10 ` dodji at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 12+ messages in thread
From: dodji at gcc dot gnu dot org @ 2009-10-17 11:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from dodji at gcc dot gnu dot org 2009-10-17 11:41 -------
Patch sent to http://gcc.gnu.org/ml/gcc-patches/2009-10/msg01126.html .
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41736
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug debug/41736] missing DW_TAG_template_*_ in some cases
2009-10-17 8:00 [Bug debug/41736] New: missing DW_TAG_template_*_ in some cases dodji at gcc dot gnu dot org
2009-10-17 8:00 ` [Bug debug/41736] " dodji at gcc dot gnu dot org
2009-10-17 11:42 ` dodji at gcc dot gnu dot org
@ 2009-10-21 13:10 ` dodji at gcc dot gnu dot org
2010-07-21 15:20 ` tromey at gcc dot gnu dot org
2010-08-31 18:34 ` tromey at gcc dot gnu dot org
4 siblings, 0 replies; 12+ messages in thread
From: dodji at gcc dot gnu dot org @ 2009-10-21 13:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from dodji at gcc dot gnu dot org 2009-10-21 13:10 -------
Created an attachment (id=18857)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18857&action=view)
Enhanced patch
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41736
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug debug/41736] missing DW_TAG_template_*_ in some cases
2009-10-17 8:00 [Bug debug/41736] New: missing DW_TAG_template_*_ in some cases dodji at gcc dot gnu dot org
` (2 preceding siblings ...)
2009-10-21 13:10 ` dodji at gcc dot gnu dot org
@ 2010-07-21 15:20 ` tromey at gcc dot gnu dot org
2010-08-31 18:34 ` tromey at gcc dot gnu dot org
4 siblings, 0 replies; 12+ messages in thread
From: tromey at gcc dot gnu dot org @ 2010-07-21 15:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from tromey at gcc dot gnu dot org 2010-07-21 15:19 -------
The ordinary cases work fine with svn trunk gcc.
However, member pointers still don't have all the info emitted.
Consider this test case:
struct S { int f; };
template<int S::*MP> struct T { };
T<&S::f> v;
For v's type, I just see:
<2><4f>: Abbrev Number: 6 (DW_TAG_template_value_param)
<50> DW_AT_name : MP
<53> DW_AT_type : <0x58>
That is, this parameter has no value.
--
tromey at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41736
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug debug/41736] missing DW_TAG_template_*_ in some cases
2009-10-17 8:00 [Bug debug/41736] New: missing DW_TAG_template_*_ in some cases dodji at gcc dot gnu dot org
` (3 preceding siblings ...)
2010-07-21 15:20 ` tromey at gcc dot gnu dot org
@ 2010-08-31 18:34 ` tromey at gcc dot gnu dot org
4 siblings, 0 replies; 12+ messages in thread
From: tromey at gcc dot gnu dot org @ 2010-08-31 18:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from tromey at gcc dot gnu dot org 2010-08-31 18:33 -------
Created an attachment (id=21610)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21610&action=view)
a simple test case
I'm attaching "temargs.cc", a simple test case from the gdb test suite.
I compiled this with today's svn trunk gcc.
When I dump the resulting DWARF I see good results for Base<double, ...>:
<1><47>: Abbrev Number: 5 (DW_TAG_structure_type)
<48> DW_AT_name : (indirect string, offset: 0x43): Base<double,
23, (& a_global), &S::f>
<4c> DW_AT_byte_size : 1
<4d> DW_AT_decl_file : 1
<4e> DW_AT_decl_line : 29
<4f> DW_AT_sibling : <0xb4>
<2><53>: Abbrev Number: 6 (DW_TAG_template_type_param)
<54> DW_AT_name : T
<56> DW_AT_type : <0xb4>
[...]
But I don't see the right results for Base<long, ...>. It is missing
all the template parameters:
<1><d0>: Abbrev Number: 5 (DW_TAG_structure_type)
<d1> DW_AT_name : (indirect string, offset: 0x191): Base<long int,
47, (& a_global), &S::f>
<d5> DW_AT_byte_size : 1
<d6> DW_AT_decl_file : 1
<d7> DW_AT_decl_line : 29
<d8> DW_AT_sibling : <0x105>
<2><dc>: Abbrev Number: 16 (DW_TAG_structure_type)
<dd> DW_AT_name : (indirect string, offset: 0x157): Inner<float>
<e1> DW_AT_byte_size : 1
<e2> DW_AT_decl_file : 1
<e3> DW_AT_decl_line : 32
<3><e4>: Abbrev Number: 6 (DW_TAG_template_type_param)
<e5> DW_AT_name : Z
<e7> DW_AT_type : <0x10c>
<3><eb>: Abbrev Number: 12 (DW_TAG_subprogram)
<ec> DW_AT_external : 1
<ed> DW_AT_name : (indirect string, offset: 0xa8): inner_m
<f1> DW_AT_decl_file : 1
<f2> DW_AT_decl_line : 34
<f3> DW_AT_MIPS_linkage_name: (indirect string, offset: 0xb0):
_ZN4BaseIlLi47EXadL_Z8a_globalEEXadL_ZN1S1fEEEE5InnerIfE7inner_mEv
<f7> DW_AT_declaration : 1
<f8> DW_AT_object_pointer: <0xfc>
<4><fc>: Abbrev Number: 11 (DW_TAG_formal_parameter)
<fd> DW_AT_type : <0x113>
<101> DW_AT_artificial : 1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41736
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug debug/41736] missing DW_TAG_template_*_ in some cases
[not found] <bug-41736-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2011-06-10 16:10 ` tromey at gcc dot gnu.org
@ 2014-04-29 16:25 ` tromey at gcc dot gnu.org
5 siblings, 0 replies; 12+ messages in thread
From: tromey at gcc dot gnu.org @ 2014-04-29 16:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41736
--- Comment #10 from Tom Tromey <tromey at gcc dot gnu.org> ---
Today I noticed another case. If you have a template like:
template<typename R, const char *&NAME, typename A>
[...]
... then NAME is not given a value in the instantiation:
<2><65c5>: Abbrev Number: 51 (DW_TAG_template_type_param)
<65c6> DW_AT_name : R
<65c8> DW_AT_type : <0x3042>
<2><65cc>: Abbrev Number: 122 (DW_TAG_template_value_param)
<65cd> DW_AT_name : (indirect string, offset: 0x6768): NAME
<65d1> DW_AT_type : <0x66ac>
<2><65d5>: Abbrev Number: 51 (DW_TAG_template_type_param)
<65d6> DW_AT_name : A1
<65d9> DW_AT_type : <0x30aa>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug debug/41736] missing DW_TAG_template_*_ in some cases
[not found] <bug-41736-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2011-06-09 21:54 ` dodji at gcc dot gnu.org
@ 2011-06-10 16:10 ` tromey at gcc dot gnu.org
2014-04-29 16:25 ` tromey at gcc dot gnu.org
5 siblings, 0 replies; 12+ messages in thread
From: tromey at gcc dot gnu.org @ 2011-06-10 16:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41736
--- Comment #9 from Tom Tromey <tromey at gcc dot gnu.org> 2011-06-10 16:09:38 UTC ---
See PR 49366 as well.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug debug/41736] missing DW_TAG_template_*_ in some cases
[not found] <bug-41736-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2011-06-09 21:50 ` dodji at gcc dot gnu.org
@ 2011-06-09 21:54 ` dodji at gcc dot gnu.org
2011-06-10 16:10 ` tromey at gcc dot gnu.org
2014-04-29 16:25 ` tromey at gcc dot gnu.org
5 siblings, 0 replies; 12+ messages in thread
From: dodji at gcc dot gnu.org @ 2011-06-09 21:54 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41736
--- Comment #8 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-06-09 21:53:22 UTC ---
Note that I am going to re-submit the fix to this bug now that I am about to
remove template arguments from DW_AT_name for template specializations (PR
debug/49312)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug debug/41736] missing DW_TAG_template_*_ in some cases
[not found] <bug-41736-4@http.gcc.gnu.org/bugzilla/>
2010-12-15 10:21 ` dodji at gcc dot gnu.org
2010-12-15 21:28 ` dodji at gcc dot gnu.org
@ 2011-06-09 21:50 ` dodji at gcc dot gnu.org
2011-06-09 21:54 ` dodji at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 12+ messages in thread
From: dodji at gcc dot gnu.org @ 2011-06-09 21:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41736
--- Comment #7 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-06-09 21:50:01 UTC ---
Another instance of bug that resembles this one is PR debug/49348
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug debug/41736] missing DW_TAG_template_*_ in some cases
[not found] <bug-41736-4@http.gcc.gnu.org/bugzilla/>
2010-12-15 10:21 ` dodji at gcc dot gnu.org
@ 2010-12-15 21:28 ` dodji at gcc dot gnu.org
2011-06-09 21:50 ` dodji at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 12+ messages in thread
From: dodji at gcc dot gnu.org @ 2010-12-15 21:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41736
--- Comment #6 from Dodji Seketeli <dodji at gcc dot gnu.org> 2010-12-15 21:28:08 UTC ---
(In reply to comment #4)
> I don't see the right results for Base<long, ...>. It is missing
> all the template parameters:
I think this problem is slightly different from what is happening in the
original bug as well. I have opened PR debug/46973 to analyse and track this
issue there.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug debug/41736] missing DW_TAG_template_*_ in some cases
[not found] <bug-41736-4@http.gcc.gnu.org/bugzilla/>
@ 2010-12-15 10:21 ` dodji at gcc dot gnu.org
2010-12-15 21:28 ` dodji at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 12+ messages in thread
From: dodji at gcc dot gnu.org @ 2010-12-15 10:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41736
--- Comment #5 from Dodji Seketeli <dodji at gcc dot gnu.org> 2010-12-15 10:21:41 UTC ---
(In reply to comment #3)
> The ordinary cases work fine with svn trunk gcc.
> However, member pointers still don't have all the info emitted.
> Consider this test case:
>
> struct S { int f; };
> template<int S::*MP> struct T { };
> T<&S::f> v;
>
> For v's type, I just see:
>
> <2><4f>: Abbrev Number: 6 (DW_TAG_template_value_param)
> <50> DW_AT_name : MP
> <53> DW_AT_type : <0x58>
>
> That is, this parameter has no value.
I have opened PR debug/46955 to track this as I believe the bug you describe is
slightly different from this one, even if they fall in the same category.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2014-04-29 16:25 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-17 8:00 [Bug debug/41736] New: missing DW_TAG_template_*_ in some cases dodji at gcc dot gnu dot org
2009-10-17 8:00 ` [Bug debug/41736] " dodji at gcc dot gnu dot org
2009-10-17 11:42 ` dodji at gcc dot gnu dot org
2009-10-21 13:10 ` dodji at gcc dot gnu dot org
2010-07-21 15:20 ` tromey at gcc dot gnu dot org
2010-08-31 18:34 ` tromey at gcc dot gnu dot org
[not found] <bug-41736-4@http.gcc.gnu.org/bugzilla/>
2010-12-15 10:21 ` dodji at gcc dot gnu.org
2010-12-15 21:28 ` dodji at gcc dot gnu.org
2011-06-09 21:50 ` dodji at gcc dot gnu.org
2011-06-09 21:54 ` dodji at gcc dot gnu.org
2011-06-10 16:10 ` tromey at gcc dot gnu.org
2014-04-29 16:25 ` tromey 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).