+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.
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.
(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
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
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);
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;
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
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)
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;
}
if (pid <= 0)
return NULL;
-
+
inf = find_inferior_pid (pid);
if (inf)
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;
regcache_raw_supply (regcache, regno, buf);
break;
}
-
+
default:
{
static int warn_user = 1;
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)
{
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;
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;
{
/* 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"));
}