[PATCH 6/7] gdb: select "Cygwin" OS ABI for Cygwin binaries

Pedro Alves palves@redhat.com
Thu Apr 2 14:03:08 GMT 2020


On 4/2/20 3:01 PM, Simon Marchi wrote:
> On 2020-04-02 9:56 a.m., Pedro Alves wrote:
>> On 4/1/20 10:53 PM, Simon Marchi via Gdb-patches wrote:
>>> However, when BFD maps the file/section data in memory for GDB to read, is that mapping
>>> guaranteed to be sufficiently aligned as well?
>>
>> I think so.  If bfd heap allocates, then memory will be aligned to the word size at
>> least.  If bfd mmaps, then memory will be aligned to page size.  And then if the
>> data structures are aligned, we should be good.
> 
> Following this message from Tom [1], I'm going to change the code to use
> bfd_get_full_section_contents and store the data into a pre-allocated gdb::byte_vector.
> Does that change anything?

I don't think it does.

Thanks,
Pedro Alves



More information about the Gdb-patches mailing list