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 5/5] powerpc64-aix aix-thread patch


>>>>> ">" == 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


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