X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fsolib-som.c;h=7a43cf88f9f409b66851cd46302e13b43edd3244;hb=5caa2f0b272d2a6edf56571fd0c59f922f26eb41;hp=f88b53912593752f358913a7307b0696e1779e91;hpb=948f8e3d72fa7047c43a952017ad4a7c9d55ab0d;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/solib-som.c b/gdb/solib-som.c index f88b539125..7a43cf88f9 100644 --- a/gdb/solib-som.c +++ b/gdb/solib-som.c @@ -1,6 +1,6 @@ /* Handle SOM shared libraries. - Copyright (C) 2004-2013 Free Software Foundation, Inc. + Copyright (C) 2004-2014 Free Software Foundation, Inc. This file is part of GDB. @@ -220,7 +220,7 @@ som_solib_create_inferior_hook (int from_tty) 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) { @@ -569,7 +569,7 @@ link_map_start (void) 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 * @@ -698,6 +698,7 @@ som_open_symbol_file_object (void *from_ttyp) 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? "))) @@ -727,10 +728,11 @@ som_open_symbol_file_object (void *from_ttyp) 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; } @@ -837,7 +839,7 @@ som_solib_section_offsets (struct objfile *objfile, { /* 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;