libc6 debug symbols

Mindspeed Comcerto 2000 based
Post Reply
swider
Posts: 14
Joined: Sun Mar 27, 2016 1:05 pm

libc6 debug symbols

Post by swider » Sun Jun 10, 2018 9:15 am

Hi,

I am developing some software suite for my nas and I am facing problem with running it with valgrind due lack of symbols,but also gdb. gdb shows up with corrupted stack which is causing such backtrace:

Code: Select all

[Switching to LWP 12570]
0x2aea3458 in select () from /opt/lib/libc.so.6
(gdb)  bt
#0  0x2aea3458 in select () from /opt/lib/libc.so.6
#1  0x00000000 in ?? ()
while in fact shall have more levels. Debug stack together with valgrind works fine on ubuntu.

Mijzelf
Posts: 6226
Joined: Mon Jun 16, 2008 10:45 am

Re: libc6 debug symbols

Post by Mijzelf » Sun Jun 10, 2018 12:50 pm

I think you have basically two options:
Develop it on a different platform, or build a custom glibc, containing debug symbols, and chroot your development environment, or bind-mount the new libc.so on the original one, or use LD_LIBRARY_PATH to force usage of it.
The sources of libc, and the build parameters as used by the firmware, can be found in the GPL sources.

swider
Posts: 14
Joined: Sun Mar 27, 2016 1:05 pm

Re: libc6 debug symbols

Post by swider » Tue Jun 12, 2018 9:36 am

Hi Mijzelf,

seems like a lot of work and requires some maintenance with time. I will most likely switch to Ubuntu with development.

by the way - would it be possible to provide standalone glibc with symbols by opkg so that user could create environment more easily ? Rebuild this library seems to be challenging task.

Mijzelf
Posts: 6226
Joined: Mon Jun 16, 2008 10:45 am

Re: libc6 debug symbols

Post by Mijzelf » Fri Jun 15, 2018 8:53 am

Ah, you are talking about Entware-ng, I suppose? That would be a challenge indeed. Entware-ng is a derivative of OpenWRT, and is by it's nature cross compiled. It's not intended to be a build environment, the addition of gcc to the repository is recently recent, and not available for all platforms. Entware-ng doesn't provide 'devel' packages, there is only one package containing all of the headers generated while building the whole repository.
Further Entware-ng is deprecated by it's maintainers, in favor of Entware (link), so I don't think the maintainers will change anything.

And I am hesitating if I will release a new zypkg for Entware, as the ZyXEL nas seems EOL.

Post Reply