aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib-legacy.c
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2007-04-10 08:47:53 +0000
committerAndreas Schwab <schwab@linux-m68k.org>2007-04-10 08:47:53 +0000
commitcfaefc65a409d1fdc5cdaee3ce430e735aba6362 (patch)
tree85789949b5ac415310c80f5b81aae65bf3e412d7 /gdb/solib-legacy.c
parente701ca866ae6842699d81e7e201f2d01e35ba10d (diff)
downloadgdb-cfaefc65a409d1fdc5cdaee3ce430e735aba6362.zip
gdb-cfaefc65a409d1fdc5cdaee3ce430e735aba6362.tar.gz
gdb-cfaefc65a409d1fdc5cdaee3ce430e735aba6362.tar.bz2
* 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.
Diffstat (limited to 'gdb/solib-legacy.c')
-rw-r--r--gdb/solib-legacy.c32
1 files changed, 1 insertions, 31 deletions
diff --git a/gdb/solib-legacy.c b/gdb/solib-legacy.c
index d876802..72af7ce 100644
--- a/gdb/solib-legacy.c
+++ b/gdb/solib-legacy.c
@@ -63,51 +63,28 @@ legacy_svr4_fetch_link_map_offsets (void)
lmo.link_map_size = sizeof (struct link_map);
lmo.l_addr_offset = offsetof (struct link_map, l_addr);
- lmo.l_addr_size = fieldsize (struct link_map, l_addr);
-
lmo.l_next_offset = offsetof (struct link_map, l_next);
- lmo.l_next_size = fieldsize (struct link_map, l_next);
-
lmo.l_ld_offset = offsetof (struct link_map, l_ld);
- lmo.l_ld_size = fieldsize (struct link_map, l_ld);
-
lmo.l_prev_offset = offsetof (struct link_map, l_prev);
- lmo.l_prev_size = fieldsize (struct link_map, l_prev);
-
lmo.l_name_offset = offsetof (struct link_map, l_name);
- lmo.l_name_size = fieldsize (struct link_map, l_name);
#else /* !defined(HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS) */
#ifdef HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS
lmo.link_map_size = sizeof (struct link_map);
lmo.l_addr_offset = offsetof (struct link_map, lm_addr);
- lmo.l_addr_size = fieldsize (struct link_map, lm_addr);
-
lmo.l_next_offset = offsetof (struct link_map, lm_next);
- lmo.l_next_size = fieldsize (struct link_map, lm_next);
-
/* FIXME: Is this the right field name, or is it available at all? */
lmo.l_ld_offset = offsetof (struct link_map, lm_ld);
- lmo.l_ld_size = fieldsize (struct link_map, lm_ld);
-
lmo.l_name_offset = offsetof (struct link_map, lm_name);
- lmo.l_name_size = fieldsize (struct link_map, lm_name);
#else /* !defined(HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS) */
#if HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS
lmo.link_map_size = sizeof (struct so_map);
lmo.l_addr_offset = offsetof (struct so_map, som_addr);
- lmo.l_addr_size = fieldsize (struct so_map, som_addr);
-
lmo.l_next_offset = offsetof (struct so_map, som_next);
- lmo.l_next_size = fieldsize (struct so_map, som_next);
-
lmo.l_name_offset = offsetof (struct so_map, som_path);
- lmo.l_name_size = fieldsize (struct so_map, som_path);
-
/* FIXME: Is the address of the dynamic table available? */
- lmo.l_ld_offset = 0;
- lmo.l_ld_size = 0;
+ lmo.l_ld_offset = -1;
#endif /* HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS */
#endif /* HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS */
#endif /* HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS */
@@ -126,16 +103,9 @@ legacy_svr4_fetch_link_map_offsets (void)
lmo32.link_map_size = sizeof (struct link_map32);
lmo32.l_addr_offset = offsetof (struct link_map32, l_addr);
- lmo32.l_addr_size = fieldsize (struct link_map32, l_addr);
-
lmo32.l_next_offset = offsetof (struct link_map32, l_next);
- lmo32.l_next_size = fieldsize (struct link_map32, l_next);
-
lmo32.l_prev_offset = offsetof (struct link_map32, l_prev);
- lmo32.l_prev_size = fieldsize (struct link_map32, l_prev);
-
lmo32.l_name_offset = offsetof (struct link_map32, l_name);
- lmo32.l_name_size = fieldsize (struct link_map32, l_name);
}
#endif /* defined (HAVE_STRUCT_LINK_MAP32) */