[PATCH, MIPS] Extract PID from core dump file

Maciej W. Rozycki macro@imgtec.com
Thu Jun 15 23:37:00 GMT 2017


On Mon, 5 Jun 2017, Djordje Todorovic wrote:

> There is already a thread for this but it is not correct ([PATCH, MIPS]
> Extract PID from core file by Michael Eager).  As author in this thread says
> it was only tested on MIPS32 (N32) .

 Please note that n32 is a MIPS64 ABI (an ILP32 ABI requiring a 64-bit 
processor).

> This patch is tested on MIPS32 and MIPS64
> executables and both points for setting pid in bfd/elf32-mips.c and
> bfd/elf64-mips.c is hit respectively. It is also checked in Linux kernel and
> the size of pid is the same as size of int.
> 
> It can be found in the source of Linux kernel:
> include/uapi/asm-generic/posix_types.h
> ...
> #ifndef __kernel_pid_t
> typedef int        __kernel_pid_t;
> #endif
> ...

 Please resend with a description clearly stating what problem you intend 
to solve, such that it can be used as the commit message.  If sending a 
GIT-formatted patch, then place any comments not to be committed after the
`---' separator (there is no requirement to send GIT-formatted patches for 
this project though).

 Do not include an update to any ChangeLog files with the patch itself; it 
will cause a conflict when the patch is applied.  Include the intended 
ChangeLog entries at the end of the description instead, and the committer 
will apply them as appropriate.

> From 79272bae0b10fa35b640d4006045f389e9a85849 Mon Sep 17 00:00:00 2001
> From: Djordje Todorovic <djordje.todorovic@rt-rk.com>
> Date: Fri, 2 Jun 2017 13:16:00 +0200
> Subject: [PATCH] Extract PID from MIPS core dump file
> 
> bfd/ChangeLog:
> 
>     * elf32-mips.c (elf32_mips_grok_psinfo): Extract core->pid.
>     * elf64-mips.c (elf64_mips_grok_psinfo): Likewise.

 Why only update elf32-mips.c and elf64-mips.c and not elfn32-mips.c?

 Also did you verify your change and if so, then how?  When submitting a 
change please always say how it has been tested.

 Finally, I see this is your first patch posted, so please clarify if you 
have a copyright assignment in place with FSF.  This is a very small 
change, so it's likely that it can go in even without such an assignment,
however it would be preferable that you had it, and it will be a 
requirement if you intend to submit more changes.

 Please let me know if you have any questions.

  Maciej



More information about the Binutils mailing list