goto keep_going;
anaddr = SYMBOL_VALUE_ADDRESS (msymbol);
- store_unsigned_integer (buf, 4, byte_order, PIDGET (inferior_ptid));
+ store_unsigned_integer (buf, 4, byte_order, ptid_get_pid (inferior_ptid));
status = target_write_memory (anaddr, buf, 4);
if (status != 0)
{
static int
match_main (const char *name)
{
- return strcmp (name, symfile_objfile->name) == 0;
+ return strcmp (name, objfile_name (symfile_objfile)) == 0;
}
static struct so_list *
int errcode;
int from_tty = *(int *)from_ttyp;
gdb_byte buf[4];
+ struct cleanup *cleanup;
if (symfile_objfile)
if (!query (_("Attempt to reload symbols from process? ")))
return 0;
}
- make_cleanup (xfree, filename);
+ cleanup = make_cleanup (xfree, filename);
/* Have a pathname: read the symbol file. */
symbol_file_add_main (filename, from_tty);
+ do_cleanups (cleanup);
return 1;
}
{
/* Oh what a pain! We need the offsets before so_list->objfile
is valid. The BFDs will never match. Make a best guess. */
- if (strstr (objfile->name, so_list->so_name))
+ if (strstr (objfile_name (objfile), so_list->so_name))
{
asection *private_section;
struct obj_section *sect;