public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/55785] New: gcc4.5.2 incorrect line # of caller for destructor
@ 2012-12-22 3:50 chihin.ko at oracle dot com
2012-12-22 4:00 ` [Bug c++/55785] " pinskia at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: chihin.ko at oracle dot com @ 2012-12-22 3:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55785
Bug #: 55785
Summary: gcc4.5.2 incorrect line # of caller for destructor
Classification: Unclassified
Product: gcc
Version: 4.5.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: chihin.ko@oracle.com
Created attachment 29024
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29024
c++ test case
platform Solaris intel
build command
/net/gozo/sqe/tools/gcc/4.5.2/intel-S2/bin/g++ 002.cc -g
(dbx) stop in stack::~stack
(dbx) run
Running: a.out
(process id 13901)
stopped in stack::~stack at line 73 in file "002.cc"
73 delete bottom;
stack::~stack(this = 0x8044c90) called from function reverse_name
(dbx) where
=>[1] stack::~stack(this = 0x8044c90), line 73 in "002.cc"
[2] reverse_name(name = 0x80511dc "Honey"), line 77 in "002.cc" <== should
be line 87
[3] main(), line 96 in "002.cc"
gcc4.7 does not have this problem.
This is due to gcc4.5.2 compiler generate extra line 77 in line table:
a.out dwarfdump:
0x080510c8 [ 84, 0] NS
0x080510e3 [ 86, 0] NS
0x080510f4 [ 87, 0] NS
0x080510f7 [ 77, 0] NS <== extra line 77
0x08051104 [ 88, 0] NS
0x0805110c [ 77, 0] NS <== extra
0x08051121 [ 91, 0] NS
compare the address 0x080510fd of "call ~stack" down below, the extra line 77
in line table, mess up the address/line mapping when doing command "where".
87 return reverse;
0x080510f4: reverse_name+0x00b4: movl 0xfffffff0(%ebp),%ebx
0x080510f7: reverse_name+0x00b7: leal 0xffffffe8(%ebp),%eax
0x080510fa: reverse_name+0x00ba: movl %eax,(%esp)
0x080510fd: reverse_name+0x00bd: call ~stack [ 0x805102a, .-0xd3 ]
0x08051102: reverse_name+0x00c2: movl %ebx,%eax
88 }
0x08051104: reverse_name+0x00c4: addl $0x00000024,%esp
0x08051107: reverse_name+0x00c7: popl %ebx
0x08051108: reverse_name+0x00c8: popl %ebp
0x08051109: reverse_name+0x00c9: ret
0x0805110a: reverse_name+0x00ca: movl %eax,%ebx
0x0805110c: reverse_name+0x00cc: leal 0xffffffe8(%ebp),%eax
0x0805110f: reverse_name+0x00cf: movl %eax,(%esp)
0x08051112: reverse_name+0x00d2: call ~stack [ 0x805102a, .-0xe8 ]
0x08051117: reverse_name+0x00d7: movl %ebx,%eax
0x08051119: reverse_name+0x00d9: movl %eax,(%esp)
0x0805111c: reverse_name+0x00dc: call _Unwind_Resume [PLT] [
0x8050d64, .-0x3b8 ]
89
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/55785] gcc4.5.2 incorrect line # of caller for destructor
2012-12-22 3:50 [Bug c++/55785] New: gcc4.5.2 incorrect line # of caller for destructor chihin.ko at oracle dot com
@ 2012-12-22 4:00 ` pinskia at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-12-22 4:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55785
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-12-22 04:00:07 UTC ---
This was fixed in 4.5.4 and a dup of bug 49951.
*** This bug has been marked as a duplicate of bug 49951 ***
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-12-22 4:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-22 3:50 [Bug c++/55785] New: gcc4.5.2 incorrect line # of caller for destructor chihin.ko at oracle dot com
2012-12-22 4:00 ` [Bug c++/55785] " pinskia 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).