This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c++/1936: Wrong address of struct member


>Number:         1936
>Category:       c++
>Synopsis:       Wrong address of struct member
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue May 03 14:28:03 UTC 2005
>Closed-Date:
>Last-Modified:
>Originator:     c_keil@yahoo.de
>Release:        gdb-6.3
>Organization:
>Environment:
SuSE Linux 9.0
output of uname -a:
Linux xxx 2.4.21-286-smp4G #1 SMP Sat Apr 2 09:08:57 UTC 2005 i686 i686 i386 GNU/Linux
>Description:
Gdb seems to judge the size of the bool type different from gcc (which should presumably be the reference, as the program is running fine on its own).
>How-To-Repeat:
Compile the program with -g (I was using g++-3.3.1 from SuSE Linux). Open program in debugger and set breakpoint after printf line. Run and compare the output with 
"p &t.d".
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/x-c++src; name="struct.cpp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="struct.cpp"

I2luY2x1ZGUgPHN0ZGxpYi5oPgojaW5jbHVkZSA8c3RkaW8uaD4KCnN0cnVjdCBzdHsKICBib29s
IGI7CiAgZG91YmxlIGQ7Cn07CgppbnQKbWFpbihpbnQgYXJnYywgY2hhciAqYXJndltdKQp7CiAg
c3QgdDsKCiAgcHJpbnRmKCImdC5kID0gJXhcbiIsICZ0LmQpOwoKICByZXR1cm4gMDsKfQo=


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]