This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 3/5] powerpc64-aix inf-ptrace patch
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: tromey at redhat dot com
- Cc: raunaq12 at in dot ibm dot com, gdb-patches at sourceware dot org, brobecker at adacore dot com
- Date: Wed, 10 Jul 2013 21:07:10 +0200 (CEST)
- Subject: Re: [PATCH 3/5] powerpc64-aix inf-ptrace patch
- References: <OFE3A164F2 dot 0E58AFE9-ON65257BA4 dot 003110DC-65257BA4 dot 0032D802 at in dot ibm dot com> <87r4f6fgst dot fsf at fleche dot redhat dot com>
> From: Tom Tromey <tromey@redhat.com>
> Date: Wed, 10 Jul 2013 11:47:30 -0600
>
> >>>>> ">" == Raunaq 12 <raunaq12@in.ibm.com> writes:
>
> >> Since that is not the right way to go about it, I thought it would be
> >> better to create a new file called 'inf-ptrace64.c' derived from
> >> inf-ptrace instead, This new file contains all these above mentioned
> >> changes. inf-ptrace64 will be compiled only if the host is detected
> >> as powerpc64-ibm-aix. SO, it will not interfere with the original
> >> inf-ptrace that is used if host is powerpc-ibm-aix
>
> No, copying the file is worse than other available alternatives.
> For example you can use configure to discover the proper argument types,
> and then write a function that wraps ptrace and provides the needed
> casts.
I agree that copying inf-ptrace.c isn't the right approach. Tom's
suggestion might be viable, but I wouldn't be pleased with more magic
casts and #ifdefs in inf-ptrace.c.