This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/4] 'catch syscall' feature -- Architecture-independent part


> From: Thiago Jung Bauermann <bauerman@br.ibm.com>
> Cc: =?ISO-8859-1?Q?S=E9rgio?= Durigan =?ISO-8859-1?Q?J=FAnior?= <sergiodj@linux.vnet.ibm.com>,
>         gdb-patches@sourceware.org
> Date: Tue, 04 Nov 2008 20:11:27 -0200
> 
> > More generally, let's say I'd like to implement support for this on
> > Windows -- how would I need to go about it?
> 
> ... but from what you are saying it seems that in Windows it's
> different. What's the proper datatype to represent a syscall there?

A symbol, I think.

> > > +      /* Checking if the user provided a syscall name or a number.  */
> > > +      if (isdigit (cur_name[0]))
> > 
> > Is the assumption that no name will ever begin with a digit
> > universally valid?
> 
> Syscall names need to be valid function names in at least the most
> common programming languages. I'm far from being a specialist, but isn't
> it a very common (or universal?) restriction that function names have to
> start with a non-digit character?

But why assume that, instead of just checking that the argument is
all-digits?  It's so easy (e.g., use `strtoul') that shortcuts like
this one are not needed.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]