This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH RFA] procfs.c related changes for AIX 5
- To: Kevin Buettner <kevinb at cygnus dot com>
- Subject: Re: [PATCH RFA] procfs.c related changes for AIX 5
- From: Eli Zaretskii <eliz at is dot elta dot co dot il>
- Date: Tue, 6 Mar 2001 11:07:39 +0200 (IST)
- cc: Robert Lipe <rjl at sco dot com>, David Taylor <taylor at redhat dot com>, Michael Snyder <msnyder at redhat dot com>, Nick Duffek <nsd at cygnus dot com>, Peter Schauer <Peter dot Schauer at regent dot e-technik dot tu-muenchen dot de>, gdb-patches at sources dot redhat dot com
On Mon, 5 Mar 2001, Kevin Buettner wrote:
> 2) AIX5 does not have a static set of syscalls. Consequently, there
> is no sys/syscall.h file which provides a nice mapping of
> symbolic names to syscall numbers. Instead, AIX5 provides
> /proc/PID/sysent which contains the information necessary to map
> strings to syscall numbers.
>
> These syscall numbers are guaranteed (at least according to the
> developer that I spoke with) to be fixed for the lifetime of a
> process, but they can certainly vary between processes.
Won't this cause problems with debugging syscall-related code, since
the values for GDB and the debuggee may be different?
> The changes needed to the code due to this change were fairly
> significant:
>
> a) sysset_t data structures (or data structures which contain
> sysset_t) must be dynamically allocated. They must be
> copied with memcpy() and explicitly freed when no longer
> needed.
>
> b) Comparisons against SYS_* constants no longer work. I've
> introduced a number of predicate functions (such as
> syscall_is_exit()) which will indicate whether a
> given system call number is a particular system call. All code
> which formerly relied on comparisons against a system call
> number was rewritten to call one of these new predicate
> functions instead.
Shouldn't these be documented somehow in gdbint.texinfo?