linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] docs/scripts/gdb: add necessary make scripts_gdb step
@ 2023-01-12 16:09 Jakob Koschel
  2023-01-13  8:21 ` Bagas Sanjaya
  2023-01-19 21:09 ` Jonathan Corbet
  0 siblings, 2 replies; 4+ messages in thread
From: Jakob Koschel @ 2023-01-12 16:09 UTC (permalink / raw)
  To: Jonathan Corbet; +Cc: linux-doc, linux-kernel, 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.

---


Signed-off-by: Jakob Koschel <jkl820.git@gmail.com>
---
 Documentation/dev-tools/gdb-kernel-debugging.rst | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/dev-tools/gdb-kernel-debugging.rst b/Documentation/dev-tools/gdb-kernel-debugging.rst
index 8e0f1fe8d17a..895285c037c7 100644
--- a/Documentation/dev-tools/gdb-kernel-debugging.rst
+++ b/Documentation/dev-tools/gdb-kernel-debugging.rst
@@ -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,
-- 
Jakob Koschel <jkl820.git@gmail.com>

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] docs/scripts/gdb: add necessary make scripts_gdb step
  2023-01-12 16:09 [PATCH] docs/scripts/gdb: add necessary make scripts_gdb step Jakob Koschel
@ 2023-01-13  8:21 ` Bagas Sanjaya
  2023-01-13  9:55   ` Jakob Koschel
  2023-01-19 21:09 ` Jonathan Corbet
  1 sibling, 1 reply; 4+ messages in thread
From: Bagas Sanjaya @ 2023-01-13  8:21 UTC (permalink / raw)
  To: Jakob Koschel, Jonathan Corbet; +Cc: linux-doc, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 727 bytes --]

On Thu, Jan 12, 2023 at 05:09:25PM +0100, Jakob Koschel wrote:
> 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.

-- 
An old man doll... just what I always wanted! - Clara

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] docs/scripts/gdb: add necessary make scripts_gdb step
  2023-01-13  8:21 ` Bagas Sanjaya
@ 2023-01-13  9:55   ` Jakob Koschel
  0 siblings, 0 replies; 4+ messages in thread
From: Jakob Koschel @ 2023-01-13  9:55 UTC (permalink / raw)
  To: Bagas Sanjaya; +Cc: Jonathan Corbet, linux-doc, linux-kernel



> On 13. Jan 2023, at 09:21, Bagas Sanjaya <bagasdotme@gmail.com> wrote:
> 
> On Thu, Jan 12, 2023 at 05:09:25PM +0100, Jakob Koschel wrote:
>> 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.
> ```

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

I'm happy to change this in v2.

> 
> Thanks.
> 
> -- 
> An old man doll... just what I always wanted! - Clara

- jakob


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] docs/scripts/gdb: add necessary make scripts_gdb step
  2023-01-12 16:09 [PATCH] docs/scripts/gdb: add necessary make scripts_gdb step Jakob Koschel
  2023-01-13  8:21 ` Bagas Sanjaya
@ 2023-01-19 21:09 ` Jonathan Corbet
  1 sibling, 0 replies; 4+ messages in thread
From: Jonathan Corbet @ 2023-01-19 21:09 UTC (permalink / raw)
  To: Jakob Koschel; +Cc: linux-doc, linux-kernel, Jakob Koschel

Jakob Koschel <jkl820.git@gmail.com> writes:

> 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.
>
> ---
>
>
> Signed-off-by: Jakob Koschel <jkl820.git@gmail.com>

Applied, thanks.

jon

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-01-19 21:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-12 16:09 [PATCH] docs/scripts/gdb: add necessary make scripts_gdb step Jakob Koschel
2023-01-13  8:21 ` Bagas Sanjaya
2023-01-13  9:55   ` Jakob Koschel
2023-01-19 21:09 ` Jonathan Corbet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).