This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC PATCH 0/3] Pretty-printing for errno
- From: Pedro Alves <palves at redhat dot com>
- To: Siddhesh Poyarekar <siddhesh at gotplt dot org>, Zack Weinberg <zackw at panix dot com>
- Cc: Phil Muldoon <pmuldoon at redhat dot com>, GNU C Library <libc-alpha at sourceware dot org>, gdb at sourceware dot org, Joseph Myers <joseph at codesourcery dot com>, Florian Weimer <fweimer at redhat dot com>, Tom Tromey <tom at tromey dot com>
- Date: Tue, 4 Jul 2017 16:54:21 +0100
- Subject: Re: [RFC PATCH 0/3] Pretty-printing for errno
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=palves at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 8D7994E341
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 8D7994E341
- References: <20170622224456.1358-1-zackw@panix.com> <b2e7bc3b-d914-37ec-0215-2937949a848c@redhat.com> <3a7946e9-d178-f878-9774-64ff44bcf5df@redhat.com> <9490d183-a57b-b336-3131-6580e4773818@redhat.com> <be8d9730-96c5-79fa-b9bc-2afc02a17ddf@redhat.com> <CAKCAbMgAwZOG95hpAAAVYJd4SP6j3aAahOf=WWedjNJkj7_JsA@mail.gmail.com> <2f28f69b-406f-65e5-40e1-ae65632ea4f0@redhat.com> <CAKCAbMj8Rf374bss0ct+H+XMOu_o+_WWR2mQ-s8fb4-3_d7GjA@mail.gmail.com> <ac116d11-810c-1746-5327-4ded60e7ea77@gotplt.org>
On 07/01/2017 03:35 PM, Siddhesh Poyarekar wrote:
> On Friday 30 June 2017 10:57 PM, Zack Weinberg wrote:
>> Reading symbols from /lib/x86_64-linux-gnu/libc.so.6...Reading symbols
>> from /usr/lib/debug/.build-id/cc/80584889db7a969292959a46c718a2b1500702.debug...done.
>> done.
>> (gdb) ptype __errno_location
>> type = int ()
>> (gdb) p __errno_location
>> $1 = {<text variable, no debug info>} 0x20590 <__GI___errno_location>
>>
>> ... a suspicion occurs...
>>
>> (gdb) ptype __GI___errno_location
>> type = int *(void)
>> (gdb) p __GI___errno_location
>> $2 = {int *(void)} 0x20590 <__GI___errno_location>
>>
>> ... so I guess this is a problem with the __GI_ indirection, which
>> *may* be a thing we can resolve on our end. I don't fully understand
>> that stuff.
>
> The __GI_* alias is an internal alias of __errno_location and I've seen
> this before with other symbols, where a function address resolves to the
> internal alias instead of the public one in gdb as well as other places
> like objdump. It might make sense to turn this around, but I suspect
> there may be a reason for it that I am unaware of.
>
I look at this a bit today, and sent a gdb patch to handle this
better now:
https://sourceware.org/ml/gdb-patches/2017-07/msg00018.html
I pushed it to the same branch as the other one: users/palves/whatis.
Thanks,
Pedro Alves