[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 14/15] gdb: Add ability to turn on shell tracing for gdb helpe
From: |
Glenn Washburn |
Subject: |
[PATCH v4 14/15] gdb: Add ability to turn on shell tracing for gdb helper script |
Date: |
Thu, 15 Dec 2022 23:29:37 -0600 |
If envvar GRUB_GDB_TRACE_FILE is set, turn on shell tracing and write
stderr messages, which includes trace messages, to path specified in the
value of the envvar.
Signed-off-by: Glenn Washburn <development@efficientek.com>
---
grub-core/gdb_helper.sh.in | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/grub-core/gdb_helper.sh.in b/grub-core/gdb_helper.sh.in
index 1eaa976fb7..13f79bfb07 100644
--- a/grub-core/gdb_helper.sh.in
+++ b/grub-core/gdb_helper.sh.in
@@ -2,6 +2,11 @@
### Helper functions for GRUB's GDB script.
###
+if [ -n "$GRUB_GDB_TRACE_FILE" ]; then
+ set -x
+ exec 2>"$GRUB_GDB_TRACE_FILE"
+fi
+
alignup() {
PAD=1
if [ "$(($1%$2))" -eq 0 ]; then
--
2.34.1
- [PATCH v4 10/15] gdb: Only connect to remote target once when first sourced, (continued)
[PATCH v4 13/15] gdb: Add extra early initialization symbols for i386-pc, Glenn Washburn, 2022/12/16
[PATCH v4 14/15] gdb: Add ability to turn on shell tracing for gdb helper script,
Glenn Washburn <=
[PATCH v4 11/15] gdb: Allow user defined "onload_<modname>" command to be run when module is loaded, Glenn Washburn, 2022/12/16
[PATCH v4 15/15] docs: Add debugging chapter to development documentation, Glenn Washburn, 2022/12/16