Thursday, April 9, 2009

changing uclibc config

i've been having issues getting gdb to break into multi-threaded code. it ends up dying due to SIGTRAP. Apparently this is due to a disconnect between lipthread.so and libthread_db.so.

found the following threads:
http://www.nabble.com/gdb-can%27t-see-call-stack%3A-SIGTRAP-td22615190.html#a22615190
http://sourceware.org/bugzilla/show_bug.cgi?id=8963
http://sourceware.org/ml/gdb-patches/2005-10/msg00044.html

the solution was to rebuild uclibc. But i had a heck of a time trying to figure out how to do this. Some amount of googling and head-banging gave me the following page:

http://buildroot.uclibc.org/buildroot.html

which advised me to run

make uclibc-menuconfig

However, doing this completely broke my build. i had to go back to scratch and download a fresh build-root. i'm sure there's an easy way to recover from what i did, but i just didn't have the time to figure out what.

so, new build headaches aside, the thing to do is:

make ARCH=arm uclibc-menuconfig

Now, by default, this drops a file at build_arm_nofpu/uclibc/.config. And the buildroot documentation page above instructs to copy this over to toolchain/uClibc/uClibc.config. In my buildroot however, the dropped file is toolchain/uClibc/uClibc-verdex.config.

cp toolchain/uClibc/uClibc-verdex.config toolchain/uClibc/uClibc.config

I would need to copy this over to uClibc.config-locale if locales were turned on, but in my case, they're not. so uClibc.config is the file in I need to replace.

cd /home/hypo/gumstix/gumstix-buildroot-1614-extracted
make

1 comment:

kage said...

update: the suggestions don't seem to work. I still get the SIGTRAP issue regardless. I've checked and double checked that the lib_thread and pthread libraries are matched and have debug symbols included, as does the app. no help whatsoever. such a downer.