This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH c++ 03/12] remote-sim.c: Add casts


On 11/03/2015 02:26 PM, Simon Marchi wrote:
> From: Simon Marchi <simon.marchi@polymtl.ca>
> 
> Mostly some casts from "generic arg" void* to the actual type.
> 
> There are two (enum gdb_signal) casts.  I tried to see if it would have
> been better to change the type of sigrc, but it has a double role, as an
> enum and as an integer, so I left it as is.

I think the sim's sim_stop_reason 'int *sigrc' parameter should be
adjusted to gdb_signal* instead of int*.  AFAICS, the sims do write
a gdb_signal to it.  (And if they didn't, it would look like a bug
to me).

> 
> gdb/ChangeLog:
> 
> 	* remote-sim.c (check_for_duplicate_sim_descriptor): Add casts.
> 	(get_sim_inferior_data): Likewise.
> 	(sim_inferior_data_cleanup): Likewise.
> 	(gdbsim_close_inferior): Likewise.
> 	(gdbsim_resume_inferior): Likewise.
> 	(gdbsim_wait): Likewise.
> 	(simulator_command): Likewise.
> 	(sim_command_completer): Likewise.

In any case, this is OK.  We can fix the sim some other day.

Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]