]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
gdb: Modify gdb prompt when running gdb_grub script
authorGlenn Washburn <development@efficientek.com>
Mon, 27 Feb 2023 21:15:37 +0000 (15:15 -0600)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 14 Mar 2023 15:07:54 +0000 (16:07 +0100)
This will let users know that the GDB session is using the GRUB gdb scripts.

Signed-off-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/gdb_helper.py.in

index 8d5ee1d292cb82873f708c805484426e3d7abd91..5ed9eab0f529863129a5c40b3b20176b69ad692d 100644 (file)
@@ -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):