From 1d27d543efd90b1e4865bd1ebe148d77a0de2662 Mon Sep 17 00:00:00 2001 From: brobecke Date: Thu, 17 Sep 2009 19:19:58 +0000 Subject: [PATCH] Fix a build failure on pa-hpux: * gdb_ptrace.h (PT_SYSCALL): Define here if not already defined. * inf-ttrace.c (inf_ttrace_wait): Fix compilation failure introduced after field syscall_id inside struct target_waitstatus has been renamed into syscall_number. --- gdb/ChangeLog | 8 ++++++++ gdb/gdb_ptrace.h | 11 +++++++++++ gdb/inf-ttrace.c | 4 ++-- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 351369217b..126eec1a4b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2009-09-17 Joel Brobecker + + Fix a build failure on pa-hpux: + * gdb_ptrace.h (PT_SYSCALL): Define here if not already defined. + * inf-ttrace.c (inf_ttrace_wait): Fix compilation failure + introduced after field syscall_id inside struct target_waitstatus + has been renamed into syscall_number. + 2009-09-16 H.J. Lu PR gdb/10649 diff --git a/gdb/gdb_ptrace.h b/gdb/gdb_ptrace.h index aeb46d5520..8e32e88577 100644 --- a/gdb/gdb_ptrace.h +++ b/gdb/gdb_ptrace.h @@ -106,6 +106,17 @@ # endif #endif +/* For systems such as HP/UX that do not provide PT_SYSCALL, define it + here as an alias for PT_CONTINUE. This is what the PT_SYSCALL + request is expected to do, in addition to stopping when entering/ + exiting a system call. Chances are, if the system supports system + call tracing, enabling this feature is probably done separately; + and there is probably no special request that we would be required + to use when resuming the execution of our program. */ +#ifndef PT_SYSCALL +# define PT_SYSCALL PT_CONTINUE +#endif + /* Some systems, in particular DEC OSF/1, Digital Unix, Compaq Tru64 or whatever it's called these days, don't provide a prototype for ptrace. Provide one to silence compiler warnings. */ diff --git a/gdb/inf-ttrace.c b/gdb/inf-ttrace.c index e136c24fd8..5233619199 100644 --- a/gdb/inf-ttrace.c +++ b/gdb/inf-ttrace.c @@ -1104,7 +1104,7 @@ inf_ttrace_wait (struct target_ops *ops, inf_ttrace_disable_page_protections (tts.tts_pid); } ourstatus->kind = TARGET_WAITKIND_SYSCALL_ENTRY; - ourstatus->value.syscall_id = tts.tts_scno; + ourstatus->value.syscall_number = tts.tts_scno; break; case TTEVT_SYSCALL_RETURN: @@ -1119,7 +1119,7 @@ inf_ttrace_wait (struct target_ops *ops, inf_ttrace_num_lwps_in_syscall--; } ourstatus->kind = TARGET_WAITKIND_SYSCALL_RETURN; - ourstatus->value.syscall_id = tts.tts_scno; + ourstatus->value.syscall_number = tts.tts_scno; break; default: -- 2.11.0