This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH c++ 03/12] remote-sim.c: Add casts
- From: Pedro Alves <palves at redhat dot com>
- To: Simon Marchi <simon dot marchi at ericsson dot com>, gdb-patches at sourceware dot org
- Cc: Simon Marchi <simon dot marchi at polymtl dot ca>
- Date: Tue, 03 Nov 2015 16:12:29 +0000
- Subject: Re: [PATCH c++ 03/12] remote-sim.c: Add casts
- Authentication-results: sourceware.org; auth=none
- References: <1446560804-18858-1-git-send-email-simon dot marchi at ericsson dot com> <1446560804-18858-3-git-send-email-simon dot marchi at ericsson dot com>
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