This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH 1/3] BFD: Write Linux core PRSTATUS note into MIPS core file
- From: "Maciej W. Rozycki" <macro at mips dot com>
- To: Djordje Todorovic <djordje dot todorovic at rt-rk dot com>
- Cc: <binutils at sourceware dot org>, <gdb-patches at sourceware dot org>, <asowda at cisco dot com>, <petar dot jovanovic at rt-rk dot com>, <nemanja dot popov at rt-rk dot com>, <nikola dot prica at rt-rk dot com>
- Date: Wed, 18 Oct 2017 14:33:11 +0100
- Subject: Re: [PATCH 1/3] BFD: Write Linux core PRSTATUS note into MIPS core file
- Authentication-results: sourceware.org; auth=none
- References: <1508248194-26950-1-git-send-email-djordje.todorovic@rt-rk.com>
On Tue, 17 Oct 2017, Djordje Todorovic wrote:
> diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c
> index 17ca432..2ee15e9 100644
> --- a/bfd/elf32-mips.c
> +++ b/bfd/elf32-mips.c
> @@ -2373,6 +2373,45 @@ elf32_mips_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
>
> return TRUE;
> }
> +
> +/* Write Linux core PRSTATUS note into core file. */
> +
> +static char *
> +elf32_mips_write_core_note (bfd *abfd, char *buf, int *bufsiz, int note_type,
> + ...)
Formatting: please align the wrapped line to the inside of the opening
parenthesis above, i.e.:
elf32_mips_write_core_note (bfd *abfd, char *buf, int *bufsiz, int note_type,
...)
> @@ -2554,6 +2593,9 @@ static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap = {
> #define ELF_COMMONPAGESIZE 0x1000
> #define elf32_bed elf32_tradbed
>
> +#undef elf_backend_write_core_note
> +#define elf_backend_write_core_note elf32_mips_write_core_note
Formatting: please use tabs to align the RHS to column #40 like all the
other such definitions.
> diff --git a/bfd/elf64-mips.c b/bfd/elf64-mips.c
> index d51124b..f3997bd 100644
> --- a/bfd/elf64-mips.c
> +++ b/bfd/elf64-mips.c
> @@ -4248,6 +4248,45 @@ elf64_mips_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
>
> return TRUE;
> }
> +
> +/* Write Linux core PRSTATUS note into core file. */
> +
> +static char *
> +elf64_mips_write_core_note (bfd *abfd, char *buf, int *bufsiz, int note_type,
> + ...)
Formatting.
> @@ -4454,6 +4493,9 @@ const struct elf_size_info mips_elf64_size_info =
> #define ELF_COMMONPAGESIZE 0x1000
> #define elf64_bed elf64_tradbed
>
> +#undef elf_backend_write_core_note
> +#define elf_backend_write_core_note elf64_mips_write_core_note
Formatting.
> diff --git a/bfd/elfn32-mips.c b/bfd/elfn32-mips.c
> index fdae183..d9d2020 100644
> --- a/bfd/elfn32-mips.c
> +++ b/bfd/elfn32-mips.c
> @@ -3630,6 +3630,45 @@ elf_n32_mips_grok_freebsd_prstatus (bfd *abfd, Elf_Internal_Note *note)
> return _bfd_elfcore_make_pseudosection (abfd, ".reg",
> size, note->descpos + offset);
> }
> +
> +/* Write Linux core PRSTATUS note into core file. */
> +
> +static char *
> +elf32_mips_write_core_note (bfd *abfd, char *buf, int *bufsiz, int note_type,
> + ...)
Formatting.
> @@ -3807,6 +3846,9 @@ static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap = {
> #define ELF_COMMONPAGESIZE 0x1000
> #define elf32_bed elf32_tradbed
>
> +#undef elf_backend_write_core_note
> +#define elf_backend_write_core_note elf32_mips_write_core_note
Formatting.
Maciej