Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@cygnus.com>
To: Eli Zaretskii <eliz@is.elta.co.il>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [PATCH RFA] procfs.c related changes for AIX 5
Date: Tue, 06 Mar 2001 01:29:00 -0000	[thread overview]
Message-ID: <1010306092900.ZM9261@ocotillo.lan> (raw)
In-Reply-To: <Pine.SUN.3.91.1010306110708.7922P-100000@is>

On Mar 6, 11:07am, Eli Zaretskii wrote:

> 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?

GDB knows the pid of the debuggee and interogates its syscall
numbers in /proc/PID/sysent.  I.e, it gets the syscall numbers
for the child process that it's debugging from the /proc filesystem.

If you're asking about actually debugging code that contains syscalls,
I'm not sure I see how this enters the picture.  Does GDB have some
additional knowledge of syscall numbers somewhere that I'm not aware
of?

BTW, for a given release of the OS, I think there is a subset of the
syscall numbers that'll be fixed and won't change.  So, in theory,
it'd be possible to use a table of #defines for these, but to the best
of my knowledge, IBM hasn't provided any in their header files.

> >     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?

Probably.  (I'll take a look.)


  reply	other threads:[~2001-03-06  1:29 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-05 18:58 Kevin Buettner
2001-03-06  1:11 ` Eli Zaretskii
2001-03-06  1:29   ` Kevin Buettner [this message]
2001-03-06  1:41     ` Eli Zaretskii
     [not found] ` <3AAEC861.2756C62A@cygnus.com>
     [not found]   ` <msnyder@cygnus.com>
2001-03-26 18:24     ` Kevin Buettner
2001-07-30  5:47 Pb when calling a nested function in the inferior Joel Brobecker
2001-07-30 10:32 ` Michael Snyder
2001-07-30 11:31   ` Kevin Buettner
2001-07-30 14:24     ` Joel Brobecker
2001-07-30 15:41       ` Andrew Cagney
2001-07-30 15:49       ` Kevin Buettner
2001-07-31  0:24         ` Joel Brobecker
2001-07-31  1:20           ` Kevin Buettner
2001-07-31  1:36             ` Joel Brobecker
2001-07-31  1:29           ` Kevin Buettner
2001-08-23  3:40         ` Joel Brobecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1010306092900.ZM9261@ocotillo.lan \
    --to=kevinb@cygnus.com \
    --cc=eliz@is.elta.co.il \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox