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

Simon Marchi
2020-04-02T19:47:23Z

On 2020-04-02 3:45 p.m., Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:
>
> Simon> + return bfd_get_section_contents (abfd, section, contents->data (), offset, count);
>>>
>>> This line looks too long.
>
> It's still too long in this version.

Sorry, I missed that comment earlier. Fixed now.

> Simon> Now that I re-read it, I don't think the function should take the extra OFFSET and
> Simon> COUNT parameters, since they are not used anywhere. I went around our calls to
> Simon> bfd_get_section_contents, and I don't think they would be very useful. And I would
> Simon> prefer not to check in code if it's not going to be exercised.
>
> Simon> So I'd go with this simpler version instead. The extra complexity can be added later,
> Simon> if needed.
>
> Sounds reasonable to me.

Thanks, I'm pushing it with the above issue fixed.

Simon