From: Michael Trimarchi <michael@amarulasolutions.com>
To: buildroot@buildroot.org
Cc: Michael Trimarchi <michael@amarulasolutions.com>,
"Yann E . MORIN" <yann.morin.1998@free.fr>
Subject: [Buildroot] [PATCH V2] package: gdb: Add helping kernel gdb functions compilation
Date: Sat, 9 Dec 2023 22:49:18 +0100 [thread overview]
Message-ID: <20231209214918.2071047-1-michael@amarulasolutions.com> (raw)
In order to use all the features of KGDB it's nice to have
the possibility to source the vmlinux-gdb.py file. The
generation of this file depend on CONFIG_GDB_SCRIPTS config
option. Add it in order to use gdb of vmlinux in output directory
including tx-* linux script
gdb-multiarch --tui output/build/<linux dir>/vmlinux
add-auto-load-safe-path output/build/<linux dir>
source output/build/<linux dir>/vmlinux-gdb.py
Linux needs to be compiled with DEBUG_INFO (without restrict
DEBUG_INFO) and kernel cmdline should be modified to wait
of kgdb if needed. As example
kgdboc_earlycon=ns16550a kgdboc=/dev/ttyS2 kgdbwait nokaslr
The test was done on am62x board over serial line. In order
to have it running properly we need to compile the agent-proxy
./output/host/bin/agent-proxy 4440 4441 0 /dev/ttyUSB0 115200
gdb can now having the debugging uart available using:
target remote localhost:4441
the 4440 is used by the console and 4441 is used to debug
[Yann E. MORIN: suggest to change the gdb.mk file instead,
changing the kernel.mk file. ]
Suggested-by: Yann E. MORIN <yann.morin.1998@free.fr>
Tested-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
---
V1->V2:
- Yann really help to make it simple and move from
a kernel task to an enable configuration to gdb
---
package/gdb/gdb.mk | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/package/gdb/gdb.mk b/package/gdb/gdb.mk
index 070598b385..0ebeb08dad 100644
--- a/package/gdb/gdb.mk
+++ b/package/gdb/gdb.mk
@@ -304,5 +304,9 @@ HOST_GDB_POST_INSTALL_HOOKS += HOST_GDB_ADD_SYMLINK
HOST_GDB_POST_INSTALL_HOOKS += gen_gdbinit_file
+define HOST_GDB_LINUX_CONFIG_FIXUPS
+ $(call KCONFIG_ENABLE_OPT,CONFIG_GDB_SCRIPTS)
+endef
+
$(eval $(autotools-package))
$(eval $(host-autotools-package))
--
2.40.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next reply other threads:[~2023-12-09 21:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-09 21:49 Michael Trimarchi [this message]
2023-12-13 20:08 ` [Buildroot] [PATCH V2] package: gdb: Add helping kernel gdb functions compilation Thomas Petazzoni via buildroot
2023-12-13 20:17 ` Michael Nazzareno Trimarchi
2023-12-13 20:24 ` Thomas Petazzoni via buildroot
2023-12-13 20:32 ` Michael Nazzareno Trimarchi
2023-12-13 20:41 ` Yann E. MORIN
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=20231209214918.2071047-1-michael@amarulasolutions.com \
--to=michael@amarulasolutions.com \
--cc=buildroot@buildroot.org \
--cc=yann.morin.1998@free.fr \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox