All of lore.kernel.org
 help / color / mirror / Atom feed
* vmlinux-gdb unable to parse_and_eval("hrtimer_resolution") on mainline
@ 2023-10-18 19:57 aftermath digital
  2023-10-19 17:27 ` Greg KH
  2023-10-19 17:35 ` Jan Kiszka
  0 siblings, 2 replies; 3+ messages in thread
From: aftermath digital @ 2023-10-18 19:57 UTC (permalink / raw)
  To: stable, jan.kiszka, kbingham

Hi,

I've tested the below on both linux-6.5.7 and mainline linux-6.6-rc6,
both of which seem to have the same issue.

GDB 13.2 isn't able to load vmlinux-gdb.py as it throws the following:

Traceback (most recent call last):
  File "/home/user/debug_kernel/linux-6.6-rc6/vmlinux-gdb.py", line
25, in <module>
    import linux.constants
  File "/home/user/debug_kernel/linux-6.6-rc6/scripts/gdb/linux/constants.py",
line 11, in <module>
    LX_hrtimer_resolution = gdb.parse_and_eval("hrtimer_resolution")
gdb.error: 'hrtimer_resolution' has unknown type; cast it to its declared type

I've built-linux like so:

make defconfig
scripts/config --disable SYSTEM_TRUSTED_KEYS
scripts/config --disable SYSTEM_REVOCATION_KEYS
scripts/config --set-str SYSTEM_TRUSTED_KEYS ""
scripts/config -e CONFIG_DEBUG_INFO -e CONFIG_GDB_SCRIPTS -e
CONFIG_FRAME_POINTER
make -j$(nproc)
make scripts_gdb

$ gcc --version
gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
$ gdb --version
GNU gdb (GDB) 13.2

This is my first time submitting a bug to the LK mailing list, please
let me know if this format is not correct or if you need more
information.

Thanks.

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

* Re: vmlinux-gdb unable to parse_and_eval("hrtimer_resolution") on mainline
  2023-10-18 19:57 vmlinux-gdb unable to parse_and_eval("hrtimer_resolution") on mainline aftermath digital
@ 2023-10-19 17:27 ` Greg KH
  2023-10-19 17:35 ` Jan Kiszka
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2023-10-19 17:27 UTC (permalink / raw)
  To: aftermath digital; +Cc: stable, jan.kiszka, kbingham

On Wed, Oct 18, 2023 at 08:57:47PM +0100, aftermath digital wrote:
> Hi,
> 
> I've tested the below on both linux-6.5.7 and mainline linux-6.6-rc6,
> both of which seem to have the same issue.
> 
> GDB 13.2 isn't able to load vmlinux-gdb.py as it throws the following:
> 
> Traceback (most recent call last):
>   File "/home/user/debug_kernel/linux-6.6-rc6/vmlinux-gdb.py", line
> 25, in <module>
>     import linux.constants
>   File "/home/user/debug_kernel/linux-6.6-rc6/scripts/gdb/linux/constants.py",
> line 11, in <module>
>     LX_hrtimer_resolution = gdb.parse_and_eval("hrtimer_resolution")
> gdb.error: 'hrtimer_resolution' has unknown type; cast it to its declared type
> 
> I've built-linux like so:
> 
> make defconfig
> scripts/config --disable SYSTEM_TRUSTED_KEYS
> scripts/config --disable SYSTEM_REVOCATION_KEYS
> scripts/config --set-str SYSTEM_TRUSTED_KEYS ""
> scripts/config -e CONFIG_DEBUG_INFO -e CONFIG_GDB_SCRIPTS -e
> CONFIG_FRAME_POINTER
> make -j$(nproc)
> make scripts_gdb
> 
> $ gcc --version
> gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
> $ gdb --version
> GNU gdb (GDB) 13.2
> 
> This is my first time submitting a bug to the LK mailing list, please
> let me know if this format is not correct or if you need more
> information.

Has this ever worked with any kernel version you have tried?  If so,
what was the last good version?  Can you run 'git bisect' to find the
offending commit?

thanks,

greg k-h

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

* Re: vmlinux-gdb unable to parse_and_eval("hrtimer_resolution") on mainline
  2023-10-18 19:57 vmlinux-gdb unable to parse_and_eval("hrtimer_resolution") on mainline aftermath digital
  2023-10-19 17:27 ` Greg KH
@ 2023-10-19 17:35 ` Jan Kiszka
  1 sibling, 0 replies; 3+ messages in thread
From: Jan Kiszka @ 2023-10-19 17:35 UTC (permalink / raw)
  To: aftermath digital, kbingham, Linux Kernel Mailing List; +Cc: stable

On 18.10.23 21:57, aftermath digital wrote:
> Hi,
> 
> I've tested the below on both linux-6.5.7 and mainline linux-6.6-rc6,
> both of which seem to have the same issue.
> 
> GDB 13.2 isn't able to load vmlinux-gdb.py as it throws the following:
> 
> Traceback (most recent call last):
>   File "/home/user/debug_kernel/linux-6.6-rc6/vmlinux-gdb.py", line
> 25, in <module>
>     import linux.constants
>   File "/home/user/debug_kernel/linux-6.6-rc6/scripts/gdb/linux/constants.py",
> line 11, in <module>
>     LX_hrtimer_resolution = gdb.parse_and_eval("hrtimer_resolution")
> gdb.error: 'hrtimer_resolution' has unknown type; cast it to its declared type
> 
> I've built-linux like so:
> 
> make defconfig
> scripts/config --disable SYSTEM_TRUSTED_KEYS
> scripts/config --disable SYSTEM_REVOCATION_KEYS
> scripts/config --set-str SYSTEM_TRUSTED_KEYS ""
> scripts/config -e CONFIG_DEBUG_INFO -e CONFIG_GDB_SCRIPTS -e
> CONFIG_FRAME_POINTER

I happen to run into this myself recently while upgrading a .config:
CONFIG_DEBUG_INFO is now selected by DEBUG_INFO_DWARF*. I've then turned
on DEBUG_INFO_DWARF5, and things worked again.

> make -j$(nproc)
> make scripts_gdb
> 
> $ gcc --version
> gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
> $ gdb --version
> GNU gdb (GDB) 13.2
> 
> This is my first time submitting a bug to the LK mailing list, please
> let me know if this format is not correct or if you need more
> information.
> 

Format is fine, just general linux-kernel@vger... reaches a broader
audience and is more appropriate for such a question.

Jan

-- 
Siemens AG, Technology
Linux Expert Center


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

end of thread, other threads:[~2023-10-19 17:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-18 19:57 vmlinux-gdb unable to parse_and_eval("hrtimer_resolution") on mainline aftermath digital
2023-10-19 17:27 ` Greg KH
2023-10-19 17:35 ` Jan Kiszka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.