This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 5/5] powerpc64-aix aix-thread patch
- From: Tom Tromey <tromey at redhat dot com>
- To: Raunaq 12 <raunaq12 at in dot ibm dot com>
- Cc: gdb-patches at sourceware dot org, brobecker at adacore dot com
- Date: Wed, 10 Jul 2013 11:40:56 -0600
- Subject: Re: [PATCH 5/5] powerpc64-aix aix-thread patch
- References: <OFCC1287F3 dot 734C3B12-ON65257BA3 dot 003677E5-65257BA3 dot 00368540 at in dot ibm dot com> <20130709144847 dot GC8063 at adacore dot com> <OFD717B12A dot 6ED9144C-ON65257BA4 dot 003658B7-65257BA4 dot 00380386 at in dot ibm dot com>
>>>>> ">" == Raunaq 12 <raunaq12@in.ibm.com> writes:
>> aix-thread.c has many ptrace calls like -
>> 'ptrace32 (PTT_WRITE_SPRS, tid, (int *) &sprs32, 0, NULL)'
>> in 64 bit mode this has to be changed to -
>> 'ptrace32 (PTT_WRITE_SPRS, tid, (long long) &sprs32, 0, NULL)'
>> The patch that adds aix64-thread.c which has all the modified ptrace calls
>> is very large as it contains a new file entirely.
>> But, the only difference between aix-thread.c and aix64-thread.c is what is
>> mentioned above.
>> I have attached the entire patch which creates aix64-thread.c below.
I think making a copy of the entire file is not a great approach.
It means that any changes will have to be made twice.
It seems to me that it would be much simpler to introduce a new function
or set of functions that do the right thing; then use these new
functions everywhere in aix-thread.c. This would eliminate the code
copying and reduce the number of #if conditions.
Tom