+struct svr4_info
+{
+ int pid;
+
+ CORE_ADDR debug_base; /* Base of dynamic linker structures */
+
+ /* Validity flag for debug_loader_offset. */
+ int debug_loader_offset_p;
+
+ /* Load address for the dynamic linker, inferred. */
+ CORE_ADDR debug_loader_offset;
+
+ /* Name of the dynamic linker, valid if debug_loader_offset_p. */
+ char *debug_loader_name;
+
+ /* Load map address for the main executable. */
+ CORE_ADDR main_lm_addr;
+};
+
+/* List of known processes using solib-svr4 shared libraries, storing
+ the required bookkeeping for each. */
+
+typedef struct svr4_info *svr4_info_p;
+DEF_VEC_P(svr4_info_p);
+VEC(svr4_info_p) *svr4_info = NULL;
+
+/* Get svr4 data for inferior PID (target id). If none is found yet,
+ add it now. This function always returns a valid object. */
+
+struct svr4_info *
+get_svr4_info (int pid)
+{
+ int ix;
+ struct svr4_info *it;
+
+ gdb_assert (pid != 0);
+
+ for (ix = 0; VEC_iterate (svr4_info_p, svr4_info, ix, it); ++ix)
+ {
+ if (it->pid == pid)
+ return it;
+ }
+
+ it = XZALLOC (struct svr4_info);
+ it->pid = pid;
+
+ VEC_safe_push (svr4_info_p, svr4_info, it);
+
+ return it;
+}
+
+/* Get rid of any svr4 related bookkeeping for inferior PID (target
+ id). */
+
+static void
+remove_svr4_info (int pid)
+{
+ int ix;
+ struct svr4_info *it;