[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 14/15] gdb: Add ability to turn on shell tracing for gdb helpe
From: |
Glenn Washburn |
Subject: |
[PATCH v3 14/15] gdb: Add ability to turn on shell tracing for gdb helper script |
Date: |
Thu, 15 Dec 2022 01:07:49 -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 v3 04/15] gdb: Move runtime module loading into runtime_load_module, (continued)
- [PATCH v3 04/15] gdb: Move runtime module loading into runtime_load_module, Glenn Washburn, 2022/12/15
- [PATCH v3 05/15] gdb: Get correct mod variable value, Glenn Washburn, 2022/12/15
- [PATCH v3 06/15] gdb: Do not run load_module if module has already been loaded, Glenn Washburn, 2022/12/15
- [PATCH v3 07/15] gdb: Add functions to make loading from dynamically positioned targets easier, Glenn Washburn, 2022/12/15
- [PATCH v3 08/15] gdb: Remove Perl dependency for GRUB GDB script, Glenn Washburn, 2022/12/15
- [PATCH v3 09/15] gdb: If enabled, print line used to load EFI kernel symbols when using gdb_grub script, Glenn Washburn, 2022/12/15
- [PATCH v3 10/15] gdb: Conditionally run GDB script logic for dynamically or statically positioned GRUB, Glenn Washburn, 2022/12/15
- [PATCH v3 11/15] gdb: Only connect to remote target once when first sourced, Glenn Washburn, 2022/12/15
- [PATCH v3 12/15] gdb: Allow user defined "onload_<modname>" command to be run when module is loaded, Glenn Washburn, 2022/12/15
- [PATCH v3 13/15] gdb: Allow running user-defined commands at GRUB start, Glenn Washburn, 2022/12/15
- [PATCH v3 14/15] gdb: Add ability to turn on shell tracing for gdb helper script,
Glenn Washburn <=
- [PATCH v3 15/15] docs: Add debugging chapter to development documentation, Glenn Washburn, 2022/12/15