Re: [PATCH] gdb: use bfd_get_section_contents to read section contents in, is_linked_with_cygwin_dll

Tom Tromey
2020-04-02T19:01:57Z

>>>>> "Simon" == Simon Marchi <simon.marchi@polymtl.ca> writes:

Simon> + return bfd_get_section_contents (abfd, section, contents->data (), offset, count);

This line looks too long.

Simon> +/* Wrapper around bfd_get_section_contents, returning the requested section
Simon> + contents in *CONTENTS. Return true on success, false otherwise.
Simon> +
Simon> + If COUNT is not specified, read from OFFSET until the end of the
Simon> + section. */
Simon> +
Simon> +bool
Simon> +gdb_bfd_get_section_contents (bfd *abfd, asection *section,

Normally in .h files we don't put a newline after the type.

Simon> + gdb::byte_vector idata_contents;
Simon> + if (!gdb_bfd_get_section_contents(abfd, idata_section, &idata_contents))

Space before paren.

Otherwise this looks good. Thank you for doing this.

Tom