[PATCH] Use PTRACE_GETREGS on i386
Mike Frysinger
vapier at gentoo.org
Fri Aug 26 19:56:15 UTC 2011
On Friday, August 26, 2011 13:32:17 Denys Vlasenko wrote:
> On Fri, 2011-08-26 at 20:36 +0400, Dmitry V. Levin wrote:
> > On Thu, Aug 25, 2011 at 12:10:06PM +0200, Denys Vlasenko wrote:
> > > +static struct i386_user_regs_struct i386_regs;
> >
> > strace is not going to call PTRACE_GETREGS with different regs
> > structures, so is there any use to include the architecture name to the
> > structure name?
>
> There *is* a reason to name it i386_regs: it makes it possible
> to easily find its uses.
>
> For example, Alpha, Blackfin and SH all have "static long r0". How can
> I quickly find only Alpha's usages of r0? There is no easy way to do it.
> I'd rather have them named alpha_r0, bfin_r0, sh_r0.
>
> Same problem with variables named r10, a3 - several arches have them.
> "struct <something> regs" is used by FOUR architectures.
>
> Variable pc is unique to S390, but it has such a short name that grep
> finds a lot of stray matches. Again, s390_pc would be much nicer.
i think this is a structure problem with the strace code base in general.
it'd be nice if we had all the arch-cruft in an arch-specific subdir instead
of sprinkling ifdefs everywhere. changing the variable names is a very poor-
man's solution.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20110826/df1e4d7b/attachment.bin>
More information about the Strace-devel
mailing list