* [PATCH c++ 02/12] linux-ppc-low.c: Add casts
2015-11-03 14:26 [PATCH c++ 01/12] linux-ppc-low.c: Remove forward declaration, move ppc_arch_setup lower Simon Marchi
@ 2015-11-03 14:26 ` Simon Marchi
2015-11-03 16:06 ` Pedro Alves
2015-11-03 14:26 ` [PATCH c++ 04/12] target_ops masK_watchpoint: change int to target_hw_bp_type Simon Marchi
` (10 subsequent siblings)
11 siblings, 1 reply; 25+ messages in thread
From: Simon Marchi @ 2015-11-03 14:26 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
From: Simon Marchi <simon.marchi@polymtl.ca>
Trivial casts for C++.
gdb/gdbserver/ChangeLog:
* linux-ppc-low.c (ppc_get_hwcap): Add cast.
(ppc_fill_vsxregset): Likewise.
(ppc_store_vsxregset): Likewise.
(ppc_fill_vrregset): Likewise.
(ppc_store_vrregset): Likewise.
(ppc_fill_evrregset): Likewise.
(ppc_store_evrregset): Likewise.
---
gdb/gdbserver/linux-ppc-low.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/gdb/gdbserver/linux-ppc-low.c b/gdb/gdbserver/linux-ppc-low.c
index 3840e40..995a725 100644
--- a/gdb/gdbserver/linux-ppc-low.c
+++ b/gdb/gdbserver/linux-ppc-low.c
@@ -346,7 +346,7 @@ ppc_get_hwcap (unsigned long *valp)
{
const struct target_desc *tdesc = current_process ()->tdesc;
int wordsize = register_size (tdesc, 0);
- unsigned char *data = alloca (2 * wordsize);
+ unsigned char *data = (unsigned char *) alloca (2 * wordsize);
int offset = 0;
while ((*the_target->read_auxv) (offset, data, 2 * wordsize) == 2 * wordsize)
@@ -446,7 +446,7 @@ static void
ppc_fill_vsxregset (struct regcache *regcache, void *buf)
{
int i, base;
- char *regset = buf;
+ char *regset = (char *) buf;
if (!(ppc_hwcap & PPC_FEATURE_HAS_VSX))
return;
@@ -460,7 +460,7 @@ static void
ppc_store_vsxregset (struct regcache *regcache, const void *buf)
{
int i, base;
- const char *regset = buf;
+ const char *regset = (const char *) buf;
if (!(ppc_hwcap & PPC_FEATURE_HAS_VSX))
return;
@@ -476,7 +476,7 @@ static void
ppc_fill_vrregset (struct regcache *regcache, void *buf)
{
int i, base;
- char *regset = buf;
+ char *regset = (char *) buf;
if (!(ppc_hwcap & PPC_FEATURE_HAS_ALTIVEC))
return;
@@ -493,7 +493,7 @@ static void
ppc_store_vrregset (struct regcache *regcache, const void *buf)
{
int i, base;
- const char *regset = buf;
+ const char *regset = (const char *) buf;
if (!(ppc_hwcap & PPC_FEATURE_HAS_ALTIVEC))
return;
@@ -517,7 +517,7 @@ static void
ppc_fill_evrregset (struct regcache *regcache, void *buf)
{
int i, ev0;
- struct gdb_evrregset_t *regset = buf;
+ struct gdb_evrregset_t *regset = (struct gdb_evrregset_t *) buf;
if (!(ppc_hwcap & PPC_FEATURE_HAS_SPE))
return;
@@ -534,7 +534,7 @@ static void
ppc_store_evrregset (struct regcache *regcache, const void *buf)
{
int i, ev0;
- const struct gdb_evrregset_t *regset = buf;
+ const struct gdb_evrregset_t *regset = (const struct gdb_evrregset_t *) buf;
if (!(ppc_hwcap & PPC_FEATURE_HAS_SPE))
return;
--
2.5.1
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH c++ 02/12] linux-ppc-low.c: Add casts
2015-11-03 14:26 ` [PATCH c++ 02/12] linux-ppc-low.c: Add casts Simon Marchi
@ 2015-11-03 16:06 ` Pedro Alves
0 siblings, 0 replies; 25+ messages in thread
From: Pedro Alves @ 2015-11-03 16:06 UTC (permalink / raw)
To: Simon Marchi, gdb-patches; +Cc: Simon Marchi
On 11/03/2015 02:26 PM, Simon Marchi wrote:
> From: Simon Marchi <simon.marchi@polymtl.ca>
>
> Trivial casts for C++.
>
> gdb/gdbserver/ChangeLog:
>
> * linux-ppc-low.c (ppc_get_hwcap): Add cast.
> (ppc_fill_vsxregset): Likewise.
> (ppc_store_vsxregset): Likewise.
> (ppc_fill_vrregset): Likewise.
> (ppc_store_vrregset): Likewise.
> (ppc_fill_evrregset): Likewise.
> (ppc_store_evrregset): Likewise.
OK.
Thanks,
Pedro Alves
^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH c++ 04/12] target_ops masK_watchpoint: change int to target_hw_bp_type
2015-11-03 14:26 [PATCH c++ 01/12] linux-ppc-low.c: Remove forward declaration, move ppc_arch_setup lower Simon Marchi
2015-11-03 14:26 ` [PATCH c++ 02/12] linux-ppc-low.c: Add casts Simon Marchi
@ 2015-11-03 14:26 ` Simon Marchi
2015-11-03 16:14 ` Pedro Alves
2015-11-03 14:26 ` [PATCH c++ 03/12] remote-sim.c: Add casts Simon Marchi
` (9 subsequent siblings)
11 siblings, 1 reply; 25+ messages in thread
From: Simon Marchi @ 2015-11-03 14:26 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
From: Simon Marchi <simon.marchi@polymtl.ca>
Fixes:
/home/simark/src/binutils-gdb/gdb/ppc-linux-nat.c: In function âint ppc_linux_insert_mask_watchpoint(target_ops*, CORE_ADDR, CORE_ADDR, int)â:
/home/simark/src/binutils-gdb/gdb/ppc-linux-nat.c:1730:40: error: invalid conversion from âintâ to âtarget_hw_bp_typeâ [-fpermissive]
p.trigger_type = get_trigger_type (rw);
^
gdb/ChangeLog:
* ppc-linux-nat.c (ppc_linux_insert_mask_watchpoint): Change
type of rw to enum target_hw_bp_type.
(ppc_linux_remove_mask_watchpoint): Likewise.
* target.c (target_insert_mask_watchpoint): Likewise.
(target_remove_mask_watchpoint): Likewise.
* target.h (target_insert_mask_watchpoint): Likewise.
(target_remove_mask_watchpoint): Likewise.
(struct target_ops) <to_insert_mask_watchpoint>: Likewise.
(struct target_ops) <to_remove_mask_watchpoint>: Likewise.
* target-delegates.c: Regenerate.
---
gdb/ppc-linux-nat.c | 4 ++--
gdb/target-delegates.c | 16 ++++++++--------
gdb/target.c | 6 ++++--
gdb/target.h | 12 ++++++++----
4 files changed, 22 insertions(+), 16 deletions(-)
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
index 55aec00..14ad68e 100644
--- a/gdb/ppc-linux-nat.c
+++ b/gdb/ppc-linux-nat.c
@@ -1719,7 +1719,7 @@ get_trigger_type (enum target_hw_bp_type type)
static int
ppc_linux_insert_mask_watchpoint (struct target_ops *ops, CORE_ADDR addr,
- CORE_ADDR mask, int rw)
+ CORE_ADDR mask, enum target_hw_bp_type rw)
{
struct lwp_info *lp;
struct ppc_hw_breakpoint p;
@@ -1747,7 +1747,7 @@ ppc_linux_insert_mask_watchpoint (struct target_ops *ops, CORE_ADDR addr,
static int
ppc_linux_remove_mask_watchpoint (struct target_ops *ops, CORE_ADDR addr,
- CORE_ADDR mask, int rw)
+ CORE_ADDR mask, enum target_hw_bp_type rw)
{
struct lwp_info *lp;
struct ppc_hw_breakpoint p;
diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c
index a7271fa..253c9d7 100644
--- a/gdb/target-delegates.c
+++ b/gdb/target-delegates.c
@@ -587,20 +587,20 @@ debug_insert_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2, enum
}
static int
-delegate_insert_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, int arg3)
+delegate_insert_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, enum target_hw_bp_type arg3)
{
self = self->beneath;
return self->to_insert_mask_watchpoint (self, arg1, arg2, arg3);
}
static int
-tdefault_insert_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, int arg3)
+tdefault_insert_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, enum target_hw_bp_type arg3)
{
return 1;
}
static int
-debug_insert_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, int arg3)
+debug_insert_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, enum target_hw_bp_type arg3)
{
int result;
fprintf_unfiltered (gdb_stdlog, "-> %s->to_insert_mask_watchpoint (...)\n", debug_target.to_shortname);
@@ -612,7 +612,7 @@ debug_insert_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR
fputs_unfiltered (", ", gdb_stdlog);
target_debug_print_CORE_ADDR (arg2);
fputs_unfiltered (", ", gdb_stdlog);
- target_debug_print_int (arg3);
+ target_debug_print_enum_target_hw_bp_type (arg3);
fputs_unfiltered (") = ", gdb_stdlog);
target_debug_print_int (result);
fputs_unfiltered ("\n", gdb_stdlog);
@@ -620,20 +620,20 @@ debug_insert_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR
}
static int
-delegate_remove_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, int arg3)
+delegate_remove_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, enum target_hw_bp_type arg3)
{
self = self->beneath;
return self->to_remove_mask_watchpoint (self, arg1, arg2, arg3);
}
static int
-tdefault_remove_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, int arg3)
+tdefault_remove_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, enum target_hw_bp_type arg3)
{
return 1;
}
static int
-debug_remove_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, int arg3)
+debug_remove_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, enum target_hw_bp_type arg3)
{
int result;
fprintf_unfiltered (gdb_stdlog, "-> %s->to_remove_mask_watchpoint (...)\n", debug_target.to_shortname);
@@ -645,7 +645,7 @@ debug_remove_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR
fputs_unfiltered (", ", gdb_stdlog);
target_debug_print_CORE_ADDR (arg2);
fputs_unfiltered (", ", gdb_stdlog);
- target_debug_print_int (arg3);
+ target_debug_print_enum_target_hw_bp_type (arg3);
fputs_unfiltered (") = ", gdb_stdlog);
target_debug_print_int (result);
fputs_unfiltered ("\n", gdb_stdlog);
diff --git a/gdb/target.c b/gdb/target.c
index 7ad2330..93786c3 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -3529,7 +3529,8 @@ target_verify_memory (const gdb_byte *data, CORE_ADDR memaddr, ULONGEST size)
target.h. */
int
-target_insert_mask_watchpoint (CORE_ADDR addr, CORE_ADDR mask, int rw)
+target_insert_mask_watchpoint (CORE_ADDR addr, CORE_ADDR mask,
+ enum target_hw_bp_type rw)
{
return current_target.to_insert_mask_watchpoint (¤t_target,
addr, mask, rw);
@@ -3539,7 +3540,8 @@ target_insert_mask_watchpoint (CORE_ADDR addr, CORE_ADDR mask, int rw)
target.h. */
int
-target_remove_mask_watchpoint (CORE_ADDR addr, CORE_ADDR mask, int rw)
+target_remove_mask_watchpoint (CORE_ADDR addr, CORE_ADDR mask,
+ enum target_hw_bp_type rw)
{
return current_target.to_remove_mask_watchpoint (¤t_target,
addr, mask, rw);
diff --git a/gdb/target.h b/gdb/target.h
index 2b2db45..0105db2 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -531,10 +531,12 @@ struct target_ops
TARGET_DEFAULT_RETURN (-1);
int (*to_insert_mask_watchpoint) (struct target_ops *,
- CORE_ADDR, CORE_ADDR, int)
+ CORE_ADDR, CORE_ADDR,
+ enum target_hw_bp_type)
TARGET_DEFAULT_RETURN (1);
int (*to_remove_mask_watchpoint) (struct target_ops *,
- CORE_ADDR, CORE_ADDR, int)
+ CORE_ADDR, CORE_ADDR,
+ enum target_hw_bp_type)
TARGET_DEFAULT_RETURN (1);
int (*to_stopped_by_watchpoint) (struct target_ops *)
TARGET_DEFAULT_RETURN (0);
@@ -1947,14 +1949,16 @@ extern char *target_thread_name (struct thread_info *);
or hw_access for an access watchpoint. Returns 0 for success, 1 if
masked watchpoints are not supported, -1 for failure. */
-extern int target_insert_mask_watchpoint (CORE_ADDR, CORE_ADDR, int);
+extern int target_insert_mask_watchpoint (CORE_ADDR, CORE_ADDR,
+ enum target_hw_bp_type);
/* Remove a masked watchpoint at ADDR with the mask MASK.
RW may be hw_read for a read watchpoint, hw_write for a write watchpoint
or hw_access for an access watchpoint. Returns 0 for success, non-zero
for failure. */
-extern int target_remove_mask_watchpoint (CORE_ADDR, CORE_ADDR, int);
+extern int target_remove_mask_watchpoint (CORE_ADDR, CORE_ADDR,
+ enum target_hw_bp_type);
/* Insert a hardware breakpoint at address BP_TGT->placed_address in
the target machine. Returns 0 for success, and returns non-zero or
--
2.5.1
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH c++ 04/12] target_ops masK_watchpoint: change int to target_hw_bp_type
2015-11-03 14:26 ` [PATCH c++ 04/12] target_ops masK_watchpoint: change int to target_hw_bp_type Simon Marchi
@ 2015-11-03 16:14 ` Pedro Alves
0 siblings, 0 replies; 25+ messages in thread
From: Pedro Alves @ 2015-11-03 16:14 UTC (permalink / raw)
To: Simon Marchi, gdb-patches; +Cc: Simon Marchi
On 11/03/2015 02:26 PM, Simon Marchi wrote:
> From: Simon Marchi <simon.marchi@polymtl.ca>
>
> Fixes:
>
> /home/simark/src/binutils-gdb/gdb/ppc-linux-nat.c: In function âint ppc_linux_insert_mask_watchpoint(target_ops*, CORE_ADDR, CORE_ADDR, int)â:
> /home/simark/src/binutils-gdb/gdb/ppc-linux-nat.c:1730:40: error: invalid conversion from âintâ to âtarget_hw_bp_typeâ [-fpermissive]
> p.trigger_type = get_trigger_type (rw);
> ^
>
> gdb/ChangeLog:
>
> * ppc-linux-nat.c (ppc_linux_insert_mask_watchpoint): Change
> type of rw to enum target_hw_bp_type.
> (ppc_linux_remove_mask_watchpoint): Likewise.
> * target.c (target_insert_mask_watchpoint): Likewise.
> (target_remove_mask_watchpoint): Likewise.
> * target.h (target_insert_mask_watchpoint): Likewise.
> (target_remove_mask_watchpoint): Likewise.
> (struct target_ops) <to_insert_mask_watchpoint>: Likewise.
> (struct target_ops) <to_remove_mask_watchpoint>: Likewise.
> * target-delegates.c: Regenerate.
OK. (nit: typo in subject)
Thanks,
Pedro Alves
^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH c++ 03/12] remote-sim.c: Add casts
2015-11-03 14:26 [PATCH c++ 01/12] linux-ppc-low.c: Remove forward declaration, move ppc_arch_setup lower Simon Marchi
2015-11-03 14:26 ` [PATCH c++ 02/12] linux-ppc-low.c: Add casts Simon Marchi
2015-11-03 14:26 ` [PATCH c++ 04/12] target_ops masK_watchpoint: change int to target_hw_bp_type Simon Marchi
@ 2015-11-03 14:26 ` Simon Marchi
2015-11-03 16:12 ` Pedro Alves
2015-11-03 14:27 ` [PATCH c++ 07/12] Change return type of raw_bkpt_type_to_arm_hwbp_type Simon Marchi
` (8 subsequent siblings)
11 siblings, 1 reply; 25+ messages in thread
From: Simon Marchi @ 2015-11-03 14:26 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
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.
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.
---
gdb/remote-sim.c | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c
index 8bd1a65..5e27114 100644
--- a/gdb/remote-sim.c
+++ b/gdb/remote-sim.c
@@ -152,9 +152,10 @@ static int
check_for_duplicate_sim_descriptor (struct inferior *inf, void *arg)
{
struct sim_inferior_data *sim_data;
- SIM_DESC new_sim_desc = arg;
+ SIM_DESC new_sim_desc = (SIM_DESC) arg;
- sim_data = inferior_data (inf, sim_inferior_data_key);
+ sim_data = ((struct sim_inferior_data *)
+ inferior_data (inf, sim_inferior_data_key));
return (sim_data != NULL && sim_data->gdbsim_desc == new_sim_desc);
}
@@ -172,7 +173,7 @@ get_sim_inferior_data (struct inferior *inf, int sim_instance_needed)
{
SIM_DESC sim_desc = NULL;
struct sim_inferior_data *sim_data
- = inferior_data (inf, sim_inferior_data_key);
+ = (struct sim_inferior_data *) inferior_data (inf, sim_inferior_data_key);
/* Try to allocate a new sim instance, if needed. We do this ahead of
a potential allocation of a sim_inferior_data struct in order to
@@ -257,7 +258,7 @@ get_sim_inferior_data_by_ptid (ptid_t ptid, int sim_instance_needed)
static void
sim_inferior_data_cleanup (struct inferior *inf, void *data)
{
- struct sim_inferior_data *sim_data = data;
+ struct sim_inferior_data *sim_data = (struct sim_inferior_data *) data;
if (sim_data != NULL)
{
@@ -766,8 +767,8 @@ gdbsim_open (const char *args, int from_tty)
static int
gdbsim_close_inferior (struct inferior *inf, void *arg)
{
- struct sim_inferior_data *sim_data = inferior_data (inf,
- sim_inferior_data_key);
+ struct sim_inferior_data *sim_data
+ = (struct sim_inferior_data *) inferior_data (inf, sim_inferior_data_key);
if (sim_data != NULL)
{
ptid_t ptid = sim_data->remote_sim_ptid;
@@ -849,7 +850,7 @@ gdbsim_resume_inferior (struct inferior *inf, void *arg)
{
struct sim_inferior_data *sim_data
= get_sim_inferior_data (inf, SIM_INSTANCE_NOT_NEEDED);
- struct resume_data *rd = arg;
+ struct resume_data *rd = (struct resume_data *) arg;
if (sim_data)
{
@@ -1034,13 +1035,13 @@ gdbsim_wait (struct target_ops *ops,
case GDB_SIGNAL_TRAP:
default:
status->kind = TARGET_WAITKIND_STOPPED;
- status->value.sig = sigrc;
+ status->value.sig = (enum gdb_signal) sigrc;
break;
}
break;
case sim_signalled:
status->kind = TARGET_WAITKIND_SIGNALLED;
- status->value.sig = sigrc;
+ status->value.sig = (enum gdb_signal) sigrc;
break;
case sim_running:
case sim_polling:
@@ -1198,7 +1199,8 @@ simulator_command (char *args, int from_tty)
thus allocating memory that would not be garbage collected until
the ultimate destruction of the associated inferior. */
- sim_data = inferior_data (current_inferior (), sim_inferior_data_key);
+ sim_data = ((struct sim_inferior_data *)
+ inferior_data (current_inferior (), sim_inferior_data_key));
if (sim_data == NULL || sim_data->gdbsim_desc == NULL)
{
@@ -1231,7 +1233,8 @@ sim_command_completer (struct cmd_list_element *ignore, const char *text,
int i;
VEC (char_ptr) *result = NULL;
- sim_data = inferior_data (current_inferior (), sim_inferior_data_key);
+ sim_data = ((struct sim_inferior_data *)
+ inferior_data (current_inferior (), sim_inferior_data_key));
if (sim_data == NULL || sim_data->gdbsim_desc == NULL)
return NULL;
--
2.5.1
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH c++ 03/12] remote-sim.c: Add casts
2015-11-03 14:26 ` [PATCH c++ 03/12] remote-sim.c: Add casts Simon Marchi
@ 2015-11-03 16:12 ` Pedro Alves
0 siblings, 0 replies; 25+ messages in thread
From: Pedro Alves @ 2015-11-03 16:12 UTC (permalink / raw)
To: Simon Marchi, gdb-patches; +Cc: Simon Marchi
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
^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH c++ 07/12] Change return type of raw_bkpt_type_to_arm_hwbp_type
2015-11-03 14:26 [PATCH c++ 01/12] linux-ppc-low.c: Remove forward declaration, move ppc_arch_setup lower Simon Marchi
` (2 preceding siblings ...)
2015-11-03 14:26 ` [PATCH c++ 03/12] remote-sim.c: Add casts Simon Marchi
@ 2015-11-03 14:27 ` Simon Marchi
2015-11-03 16:16 ` Pedro Alves
2015-11-03 14:27 ` [PATCH c++ 10/12] linux-mips-low.c: Change "private" variable name Simon Marchi
` (7 subsequent siblings)
11 siblings, 1 reply; 25+ messages in thread
From: Simon Marchi @ 2015-11-03 14:27 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
From: Simon Marchi <simon.marchi@polymtl.ca>
Fixes:
/home/simark/src/binutils-gdb/gdb/gdbserver/linux-arm-low.c: In function âint arm_linux_hw_point_initialize(raw_bkpt_type, CORE_ADDR, int, arm_linux_hw_breakpoint*)â:
/home/simark/src/binutils-gdb/gdb/gdbserver/linux-arm-low.c:459:55: error: invalid conversion from âintâ to âarm_hwbp_typeâ [-fpermissive]
hwbp_type = raw_bkpt_type_to_arm_hwbp_type (raw_type);
^
gdb/gdbserver/ChangeLog:
* linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
Change return type to arm_hwbp_type.
---
gdb/gdbserver/linux-arm-low.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/gdbserver/linux-arm-low.c b/gdb/gdbserver/linux-arm-low.c
index ae659dd..dda37cb 100644
--- a/gdb/gdbserver/linux-arm-low.c
+++ b/gdb/gdbserver/linux-arm-low.c
@@ -426,7 +426,7 @@ arm_linux_hw_breakpoint_equal (const struct arm_linux_hw_breakpoint *p1,
/* Convert a raw breakpoint type to an enum arm_hwbp_type. */
-static int
+static arm_hwbp_type
raw_bkpt_type_to_arm_hwbp_type (enum raw_bkpt_type raw_type)
{
switch (raw_type)
--
2.5.1
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH c++ 07/12] Change return type of raw_bkpt_type_to_arm_hwbp_type
2015-11-03 14:27 ` [PATCH c++ 07/12] Change return type of raw_bkpt_type_to_arm_hwbp_type Simon Marchi
@ 2015-11-03 16:16 ` Pedro Alves
0 siblings, 0 replies; 25+ messages in thread
From: Pedro Alves @ 2015-11-03 16:16 UTC (permalink / raw)
To: Simon Marchi, gdb-patches; +Cc: Simon Marchi
On 11/03/2015 02:26 PM, Simon Marchi wrote:
> From: Simon Marchi <simon.marchi@polymtl.ca>
>
> Fixes:
>
> /home/simark/src/binutils-gdb/gdb/gdbserver/linux-arm-low.c: In function âint arm_linux_hw_point_initialize(raw_bkpt_type, CORE_ADDR, int, arm_linux_hw_breakpoint*)â:
> /home/simark/src/binutils-gdb/gdb/gdbserver/linux-arm-low.c:459:55: error: invalid conversion from âintâ to âarm_hwbp_typeâ [-fpermissive]
> hwbp_type = raw_bkpt_type_to_arm_hwbp_type (raw_type);
> ^
>
> gdb/gdbserver/ChangeLog:
>
> * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
> Change return type to arm_hwbp_type.
OK.
Thanks,
Pedro Alves
^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH c++ 10/12] linux-mips-low.c: Change "private" variable name
2015-11-03 14:26 [PATCH c++ 01/12] linux-ppc-low.c: Remove forward declaration, move ppc_arch_setup lower Simon Marchi
` (3 preceding siblings ...)
2015-11-03 14:27 ` [PATCH c++ 07/12] Change return type of raw_bkpt_type_to_arm_hwbp_type Simon Marchi
@ 2015-11-03 14:27 ` Simon Marchi
2015-11-03 16:17 ` Pedro Alves
2015-11-03 14:27 ` [PATCH c++ 05/12] linux-aarch32-low.c: Use NULL_REGSET Simon Marchi
` (6 subsequent siblings)
11 siblings, 1 reply; 25+ messages in thread
From: Simon Marchi @ 2015-11-03 14:27 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
From: Simon Marchi <simon.marchi@polymtl.ca>
Fixes:
/home/simark/src/binutils-gdb/gdb/gdbserver/linux-mips-low.c:359:48: error: expected â,â or â...â before âprivateâ
mips_add_watchpoint (struct arch_process_info *private, CORE_ADDR addr,
^
gdb/gdbserver/ChangeLog:
* linux-mips-low.c (mips_add_watchpoint): Rename private to
priv.
---
gdb/gdbserver/linux-mips-low.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gdb/gdbserver/linux-mips-low.c b/gdb/gdbserver/linux-mips-low.c
index 2cfa7c2..0525522 100644
--- a/gdb/gdbserver/linux-mips-low.c
+++ b/gdb/gdbserver/linux-mips-low.c
@@ -356,7 +356,7 @@ mips_linux_new_thread (struct lwp_info *lwp)
/* Create a new mips_watchpoint and add it to the list. */
static void
-mips_add_watchpoint (struct arch_process_info *private, CORE_ADDR addr, int len,
+mips_add_watchpoint (struct arch_process_info *priv, CORE_ADDR addr, int len,
enum target_hw_bp_type watch_type)
{
struct mips_watchpoint *new_watch;
@@ -368,7 +368,7 @@ mips_add_watchpoint (struct arch_process_info *private, CORE_ADDR addr, int len,
new_watch->type = watch_type;
new_watch->next = NULL;
- pw = &private->current_watches;
+ pw = &priv->current_watches;
while (*pw != NULL)
pw = &(*pw)->next;
*pw = new_watch;
--
2.5.1
^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH c++ 05/12] linux-aarch32-low.c: Use NULL_REGSET
2015-11-03 14:26 [PATCH c++ 01/12] linux-ppc-low.c: Remove forward declaration, move ppc_arch_setup lower Simon Marchi
` (4 preceding siblings ...)
2015-11-03 14:27 ` [PATCH c++ 10/12] linux-mips-low.c: Change "private" variable name Simon Marchi
@ 2015-11-03 14:27 ` Simon Marchi
2015-11-03 16:14 ` Pedro Alves
2015-11-03 14:27 ` [PATCH c++ 06/12] gdbserver arm: Add casts Simon Marchi
` (5 subsequent siblings)
11 siblings, 1 reply; 25+ messages in thread
From: Simon Marchi @ 2015-11-03 14:27 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
From: Simon Marchi <simon.marchi@polymtl.ca>
Fixes
/home/simark/src/binutils-gdb/gdb/gdbserver/linux-aarch32-low.c:124:1: error: invalid conversion from âintâ to âregset_typeâ [-fpermissive]
};
^
gdb/gdbserver/ChangeLog:
* linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
---
gdb/gdbserver/linux-aarch32-low.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/gdbserver/linux-aarch32-low.c b/gdb/gdbserver/linux-aarch32-low.c
index 5876b13..891f8cd 100644
--- a/gdb/gdbserver/linux-aarch32-low.c
+++ b/gdb/gdbserver/linux-aarch32-low.c
@@ -120,7 +120,7 @@ static struct regset_info aarch32_regsets[] = {
{ PTRACE_GETREGSET, PTRACE_SETREGSET, NT_ARM_VFP, 32 * 8 + 4,
EXTENDED_REGS,
arm_fill_vfpregset, arm_store_vfpregset },
- { 0, 0, 0, -1, -1, NULL, NULL }
+ NULL_REGSET
};
static struct regsets_info aarch32_regsets_info =
--
2.5.1
^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH c++ 06/12] gdbserver arm: Add casts
2015-11-03 14:26 [PATCH c++ 01/12] linux-ppc-low.c: Remove forward declaration, move ppc_arch_setup lower Simon Marchi
` (5 preceding siblings ...)
2015-11-03 14:27 ` [PATCH c++ 05/12] linux-aarch32-low.c: Use NULL_REGSET Simon Marchi
@ 2015-11-03 14:27 ` Simon Marchi
2015-11-03 16:15 ` Pedro Alves
2015-11-03 14:27 ` [PATCH c++ 11/12] linux-mips-low.c: " Simon Marchi
` (4 subsequent siblings)
11 siblings, 1 reply; 25+ messages in thread
From: Simon Marchi @ 2015-11-03 14:27 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
From: Simon Marchi <simon.marchi@polymtl.ca>
Trivial casts for C++.
Fixes things like
In file included from /home/simark/src/binutils-gdb/gdb/gdbserver/../common/common-defs.h:39:0,
from /home/simark/src/binutils-gdb/gdb/gdbserver/server.h:22,
from /home/simark/src/binutils-gdb/gdb/gdbserver/linux-arm-low.c:19:
/home/simark/src/binutils-gdb/gdb/gdbserver/linux-arm-low.c: In function âint arm_get_hwcap(long unsigned int*)â:
/home/simark/src/binutils-gdb/gdb/gdbserver/../../include/libiberty.h:711:38: error: invalid conversion from âvoid*â to âunsigned char*â [-fpermissive]
# define alloca(x) __builtin_alloca(x)
^
/home/simark/src/binutils-gdb/gdb/gdbserver/linux-arm-low.c:807:25: note: in expansion of macro âallocaâ
unsigned char *data = alloca (8);
^
gdb/gdbserver/ChangeLog:
* linux-aarch32-low.c (arm_fill_gregset): Add cast.
(arm_store_gregset): Likewise.
* linux-arm-low.c (arm_get_hwcap): Likewise.
(arm_read_description): Likewise.
---
gdb/gdbserver/linux-aarch32-low.c | 4 ++--
gdb/gdbserver/linux-arm-low.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/gdb/gdbserver/linux-aarch32-low.c b/gdb/gdbserver/linux-aarch32-low.c
index 891f8cd..221b5b9 100644
--- a/gdb/gdbserver/linux-aarch32-low.c
+++ b/gdb/gdbserver/linux-aarch32-low.c
@@ -39,7 +39,7 @@ void
arm_fill_gregset (struct regcache *regcache, void *buf)
{
int i;
- uint32_t *regs = buf;
+ uint32_t *regs = (uint32_t *) buf;
for (i = ARM_A1_REGNUM; i <= ARM_PC_REGNUM; i++)
collect_register (regcache, i, ®s[i]);
@@ -54,7 +54,7 @@ arm_store_gregset (struct regcache *regcache, const void *buf)
{
int i;
char zerobuf[8];
- const uint32_t *regs = buf;
+ const uint32_t *regs = (const uint32_t *) buf;
memset (zerobuf, 0, 8);
for (i = ARM_A1_REGNUM; i <= ARM_PC_REGNUM; i++)
diff --git a/gdb/gdbserver/linux-arm-low.c b/gdb/gdbserver/linux-arm-low.c
index e10955f..ae659dd 100644
--- a/gdb/gdbserver/linux-arm-low.c
+++ b/gdb/gdbserver/linux-arm-low.c
@@ -804,7 +804,7 @@ arm_prepare_to_resume (struct lwp_info *lwp)
static int
arm_get_hwcap (unsigned long *valp)
{
- unsigned char *data = alloca (8);
+ unsigned char *data = (unsigned char *) alloca (8);
int offset = 0;
while ((*the_target->read_auxv) (offset, data, 8) == 8)
@@ -855,7 +855,7 @@ arm_read_description (void)
/* Now make sure that the kernel supports reading these
registers. Support was added in 2.6.30. */
errno = 0;
- buf = xmalloc (32 * 8 + 4);
+ buf = (char *) xmalloc (32 * 8 + 4);
if (ptrace (PTRACE_GETVFPREGS, pid, 0, buf) < 0
&& errno == EIO)
result = tdesc_arm;
--
2.5.1
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH c++ 06/12] gdbserver arm: Add casts
2015-11-03 14:27 ` [PATCH c++ 06/12] gdbserver arm: Add casts Simon Marchi
@ 2015-11-03 16:15 ` Pedro Alves
0 siblings, 0 replies; 25+ messages in thread
From: Pedro Alves @ 2015-11-03 16:15 UTC (permalink / raw)
To: Simon Marchi, gdb-patches; +Cc: Simon Marchi
On 11/03/2015 02:26 PM, Simon Marchi wrote:
> From: Simon Marchi <simon.marchi@polymtl.ca>
>
> Trivial casts for C++.
>
> Fixes things like
>
> In file included from /home/simark/src/binutils-gdb/gdb/gdbserver/../common/common-defs.h:39:0,
> from /home/simark/src/binutils-gdb/gdb/gdbserver/server.h:22,
> from /home/simark/src/binutils-gdb/gdb/gdbserver/linux-arm-low.c:19:
> /home/simark/src/binutils-gdb/gdb/gdbserver/linux-arm-low.c: In function âint arm_get_hwcap(long unsigned int*)â:
> /home/simark/src/binutils-gdb/gdb/gdbserver/../../include/libiberty.h:711:38: error: invalid conversion from âvoid*â to âunsigned char*â [-fpermissive]
> # define alloca(x) __builtin_alloca(x)
> ^
> /home/simark/src/binutils-gdb/gdb/gdbserver/linux-arm-low.c:807:25: note: in expansion of macro âallocaâ
> unsigned char *data = alloca (8);
> ^
>
> gdb/gdbserver/ChangeLog:
>
> * linux-aarch32-low.c (arm_fill_gregset): Add cast.
> (arm_store_gregset): Likewise.
> * linux-arm-low.c (arm_get_hwcap): Likewise.
> (arm_read_description): Likewise.
<rubberstamp>OK</rubberstamp>
Thanks,
Pedro Alves
^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH c++ 11/12] linux-mips-low.c: Add casts
2015-11-03 14:26 [PATCH c++ 01/12] linux-ppc-low.c: Remove forward declaration, move ppc_arch_setup lower Simon Marchi
` (6 preceding siblings ...)
2015-11-03 14:27 ` [PATCH c++ 06/12] gdbserver arm: Add casts Simon Marchi
@ 2015-11-03 14:27 ` Simon Marchi
2015-11-03 16:18 ` Pedro Alves
2015-11-03 14:27 ` [PATCH c++ 08/12] arm-linux-nat.c: Add cast Simon Marchi
` (3 subsequent siblings)
11 siblings, 1 reply; 25+ messages in thread
From: Simon Marchi @ 2015-11-03 14:27 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
From: Simon Marchi <simon.marchi@polymtl.ca>
Fixes a bunch of:
/home/simark/src/binutils-gdb/gdb/gdbserver/linux-mips-low.c: In function âvoid mips_store_fpregset(regcache*, const void*)â:
/home/simark/src/binutils-gdb/gdb/gdbserver/linux-mips-low.c:809:39: error: invalid conversion from âconst void*â to âconst mips_register*â [-fpermissive]
const union mips_register *regset = buf;
^
gdb/gdbserver/ChangeLog:
* linux-mips-low.c (mips_fill_gregset): Add cast.
(mips_store_gregset): Likewise.
(mips_fill_fpregset): Likewise.
(mips_store_fpregset): Likewise.
---
gdb/gdbserver/linux-mips-low.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gdb/gdbserver/linux-mips-low.c b/gdb/gdbserver/linux-mips-low.c
index 0525522..459f4fc 100644
--- a/gdb/gdbserver/linux-mips-low.c
+++ b/gdb/gdbserver/linux-mips-low.c
@@ -724,7 +724,7 @@ mips_supply_register_32bit (struct regcache *regcache,
static void
mips_fill_gregset (struct regcache *regcache, void *buf)
{
- union mips_register *regset = buf;
+ union mips_register *regset = (union mips_register *) buf;
int i, use_64bit;
const struct target_desc *tdesc = regcache->tdesc;
@@ -753,7 +753,7 @@ mips_fill_gregset (struct regcache *regcache, void *buf)
static void
mips_store_gregset (struct regcache *regcache, const void *buf)
{
- const union mips_register *regset = buf;
+ const union mips_register *regset = (const union mips_register *) buf;
int i, use_64bit;
use_64bit = (register_size (regcache->tdesc, 0) == 8);
@@ -781,7 +781,7 @@ mips_store_gregset (struct regcache *regcache, const void *buf)
static void
mips_fill_fpregset (struct regcache *regcache, void *buf)
{
- union mips_register *regset = buf;
+ union mips_register *regset = (union mips_register *) buf;
int i, use_64bit, first_fp, big_endian;
use_64bit = (register_size (regcache->tdesc, 0) == 8);
@@ -806,7 +806,7 @@ mips_fill_fpregset (struct regcache *regcache, void *buf)
static void
mips_store_fpregset (struct regcache *regcache, const void *buf)
{
- const union mips_register *regset = buf;
+ const union mips_register *regset = (const union mips_register *) buf;
int i, use_64bit, first_fp, big_endian;
use_64bit = (register_size (regcache->tdesc, 0) == 8);
--
2.5.1
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH c++ 11/12] linux-mips-low.c: Add casts
2015-11-03 14:27 ` [PATCH c++ 11/12] linux-mips-low.c: " Simon Marchi
@ 2015-11-03 16:18 ` Pedro Alves
0 siblings, 0 replies; 25+ messages in thread
From: Pedro Alves @ 2015-11-03 16:18 UTC (permalink / raw)
To: Simon Marchi, gdb-patches; +Cc: Simon Marchi
On 11/03/2015 02:26 PM, Simon Marchi wrote:
> From: Simon Marchi <simon.marchi@polymtl.ca>
>
> Fixes a bunch of:
>
> /home/simark/src/binutils-gdb/gdb/gdbserver/linux-mips-low.c: In function âvoid mips_store_fpregset(regcache*, const void*)â:
> /home/simark/src/binutils-gdb/gdb/gdbserver/linux-mips-low.c:809:39: error: invalid conversion from âconst void*â to âconst mips_register*â [-fpermissive]
> const union mips_register *regset = buf;
> ^
>
> gdb/gdbserver/ChangeLog:
>
> * linux-mips-low.c (mips_fill_gregset): Add cast.
> (mips_store_gregset): Likewise.
> (mips_fill_fpregset): Likewise.
> (mips_store_fpregset): Likewise.
OK.
Thanks,
Pedro Alves
^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH c++ 08/12] arm-linux-nat.c: Add cast
2015-11-03 14:26 [PATCH c++ 01/12] linux-ppc-low.c: Remove forward declaration, move ppc_arch_setup lower Simon Marchi
` (7 preceding siblings ...)
2015-11-03 14:27 ` [PATCH c++ 11/12] linux-mips-low.c: " Simon Marchi
@ 2015-11-03 14:27 ` Simon Marchi
2015-11-03 16:16 ` Pedro Alves
2015-11-03 14:27 ` [PATCH c++ 09/12] linux-mips-low.c: Fix type of mips_add_watchpoint parameter Simon Marchi
` (2 subsequent siblings)
11 siblings, 1 reply; 25+ messages in thread
From: Simon Marchi @ 2015-11-03 14:27 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
From: Simon Marchi <simon.marchi@polymtl.ca>
Fixes:
/home/simark/src/binutils-gdb/gdb/arm-linux-nat.c: In function âconst target_desc* arm_linux_read_description(target_ops*)â:
/home/simark/src/binutils-gdb/gdb/../include/libiberty.h:711:38: error: invalid conversion from âvoid*â to âchar*â [-fpermissive]
# define alloca(x) __builtin_alloca(x)
^
/home/simark/src/binutils-gdb/gdb/arm-linux-nat.c:578:13: note: in expansion of macro âallocaâ
buf = alloca (VFP_REGS_SIZE);
^
gdb/ChangeLog:
* arm-linux-nat.c (arm_linux_read_description): Add cast.
---
gdb/arm-linux-nat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c
index a63b181..63fdae1 100644
--- a/gdb/arm-linux-nat.c
+++ b/gdb/arm-linux-nat.c
@@ -575,7 +575,7 @@ arm_linux_read_description (struct target_ops *ops)
registers. Support was added in 2.6.30. */
pid = ptid_get_lwp (inferior_ptid);
errno = 0;
- buf = alloca (VFP_REGS_SIZE);
+ buf = (char *) alloca (VFP_REGS_SIZE);
if (ptrace (PTRACE_GETVFPREGS, pid, 0, buf) < 0
&& errno == EIO)
result = NULL;
--
2.5.1
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH c++ 08/12] arm-linux-nat.c: Add cast
2015-11-03 14:27 ` [PATCH c++ 08/12] arm-linux-nat.c: Add cast Simon Marchi
@ 2015-11-03 16:16 ` Pedro Alves
0 siblings, 0 replies; 25+ messages in thread
From: Pedro Alves @ 2015-11-03 16:16 UTC (permalink / raw)
To: Simon Marchi, gdb-patches; +Cc: Simon Marchi
On 11/03/2015 02:26 PM, Simon Marchi wrote:
> From: Simon Marchi <simon.marchi@polymtl.ca>
>
> Fixes:
>
> /home/simark/src/binutils-gdb/gdb/arm-linux-nat.c: In function âconst target_desc* arm_linux_read_description(target_ops*)â:
> /home/simark/src/binutils-gdb/gdb/../include/libiberty.h:711:38: error: invalid conversion from âvoid*â to âchar*â [-fpermissive]
> # define alloca(x) __builtin_alloca(x)
> ^
> /home/simark/src/binutils-gdb/gdb/arm-linux-nat.c:578:13: note: in expansion of macro âallocaâ
> buf = alloca (VFP_REGS_SIZE);
> ^
>
> gdb/ChangeLog:
>
> * arm-linux-nat.c (arm_linux_read_description): Add cast.
OK.
Thanks,
Pedro Alves
^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH c++ 09/12] linux-mips-low.c: Fix type of mips_add_watchpoint parameter
2015-11-03 14:26 [PATCH c++ 01/12] linux-ppc-low.c: Remove forward declaration, move ppc_arch_setup lower Simon Marchi
` (8 preceding siblings ...)
2015-11-03 14:27 ` [PATCH c++ 08/12] arm-linux-nat.c: Add cast Simon Marchi
@ 2015-11-03 14:27 ` Simon Marchi
2015-11-03 16:17 ` Pedro Alves
2015-11-03 14:27 ` [PATCH c++ 12/12] xtensa: Add missing statics Simon Marchi
2015-11-03 16:06 ` [PATCH c++ 01/12] linux-ppc-low.c: Remove forward declaration, move ppc_arch_setup lower Pedro Alves
11 siblings, 1 reply; 25+ messages in thread
From: Simon Marchi @ 2015-11-03 14:27 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
From: Simon Marchi <simon.marchi@polymtl.ca>
Fixes
/home/simark/src/binutils-gdb/gdb/gdbserver/linux-mips-low.c: In function âvoid mips_add_watchpoint(arch_process_info*, CORE_ADDR, int, int)â:
/home/simark/src/binutils-gdb/gdb/gdbserver/linux-mips-low.c:368:19: error: invalid conversion from âintâ to âtarget_hw_bp_typeâ [-fpermissive]
new_watch->type = watch_type;
^
gdb/gdbserver/ChangeLog:
* linux-mips-low.c (mips_linux_new_thread): Change type of
watch_type to enum target_hw_bp_type.
---
gdb/gdbserver/linux-mips-low.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gdb/gdbserver/linux-mips-low.c b/gdb/gdbserver/linux-mips-low.c
index 86f7962..2cfa7c2 100644
--- a/gdb/gdbserver/linux-mips-low.c
+++ b/gdb/gdbserver/linux-mips-low.c
@@ -356,8 +356,8 @@ mips_linux_new_thread (struct lwp_info *lwp)
/* Create a new mips_watchpoint and add it to the list. */
static void
-mips_add_watchpoint (struct arch_process_info *private, CORE_ADDR addr,
- int len, int watch_type)
+mips_add_watchpoint (struct arch_process_info *private, CORE_ADDR addr, int len,
+ enum target_hw_bp_type watch_type)
{
struct mips_watchpoint *new_watch;
struct mips_watchpoint **pw;
--
2.5.1
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH c++ 09/12] linux-mips-low.c: Fix type of mips_add_watchpoint parameter
2015-11-03 14:27 ` [PATCH c++ 09/12] linux-mips-low.c: Fix type of mips_add_watchpoint parameter Simon Marchi
@ 2015-11-03 16:17 ` Pedro Alves
0 siblings, 0 replies; 25+ messages in thread
From: Pedro Alves @ 2015-11-03 16:17 UTC (permalink / raw)
To: Simon Marchi, gdb-patches; +Cc: Simon Marchi
On 11/03/2015 02:26 PM, Simon Marchi wrote:
> From: Simon Marchi <simon.marchi@polymtl.ca>
>
> Fixes
>
> /home/simark/src/binutils-gdb/gdb/gdbserver/linux-mips-low.c: In function âvoid mips_add_watchpoint(arch_process_info*, CORE_ADDR, int, int)â:
> /home/simark/src/binutils-gdb/gdb/gdbserver/linux-mips-low.c:368:19: error: invalid conversion from âintâ to âtarget_hw_bp_typeâ [-fpermissive]
> new_watch->type = watch_type;
> ^
>
> gdb/gdbserver/ChangeLog:
>
> * linux-mips-low.c (mips_linux_new_thread): Change type of
> watch_type to enum target_hw_bp_type.
OK.
Thanks,
Pedro Alves
^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH c++ 12/12] xtensa: Add missing statics
2015-11-03 14:26 [PATCH c++ 01/12] linux-ppc-low.c: Remove forward declaration, move ppc_arch_setup lower Simon Marchi
` (9 preceding siblings ...)
2015-11-03 14:27 ` [PATCH c++ 09/12] linux-mips-low.c: Fix type of mips_add_watchpoint parameter Simon Marchi
@ 2015-11-03 14:27 ` Simon Marchi
2015-11-03 16:19 ` Pedro Alves
2015-11-03 16:06 ` [PATCH c++ 01/12] linux-ppc-low.c: Remove forward declaration, move ppc_arch_setup lower Pedro Alves
11 siblings, 1 reply; 25+ messages in thread
From: Simon Marchi @ 2015-11-03 14:27 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
From: Simon Marchi <simon.marchi@polymtl.ca>
This actually fixes the build in C:
/home/simark/src/binutils-gdb/gdb/xtensa-linux-nat.c:100:1: error: no previous prototype for âsupply_gregset_regâ [-Werror=missing-prototypes]
supply_gregset_reg (struct regcache *regcache,
^
/home/simark/src/binutils-gdb/gdb/xtensa-linux-nat.c:257:1: error: no previous prototype for âxtensa_linux_fetch_inferior_registersâ [-Werror=missing-prototypes]
xtensa_linux_fetch_inferior_registers (struct target_ops *ops,
^
/home/simark/src/binutils-gdb/gdb/xtensa-linux-nat.c:272:1: error: no previous prototype for âxtensa_linux_store_inferior_registersâ [-Werror=missing-prototypes]
xtensa_linux_store_inferior_registers (struct target_ops *ops,
^
cc1: all warnings being treated as errors
These functions are local to this file, so they should be static.
gdb/ChangeLog:
* xtensa-linux-nat.c (supply_gregset_reg): Make static.
(xtensa_linux_fetch_inferior_registers): Likewise.
(xtensa_linux_store_inferior_registers): Likewise.
---
gdb/xtensa-linux-nat.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gdb/xtensa-linux-nat.c b/gdb/xtensa-linux-nat.c
index 5538d5b..d024408 100644
--- a/gdb/xtensa-linux-nat.c
+++ b/gdb/xtensa-linux-nat.c
@@ -96,7 +96,7 @@ fill_gregset (const struct regcache *regcache,
}
}
-void
+static void
supply_gregset_reg (struct regcache *regcache,
const gdb_gregset_t *gregsetp, int regnum)
{
@@ -253,7 +253,7 @@ store_xtregs (struct regcache *regcache, int regnum)
perror_with_name (_("Couldn't write extended registers"));
}
-void
+static void
xtensa_linux_fetch_inferior_registers (struct target_ops *ops,
struct regcache *regcache, int regnum)
{
@@ -268,7 +268,7 @@ xtensa_linux_fetch_inferior_registers (struct target_ops *ops,
fetch_xtregs (regcache, regnum);
}
-void
+static void
xtensa_linux_store_inferior_registers (struct target_ops *ops,
struct regcache *regcache, int regnum)
{
--
2.5.1
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH c++ 12/12] xtensa: Add missing statics
2015-11-03 14:27 ` [PATCH c++ 12/12] xtensa: Add missing statics Simon Marchi
@ 2015-11-03 16:19 ` Pedro Alves
0 siblings, 0 replies; 25+ messages in thread
From: Pedro Alves @ 2015-11-03 16:19 UTC (permalink / raw)
To: Simon Marchi, gdb-patches; +Cc: Simon Marchi
On 11/03/2015 02:26 PM, Simon Marchi wrote:
> From: Simon Marchi <simon.marchi@polymtl.ca>
>
> This actually fixes the build in C:
>
> /home/simark/src/binutils-gdb/gdb/xtensa-linux-nat.c:100:1: error: no previous prototype for âsupply_gregset_regâ [-Werror=missing-prototypes]
> supply_gregset_reg (struct regcache *regcache,
> ^
> /home/simark/src/binutils-gdb/gdb/xtensa-linux-nat.c:257:1: error: no previous prototype for âxtensa_linux_fetch_inferior_registersâ [-Werror=missing-prototypes]
> xtensa_linux_fetch_inferior_registers (struct target_ops *ops,
> ^
> /home/simark/src/binutils-gdb/gdb/xtensa-linux-nat.c:272:1: error: no previous prototype for âxtensa_linux_store_inferior_registersâ [-Werror=missing-prototypes]
> xtensa_linux_store_inferior_registers (struct target_ops *ops,
> ^
> cc1: all warnings being treated as errors
>
> These functions are local to this file, so they should be static.
>
> gdb/ChangeLog:
>
> * xtensa-linux-nat.c (supply_gregset_reg): Make static.
> (xtensa_linux_fetch_inferior_registers): Likewise.
> (xtensa_linux_store_inferior_registers): Likewise.
OK.
Thanks,
Pedro Alves
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH c++ 01/12] linux-ppc-low.c: Remove forward declaration, move ppc_arch_setup lower
2015-11-03 14:26 [PATCH c++ 01/12] linux-ppc-low.c: Remove forward declaration, move ppc_arch_setup lower Simon Marchi
` (10 preceding siblings ...)
2015-11-03 14:27 ` [PATCH c++ 12/12] xtensa: Add missing statics Simon Marchi
@ 2015-11-03 16:06 ` Pedro Alves
2015-11-03 18:35 ` Simon Marchi
11 siblings, 1 reply; 25+ messages in thread
From: Pedro Alves @ 2015-11-03 16:06 UTC (permalink / raw)
To: Simon Marchi, gdb-patches; +Cc: Simon Marchi
On 11/03/2015 02:26 PM, Simon Marchi wrote:
> From: Simon Marchi <simon.marchi@polymtl.ca>
>
> g++ doesn't like that we forward-declare a variable that is initialized
> later in the file. It's easy enough to re-order things to fix it.
Yeah, doesn't work in C either with -fno-common.
>
> Fixes
>
> /home/simark/src/binutils-gdb/gdb/gdbserver/linux-ppc-low.c:663:28: error: redefinition of âusrregs_info ppc_usrregs_infoâ
> static struct usrregs_info ppc_usrregs_info =
> ^
> /home/simark/src/binutils-gdb/gdb/gdbserver/linux-ppc-low.c:381:28: note: âusrregs_info ppc_usrregs_infoâ previously declared here
> static struct usrregs_info ppc_usrregs_info;
> ^
>
> gdb/gdbserver/ChangeLog:
>
> * linux-ppc-low.c (ppc_usrregs_info): Remove
> forward-declaration.
> (ppc_arch_setup): Move lower in file.
OK.
Thanks,
Pedro Alves
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH c++ 01/12] linux-ppc-low.c: Remove forward declaration, move ppc_arch_setup lower
2015-11-03 16:06 ` [PATCH c++ 01/12] linux-ppc-low.c: Remove forward declaration, move ppc_arch_setup lower Pedro Alves
@ 2015-11-03 18:35 ` Simon Marchi
0 siblings, 0 replies; 25+ messages in thread
From: Simon Marchi @ 2015-11-03 18:35 UTC (permalink / raw)
To: Pedro Alves, gdb-patches; +Cc: Simon Marchi
On 15-11-03 11:05 AM, Pedro Alves wrote:
> On 11/03/2015 02:26 PM, Simon Marchi wrote:
>> From: Simon Marchi <simon.marchi@polymtl.ca>
>>
>> g++ doesn't like that we forward-declare a variable that is initialized
>> later in the file. It's easy enough to re-order things to fix it.
>
> Yeah, doesn't work in C either with -fno-common.
>
>>
>> Fixes
>>
>> /home/simark/src/binutils-gdb/gdb/gdbserver/linux-ppc-low.c:663:28: error: redefinition of ‘usrregs_info ppc_usrregs_info’
>> static struct usrregs_info ppc_usrregs_info =
>> ^
>> /home/simark/src/binutils-gdb/gdb/gdbserver/linux-ppc-low.c:381:28: note: ‘usrregs_info ppc_usrregs_info’ previously declared here
>> static struct usrregs_info ppc_usrregs_info;
>> ^
>>
>> gdb/gdbserver/ChangeLog:
>>
>> * linux-ppc-low.c (ppc_usrregs_info): Remove
>> forward-declaration.
>> (ppc_arch_setup): Move lower in file.
>
> OK.
>
> Thanks,
> Pedro Alves
>
Pushed all 12 patches, with the typo in the title fixed.
Thanks!
^ permalink raw reply [flat|nested] 25+ messages in thread