Re: [PATCH] gdb: introduce objfile text_section_offset and data_section_offset methods

Simon Marchi
2020-01-23T22:49:44Z

On 2020-01-23 5:41 p.m., Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi <simon.marchi@polymtl.ca> writes:
>
> Simon> The pattern
> Simon> objfile-> section_offsets[SECT_OFF_TEXT (objfile)]
>
> Simon> ... appears very often, to get the offset of the text section of an
> Simon> objfile. I thought it would be more readable to write it as:
>
> Simon> objfile-> text_section_offset ()
>
> Simon> ... so I added this method and used it where possible. I also added
> Simon> data_section_offset, although it is not used as much.
>
> Thanks. This looks good to me.
>
> Tom
>

Thanks, I'll make sure it still builds and then push it.

Simon