You are not logged in.

#1 2015-05-10 08:58:29

drt123
Member
Registered: 2015-01-06
Posts: 5

gdb and libc debug symbols

hi, im trying to make gdb use debugging symbols for libc, but to no avail. I am running a standard 64-bit arch install, fully updated.

gdb is 7.9, gcc is 4.9.2, glibc is 2.21
file shows

/usr/lib/libc-2.21.so: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /usr/lib/ld-linux-x86-64.so.2, BuildID[sha1]=879c9c4ffc5aabfd0a9c9d1b1c73d5f1df969aac, for GNU/Linux 2.6.32, not stripped

readelf --syms reads a million lines of symbols, however readelf --debug-dump=info on libc gives no output (nor any errors).
gdb says

 Reading symbols from /usr/lib/libc.so.6...(no debugging symbols found)...done.

on verbose after run, and

    574d0  0x00007ffff7b83ee4  Yes (*)     /usr/lib/libc.so.6
    (*): Shared library is missing debugging information.

on info shared.

i have built glibc from the abs with the debug option added, that built 2 packages,  glibc and glibc-debug. i have installed the debug one with pacman, the files went into /usr/lib/debug/usr/lib.
i have set debug-file-directory to /usr/lib/debug/usr/lib, that didnt help either. i have manually tried to load the symbols from the debug file with symbol-file, no dice.

help would be much appreciated, doing this on debian systems is a piece of cake (just install the debug package for the library et voila), i must be doing something wrong. thank you

Offline

#2 2015-05-10 10:30:16

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,550
Website

Re: gdb and libc debug symbols

Did you rebuild glibc with debugging symbols (i.e. the "-g" flag for gcc)?  Not stripping normal symbols is different that including debuggin symbols.

Last edited by Trilby (2015-05-10 10:30:41)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2015-05-10 11:25:40

drt123
Member
Registered: 2015-01-06
Posts: 5

Re: gdb and libc debug symbols

options=('debug' 'staticlibs')

these are the options i have set in the PKGBUILD, i might try giving CFLAGS directly, but compiling libc on this old dualcore takes quite a bit of time unfortunately

Offline

#4 2015-05-10 13:02:43

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,400
Website

Re: gdb and libc debug symbols

Read the glibc PKGBUILD - particularly at the end of the package() function.

Offline

Board footer

Powered by FluxBB