This is the mail archive of the gdb-prs@sourceware.org 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]

[Bug c++/11836] gdb cannot access variables that are subject toreturn value optimization


http://sourceware.org/bugzilla/show_bug.cgi?id=11836

--- Comment #9 from rdengler at arcor dot de 2011-02-17 17:14:59 UTC ---
Hi Jan,

thanks for the information.
Sorry I couldn't test it yet, there only is g++ 4.4.3
on my system.
I suppose the confusing behaviour will have gone,
the test code is simple enough.

Regards
Richard



jan.kratochvil at redhat dot com schrieb:

>http://sourceware.org/bugzilla/show_bug.cgi?id=11836
>
>Jan Kratochvil <jan.kratochvil at redhat dot com> changed:
>
>           What    |Removed                     |Added
>----------------------------------------------------------------------------
>             Status|NEW                         |WAITING
>                 CC|                            |jan.kratochvil at redhat
>                   |                            |dot com
>
>--- Comment #8 from Jan Kratochvil <jan.kratochvil at redhat dot com> 2011-02-14 12:34:01 UTC ---
>http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44367
>
>Breakpoint 1, foo () at rvo.C:8
>8        return s;
>$1 = "helloworld"
>
>Breakpoint 2, bar () at rvo.C:16
>16        return "something else";
>$2 = "helloworld"
>
>with /r:
>
>Breakpoint 1, foo () at rvo.C:8
>8        return s;
>$1 = {static npos = 18446744073709551615, _M_dataplus = {<std::allocator<char>>
>= {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, 
>    _M_p = 0x601058 "helloworld"}}
>
>Breakpoint 2, bar () at rvo.C:16
>16        return "something else";
>$2 = {static npos = 18446744073709551615, _M_dataplus = {<std::allocator<char>>
>= {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, 
>    _M_p = 0x601028 "helloworld"}}
>
>This should be a GCC-only bug which is already fixed:
>FAIL g++ (GCC) 4.4.6 20110124 (prerelease)
>PASS g++ (GCC) 4.5.3 20110124 (prerelease)
>PASS g++ (GCC) 4.6.0 20110212 (experimental)
>PASS gcc-c++-4.6.0-0.6.fc15.x86_64
>
>Behaves the same with both:
>GNU gdb (GDB) 7.2.50.20110213-cvs
>gdb-7.2.50.20110206-18.fc15.x86_64
>
>Is the bug still reproducible with recent GCC?
>
>  
>

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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