This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Signed vs. unsigned adresses in solib-svr4
> From: Andreas Schwab <schwab@suse.de>
> Date: Thu, 29 Mar 2007 13:38:36 +0200
>
> Daniel Jacobowitz <drow@false.org> writes:
>
> > On Tue, Mar 27, 2007 at 10:20:23PM +0200, Andreas Schwab wrote:
> >> > - since I know that the assumption is wrong for MIPS. Isn't there an
> >> > extract_address or something like that which would be suitable?
> >>
> >> There is extract_typed_address, but I don't know how to construct the
> >> struct type that it needs.
> >
> > Probably builtin_type_void_data_ptr is all you need.
>
> How about this then? Regtestest on
> {i386,ia64,ppc,ppc64,s390,s390x,x86_64}-linux.
I like this.
>
> Andreas.
>
> 2007-03-29 Andreas Schwab <schwab@suse.de>
>
> * solib-svr4.h (struct link_map_offsets): Remove l_addr_size,
> l_ld_size, l_next_size, l_prev_size, l_name_size.
>
> * solib-svr4.c (LM_ADDR_FROM_LINK_MAP): Use extract_typed_address
> to extract addresses from link map.
> (LM_DYNAMIC_FROM_LINK_MAP): Likewise.
> (LM_NEXT): Likewise.
> (LM_NAME): Likewise.
> (IGNORE_FIRST_LINK_MAP_ENTRY): Likewise.
> (elf_locate_base): Likewise.
> (open_symbol_file_object): Likewise.
> (svr4_fetch_objfile_link_map): Likewise.
> (SOLIB_EXTRACT_ADDRESS): Remove unused macro.
> (HAS_LM_DYNAMIC_FROM_LINK_MAP): Test l_ld_offset instead of
> l_ld_size.
> (svr4_ilp32_fetch_link_map_offsets): Don't set removed members.
> (svr4_lp64_fetch_link_map_offsets): Likewise.
>
> * solib-legacy.c (legacy_svr4_fetch_link_map_offsets): Don't set
> removed members. Set l_ld_offset to -1 if not present.