X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=sim%2Fppc%2Fsim_calls.c;h=4e61335c2d4e5b7b48cb1381a58cded60d4e4491;hb=00923338dec84505addaf9cdeca2e9c844757824;hp=08feb39ab760130c64bcadbe05abe175c84a9298;hpb=2b3cc94f76d057b1004e8a22f034aed46cc72da6;p=deliverable%2Fbinutils-gdb.git diff --git a/sim/ppc/sim_calls.c b/sim/ppc/sim_calls.c index 08feb39ab7..4e61335c2d 100644 --- a/sim/ppc/sim_calls.c +++ b/sim/ppc/sim_calls.c @@ -4,7 +4,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -13,8 +13,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + along with this program; if not, see . */ @@ -44,6 +43,7 @@ #include "bfd.h" #include "gdb/callback.h" #include "gdb/remote-sim.h" +#include "gdb/signals.h" /* Define the rate at which the simulator should poll the host for a quit. */ @@ -97,7 +97,7 @@ sim_close (SIM_DESC sd, int quitting) SIM_RC -sim_load (SIM_DESC sd, char *prog, bfd *abfd, int from_tty) +sim_load (SIM_DESC sd, const char *prog, bfd *abfd, int from_tty) { TRACE(trace_gdb, ("sim_load(prog=%s, from_tty=%d) called\n", prog, from_tty)); @@ -143,7 +143,7 @@ sim_read (SIM_DESC sd, SIM_ADDR mem, unsigned char *buf, int length) int -sim_write (SIM_DESC sd, SIM_ADDR mem, unsigned char *buf, int length) +sim_write (SIM_DESC sd, SIM_ADDR mem, const unsigned char *buf, int length) { int result = psim_write_memory(simulator, MAX_NR_PROCESSORS, buf, mem, length, @@ -197,13 +197,13 @@ sim_stop_reason (SIM_DESC sd, enum sim_stop *reason, int *sigrc) case was_continuing: *reason = sim_stopped; if (status.signal == 0) - *sigrc = SIGTRAP; + *sigrc = GDB_SIGNAL_TRAP; else *sigrc = status.signal; break; case was_trap: *reason = sim_stopped; - *sigrc = SIGTRAP; + *sigrc = GDB_SIGNAL_TRAP; break; case was_exited: *reason = sim_exited; @@ -247,7 +247,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal) } void -sim_do_command (SIM_DESC sd, char *cmd) +sim_do_command (SIM_DESC sd, const char *cmd) { TRACE(trace_gdb, ("sim_do_commands(cmd=%s) called\n", cmd ? cmd : "(null)")); @@ -258,6 +258,11 @@ sim_do_command (SIM_DESC sd, char *cmd) } } +char ** +sim_complete_command (SIM_DESC sd, const char *text, const char *word) +{ + return NULL; +} /* Polling, if required */ @@ -389,8 +394,3 @@ zalloc(long size) memset(memory, 0, size); return memory; } - -void zfree(void *data) -{ - free(data); -}