This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA v3 3/6] Introduce partial_symbol::address
- From: Tom Tromey <tom at tromey dot com>
- To: Simon Marchi <simon dot marchi at ericsson dot com>
- Cc: Tom Tromey <tom at tromey dot com>, <gdb-patches at sourceware dot org>
- Date: Wed, 18 Jul 2018 11:47:27 -0600
- Subject: Re: [RFA v3 3/6] Introduce partial_symbol::address
- References: <20180607161955.9800-1-tom@tromey.com> <20180607161955.9800-4-tom@tromey.com> <54c4c40b-b183-3040-e319-fa5bf1b32638@ericsson.com>
>>>>> "Simon" == Simon Marchi <simon.marchi@ericsson.com> writes:
Simon> I think it would be clearer to name this "unrelocated_address".
I made this change.
>> + /* Set the address of this partial symbol. The address must be
>> + unrelocated. */
>> + void set_address (CORE_ADDR addr)
>> + {
>> + value.address = addr;
>> + }
Simon> Since this is the mirror of raw_address (or unrelocated_address), it might good to
Simon> name it set_raw_address (or set_unrelocated_address). Bugs in the calling code
Simon> would be more apparent. If you're playing with a relocated address and call
Simon> set_unrelocated_address, it's quite obvious something is wrong.
Simon> Except it's not actually true as of this patch (we still pass a relocated address),
Simon> so maybe it can be renamed later, when it is the case.
I've changed the final patch to rename it to set_unrelocated_address.
Tom