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: gcore support for AIX


On 10/18/2017 10:41 AM, Sangamesh Mallayya wrote:

>> Some comments on the patch itself:
>>
>>> +#if (GDB_OSABI_DEFAULT == GDB_OSABI_AIX)
>>
>> We really try to avoid this type of #ifdef conditional code.  Platform-
>> specific code should be encapsulated into target callback routines.
>> There are already some of those related to gcore.  If those do not
>> suffice to implement this feature on AIX, they should be extended
>> or new ones added.  The actual implementation can then be provided in
>> rs6000-nat.c
>>
> Thanks for pointing this out.
> Best possible solution here to add gcore support for AIX is to implement 
> it the way it was done for other platforms instead of using gencore 
> command/API.
> And platform changes should go into the rs600-nat.c files.
> 

+1000.

> Idea here is just to make gdb continue it's execution after executing 
> single instruction.
> I think waiting on gencore process completion can be also possible and can 
> be done that way too. 

Even if you make sure to only run one instruction, that is still
undesirable, because by running an instruction you're altering
the state of the program that you want to dump core.  That
instruction may well corrupt the inferior, or kill it...  That's
extremely surprising for users that are dumping core exactly to
save state _because_ they've determined that the program just
gotten into a messed up state that they want to be able to analyze
again [state which may be hard to reproduce].

I'd really really prefer if AIX implemented core support by making
gdb/bfd themselves create the core dump.

Thanks,
Pedro Alves


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