diff options
author | Kevin Buettner <kevinb@redhat.com> | 2001-03-19 05:46:27 +0000 |
---|---|---|
committer | Kevin Buettner <kevinb@redhat.com> | 2001-03-19 05:46:27 +0000 |
commit | d45fe813da000d2d7dc3fdf115b9a679e5042d93 (patch) | |
tree | 29371110391384db7e57c873ed74abd1351c9254 /gdb/solib-legacy.c | |
parent | 8aa16b78d80fc1ad1e252d8b712c828444a60be4 (diff) | |
download | gdb-d45fe813da000d2d7dc3fdf115b9a679e5042d93.zip gdb-d45fe813da000d2d7dc3fdf115b9a679e5042d93.tar.gz gdb-d45fe813da000d2d7dc3fdf115b9a679e5042d93.tar.bz2 |
Fix solib support so that non-svr4-solib-host x svr4-solib-target will work.
Diffstat (limited to 'gdb/solib-legacy.c')
-rw-r--r-- | gdb/solib-legacy.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/gdb/solib-legacy.c b/gdb/solib-legacy.c index 29ed014..e6507f2 100644 --- a/gdb/solib-legacy.c +++ b/gdb/solib-legacy.c @@ -49,7 +49,7 @@ legacy_svr4_fetch_link_map_offsets (void) { lmp = &lmo; -#ifdef SVR4_SHARED_LIBS +#ifdef HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS lmo.r_debug_size = sizeof (struct r_debug); lmo.r_map_offset = offsetof (struct r_debug, r_map); @@ -68,7 +68,8 @@ legacy_svr4_fetch_link_map_offsets (void) lmo.l_name_offset = offsetof (struct link_map, l_name); lmo.l_name_size = fieldsize (struct link_map, l_name); -#else /* !SVR4_SHARED_LIBS */ +#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); @@ -79,7 +80,21 @@ legacy_svr4_fetch_link_map_offsets (void) lmo.l_name_offset = offsetof (struct link_map, lm_name); lmo.l_name_size = fieldsize (struct link_map, lm_name); -#endif /* SVR4_SHARED_LIBS */ +#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); +#endif /* HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS */ +#endif /* HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS */ +#endif /* HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS */ } #if defined (HAVE_STRUCT_LINK_MAP32) |