Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(815)

Unified Diff: gdb/solib-spu.c

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/solib-spu.h ('k') | gdb/solib-sunos.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/solib-spu.c
diff --git a/gdb/solib-spu.c b/gdb/solib-spu.c
index b5454e709906c4cb77657c4f028c234e70712183..c12324cbcb5c1ca26681d2426b03a0e9c3a62f25 100644
--- a/gdb/solib-spu.c
+++ b/gdb/solib-spu.c
@@ -1,5 +1,5 @@
/* Cell SPU GNU/Linux support -- shared library handling.
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
Contributed by Ulrich Weigand <uweigand@de.ibm.com>.
@@ -21,9 +21,9 @@
#include "defs.h"
#include "solib-spu.h"
#include "gdbcore.h"
-#include "gdb_string.h"
+#include <string.h>
#include "gdb_assert.h"
-#include "gdb_stat.h"
+#include <sys/stat.h>
#include "arch-utils.h"
#include "bfd.h"
#include "symtab.h"
@@ -36,6 +36,7 @@
#include "breakpoint.h"
#include "gdbthread.h"
#include "exceptions.h"
+#include "gdb_bfd.h"
#include "spu-tdep.h"
@@ -157,11 +158,11 @@ append_ocl_sos (struct so_list **link_ptr)
static struct so_list *
spu_current_sos (void)
{
- enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch);
+ enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
struct so_list *head;
struct so_list **link_ptr;
- char buf[MAX_SPE_FD * 4];
+ gdb_byte buf[MAX_SPE_FD * 4];
int i, size;
/* First, retrieve the SVR4 shared library list. */
@@ -208,7 +209,7 @@ spu_current_sos (void)
yet. Skip such entries; we'll be back for them later. */
xsnprintf (annex, sizeof annex, "%d/object-id", fd);
len = target_read (&current_target, TARGET_OBJECT_SPU, annex,
- id, 0, sizeof id);
+ (gdb_byte *) id, 0, sizeof id);
if (len <= 0 || len >= sizeof id)
continue;
id[len] = 0;
@@ -285,7 +286,9 @@ static int
spu_bfd_iovec_close (bfd *nbfd, void *stream)
{
xfree (stream);
- return 1;
+
+ /* Zero means success. */
+ return 0;
}
static file_ptr
@@ -325,16 +328,16 @@ spu_bfd_fopen (char *name, CORE_ADDR addr)
CORE_ADDR *open_closure = xmalloc (sizeof (CORE_ADDR));
*open_closure = addr;
- nbfd = bfd_openr_iovec (xstrdup (name), "elf32-spu",
- spu_bfd_iovec_open, open_closure,
- spu_bfd_iovec_pread, spu_bfd_iovec_close,
- spu_bfd_iovec_stat);
+ nbfd = gdb_bfd_openr_iovec (name, "elf32-spu",
+ spu_bfd_iovec_open, open_closure,
+ spu_bfd_iovec_pread, spu_bfd_iovec_close,
+ spu_bfd_iovec_stat);
if (!nbfd)
return NULL;
if (!bfd_check_format (nbfd, bfd_object))
{
- bfd_close (nbfd);
+ gdb_bfd_unref (nbfd);
return NULL;
}
@@ -417,9 +420,9 @@ spu_enable_break (struct objfile *objfile)
{
CORE_ADDR addr = SYMBOL_VALUE_ADDRESS (spe_event_sym);
- addr = gdbarch_convert_from_func_ptr_addr (target_gdbarch, addr,
+ addr = gdbarch_convert_from_func_ptr_addr (target_gdbarch (), addr,
&current_target);
- create_solib_event_breakpoint (target_gdbarch, addr);
+ create_solib_event_breakpoint (target_gdbarch (), addr);
return 1;
}
« no previous file with comments | « gdb/solib-spu.h ('k') | gdb/solib-sunos.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698