From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10623 invoked by alias); 14 Nov 2008 22:07:07 -0000 Received: (qmail 10465 invoked by uid 22791); 14 Nov 2008 22:07:06 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.13) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 14 Nov 2008 22:06:31 +0000 Received: from wpaz13.hot.corp.google.com (wpaz13.hot.corp.google.com [172.24.198.77]) by smtp-out.google.com with ESMTP id mAEM6SMO031550 for ; Fri, 14 Nov 2008 14:06:29 -0800 Received: from wa-out-1112.google.com (wafk17.prod.google.com [10.114.187.17]) by wpaz13.hot.corp.google.com with ESMTP id mAEM6RRJ010825 for ; Fri, 14 Nov 2008 14:06:27 -0800 Received: by wa-out-1112.google.com with SMTP id k17so869969waf.0 for ; Fri, 14 Nov 2008 14:06:27 -0800 (PST) MIME-Version: 1.0 Received: by 10.114.135.1 with SMTP id i1mr835918wad.193.1226700386906; Fri, 14 Nov 2008 14:06:26 -0800 (PST) In-Reply-To: <491DF12A.5090903@vmware.com> References: <20081114204617.A4A533A6B15@localhost> <491DF12A.5090903@vmware.com> Date: Sat, 15 Nov 2008 17:22:00 -0000 Message-ID: <8ac60eac0811141406h4bb126c0sbd898e7d612f46dd@mail.gmail.com> Subject: Re: [RFA] [patch] 'info symbol' to print more info From: Paul Pluzhnikov To: Michael Snyder Cc: "gdb-patches@sourceware.org" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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: 2008-11/txt/msg00376.txt.bz2 On Fri, Nov 14, 2008 at 1:44 PM, Michael Snyder wrote: > Just one suggestion (and suggestion only) -- since the exec_file > is sort of the default/common case, do you think it would be a > good idea to check if it's the exec_file, and omit the objfile > information if so? I think there are two large classes of users: - embedded people with no shared libraries and a single (statically linked) executable, and - everybody else. I've never been in the first camp. From the second camp, if the symbol is in the main executable, I want to know that too. E.g. if I do 'info symbol &malloc', and it tells me .text in a.out, that may well be a very important clue (that something unusual is happening). I do agree that for the fully-static executable case the extra verbiage may be somewhat annoying. Looking for a way to tell if that is the case ... Would the test below be sufficient? if (ojbect_files->next) /* there is only one object, so don't print its name ... */ I also just noticed inconsistency between 'info symbol' and 'maintenance translate-address' wording: exit+0 section .text in /usr/lib64/libc.so.6 exit in section .text of /usr/lib64/libc.so.6 I'll fix that in the final patch so they are the same. Thanks, -- Paul Pluzhnikov