Skip to contentSkip to conversation

docs/scripts/gdb: add necessary make scripts_gdb step

PATCH Applied Jakob Koschel 3 participants 4 messages Jan 12, 2023 – Jan 19, 2023

Subsystems (2)

v1 of 2 Applied Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 docs/scripts/gdb: add necessary make scripts_gdb step

In order to debug the kernel successfully with gdb you need to run 'make scripts_gdb' nowadays.

This was changed with the following commit:

Commit 67274c083438340ad16c ("scripts/gdb: delay generation of gdb constants.py")

In order to have a complete guide for beginners this remark should be added to the offial documentation.

---

---
 Documentation/dev-tools/gdb-kernel-debugging.rst | 4 ++++
 1 file changed, 4 insertions(+)
Documentation/dev-tools/gdb-kernel-debugging.rst +4 -0
index 8e0f1fe8d17a..895285c037c7 100644
@@ -39,6 +39,10 @@ Setup
   this mode. In this case, you should build the kernel with
   CONFIG_RANDOMIZE_BASE disabled if the architecture supports KASLR.
 
+- Build the gdb scripts (required on kernels v5.1 and above)::
+
+    make scripts_gdb
+
 - Enable the gdb stub of QEMU/KVM, either
 
     - at VM startup time by appending "-s" to the QEMU command line

---
base-commit: c757fc92a3f73734872c7793b97f06434773d65d
change-id: 20230112-documentation-gdb-af00d23b2b60

Best regards,

Signature · 1 line
Jakob Koschel <[email protected]>
#1 lore raw
Quoted 11 lines · Jakob Koschel

In order to debug the kernel successfully with gdb you need to run 'make scripts_gdb' nowadays.

This was changed with the following commit:

Commit 67274c083438340ad16c ("scripts/gdb: delay generation of gdb constants.py")

In order to have a complete guide for beginners this remark should be added to the offial documentation.

What about below?

```
Since commit <commit>, debugging kernel requires gdb scripts to be built
with "make scripts_gdb" first. Reflect this requirement in the
"Debugging kernel and modules via gdb" documentation.
```

Thanks.

Signature · 1 line
An old man doll... just what I always wanted! - Clara
#2 lore raw
Quoted 17 lines · Bagas Sanjaya
Quoted 11 lines · Jakob Koschel

In order to debug the kernel successfully with gdb you need to run 'make scripts_gdb' nowadays.

This was changed with the following commit:

Commit 67274c083438340ad16c ("scripts/gdb: delay generation of gdb constants.py")

In order to have a complete guide for beginners this remark should be added to the offial documentation.

Quoted 7 lines

What about below?

```
Since commit <commit>, debugging kernel requires gdb scripts to be built
with "make scripts_gdb" first. Reflect this requirement in the
"Debugging kernel and modules via gdb" documentation.
```

I guess you are suggesting this as an alternative commit message?

I'm happy to change this in v2.

Quoted 5 lines

Thanks.

Signature · 1 line
An old man doll... just what I always wanted! - Clara

- jakob

maintainer Applied
#3 lore raw
In reply to Jakob Koschel
Quoted 8 lines · Jakob Koschel

In order to debug the kernel successfully with gdb you need to run 'make scripts_gdb' nowadays.

This was changed with the following commit:

Commit 67274c083438340ad16c ("scripts/gdb: delay generation of gdb constants.py")

Quoted 7 lines

In order to have a complete guide for beginners this remark should be added to the offial documentation.

---

Applied, thanks.

jon