]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
[gdb/testsuite] Fix gdb.arch/arm-single-step-kernel-helper.exp
authorTom de Vries <tdevries@suse.de>
Fri, 16 Aug 2024 12:22:46 +0000 (14:22 +0200)
committerTom de Vries <tdevries@suse.de>
Fri, 16 Aug 2024 12:22:46 +0000 (14:22 +0200)
commit51f38ebfc430b81a6ee93dbb37ed293b78f87778
tree2a2de64411d833fec88c0cc5820baff25daaf9fb
parentbc737bc7fb7808d2915cc15cfba4b84b345940f1
[gdb/testsuite] Fix gdb.arch/arm-single-step-kernel-helper.exp

On arm-linux I run into:
...
(gdb) p *kernel_user_helper_version^M
Cannot access memory at address 0xffff0ffc^M
(gdb) FAIL: gdb.arch/arm-single-step-kernel-helper.exp: check kernel helper version
...

What the test-case is trying to do, is to access a special address in the arm
linux kernel [1] using ptrace, which doesn't seem to work.

This is with kernel version 6.1.55.  Perhaps this used to work, but the kernel
was modified to be more strict with respect to access to this special address.

Fix this by making the inferior access that special address instead.

Tested on arm-linux.

Approved-By: Luis Machado <luis.machado@arm.com>
PR testsuite/32070
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32070

[1] https://www.kernel.org/doc/Documentation/arm/kernel_user_helpers.txt
gdb/testsuite/gdb.arch/arm-single-step-kernel-helper.c
gdb/testsuite/gdb.arch/arm-single-step-kernel-helper.exp