This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On 2016-10-14 06:53, Yao Qi wrote:
In this patch, I add a new gdbarch method convert_from_func_addr, which converts function address back to function descriptor address or function pointer address. It is the reversed operation of convert_from_func_ptr_addr. We convert function address to function descriptor address when,
I think these could be better named, byt saying what it converts from _and_ what it converts to. With convert_from_func_addr, we know it takes as input a function address, but we don't know what it converts it to. What about something like convert_func_address_to_descriptor (or convert_func_addr_to_desc if you prefer shorter names)?
I think that it would also be clearer if we always used the same terminology (address and descriptor seem good). It is not very intuitive what is the difference between convert_from_func_ptr_addr and convert_from_func_addr. "function pointer address" and "function address" sound too close to each other, so it's easy to confuse them...
3. User visible changes This patch brings several user visible changes, which look more accurate, shown by this table below, COMMAND BEFORE AFTERp main main function address main function descriptoraddress disass main disassembly function main not changeddisass main+4,+4 disassembly 4 bytes from disassembly 4 bytes from function main address + 4 main's function descriptor + 4 x/i main show one instruction on show one instruction on main'sfunction main address function descriptor Although the latter looks inconvenient, that is consistent to the meaning on C language level. Due to these changes, test cases are adjusted accordingly.
Could you provide example of the actual output of those commands, before and after? It is not clear to me what the difference will be.
Thanks, Simon
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |