From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14967 invoked by alias); 14 May 2012 19:39:55 -0000 Received: (qmail 14956 invoked by uid 22791); 14 May 2012 19:39:54 -0000 X-SWARE-Spam-Status: No, hits=-6.4 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,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; Mon, 14 May 2012 19:39:38 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q4EJdZ2l031182 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 14 May 2012 15:39:35 -0400 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q4EJdX5q013760 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 14 May 2012 15:39:34 -0400 From: Tom Tromey To: Jan Kratochvil Cc: gdb-patches@sourceware.org, Eli Zaretskii Subject: Re: [2/2] RFA: implement 'set print symbol' References: <871uo2giob.fsf@fleche.redhat.com> <20120409191420.GA1010@host2.jankratochvil.net> <87fwcc679z.fsf@fleche.redhat.com> <83pqbg7i1n.fsf@gnu.org> <87r4vw4nxu.fsf@fleche.redhat.com> <83lim46rk7.fsf@gnu.org> <20120410065226.GA23852@host2.jankratochvil.net> <83aa2k6n96.fsf@gnu.org> <20120410081843.GA27643@host2.jankratochvil.net> Date: Mon, 14 May 2012 19:39:00 -0000 In-Reply-To: <20120410081843.GA27643@host2.jankratochvil.net> (Jan Kratochvil's message of "Tue, 10 Apr 2012 10:18:43 +0200") Message-ID: <87likuwo0a.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.95 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-05/txt/msg00538.txt.bz2 >>>>> "Jan" == Jan Kratochvil writes: Jan> I have checked some (the first) FAIL cases of the testsuite and it does not Jan> seem to be acceptable to be printed by default in its current form: Jan> Breakpoint 7, marker3 (a=0x400918 <__dso_handle+48> "stack", b=0x400912 <__dso_handle+42> "trace") at ./gdb.base/break1.c:48^M Jan> __dso_handle is a false resolution. Jan> So if it should be default there should be at least restriction to ignore Jan> size-less objects. I made it ignore size-less data symbols. It turns out that we can't ignore size-less text symbols -- asm-source.exp checks this case. Jan> But even with size-ful objects the default on is not great: Jan> (gdb) p t_structs_a(struct_val1) Jan> $92 = "foo" In the new series (to be posted shortly) I fixed the obvious formatting bug here. Jan> Such local symbols just make no sense to display IMO. Maybe there Jan> could be GDB hack to suppress the \.\d+$ symbols from GCC? Or even Jan> GCC suppressing them? I left it as-is. I did notice that we have no way to look up a generic symbol by address. In gdb currently, you can look up any minimal symbol by address, but for full symbols you can only look up functions. Jan> There is still an open issue of updating the whole testsuite if the Jan> default is changed. I did this. It revealed some other oddities. Tom