This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit/head+branch] fix build failure on pa-hpux (due to syscall patch)
- From: Joel Brobecker <brobecker at adacore dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 17 Sep 2009 12:25:43 -0700
- Subject: [commit/head+branch] fix build failure on pa-hpux (due to syscall patch)
Hello,
Noticed a couple of compilation errors on pa-hpux. One was due to
the absence of a PT_SYSCALL macro in the pa-hpux include headers,
and the other one was because a field got renamed (I grep'ed all
sources, just to make sure that we did not forget any other update).
Fixed thusly, on both head and branch. The change in gdb_ptrace.h
is not exactly on the totally obvious side, in terms of what value
to use if PT_SYSCALL is not defined, but it should not matter in
practice. I don't believe catch syscall has been ported to pa-hpux
anyway.
2009-09-17 Joel Brobecker <brobecker@adacore.com>
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.
--
Joel
Index: gdb_ptrace.h
===================================================================
RCS file: /cvs/src/src/gdb/gdb_ptrace.h,v
retrieving revision 1.10
diff -u -p -r1.10 gdb_ptrace.h
--- gdb_ptrace.h 3 Jan 2009 05:57:51 -0000 1.10
+++ gdb_ptrace.h 17 Sep 2009 19:12:14 -0000
@@ -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. */
Index: inf-ttrace.c
===================================================================
RCS file: /cvs/src/src/gdb/inf-ttrace.c,v
retrieving revision 1.48
diff -u -p -r1.48 inf-ttrace.c
--- inf-ttrace.c 24 May 2009 21:06:53 -0000 1.48
+++ inf-ttrace.c 17 Sep 2009 19:12:14 -0000
@@ -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: