From: Thierry Bultel <thierry.bultel@wanadoo.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] Enables thread debugging with full gdb on target
Date: Thu, 20 Sep 2012 17:22:29 +0200 [thread overview]
Message-ID: <505B34B5.2050503@wanadoo.fr> (raw)
In-Reply-To: <20120920144226.70dd0e27@skate>
The libthread_db was not copied on target
GDB needs libpthread to be not stripped
Signed-off-by: Thierry Bultel <thierry.bultel@wanadoo.fr>
diff -Naur buildroot-2012.08.orig/Makefile buildroot-2012.08/Makefile
--- buildroot-2012.08.orig/Makefile 2012-08-31 10:49:41.000000000 +0200
+++ buildroot-2012.08/Makefile 2012-09-20 16:42:11.938021804 +0200
@@ -416,6 +416,10 @@
$(TARGET_DIR): $(BUILD_DIR)/.root
+ifeq ($(BR2_PACKAGE_GDB),y)
+BR2_STRIP_EXCLUDE_FILES += libpthread*.so*
+endif
+
STRIP_FIND_CMD = find $(TARGET_DIR)
ifneq (,$(call qstrip,$(BR2_STRIP_EXCLUDE_DIRS)))
STRIP_FIND_CMD += \( $(call finddirclauses,$(TARGET_DIR),$(call qstrip,$(BR2_STRIP_EXCLUDE_DIRS))) \) -prune -o
diff -Naur buildroot-2012.08.orig/toolchain/toolchain-crosstool-ng/crosstool-ng.mk buildroot-2012.08/toolchain/toolchain-crosstool-ng/crosstool-ng.mk
--- buildroot-2012.08.orig/toolchain/toolchain-crosstool-ng/crosstool-ng.mk 2012-08-31 10:49:41.000000000 +0200
+++ buildroot-2012.08/toolchain/toolchain-crosstool-ng/crosstool-ng.mk 2012-09-20 16:41:46.741771907 +0200
@@ -41,6 +41,18 @@
CTNG_LIBS_LIB := ld*.so libc.so libcrypt.so libdl.so libgcc_s.so libm.so \
libnsl.so libpthread.so libresolv.so librt.so libutil.so
+ifeq ($(BR2_PACKAGE_GDB_SERVER),y)
+CTNG_LIBS_LIB_THREAD_DB_NEEDED := y
+endif
+
+ifeq ($(BR2_PACKAGE_GDB),y)
+CTNG_LIBS_LIB_THREAD_DB_NEEDED := y
+endif
+
+ifeq ($(CTNG_LIBS_LIB_THREAD_DB_NEEDED),y)
+CTNG_LIBS_LIB += libthread_db.so
+endif
+
#--------------
# The libc-specific system libraries (in /lib)
# Note: it may be needed to tweak the NSS libs in the glibc and eglibc cases...
prev parent reply other threads:[~2012-09-20 15:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-19 15:44 [Buildroot] thread debugging with target gdb Thierry Bultel
2012-09-19 21:04 ` Arnout Vandecappelle
2012-09-19 21:27 ` Thierry Bultel
2012-09-19 21:30 ` Arnout Vandecappelle
2012-09-20 11:38 ` Thierry Bultel
2012-09-20 12:42 ` Thomas Petazzoni
2012-09-20 15:22 ` Thierry Bultel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=505B34B5.2050503@wanadoo.fr \
--to=thierry.bultel@wanadoo.fr \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.