public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug debug/41048] New: bad DW_AT_data_member_location from g++ @ 2009-08-12 19:18 tromey at gcc dot gnu dot org 2009-08-12 19:25 ` [Bug debug/41048] " pinskia at gcc dot gnu dot org ` (3 more replies) 0 siblings, 4 replies; 5+ messages in thread From: tromey at gcc dot gnu dot org @ 2009-08-12 19:18 UTC (permalink / raw) To: gcc-bugs This example came from the gdb list: #include "stdio.h" class Blah { public: Blah(): mFlag(0) {} void setFlag( int value ) { mFlag = value; } void printFlag() { printf( "Flag value is %d\n", mFlag ); } private: int mHugeArray[0x08000001]; int mFlag; }; int main( int argc, char* argv[] ) { Blah* foo = new Blah(); foo->setFlag(1); foo->printFlag(); return 0; } I compiled this using today's svn trunk g++. Then readelf shows: <2><8e>: Abbrev Number: 7 (DW_TAG_member) <8f> DW_AT_name : (indirect string, offset: 0x9f): mHugeArray <93> DW_AT_decl_file : 1 <94> DW_AT_decl_line : 13 <95> DW_AT_type : <0xf2> <99> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) <9c> DW_AT_accessibility: 3 (private) <2><9d>: Abbrev Number: 7 (DW_TAG_member) <9e> DW_AT_name : (indirect string, offset: 0x0): mFlag <a2> DW_AT_decl_file : 1 <a3> DW_AT_decl_line : 14 <a4> DW_AT_type : <0x53> <a8> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) <ab> DW_AT_accessibility: 3 (private) Both fields the same DW_AT_data_member_location. -- Summary: bad DW_AT_data_member_location from g++ Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tromey at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41048 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug debug/41048] bad DW_AT_data_member_location from g++ 2009-08-12 19:18 [Bug debug/41048] New: bad DW_AT_data_member_location from g++ tromey at gcc dot gnu dot org @ 2009-08-12 19:25 ` pinskia at gcc dot gnu dot org 2010-05-24 11:13 ` jakub at gcc dot gnu dot org ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: pinskia at gcc dot gnu dot org @ 2009-08-12 19:25 UTC (permalink / raw) To: gcc-bugs ------- Comment #1 from pinskia at gcc dot gnu dot org 2009-08-12 19:25 ------- I think this only happens for HWI == 32bits. It works for me with a compiler for ppc64-linux-gnu but fails with i686-linux-gnu. (Oh it works for i386-darwin too which has HWI as being 64bits). One more reason to change HWI for x86 to be 64bits by default. -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- GCC target triplet| |HWi == 32bits http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41048 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug debug/41048] bad DW_AT_data_member_location from g++ 2009-08-12 19:18 [Bug debug/41048] New: bad DW_AT_data_member_location from g++ tromey at gcc dot gnu dot org 2009-08-12 19:25 ` [Bug debug/41048] " pinskia at gcc dot gnu dot org @ 2010-05-24 11:13 ` jakub at gcc dot gnu dot org 2010-05-28 13:47 ` jakub at gcc dot gnu dot org 2010-07-28 14:32 ` jakub at gcc dot gnu dot org 3 siblings, 0 replies; 5+ messages in thread From: jakub at gcc dot gnu dot org @ 2010-05-24 11:13 UTC (permalink / raw) To: gcc-bugs ------- Comment #2 from jakub at gcc dot gnu dot org 2010-05-24 11:13 ------- Created an attachment (id=20733) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20733&action=view) gcc46-pr41048.patch Untested fix. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41048 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug debug/41048] bad DW_AT_data_member_location from g++ 2009-08-12 19:18 [Bug debug/41048] New: bad DW_AT_data_member_location from g++ tromey at gcc dot gnu dot org 2009-08-12 19:25 ` [Bug debug/41048] " pinskia at gcc dot gnu dot org 2010-05-24 11:13 ` jakub at gcc dot gnu dot org @ 2010-05-28 13:47 ` jakub at gcc dot gnu dot org 2010-07-28 14:32 ` jakub at gcc dot gnu dot org 3 siblings, 0 replies; 5+ messages in thread From: jakub at gcc dot gnu dot org @ 2010-05-28 13:47 UTC (permalink / raw) To: gcc-bugs ------- Comment #3 from jakub at gcc dot gnu dot org 2010-05-28 13:47 ------- Subject: Bug 41048 Author: jakub Date: Fri May 28 13:46:46 2010 New Revision: 159975 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=159975 Log: PR debug/41048 * dwarf2out.c (double_int_type_size_in_bits): New function. (round_up_to_align): Change first argument and return value to double_int. (field_byte_offset): Work internally on double_ints. Modified: trunk/gcc/ChangeLog trunk/gcc/dwarf2out.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41048 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug debug/41048] bad DW_AT_data_member_location from g++ 2009-08-12 19:18 [Bug debug/41048] New: bad DW_AT_data_member_location from g++ tromey at gcc dot gnu dot org ` (2 preceding siblings ...) 2010-05-28 13:47 ` jakub at gcc dot gnu dot org @ 2010-07-28 14:32 ` jakub at gcc dot gnu dot org 3 siblings, 0 replies; 5+ messages in thread From: jakub at gcc dot gnu dot org @ 2010-07-28 14:32 UTC (permalink / raw) To: gcc-bugs ------- Comment #4 from jakub at gcc dot gnu dot org 2010-07-28 14:32 ------- Fixed. -- jakub at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41048 ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-07-28 14:32 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2009-08-12 19:18 [Bug debug/41048] New: bad DW_AT_data_member_location from g++ tromey at gcc dot gnu dot org 2009-08-12 19:25 ` [Bug debug/41048] " pinskia at gcc dot gnu dot org 2010-05-24 11:13 ` jakub at gcc dot gnu dot org 2010-05-28 13:47 ` jakub at gcc dot gnu dot org 2010-07-28 14:32 ` jakub 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).