public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "François Dumont" <frs.dumont@gmail.com>
To: "libstdc++@gcc.gnu.org" <libstdc++@gcc.gnu.org>,
	 gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: Demangle symbols in debug assertion messages
Date: Tue, 19 May 2015 20:54:00 -0000	[thread overview]
Message-ID: <555BA15E.6090409@gmail.com> (raw)
In-Reply-To: <5547D73C.6070602@gmail.com>

Hello

     Is it ok ?

François

On 04/05/2015 22:31, François Dumont wrote:
> Hi
>
>     Here is  the patch to demangle symbols in debug messages. I have 
> also simplify code in formatter.h.
>
>     Here is an example of assertion message:
>
> /home/fdt/dev/gcc/build/x86_64-unknown-linux-gnu/libstdc++-v3/include/debug/functions.h:213: 
>
>     error: function requires a valid iterator range [__first, __last).
>
> Objects involved in the operation:
> iterator "__first" @ 0x0x7fff165d68b0 {
>   type = 
> __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<int*, 
> std::__cxx1998::vector<int, std::allocator<int> > >, 
> std::__debug::vector<int, std::allocator<int> > > (mutable iterator);
>   state = dereferenceable;
>   references sequence with type `std::__debug::vector<int, 
> std::allocator<int> >' @ 0x0x7fff165d69d0
> }
> iterator "__last" @ 0x0x7fff165d68e0 {
>   type = 
> __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<int*, 
> std::__cxx1998::vector<int, std::allocator<int> > >, 
> std::__debug::vector<int, std::allocator<int> > > (mutable iterator);
>   state = dereferenceable;
>   references sequence with type `std::__debug::vector<int, 
> std::allocator<int> >' @ 0x0x7fff165d69d0
> }
>
>
>     * include/debug/formatter.h (_GLIBCXX_TYPEID): New macro to simplify
>     usage of typeid.
>     (_Error_formatter::_M_print_type): New.
>     * src/c++11/debug.cc
>     (_Error_formatter::_Parameter::_M_print_field): Use latter.
>     (_Error_formatter::_M_print_type): Implement latter using
>     __cxaabiv1::__cxa_demangle to print demangled type name.
>
> I just hope that __cxa_demangle is portable.
>
> Ok to commit ?
>
> François
>

  reply	other threads:[~2015-05-19 20:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-04 20:32 François Dumont
2015-05-19 20:54 ` François Dumont [this message]
2015-05-20 10:20 ` Jonathan Wakely
2015-05-20 10:38   ` Jonathan Wakely
2015-05-20 19:50     ` François Dumont
2015-05-21 10:37       ` Jonathan Wakely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=555BA15E.6090409@gmail.com \
    --to=frs.dumont@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).