Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:ChickeNES:osdev
cross-alpha-gdb
gdb-testsuite-require-syscall-time-in-gdb.rever...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File gdb-testsuite-require-syscall-time-in-gdb.reverse-ti.patch of Package cross-alpha-gdb
From e4db94ab97c500e9090feb6da8a1e7974c5c0d9a Mon Sep 17 00:00:00 2001 From: Tom de Vries <tdevries@suse.de> Date: Tue, 21 Feb 2023 14:10:12 +0100 Subject: [PATCH 2/6] [gdb/testsuite] Require syscall time in gdb.reverse/time-reverse.exp On aarch64-linux, I run into: ... Running gdb.reverse/time-reverse.exp ... gdb compile failed, gdb.reverse/time-reverse.c: In function 'main': gdb.reverse/time-reverse.c:39:12: error: 'SYS_time' undeclared \ (first use in this function); did you mean 'SYS_times'? syscall (SYS_time, &time_global); ^~~~~~~~ SYS_times gdb.reverse/time-reverse.c:39:12: note: each undeclared identifier is \ reported only once for each function it appears in UNTESTED: gdb.reverse/time-reverse.exp: failed to prepare ... Fix this by adding a new proc have_syscall, and requiring syscall time, such that we have instead: ... UNSUPPORTED: gdb.reverse/time-reverse.exp: require failed: \ expr [have_syscall time] ... Tested on x86_64-linux and aarch64-linux. --- gdb/testsuite/gdb.reverse/time-reverse.exp | 2 ++ gdb/testsuite/lib/gdb.exp | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/gdb/testsuite/gdb.reverse/time-reverse.exp b/gdb/testsuite/gdb.reverse/time-reverse.exp index 73648af992b..d382d1c2337 100644 --- a/gdb/testsuite/gdb.reverse/time-reverse.exp +++ b/gdb/testsuite/gdb.reverse/time-reverse.exp @@ -25,6 +25,8 @@ if ![supports_reverse] { standard_testfile +if { ![have_syscall time] } { return } + if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } { return -1 } diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 85ef279bfe9..095d8930edb 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -9410,5 +9410,16 @@ gdb_caching_proc linux_kernel_version { return [list $v1 $v2 $v3] } +# Return 1 if syscall NAME is supported. + +proc have_syscall { name } { + set src \ + [list \ + "#include <sys/syscall.h>" \ + "int var = SYS_$name;"] + set src [join $src "\n"] + return [gdb_can_simple_compile have_syscall_$name $src object] +} + # Always load compatibility stuff. load_lib future.exp -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor