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++/15154] New: Non-POD class causes garbage when printingobject from a return value


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

             Bug #: 15154
           Summary: Non-POD class causes garbage when printing object from
                    a return value
           Product: gdb
           Version: 7.5
            Status: NEW
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned@sourceware.org
        ReportedBy: mstensho@opera.com
    Classification: Unclassified


Created attachment 6874
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6874
Test case

It seems impossible to print non-POD object values from return values
correctly. Also happens with "print function()" when function() returns
something non-POD. That even crashes sometimes.

See attachment. Works fine if PREVENT_NONPOD is defined.

This is with gdb 7.4.1-debian , but it also fails when building 7.5 on my own.

Full output from gdb --version:
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.

-- 
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]