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++/15401] "set print object on" + printing variables of type: a reference to derived class.


https://sourceware.org/bugzilla/show_bug.cgi?id=15401

--- Comment #4 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Galvan
<martingalvan@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=476350ba4800f1144b125f6511a5e25b223cc90b

commit 476350ba4800f1144b125f6511a5e25b223cc90b
Author: Martin Galvan <martin.galvan@tallertechnologies.com>
Date:   Wed Apr 27 12:01:14 2016 -0300

    c_value_print: Revert 'val' to a reference for TYPE_CODE_STRUCT

    Currently c_value_print will turn struct reference values into pointers
before
    doing a set of RTTI checks.  This was introduced as a fix to PR c++/15401.
    If there's RTTI the pointer will be adjusted and converted back to a
reference.
    However, if there's no RTTI the value will still be treated as a pointer
during
    the remainder of the function.
    This patch moves the conversion down so that it's always performed when
needed.

    Notice this currently has not user-visible effects, so can be seen as a
small
    code cleanup.  However, it'll be necessary for the bug-fix for handling
    synthetic C++ references.  It causes no testsuite regressions.

    gdb/ChangeLog:
    2016-04-26  Martin Galvan  <martin.galvan@tallertechnologies.com>

        * c-valprint.c (c_value_print): Always convert val back to reference
        type if we converted it to a pointer type.

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