[Bug debug/33044] Local variables in C++ constructor not visible for debugging
--- Comment #5 from nikolay at totalviewtech dot com 2007-08-24 13:15 --- This is not fixed neither in 4.1.0 nor in any later version. The problem is that DIE for static foofoo was indeed produced, but produced in wrong place. <2><260>: Abbrev Number: 7 (DW_TAG_subprogram) --- Constructor declaration DW_AT_external: 1 DW_AT_name: A DW_AT_decl_file : 1 DW_AT_decl_line : 16 DW_AT_declaration : 1 <1><27f>: Abbrev Number: 10 (DW_TAG_subprogram) --- Broken declaration DW_AT_sibling : <2bc> DW_AT_specification: <260> DW_AT_decl_line : 22 DW_AT_inline : 0 (not inlined) . <2><2a7>: Abbrev Number: 13 (DW_TAG_variable)- this is where foofoo was emited DW_AT_name: foofoo DW_AT_decl_file : 1 DW_AT_decl_line : 28 DW_AT_type: <3a1> DW_AT_location: 5 byte block: 3 c0 86 4 8 (DW_OP_addr: 80486c0) <1><2c1>: Abbrev Number: 15 (DW_TAG_subprogram) -- real constructor declaration DW_AT_sibling : <2fd> DW_AT_abstract_origin: <27f> DW_AT_low_pc : 0x8048474 DW_AT_high_pc : 0x80484ed DW_AT_frame_base : 0 (location list) <2><2ee>: Abbrev Number: 17 (DW_TAG_lexical_block) -- this is the scope, where foo and all other variables should be defined. DW_AT_low_pc : 0x8048495 DW_AT_high_pc : 0x80484eb <3><2f7>: Abbrev Number: 18 (DW_TAG_variable) --- this is supposed to be "iii" DW_AT_location: 2 byte block: 91 74(DW_OP_fbreg: -12) - So dwarf producer is clearly confused and emits static foofoo in wrong broken subprogram declaration. Instead it should emit it inside lexical block <2ee> -- nikolay at totalviewtech dot com changed: What|Removed |Added ------------ CC||nikolay at totalviewtech dot ||com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33044
[Bug debug/33044] Local static variable in C++ constructor not visible for debugging
--- Comment #8 from nikolay at totalviewtech dot com 2007-08-24 16:45 --- (In reply to comment #7) > This all comes down to cloning. > What do you mean? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33044
[Bug fortran/33179] New: gfortran doesn't emit type information for allocatable arrays
It looks like gfortran is using a descriptors to display allocatable arrays in f90, but I could never figure what is the type of the array: <1><202>: Abbrev Number: 2 (DW_TAG_structure_type) DW_AT_name: array_descriptor2 <2><21c>: Abbrev Number: 3 (DW_TAG_member) DW_AT_name: data <2><22b>: Abbrev Number: 3 (DW_TAG_member) DW_AT_name: offset <2><23c>: Abbrev Number: 3 (DW_TAG_member) DW_AT_name: dtype DW_AT_type: <1fa> Any idea how I can get a type from that? -- Summary: gfortran doesn't emit type information for allocatable arrays Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: major Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: nikolay at totalviewtech dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33179
[Bug fortran/33179] gfortran doesn't emit type information for allocatable arrays
--- Comment #2 from nikolay at totalviewtech dot com 2007-10-04 17:13 --- Ok, Here is how it is implemented now: <1><1b1>: Abbrev Number: 2 (DW_TAG_structure_type) DW_AT_name: array_descriptor2 DW_AT_byte_size : 36 DW_AT_decl_file : 1 DW_AT_decl_line : 16 DW_AT_sibling : <20a> <2><1cb>: Abbrev Number: 3 (DW_TAG_member) DW_AT_name: data DW_AT_decl_file : 1 DW_AT_decl_line : 16 DW_AT_type: <20a> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) <2><1da>: Abbrev Number: 3 (DW_TAG_member) DW_AT_name: offset DW_AT_decl_file : 1 DW_AT_decl_line : 16 DW_AT_type: <20c> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) <2><1eb>: Abbrev Number: 3 (DW_TAG_member) DW_AT_name: dtype DW_AT_decl_file : 1 DW_AT_decl_line : 16 DW_AT_type: <20c> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) <2><1fb>: Abbrev Number: 3 (DW_TAG_member) DW_AT_name: dim DW_AT_decl_file : 1 DW_AT_decl_line : 16 DW_AT_type: <214> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) <1><20a>: Abbrev Number: 4 (DW_TAG_pointer_type) DW_AT_byte_size : 4 <1><20c>: Abbrev Number: 5 (DW_TAG_base_type) DW_AT_byte_size : 4 DW_AT_encoding: 5 (signed) DW_AT_name: int4 Notice, that there is already a member 'data', that is a pointer to user array. The problem is, that it points to TAG <20a>, that is a pointer with missing AT type. I think at least, you need is to add type of the user data to this tag, then debugger can figure out what is the data. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33179
[Bug debug/51517] New: [4.4 regression ] Wrong debug information for pointers with negative strides.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51517 Bug #: 51517 Summary: [4.4 regression ] Wrong debug information for pointers with negative strides. Classification: Unclassified Product: gcc Version: 4.6.2 Status: UNCONFIRMED Severity: major Priority: P3 Component: debug AssignedTo: unassig...@gcc.gnu.org ReportedBy: niko...@totalviewtech.com Created attachment 26062 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26062 Example to demostrate Consider attached examples, pointer ip: integer, dimension (:), pointer :: ip If you associate it twice for two variables, . ip => it (10:1:-2) ip=> unpleasant%small_pad than stride calculated as zero <2>: Abbrev Number: 7 (DW_TAG_variable) DW_AT_name: ip DW_AT_decl_file : 1 DW_AT_decl_line : 8 DW_AT_type: <165> DW_AT_location: 3 byte block: 91 b0 7e (DW_OP_fbreg: -208) <1><165>: Abbrev Number: 15 (DW_TAG_array_type) DW_AT_data_location: 2 byte block: 97 6 (DW_OP_push_object_address; DW_OP_deref) DW_AT_associated : 4 byte block: 97 6 30 2e (DW_OP_push_object_address; DW_OP_deref; DW_OP_lit0; DW_OP_ne) DW_AT_type: <60> DW_AT_sibling : <189> <2><176>: Abbrev Number: 14 (DW_TAG_subrange_type) DW_AT_lower_bound : 4 byte block: 97 23 20 6 (DW_OP_push_object_address; DW_OP_plus_uconst: 32; DW_OP_deref) DW_AT_upper_bound : 4 byte block: 97 23 28 6 (DW_OP_push_object_address; DW_OP_plus_uconst: 40; DW_OP_deref) DW_AT_stride : 6 byte block: 97 23 18 6 30 1e (DW_OP_push_object_address; DW_OP_plus_uconst: 24; DW_OP_deref; DW_OP_lit0; DW_OP_mul) I think error is in: DW_OP_lit0. Should be something like DW_OP_lit2 This is regression from 4.4 and is broken in 4.5 and 4.6 I have attached an example that you can compile and verify.
[Bug debug/51873] New: stringstream is opaque with g++
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51873 Bug #: 51873 Summary: stringstream is opaque with g++ Classification: Unclassified Product: gcc Version: 4.6.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug AssignedTo: unassig...@gcc.gnu.org ReportedBy: niko...@totalviewtech.com Consider this example: #include #include using namespace std; int main() { std::stringstream msg; char ch; msg << "hello"; for (int n = 0; n < 4; n++) { msg >> ch; cout << ch << endl; } return 0; } - If you compile it with -g and try to debug it msg variable is reported as opaque. 13for (int n = 0; n < 4; n++) (gdb) p msg $1 = (gdb) Same in Totalview. Here is a dwarf: <2>: Abbrev Number: 12 (DW_TAG_structure_type) DW_AT_name: basic_stringstream,std::allocator > DW_AT_declaration : 1 . <2><5dd2>: Abbrev Number: 7 (DW_TAG_typedef) DW_AT_name: stringstream DW_AT_decl_file : 26 DW_AT_decl_line : 143 DW_AT_type: <2><5de6>: Abbrev Number: 103 (DW_TAG_variable) DW_AT_name: msg DW_AT_decl_file : 2 DW_AT_decl_line : 8 DW_AT_type: <5dd2> DW_AT_location: 3 byte block: 91 e0 7c (DW_OP_fbreg: -416) There is only declaration of stringstream and no definition.
[Bug debug/45181] New: No debug information for parameter type
If parameter of function is passed as reference or pointer, there is no debug information for type and all pointers/references are of type void*/&. -- Summary: No debug information for parameter type Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: nikolay at totalviewtech dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45181
[Bug debug/45181] No debug information for parameter type
--- Comment #1 from nikolay at totalviewtech dot com 2010-08-04 13:29 --- Created an attachment (id=21395) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21395&action=view) Reproducer How to Repeat: Untar reproducer and run debugger to line 53. check all parameters, they all of type void -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45181
[Bug debug/45181] No debug information for parameter type
--- Comment #4 from nikolay at totalviewtech dot com 2010-08-04 14:23 --- Yes, this looks similar. The same error is seen in dwarf -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45181
[Bug fortran/45186] New: Gfortran 4.5.0 emits wrong linenumbers
This is pretty widespread. I have attached one example, but I see it in many programs. How to repeat: Compile with -g Do a next couple of times: Notice, that PC is jumping back and forth. Also notice, that there is no linenumbers for lines 19 20 and 27 -- Summary: Gfortran 4.5.0 emits wrong linenumbers Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: nikolay at totalviewtech dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45186
[Bug fortran/45186] Gfortran 4.5.0 emits wrong linenumbers
--- Comment #1 from nikolay at totalviewtech dot com 2010-08-04 21:03 --- Created an attachment (id=21397) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21397&action=view) example -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45186