From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2080 invoked by alias); 30 Jun 2017 00:28:50 -0000 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 Received: (qmail 2035 invoked by uid 89); 30 Jun 2017 00:28:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_SORBS_SPAM,RP_MATCHES_RCVD,SPF_PASS autolearn=no version=3.3.2 spammy=H*Ad:U*tom X-Spam-User: qpsmtpd, 2 recipients X-HELO: mailbackend.panix.com Received: from mailbackend.panix.com (HELO mailbackend.panix.com) (166.84.1.89) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 30 Jun 2017 00:28:47 +0000 Received: from mail-it0-f42.google.com (mail-it0-f42.google.com [209.85.214.42]) by mailbackend.panix.com (Postfix) with ESMTPSA id 2B8BC10033; Thu, 29 Jun 2017 20:28:45 -0400 (EDT) Received: by mail-it0-f42.google.com with SMTP id m68so54025441ith.1; Thu, 29 Jun 2017 17:28:45 -0700 (PDT) X-Gm-Message-State: AKS2vOxkJZ9W1uevTJVgPz3jZcXU0quNRjKnwHlOn4NueysCctlDgnr5 HjmxQ5WBbSXGbvXoobn8uQZrT2JShA== X-Received: by 10.36.81.211 with SMTP id s202mr16691104ita.113.1498782525408; Thu, 29 Jun 2017 17:28:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.202.132 with HTTP; Thu, 29 Jun 2017 17:28:44 -0700 (PDT) In-Reply-To: References: <20170622224456.1358-1-zackw@panix.com> <3a7946e9-d178-f878-9774-64ff44bcf5df@redhat.com> <9490d183-a57b-b336-3131-6580e4773818@redhat.com> From: Zack Weinberg Date: Fri, 30 Jun 2017 00:28:00 -0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 0/3] Pretty-printing for errno To: Pedro Alves Cc: Phil Muldoon , GNU C Library , gdb@sourceware.org, Joseph Myers , Florian Weimer , tom@tromey.com, Siddhesh Poyarekar Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2017-06/txt/msg00045.txt.bz2 On Thu, Jun 29, 2017 at 1:28 PM, Pedro Alves wrote: > With this code: > > typedef int zzz; > zzz z; > > gdb: > > (gdb) whatis z > type = zzz > (gdb) whatis (zzz)0 > type = zzz > (gdb) whatis zzz > type = int For the glibc patch to go through, this case also needs to work: typedef int error_t; error_t var; extern error_t *errloc(void); int main(void) { return *errloc(); } (compiled to .o file) (gdb) ptype errloc No symbol "errloc" in current context. This might be a problem with inadequate debugging information generated by the compiler -- it does work correctly if a function *definition* is visible. But we need it to work given only the above, possibly with no debug symbols in the shared library defining "errloc". zw