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

Unified Diff: gdb/gdbserver/spu-low.c

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 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/gdbserver/server.c ('k') | gdb/gdbserver/target.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/gdbserver/spu-low.c
diff --git a/gdb/gdbserver/spu-low.c b/gdb/gdbserver/spu-low.c
index 2a720ae252c986e770f7dc5f4b196ac36c752614..d7283a9703f90d215ec1aa4f8181a5e5df158a43 100644
--- a/gdb/gdbserver/spu-low.c
+++ b/gdb/gdbserver/spu-low.c
@@ -206,14 +206,14 @@ store_ppc_memory (CORE_ADDR memaddr, char *myaddr, int len)
static int
parse_spufs_run (int *fd, CORE_ADDR *addr)
{
- char buf[4];
+ unsigned int insn;
CORE_ADDR pc = fetch_ppc_register (32); /* nip */
/* Fetch instruction preceding current NIP. */
- if (fetch_ppc_memory (pc-4, buf, 4) != 0)
+ if (fetch_ppc_memory (pc-4, (char *) &insn, 4) != 0)
return 0;
/* It should be a "sc" instruction. */
- if (*(unsigned int *)buf != INSTR_SC)
+ if (insn != INSTR_SC)
return 0;
/* System call number should be NR_spu_run. */
if (fetch_ppc_register (0) != NR_spu_run)
@@ -455,7 +455,7 @@ spu_wait (ptid_t ptid, struct target_waitstatus *ourstatus, int options)
{
fprintf (stderr, "\nChild terminated with signal = %x \n", WTERMSIG (w));
ourstatus->kind = TARGET_WAITKIND_SIGNALLED;
- ourstatus->value.sig = target_signal_from_host (WTERMSIG (w));
+ ourstatus->value.sig = gdb_signal_from_host (WTERMSIG (w));
clear_inferiors ();
return pid_to_ptid (ret);
}
@@ -465,12 +465,12 @@ spu_wait (ptid_t ptid, struct target_waitstatus *ourstatus, int options)
if (!server_waiting)
{
ourstatus->kind = TARGET_WAITKIND_STOPPED;
- ourstatus->value.sig = TARGET_SIGNAL_0;
+ ourstatus->value.sig = GDB_SIGNAL_0;
return ptid_build (ret, ret, 0);
}
ourstatus->kind = TARGET_WAITKIND_STOPPED;
- ourstatus->value.sig = target_signal_from_host (WSTOPSIG (w));
+ ourstatus->value.sig = gdb_signal_from_host (WSTOPSIG (w));
return ptid_build (ret, ret, 0);
}
« no previous file with comments | « gdb/gdbserver/server.c ('k') | gdb/gdbserver/target.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698