aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2014-07-30 13:06:52 -0700
committerRoland McGrath <roland@hack.frob.com>2014-07-30 13:06:52 -0700
commit74228e779003e841dd9cfe5780a2c9dc703699b4 (patch)
tree41af0ad5f277e483846a34af0ddfc03e9e436c92 /gdb
parent014f9477f4bdb04ca3accad0a7c986c2dff90e1f (diff)
downloadgdb-74228e779003e841dd9cfe5780a2c9dc703699b4.zip
gdb-74228e779003e841dd9cfe5780a2c9dc703699b4.tar.gz
gdb-74228e779003e841dd9cfe5780a2c9dc703699b4.tar.bz2
Fix incomplete constification in remote-sim.c
2014-07-30 Roland McGrath <mcgrathr@google.com> * remote-sim.c (gdbsim_open): Apply constification to forward decl.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog10
-rw-r--r--gdb/remote-sim.c42
2 files changed, 28 insertions, 24 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 1322e94..efba786 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2014-07-30 Roland McGrath <mcgrathr@google.com>
+
+ * remote-sim.c (gdbsim_open): Apply constification to forward decl.
+
2014-07-30 Tom Tromey <tromey@redhat.com>
* bsd-kvm.c (bsd_kvm_open): Constify.
@@ -1602,7 +1606,7 @@
momentary_breakpoint_from_master with additional argument.
(momentary_breakpoint_from_master): Add argument to function
definition and use it to initialize structure member flag.
- (clone_momentary_breakpoint): Call
+ (clone_momentary_breakpoint): Call
momentary_breakpoint_from_master with additional argument.
* infrun.c (follow_inferior_reset_breakpoints): Clear structure
member flags set in momentary_breakpoint_from_master.
@@ -1920,7 +1924,7 @@
(gdb_PyObject_HasAttrString): New inline function definitions.
* py-value.c (get_field_flag): Remove the now unnecessary cast to
char * of the second argument to PyObject_GetAttrString.
-
+
2014-06-10 Joel Brobecker <brobecker@adacore.com>
* serial.c (serial_write): Fix index of character to be printed
@@ -9402,7 +9406,7 @@
2014-02-03 Kevin Buettner <kevinb@redhat.com>
- * mn10300-tdep.c (mn10300_dwarf2_reg_to_regnum): Rewrite
+ * mn10300-tdep.c (mn10300_dwarf2_reg_to_regnum): Rewrite
dwarf2_to_gdb[] table using symbolic constants. Adjust
penultimate entry from number representing the PC register
to symbolic constant representing the MDR register. Add
diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c
index 753de74..52758fa 100644
--- a/gdb/remote-sim.c
+++ b/gdb/remote-sim.c
@@ -76,7 +76,7 @@ static void gdbsim_kill (struct target_ops *);
static void gdbsim_load (struct target_ops *self, const char *prog,
int fromtty);
-static void gdbsim_open (char *args, int from_tty);
+static void gdbsim_open (const char *args, int from_tty);
static void gdbsim_close (struct target_ops *self);
@@ -180,7 +180,7 @@ get_sim_inferior_data (struct inferior *inf, int sim_instance_needed)
a potential allocation of a sim_inferior_data struct in order to
avoid needlessly allocating that struct in the event that the sim
instance allocation fails. */
- if (sim_instance_needed == SIM_INSTANCE_NEEDED
+ if (sim_instance_needed == SIM_INSTANCE_NEEDED
&& (sim_data == NULL || sim_data->gdbsim_desc == NULL))
{
struct inferior *idup;
@@ -190,7 +190,7 @@ get_sim_inferior_data (struct inferior *inf, int sim_instance_needed)
inf->num);
idup = iterate_over_inferiors (check_for_duplicate_sim_descriptor,
- sim_desc);
+ sim_desc);
if (idup != NULL)
{
/* We don't close the descriptor due to the fact that it's
@@ -203,8 +203,8 @@ get_sim_inferior_data (struct inferior *inf, int sim_instance_needed)
error (
_("Inferior %d and inferior %d would have identical simulator state.\n"
"(This simulator does not support the running of more than one inferior.)"),
- inf->num, idup->num);
- }
+ inf->num, idup->num);
+ }
}
if (sim_data == NULL)
@@ -225,7 +225,7 @@ get_sim_inferior_data (struct inferior *inf, int sim_instance_needed)
else if (sim_desc)
{
/* This handles the case where sim_data was allocated prior to
- needing a sim instance. */
+ needing a sim instance. */
sim_data->gdbsim_desc = sim_desc;
}
@@ -245,7 +245,7 @@ get_sim_inferior_data_by_ptid (ptid_t ptid, int sim_instance_needed)
if (pid <= 0)
return NULL;
-
+
inf = find_inferior_pid (pid);
if (inf)
@@ -447,7 +447,7 @@ gdbsim_fetch_register (struct target_ops *ops,
case SIM_REGNO_DOES_NOT_EXIST:
{
/* For moment treat a `does not exist' register the same way
- as an ``unavailable'' register. */
+ as an ``unavailable'' register. */
gdb_byte buf[MAX_REGISTER_SIZE];
int nr_bytes;
@@ -455,7 +455,7 @@ gdbsim_fetch_register (struct target_ops *ops,
regcache_raw_supply (regcache, regno, buf);
break;
}
-
+
default:
{
static int warn_user = 1;
@@ -529,11 +529,11 @@ gdbsim_store_register (struct target_ops *ops,
internal_error (__FILE__, __LINE__,
_("Register size different to expected"));
if (nr_bytes < 0)
- internal_error (__FILE__, __LINE__,
- _("Register %d not updated"), regno);
+ internal_error (__FILE__, __LINE__,
+ _("Register %d not updated"), regno);
if (nr_bytes == 0)
- warning (_("Register %s not updated"),
- gdbarch_register_name (gdbarch, regno));
+ warning (_("Register %s not updated"),
+ gdbarch_register_name (gdbarch, regno));
if (remote_debug)
{
@@ -764,7 +764,7 @@ static int
gdbsim_close_inferior (struct inferior *inf, void *arg)
{
struct sim_inferior_data *sim_data = inferior_data (inf,
- sim_inferior_data_key);
+ sim_inferior_data_key);
if (sim_data != NULL)
{
ptid_t ptid = sim_data->remote_sim_ptid;
@@ -1008,7 +1008,7 @@ gdbsim_wait (struct target_ops *ops,
prev_sigint = signal (SIGINT, gdbsim_cntrl_c);
#endif
sim_resume (sim_data->gdbsim_desc, sim_data->resume_step,
- sim_data->resume_siggnal);
+ sim_data->resume_siggnal);
signal (SIGINT, prev_sigint);
sim_data->resume_step = 0;
@@ -1200,14 +1200,14 @@ simulator_command (char *args, int from_tty)
{
/* PREVIOUSLY: The user may give a command before the simulator
- is opened. [...] (??? assuming of course one wishes to
- continue to allow commands to be sent to unopened simulators,
- which isn't entirely unreasonable). */
+ is opened. [...] (??? assuming of course one wishes to
+ continue to allow commands to be sent to unopened simulators,
+ which isn't entirely unreasonable). */
/* The simulator is a builtin abstraction of a remote target.
- Consistent with that model, access to the simulator, via sim
- commands, is restricted to the period when the channel to the
- simulator is open. */
+ Consistent with that model, access to the simulator, via sim
+ commands, is restricted to the period when the channel to the
+ simulator is open. */
error (_("Not connected to the simulator target"));
}