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 Tue, 29 Jan 2013 17:15:13 +0100, Aleksandar Ristovski wrote:+ /* Section vma is unrelocated. If SO_BASE_ADDR is zero, then + use ASECT->VMA as-is. If not, then use offset + base addr. */ + res = target_verify_memory (data, (so_base_addr > 0)?
I do not see why to use target_verify_memory in this case.
target_verify_memory is there for large sections to compare only their 32-bit checksum. But build-id is already only 20 bytes long, with the protocol overhead the 4 vs. 20 bytes do not make a difference. And it needlessly weakens the check, it also does some patching of target_verify_memory. Just use target_read_memory and memcmp.
+ so_base_addr + sect_vma_offset + : asect->vma, + size);
so->abfd is not properly relocated (not sure why but it is so) but you can
iterate so->sections..so->sections_end which contains relocated ADDR (=target VMA). Then you can drop the svr4_unrelocated_vma and other calculations around.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |