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]

gcore support for AIX


Hi All,

I have came across a way to add gencore support for the AIX.
Need to your input and suggestions on current implementation or is their 
any other way this can be done ?

Some background on the gencore command/API on AIX.

AIX provides a gencore command and gencore api for generating a 
core of a running program. If debugging a process through gdb,
gdb uses ptrace to control the prcoess execution.

In this case all threads of process must have stopped by
gdb and gencore will hang if gencore command or API is used on the
process which gdb is debugging. 

In order to keep it from hanging, gdb would need to continue one thread
in the process for as little as one instruction.
If a thread is continued, then when it runs it will be resumed such that
the core signal will be handled by that thread of the process and the
core file will be written.

In this implementation gencore api will be called through a separate gdb 
thread
which will be scheduled and gencore will be executed after a call to 
"step_1_ext (0, 1, "1")" which will call step_1 to execute single 
instruction.

I am yet to try this patch on other linux system to check if the change 
won't cause any issues their.



Thanks,
Sangamesh

Attachment: aix-gcore.patch
Description: Binary data

Attachment: testings
Description: Binary data


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