This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC PATCH 0/3] Pretty-printing for errno


On Thu, Jun 29, 2017 at 1:28 PM, Pedro Alves <palves@redhat.com> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]