grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v5 13/14] gdb: Modify gdb prompt when running gdb_grub script


From: Glenn Washburn
Subject: [PATCH v5 13/14] gdb: Modify gdb prompt when running gdb_grub script
Date: Fri, 23 Dec 2022 22:19:34 -0600

This will let users know that the GDB session is using the GRUB gdb scripts.

Signed-off-by: Glenn Washburn <development@efficientek.com>
---
 grub-core/gdb_helper.py.in | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/grub-core/gdb_helper.py.in b/grub-core/gdb_helper.py.in
index 8d5ee1d292..5ed9eab0f5 100644
--- a/grub-core/gdb_helper.py.in
+++ b/grub-core/gdb_helper.py.in
@@ -2,6 +2,10 @@ import os
 import re
 import subprocess
 
+def prompt_hook (current_prompt):
+  return "(grub gdb) "
+gdb.prompt_hook = prompt_hook
+
 ##### Convenience functions #####
 
 class IsGrubLoaded (gdb.Function):
-- 
2.34.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]