aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin Aladyshev <aladyshev22@gmail.com>2021-07-19 18:48:06 +0300
committerKonstantin Aladyshev <aladyshev22@gmail.com>2021-07-19 18:48:06 +0300
commitb139756457b4ba82db773e0114e0684dc1cefdfe (patch)
tree421603e940306ad66f988dc944aea28bc184d849
parent907a0fc2d8003a1284be8a46340e1acbb6699790 (diff)
downloadUEFI-Lessons-b139756457b4ba82db773e0114e0684dc1cefdfe.tar.gz
UEFI-Lessons-b139756457b4ba82db773e0114e0684dc1cefdfe.tar.bz2
UEFI-Lessons-b139756457b4ba82db773e0114e0684dc1cefdfe.zip
Update GDB cheatsheet
Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
-rw-r--r--Lessons/Lesson_42/README.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/Lessons/Lesson_42/README.md b/Lessons/Lesson_42/README.md
index 389bf44..1074dfe 100644
--- a/Lessons/Lesson_42/README.md
+++ b/Lessons/Lesson_42/README.md
@@ -373,6 +373,22 @@ In the end `run_gdb_ovmf.sh` would provide similar `tmux` session. The only diff
- `d <number>` - delete breakpoint `<number>`
- `c` - continue
- `q` - quit GDB
+- `Ctrl+p` - previous GDB command in history
+- `Ctrl+n` - next GDB command in history
+- `Ctrl+x` and `o` - change active window in tui mode
+
+To print CHAR16 string you can use `x /sh <addr>` command. Here is the example how can you print device path:
+```
+(gdb) p ConvertDevicePathToText(DevicePath, 0, 1)
+$1 = (CHAR16 *) 0x6d04518
+(gdb) x /sh 0x6d04518
+0x6d04518: u"PciRoot(0x0)/Pci(0x2,0x0)"
+```
+You can even do it in one command:
+```
+(gdb) x /sh ConvertDevicePathToText(DevicePath, 0, 1)
+0x6d02098: u"PciRoot(0x0)/Pci(0x2,0x0)"
+```
# Minimal Tmux cheatsheet