* [ptxdist] [PATCH v2] ptxdist: add cgdb command
@ 2020-10-28 15:35 Marian Cichy
2020-10-30 12:02 ` [ptxdist] [APPLIED] " Michael Olbrich
0 siblings, 1 reply; 2+ messages in thread
From: Marian Cichy @ 2020-10-28 15:35 UTC (permalink / raw)
To: ptxdist; +Cc: Marian Cichy
cgdb is a curses-frontend for gdb with some
visual conveniences for debugging. ptxdist already
has a 'ptxdist gdb' command to invoke gdb with
configured sysroot etc., and it would be nice
to have when we can also use cgdb.
Signed-off-by: Marian Cichy <m.cichy@pengutronix.de>
---
bin/ptxdist | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/bin/ptxdist b/bin/ptxdist
index 0d5e4328e..0a252e4ab 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -765,6 +765,8 @@ Misc:
use 'newpackage help' for a longer description
nfsroot run a userspace NFS server and export the nfsroot
gdb run cross gdb with configured sysroot etc.
+ cgdb run cross gdb with configured sysroot etc.
+ with cgdb as frontend
bsp-info print some basic information about the BSP
package-info <package> print some basic information about the package
print <var> print the contents of a variable, in the way
@@ -1761,11 +1763,18 @@ EOF
ptxd_make_log export_src EXPORTDIR="${1}"
exit
;;
- gdb)
+ gdb|cgdb)
+ local -a prefix
+ if [ "${cmd}" = "cgdb" ]; then
+ if [ \! -x "$(which cgdb 2>/dev/null)" ]; then
+ ptxd_bailout "cgdb is required to be installed on your host-machine."
+ fi
+ prefix=( cgdb -d )
+ fi
check_premake_compiler &&
compiler_prefix="$(ptxd_get_ptxconf PTXCONF_COMPILER_PREFIX)" &&
ptxdist_trap_exit_handler &&
- exec "${PTXDIST_PLATFORMDIR}/sysroot-host/lib/wrapper/${compiler_prefix}gdb" "${@}"
+ exec "${prefix[@]}" "${PTXDIST_PLATFORMDIR}/sysroot-host/lib/wrapper/${compiler_prefix}gdb" "${@}"
;;
get|urlcheck)
declare -a pkgs
--
2.20.1
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [ptxdist] [APPLIED] ptxdist: add cgdb command
2020-10-28 15:35 [ptxdist] [PATCH v2] ptxdist: add cgdb command Marian Cichy
@ 2020-10-30 12:02 ` Michael Olbrich
0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2020-10-30 12:02 UTC (permalink / raw)
To: ptxdist; +Cc: Marian Cichy
Thanks, applied as b61ac630c7cb2d4f95ecc53452c3d706ccb24e8e.
Michael
[sent from post-receive hook]
On Fri, 30 Oct 2020 13:02:47 +0100, Marian Cichy <m.cichy@pengutronix.de> wrote:
> cgdb is a curses-frontend for gdb with some
> visual conveniences for debugging. ptxdist already
> has a 'ptxdist gdb' command to invoke gdb with
> configured sysroot etc., and it would be nice
> to have when we can also use cgdb.
>
> Signed-off-by: Marian Cichy <m.cichy@pengutronix.de>
> Message-Id: <20201028153543.5092-1-m.cichy@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
>
> diff --git a/bin/ptxdist b/bin/ptxdist
> index 0d5e4328e1d6..0a252e4ab22e 100755
> --- a/bin/ptxdist
> +++ b/bin/ptxdist
> @@ -765,6 +765,8 @@ Misc:
> use 'newpackage help' for a longer description
> nfsroot run a userspace NFS server and export the nfsroot
> gdb run cross gdb with configured sysroot etc.
> + cgdb run cross gdb with configured sysroot etc.
> + with cgdb as frontend
> bsp-info print some basic information about the BSP
> package-info <package> print some basic information about the package
> print <var> print the contents of a variable, in the way
> @@ -1761,11 +1763,18 @@ EOF
> ptxd_make_log export_src EXPORTDIR="${1}"
> exit
> ;;
> - gdb)
> + gdb|cgdb)
> + local -a prefix
> + if [ "${cmd}" = "cgdb" ]; then
> + if [ \! -x "$(which cgdb 2>/dev/null)" ]; then
> + ptxd_bailout "cgdb is required to be installed on your host-machine."
> + fi
> + prefix=( cgdb -d )
> + fi
> check_premake_compiler &&
> compiler_prefix="$(ptxd_get_ptxconf PTXCONF_COMPILER_PREFIX)" &&
> ptxdist_trap_exit_handler &&
> - exec "${PTXDIST_PLATFORMDIR}/sysroot-host/lib/wrapper/${compiler_prefix}gdb" "${@}"
> + exec "${prefix[@]}" "${PTXDIST_PLATFORMDIR}/sysroot-host/lib/wrapper/${compiler_prefix}gdb" "${@}"
> ;;
> get|urlcheck)
> declare -a pkgs
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-10-30 12:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-28 15:35 [ptxdist] [PATCH v2] ptxdist: add cgdb command Marian Cichy
2020-10-30 12:02 ` [ptxdist] [APPLIED] " Michael Olbrich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox