* [PATCH v2 0/1] GDB Enhancements for device threaded core support
@ 2013-11-01 6:24 blloyd
2013-11-01 6:24 ` [PATCH v2 1/1] Enhancements to let multi-threaded debugging function correctly on devices blloyd
0 siblings, 1 reply; 3+ messages in thread
From: blloyd @ 2013-11-01 6:24 UTC (permalink / raw)
To: openembedded-core
core file generation can create a broken core file when threading is used in the application.
This change provides updates to the gdb package so multi-threaded applications debugging from failures works properly from end devices that include gdb.
The following changes since commit 523f2a9ea970713fb775bc48f84b67420b1106a0:
cross-canadian: Improve comment (2013-10-30 18:01:34 +0000)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib blloyd/gdb_assist_v2
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=blloyd/gdb_assist_v2
blloyd (1):
Enhancements to let multi-threaded debugging function correctly on
devices
meta/recipes-devtools/gdb/gdb-common.inc | 12 +++++++-----
meta/recipes-devtools/gdb/gdb.inc | 9 ++++++++-
2 files changed, 15 insertions(+), 6 deletions(-)
--
1.8.1.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2 1/1] Enhancements to let multi-threaded debugging function correctly on devices
2013-11-01 6:24 [PATCH v2 0/1] GDB Enhancements for device threaded core support blloyd
@ 2013-11-01 6:24 ` blloyd
2013-11-01 19:18 ` Saul Wold
0 siblings, 1 reply; 3+ messages in thread
From: blloyd @ 2013-11-01 6:24 UTC (permalink / raw)
To: openembedded-core
gdb includes a script to make generating core files trivial. Add a package to allow inclusion of this script in images. GDB also requires symbols that are usually stripped from the threads library to properly generate a core dump. Therefore, ensure when gdb is installed the necessary debug file is also present so gdb is fully functional.
Signed-off-by: blloyd <blloyd@familyhonor.net>
---
meta/recipes-devtools/gdb/gdb-common.inc | 12 +++++++-----
meta/recipes-devtools/gdb/gdb.inc | 9 ++++++++-
2 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/meta/recipes-devtools/gdb/gdb-common.inc b/meta/recipes-devtools/gdb/gdb-common.inc
index 6954954..4b08283 100644
--- a/meta/recipes-devtools/gdb/gdb-common.inc
+++ b/meta/recipes-devtools/gdb/gdb-common.inc
@@ -61,8 +61,10 @@ do_install_append() {
rm -rf ${D}${datadir}/locale
}
-RRECOMMENDS_gdb_append_linux = " glibc-thread-db "
-RRECOMMENDS_gdb_append_linux-gnueabi = " glibc-thread-db "
-RRECOMMENDS_gdbserver_append_linux = " glibc-thread-db "
-RRECOMMENDS_gdbserver_append_linux-gnueabi = " glibc-thread-db "
-
+# Unfortunately, for gdb multi-threading to function reliably it must have the eglibc debug symbols
+# which are a part of the eglibc-dev package. So we have added a dependency on that here.
+RRECOMMENDS_gdb_append_linux = " glibc-thread-db eglibc-dbg "
+RRECOMMENDS_gdb_append_linux-gnueabi = " glibc-thread-db eglibc-dbg "
+RRECOMMENDS_gdbserver_append_linux = " glibc-thread-db eglibc-dbg "
+RRECOMMENDS_gdbserver_append_linux-gnueabi = " glibc-thread-db eglibc-dbg "
+RDEPENDS_gcore_append = " gdb "
diff --git a/meta/recipes-devtools/gdb/gdb.inc b/meta/recipes-devtools/gdb/gdb.inc
index 3321a24..9bf0e86 100644
--- a/meta/recipes-devtools/gdb/gdb.inc
+++ b/meta/recipes-devtools/gdb/gdb.inc
@@ -10,5 +10,12 @@ SRC_URI += "file://kill_arm_map_symbols.patch \
#export CFLAGS_append=" -L${STAGING_LIBDIR}"
# cross-canadian must not see this
-PACKAGES =+ "gdbserver"
+PACKAGES =+ "gdbserver gcore"
FILES_gdbserver = "${bindir}/gdbserver"
+FILES_gcore = "${bindir}/gcore"
+
+do_install_append() {
+ # When trying to find what went wrong with a program, a core dump can be very helpful
+ # Go ahead and make it easier to get one when we have gdb on the system
+ install -m 0755 ${S}/gdb/gdb_gcore.sh ${D}${bindir}/gcore
+}
--
1.8.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2 1/1] Enhancements to let multi-threaded debugging function correctly on devices
2013-11-01 6:24 ` [PATCH v2 1/1] Enhancements to let multi-threaded debugging function correctly on devices blloyd
@ 2013-11-01 19:18 ` Saul Wold
0 siblings, 0 replies; 3+ messages in thread
From: Saul Wold @ 2013-11-01 19:18 UTC (permalink / raw)
To: blloyd, openembedded-core
On 10/31/2013 11:24 PM, blloyd wrote:
> gdb includes a script to make generating core files trivial. Add a package to allow inclusion of this script in images. GDB also requires symbols that are usually stripped from the threads library to properly generate a core dump. Therefore, ensure when gdb is installed the necessary debug file is also present so gdb is fully functional.
>
Please follow the patch sumbission guidelines here:
http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
The commit message should be better formated to include the recipe name
in the short commit message as follows
gdb: enhancements to let ...
Also format the commit message to remain under 78 chars.
> Signed-off-by: blloyd <blloyd@familyhonor.net>
> ---
> meta/recipes-devtools/gdb/gdb-common.inc | 12 +++++++-----
> meta/recipes-devtools/gdb/gdb.inc | 9 ++++++++-
> 2 files changed, 15 insertions(+), 6 deletions(-)
>
> diff --git a/meta/recipes-devtools/gdb/gdb-common.inc b/meta/recipes-devtools/gdb/gdb-common.inc
> index 6954954..4b08283 100644
> --- a/meta/recipes-devtools/gdb/gdb-common.inc
> +++ b/meta/recipes-devtools/gdb/gdb-common.inc
> @@ -61,8 +61,10 @@ do_install_append() {
> rm -rf ${D}${datadir}/locale
> }
>
> -RRECOMMENDS_gdb_append_linux = " glibc-thread-db "
> -RRECOMMENDS_gdb_append_linux-gnueabi = " glibc-thread-db "
> -RRECOMMENDS_gdbserver_append_linux = " glibc-thread-db "
> -RRECOMMENDS_gdbserver_append_linux-gnueabi = " glibc-thread-db "
> -
> +# Unfortunately, for gdb multi-threading to function reliably it must have the eglibc debug symbols
> +# which are a part of the eglibc-dev package. So we have added a dependency on that here.
> +RRECOMMENDS_gdb_append_linux = " glibc-thread-db eglibc-dbg "
> +RRECOMMENDS_gdb_append_linux-gnueabi = " glibc-thread-db eglibc-dbg "
> +RRECOMMENDS_gdbserver_append_linux = " glibc-thread-db eglibc-dbg "
> +RRECOMMENDS_gdbserver_append_linux-gnueabi = " glibc-thread-db eglibc-dbg "
> +RDEPENDS_gcore_append = " gdb "
I think there were another suggestion for this patch, which was to make
the new RRECOMMENDS be on the gcore package instead of burdening the gsd
and gdbserver packages, then it could just be 1 patch.
Sau!
> diff --git a/meta/recipes-devtools/gdb/gdb.inc b/meta/recipes-devtools/gdb/gdb.inc
> index 3321a24..9bf0e86 100644
> --- a/meta/recipes-devtools/gdb/gdb.inc
> +++ b/meta/recipes-devtools/gdb/gdb.inc
> @@ -10,5 +10,12 @@ SRC_URI += "file://kill_arm_map_symbols.patch \
> #export CFLAGS_append=" -L${STAGING_LIBDIR}"
>
> # cross-canadian must not see this
> -PACKAGES =+ "gdbserver"
> +PACKAGES =+ "gdbserver gcore"
> FILES_gdbserver = "${bindir}/gdbserver"
> +FILES_gcore = "${bindir}/gcore"
> +
> +do_install_append() {
> + # When trying to find what went wrong with a program, a core dump can be very helpful
> + # Go ahead and make it easier to get one when we have gdb on the system
> + install -m 0755 ${S}/gdb/gdb_gcore.sh ${D}${bindir}/gcore
> +}
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-11-01 19:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-01 6:24 [PATCH v2 0/1] GDB Enhancements for device threaded core support blloyd
2013-11-01 6:24 ` [PATCH v2 1/1] Enhancements to let multi-threaded debugging function correctly on devices blloyd
2013-11-01 19:18 ` Saul Wold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox