2010-01-09 Joel Brobecker <brobecker@adacore.com>
+ -Wunused warning in procfs.c (mips-irix only).
+ * procfs.c (gdb_praddset, gdb_prdelset): New macros. Use them
+ throughout instead of using praddset and prdelset respectively.
+
+2010-01-09 Joel Brobecker <brobecker@adacore.com>
+
GDB crash while stepping into function.
* infrun.c (handle_inferior_event): Refetch the current frame
after handling what.main_action, in case that pointer became
typedef struct siginfo gdb_siginfo_t;
#endif
+/* On mips-irix, praddset and prdelset are defined in such a way that
+ they return a value, which causes GCC to emit a -Wunused error
+ because the returned value is not used. Prevent this warning
+ by casting the return value to void. On sparc-solaris, this issue
+ does not exist because the definition of these macros already include
+ that cast to void. */
+#define gdb_praddset(sp, flag) ((void) praddset (sp, flag))
+#define gdb_prdelset(sp, flag) ((void) prdelset (sp, flag))
+
/* gdb_premptysysset */
#ifdef premptysysset
#define gdb_premptysysset premptysysset
#ifdef praddsysset
#define gdb_praddsysset praddsysset
#else
-#define gdb_praddsysset praddset
+#define gdb_praddsysset gdb_praddset
#endif
/* prdelsysset */
#ifdef prdelsysset
#define gdb_prdelsysset prdelsysset
#else
-#define gdb_prdelsysset prdelset
+#define gdb_prdelsysset gdb_prdelset
#endif
/* prissyssetmember */
{
if (proc_get_traced_signals (pi, &temp))
{
- praddset (&temp, signo);
+ gdb_praddset (&temp, signo);
return proc_set_traced_signals (pi, &temp);
}
}
{
if (proc_get_traced_signals (pi, &temp))
{
- prdelset (&temp, signo);
+ gdb_prdelset (&temp, signo);
return proc_set_traced_signals (pi, &temp);
}
}
#else
/* Register to trace hardware faults in the child. */
prfillset (&traced_faults); /* trace all faults... */
- prdelset (&traced_faults, FLTPAGE); /* except page fault. */
+ gdb_prdelset (&traced_faults, FLTPAGE); /* except page fault. */
#endif
if (!proc_set_traced_faults (pi, &traced_faults))
return __LINE__;
if (signal_stop_state (target_signal_from_host (signo)) == 0 &&
signal_print_state (target_signal_from_host (signo)) == 0 &&
signal_pass_state (target_signal_from_host (signo)) == 1)
- prdelset (signals, signo);
+ gdb_prdelset (signals, signo);
else
- praddset (signals, signo);
+ gdb_praddset (signals, signo);
return proc_set_traced_signals (pi, signals);
}