From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21481 invoked by alias); 15 Aug 2012 15:13:10 -0000 Received: (qmail 21433 invoked by uid 22791); 15 Aug 2012 15:13:09 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 15 Aug 2012 15:12:57 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q7FFCW9f009207 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 15 Aug 2012 11:12:33 -0400 Received: from host2.jankratochvil.net (ovpn-116-27.ams2.redhat.com [10.36.116.27]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q7FFCRh3004816 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 15 Aug 2012 11:12:30 -0400 Date: Wed, 15 Aug 2012 15:13:00 -0000 From: Jan Kratochvil To: Diego Novillo Cc: Richard Guenther , gcc-patches@gcc.gnu.org, Lawrence Crowl , bonzini@gnu.org, dj@redhat.com, tromey@redhat.com, laurynas.biveinis@gmail.com, gdb@sourceware.org Subject: Re: Merge C++ conversion into trunk (0/6 - Overview) Message-ID: <20120815151227.GA1324@host2.jankratochvil.net> References: <20120812200427.GA12561@google.com> <502B93BF.6020802@google.com> <502B94C9.4020607@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <502B94C9.4020607@google.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-08/txt/msg00049.txt.bz2 On Wed, 15 Aug 2012 14:23:37 +0200, Diego Novillo wrote: > GDB folks, would it be hard to figure out that there is a single > variant of the called function and trust the user that they are > passing the right pointer value? It is a needless violation of C++ resolving rules. There are various easy way how to get it working (in .gdbinit or cc1-gdb.gdb define GDB function, define macro in GDB, use GDB python pretty printer instead (possibly even calling GCC inferior function) etc.). While I did not post such patch yet I would prefer to even forbid by default expressions like (gdb) print *0x1234567 and enforce (gdb) print *(int *)0x1234567 instead as the former syntax confuses people (as commonly seen on IRC), the same applies to calling functions without full debuginfo (they should require an explicit cast in GDB) etc. Regards, Jan