static struct ipa_sym_addresses ipa_sym_addrs;
+static int all_agent_symbols_looked_up = 0;
+
+int
+agent_loaded_p (void)
+{
+ return all_agent_symbols_looked_up;
+}
+
/* Look up all symbols needed by agent. Return 0 if all the symbols are
found, return non-zero otherwise. */
int
-agent_look_up_symbols (void)
+agent_look_up_symbols (void *arg)
{
int i;
+ all_agent_symbols_looked_up = 0;
+
for (i = 0; i < sizeof (symbol_list) / sizeof (symbol_list[0]); i++)
{
CORE_ADDR *addrp =
if (look_up_one_symbol (symbol_list[i].name, addrp, 1) == 0)
#else
- struct minimal_symbol *sym = lookup_minimal_symbol (symbol_list[i].name,
- NULL, NULL);
+ struct minimal_symbol *sym =
+ lookup_minimal_symbol (symbol_list[i].name, NULL,
+ (struct objfile *) arg);
if (sym != NULL)
*addrp = SYMBOL_VALUE_ADDRESS (sym);
}
}
+ all_agent_symbols_looked_up = 1;
return 0;
}
else
#endif
{
- warning ("Error reading helper thread's id in lib");
+ warning (_("Error reading helper thread's id in lib"));
}
}
res = fd = socket (PF_UNIX, SOCK_STREAM, 0);
if (res == -1)
{
- warning ("error opening sync socket: %s\n", strerror (errno));
+ warning (_("error opening sync socket: %s"), strerror (errno));
return -1;
}
res = xsnprintf (addr.sun_path, UNIX_PATH_MAX, "%s", path);
if (res >= UNIX_PATH_MAX)
{
- warning ("string overflow allocating socket name\n");
+ warning (_("string overflow allocating socket name"));
close (fd);
return -1;
}
res = connect (fd, (struct sockaddr *) &addr, sizeof (addr));
if (res == -1)
{
- warning ("error connecting sync socket (%s): %s. "
- "Make sure the directory exists and that it is writable.",
- path, strerror (errno));
+ warning (_("error connecting sync socket (%s): %s. "
+ "Make sure the directory exists and that it is writable."),
+ path, strerror (errno));
close (fd);
return -1;
}
if (ret != 0)
{
- warning ("unable to write");
+ warning (_("unable to write"));
return -1;
}
IPA_CMD_BUF_SIZE))
#endif
{
- warning ("Error reading command response");
+ warning (_("Error reading command response"));
return -1;
}
}
byte_order);
else
#endif
- warning ("Error reading capability of agent");
+ warning (_("Error reading capability of agent"));
}
return agent_capability & agent_capa;
}