/* Handle SVR4 shared libraries for GDB, the GNU Debugger.
- Copyright (C) 1990-2015 Free Software Foundation, Inc.
+ Copyright (C) 1990-2016 Free Software Foundation, Inc.
This file is part of GDB.
static void
svr4_pspace_data_cleanup (struct program_space *pspace, void *arg)
{
- struct svr4_info *info = arg;
+ struct svr4_info *info = (struct svr4_info *) arg;
free_probes_table (info);
free_solib_list (info);
{
struct svr4_info *info;
- info = program_space_data (current_program_space, solib_svr4_pspace_data);
+ info = (struct svr4_info *) program_space_data (current_program_space,
+ solib_svr4_pspace_data);
if (info != NULL)
return info;
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct svr4_library_list *list = user_data;
- const char *name = xml_find_attribute (attributes, "name")->value;
- ULONGEST *lmp = xml_find_attribute (attributes, "lm")->value;
- ULONGEST *l_addrp = xml_find_attribute (attributes, "l_addr")->value;
- ULONGEST *l_ldp = xml_find_attribute (attributes, "l_ld")->value;
+ struct svr4_library_list *list = (struct svr4_library_list *) user_data;
+ const char *name
+ = (const char *) xml_find_attribute (attributes, "name")->value;
+ ULONGEST *lmp
+ = (ULONGEST *) xml_find_attribute (attributes, "lm")->value;
+ ULONGEST *l_addrp
+ = (ULONGEST *) xml_find_attribute (attributes, "l_addr")->value;
+ ULONGEST *l_ldp
+ = (ULONGEST *) xml_find_attribute (attributes, "l_ld")->value;
struct so_list *new_elem;
new_elem = XCNEW (struct so_list);
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct svr4_library_list *list = user_data;
- const char *version = xml_find_attribute (attributes, "version")->value;
+ struct svr4_library_list *list = (struct svr4_library_list *) user_data;
+ const char *version
+ = (const char *) xml_find_attribute (attributes, "version")->value;
struct gdb_xml_value *main_lm = xml_find_attribute (attributes, "main-lm");
if (strcmp (version, "1.0") != 0)
static hashval_t
hash_probe_and_action (const void *p)
{
- const struct probe_and_action *pa = p;
+ const struct probe_and_action *pa = (const struct probe_and_action *) p;
return (hashval_t) pa->address;
}
static int
equal_probe_and_action (const void *p1, const void *p2)
{
- const struct probe_and_action *pa1 = p1;
- const struct probe_and_action *pa2 = p2;
+ const struct probe_and_action *pa1 = (const struct probe_and_action *) p1;
+ const struct probe_and_action *pa2 = (const struct probe_and_action *) p2;
return pa1->address == pa2->address;
}
struct svr4_info *info;
struct probe_and_action *pa;
- info = program_space_data (loc->pspace, solib_svr4_pspace_data);
+ info = ((struct svr4_info *)
+ program_space_data (loc->pspace, solib_svr4_pspace_data));
if (info == NULL || info->probes_table == NULL)
continue;
/* Helper function for gdb_bfd_lookup_symbol. */
static int
-cmp_name_and_sec_flags (asymbol *sym, void *data)
+cmp_name_and_sec_flags (const asymbol *sym, const void *data)
{
return (strcmp (sym->name, (const char *) data) == 0
&& (sym->section->flags & (SEC_CODE | SEC_DATA)) != 0);
for (bkpt_namep = solib_break_names; *bkpt_namep != NULL; bkpt_namep++)
{
sym_addr = gdb_bfd_lookup_symbol (tmp_bfd, cmp_name_and_sec_flags,
- (void *) *bkpt_namep);
+ *bkpt_namep);
if (sym_addr != 0)
break;
}
set_solib_svr4_fetch_link_map_offsets (struct gdbarch *gdbarch,
struct link_map_offsets *(*flmo) (void))
{
- struct solib_svr4_ops *ops = gdbarch_data (gdbarch, solib_svr4_data);
+ struct solib_svr4_ops *ops
+ = (struct solib_svr4_ops *) gdbarch_data (gdbarch, solib_svr4_data);
ops->fetch_link_map_offsets = flmo;
static struct link_map_offsets *
svr4_fetch_link_map_offsets (void)
{
- struct solib_svr4_ops *ops = gdbarch_data (target_gdbarch (), solib_svr4_data);
+ struct solib_svr4_ops *ops
+ = (struct solib_svr4_ops *) gdbarch_data (target_gdbarch (),
+ solib_svr4_data);
gdb_assert (ops->fetch_link_map_offsets);
return ops->fetch_link_map_offsets ();
static int
svr4_have_link_map_offsets (void)
{
- struct solib_svr4_ops *ops = gdbarch_data (target_gdbarch (), solib_svr4_data);
+ struct solib_svr4_ops *ops
+ = (struct solib_svr4_ops *) gdbarch_data (target_gdbarch (),
+ solib_svr4_data);
return (ops->fetch_link_map_offsets != NULL);
}