public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Re: [PATCH 1/5] bfd: add elfcore_write_file_note
       [not found] ` <20210103130300.21637-2-mihails.strasuns@intel.com>
@ 2021-01-22 22:17   ` Simon Marchi
  2021-01-25 11:04     ` Nick Clifton
  0 siblings, 1 reply; 2+ messages in thread
From: Simon Marchi @ 2021-01-22 22:17 UTC (permalink / raw)
  To: Mihails Strasuns, gdb-patches; +Cc: binutils

Adding binutils@ in CC, can someone over there please review this change?

The full series is here:

https://sourceware.org/pipermail/gdb-patches/2021-January/174652.html

Simon

On 2021-01-03 8:02 a.m., Mihails Strasuns via Gdb-patches wrote:
> Adds a trivial wrapper over elfcore_write_note, primarily to be more
> consistent with other ELF note helper functions and highlight NT_FILE as
> one of notes handled by gdb.
> 
> bfd/ChangeLog:
> 2020-12-17  Mihails Strasuns  <mihails.strasuns@intel.com>
> 
> 	* bfd-elf.h (elfcore_write_file_note): New function.
> 	* elf.c (elfcore_write_file_note): New function.
> 
> gdb/ChangeLog:
> 2020-12-17  Mihails Strasuns  <mihails.strasuns@intel.com>
> 
> 	* linux-tdep.c (linux_make_mappings_corefile_notes): Start using
> 	elfcore_write_file_note.
> ---
>  bfd/elf-bfd.h    | 2 ++
>  bfd/elf.c        | 8 ++++++++
>  gdb/linux-tdep.c | 8 +++-----
>  3 files changed, 13 insertions(+), 5 deletions(-)
> 
> diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
> index 53b5ffc33d..75d5576042 100644
> --- a/bfd/elf-bfd.h
> +++ b/bfd/elf-bfd.h
> @@ -2801,6 +2801,8 @@ extern char *elfcore_write_lwpstatus
>    (bfd *, char *, int *, long, int, const void *);
>  extern char *elfcore_write_register_note
>    (bfd *, char *, int *, const char *, const void *, int);
> +extern char *elfcore_write_file_note
> +  (bfd *, char *, int *, const void*, int);
>  
>  /* Internal structure which holds information to be included in the
>     PRPSINFO section of Linux core files.
> diff --git a/bfd/elf.c b/bfd/elf.c
> index 9c82912aeb..070db5b180 100644
> --- a/bfd/elf.c
> +++ b/bfd/elf.c
> @@ -12028,6 +12028,14 @@ elfcore_write_register_note (bfd *abfd,
>    return NULL;
>  }
>  
> +char *
> +elfcore_write_file_note (bfd *obfd, char *note_data, int *note_size,
> +			 const void *buf, int bufsiz)
> +{
> +  return elfcore_write_note (obfd, note_data, note_size,
> +			     "CORE", NT_FILE, buf, bufsiz);
> +}
> +
>  static bfd_boolean
>  elf_parse_notes (bfd *abfd, char *buf, size_t size, file_ptr offset,
>  		 size_t align)
> diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c
> index 5ae28d826c..5b44e7135b 100644
> --- a/gdb/linux-tdep.c
> +++ b/gdb/linux-tdep.c
> @@ -1591,11 +1591,9 @@ linux_make_mappings_corefile_notes (struct gdbarch *gdbarch, bfd *obfd,
>        obstack_grow (&data_obstack, obstack_base (&filename_obstack),
>  		    size);
>  
> -      note_data.reset (elfcore_write_note
> -			 (obfd, note_data.release (),
> -			  note_size, "CORE", NT_FILE,
> -			  obstack_base (&data_obstack),
> -			  obstack_object_size (&data_obstack)));
> +      note_data.reset (elfcore_write_file_note (obfd, note_data.release (), note_size,
> +						obstack_base (&data_obstack),
> +						obstack_object_size (&data_obstack)));
>      }
>  }
>  
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/5] bfd: add elfcore_write_file_note
  2021-01-22 22:17   ` [PATCH 1/5] bfd: add elfcore_write_file_note Simon Marchi
@ 2021-01-25 11:04     ` Nick Clifton
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2021-01-25 11:04 UTC (permalink / raw)
  To: Simon Marchi, Mihails Strasuns, gdb-patches; +Cc: binutils

Hi Simon,

> Adding binutils@ in CC, can someone over there please review this change?

>> bfd/ChangeLog:
>> 2020-12-17  Mihails Strasuns  <mihails.strasuns@intel.com>
>>
>> 	* bfd-elf.h (elfcore_write_file_note): New function.
>> 	* elf.c (elfcore_write_file_note): New function.
This part of the change is totally fine.  Please consider it approved.

Cheers
   Nick


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-25 11:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20210103130300.21637-1-mihails.strasuns@intel.com>
     [not found] ` <20210103130300.21637-2-mihails.strasuns@intel.com>
2021-01-22 22:17   ` [PATCH 1/5] bfd: add elfcore_write_file_note Simon Marchi
2021-01-25 11:04     ` Nick Clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).