This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] gdb: introduce objfile text_section_offset and data_section_offset methods
- From: Tom Tromey <tom at tromey dot com>
- To: Simon Marchi <simon dot marchi at polymtl dot ca>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 23 Jan 2020 15:41:10 -0700
- Subject: Re: [PATCH] gdb: introduce objfile text_section_offset and data_section_offset methods
- References: <20200114050342.972630-1-simon.marchi@polymtl.ca>
>>>>> "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