--- gdb/remote.c +++ gdb/remote.c @@ -966,8 +966,8 @@ static int use_threadextra_query; /* Tokens for use by the asynchronous signal handlers for SIGINT. */ -static void *sigint_remote_twice_token; -static void *sigint_remote_token; +static struct async_signal_handler *sigint_remote_twice_token; +static struct async_signal_handler *sigint_remote_token; /* These are pointers to hook functions that may be set in order to modify resume/wait behavior for a particular architecture. */ @@ -2843,11 +2843,9 @@ { signal (SIGINT, handle_sigint); if (sigint_remote_twice_token) - delete_async_signal_handler ((struct async_signal_handler **) - &sigint_remote_twice_token); + delete_async_signal_handler (&sigint_remote_twice_token); if (sigint_remote_token) - delete_async_signal_handler ((struct async_signal_handler **) - &sigint_remote_token); + delete_async_signal_handler (&sigint_remote_token); } /* Send ^C to target to halt it. Target will respond, and send us a --- gdb/tui/tui-layout.c +++ gdb/tui/tui-layout.c @@ -47,7 +47,7 @@ ********************************/ static void show_layout (enum tui_layout_type); static void init_gen_win_info (struct tui_gen_win_info *, enum tui_win_type, int, int, int, int); -static void init_and_make_win (void **, enum tui_win_type, int, int, int, int, int); +static void init_and_make_win (struct tui_gen_win_info **, enum tui_win_type, int, int, int, int, int); static void show_source_or_disasm_and_command (enum tui_layout_type); static void make_source_or_disasm_window (struct tui_win_info * *, enum tui_win_type, int, int); static void make_command_window (struct tui_win_info * *, int, int); @@ -640,13 +640,13 @@ static void make_command_window (struct tui_win_info * * win_info_ptr, int height, int origin_y) { - init_and_make_win ((void **) win_info_ptr, - CMD_WIN, - height, - tui_term_width (), - 0, - origin_y, - DONT_BOX_WINDOW); + init_and_make_win ((struct tui_gen_win_info **) win_info_ptr, + CMD_WIN, + height, + tui_term_width (), + 0, + origin_y, + DONT_BOX_WINDOW); (*win_info_ptr)->can_highlight = FALSE; } @@ -679,13 +679,13 @@ static void make_data_window (struct tui_win_info * * win_info_ptr, int height, int origin_y) { - init_and_make_win ((void **) win_info_ptr, - DATA_WIN, - height, - tui_term_width (), - 0, - origin_y, - BOX_WINDOW); + init_and_make_win ((struct tui_gen_win_info **) win_info_ptr, + DATA_WIN, + height, + tui_term_width (), + 0, + origin_y, + BOX_WINDOW); } @@ -751,13 +751,13 @@ if (TUI_DISASM_WIN == NULL) { make_disasm_window (&TUI_DISASM_WIN, asm_height, src_height - 1); - init_and_make_win ((void **) & locator, - LOCATOR_WIN, - 2 /* 1 */ , - tui_term_width (), - 0, - (src_height + asm_height) - 1, - DONT_BOX_WINDOW); + init_and_make_win (&locator, + LOCATOR_WIN, + 2 /* 1 */ , + tui_term_width (), + 0, + (src_height + asm_height) - 1, + DONT_BOX_WINDOW); } else { @@ -844,13 +844,13 @@ make_source_window (&tui_win_list[win_type], src_height, data_height - 1); else make_disasm_window (&tui_win_list[win_type], src_height, data_height - 1); - init_and_make_win ((void **) & locator, - LOCATOR_WIN, - 2 /* 1 */ , - tui_term_width (), - 0, - total_height - 1, - DONT_BOX_WINDOW); + init_and_make_win (&locator, + LOCATOR_WIN, + 2 /* 1 */ , + tui_term_width (), + 0, + total_height - 1, + DONT_BOX_WINDOW); } else { @@ -912,37 +912,25 @@ ** init_and_make_win(). */ static void -init_and_make_win (void ** win_info_ptr, enum tui_win_type win_type, - int height, int width, int origin_x, int origin_y, int box_it) +init_and_make_win (struct tui_gen_win_info **win_info_ptr, + enum tui_win_type win_type, int height, int width, + int origin_x, int origin_y, int box_it) { - void *opaque_win_info = *win_info_ptr; - struct tui_gen_win_info * generic; + struct tui_gen_win_info *generic = *win_info_ptr; - if (opaque_win_info == NULL) + if (generic == NULL) { if (tui_win_is_auxillary (win_type)) - opaque_win_info = (void *) tui_alloc_generic_win_info (); + generic = tui_alloc_generic_win_info (); else - opaque_win_info = (void *) tui_alloc_win_info (win_type); - } - if (tui_win_is_auxillary (win_type)) - generic = (struct tui_gen_win_info *) opaque_win_info; - else - generic = &((struct tui_win_info *) opaque_win_info)->generic; - - if (opaque_win_info != NULL) - { - init_gen_win_info (generic, win_type, height, width, origin_x, origin_y); - if (!tui_win_is_auxillary (win_type)) - { - if (generic->type == CMD_WIN) - ((struct tui_win_info *) opaque_win_info)->can_highlight = FALSE; - else - ((struct tui_win_info *) opaque_win_info)->can_highlight = TRUE; - } - tui_make_window (generic, box_it); + generic = &tui_alloc_win_info (win_type)->generic; + *win_info_ptr = generic; } - *win_info_ptr = opaque_win_info; + init_gen_win_info (generic, win_type, height, width, origin_x, origin_y); + if (!tui_win_is_auxillary (win_type)) + ((struct tui_win_info *) generic)->can_highlight + = generic->type != CMD_WIN; + tui_make_window (generic, box_it); } @@ -959,23 +947,23 @@ execution_info = tui_source_exec_info_win_ptr (); else execution_info = tui_disassem_exec_info_win_ptr (); - init_and_make_win ((void **) & execution_info, - EXEC_INFO_WIN, - height, - 3, - 0, - origin_y, - DONT_BOX_WINDOW); + init_and_make_win (&execution_info, + EXEC_INFO_WIN, + height, + 3, + 0, + origin_y, + DONT_BOX_WINDOW); /* ** Now create the source window. */ - init_and_make_win ((void **) win_info_ptr, - type, - height, - tui_term_width () - execution_info->width, - execution_info->width, - origin_y, - BOX_WINDOW); + init_and_make_win ((struct tui_gen_win_info **) win_info_ptr, + type, + height, + tui_term_width () - execution_info->width, + execution_info->width, + origin_y, + BOX_WINDOW); (*win_info_ptr)->detail.source_info.execution_info = execution_info; } @@ -1009,13 +997,13 @@ make_source_window (win_info_ptr, src_height - 1, 0); else make_disasm_window (win_info_ptr, src_height - 1, 0); - init_and_make_win ((void **) & locator, - LOCATOR_WIN, - 2 /* 1 */ , - tui_term_width (), - 0, - src_height - 1, - DONT_BOX_WINDOW); + init_and_make_win (&locator, + LOCATOR_WIN, + 2 /* 1 */ , + tui_term_width (), + 0, + src_height - 1, + DONT_BOX_WINDOW); } else { --- sim/common/gentmap.c +++ sim/common/gentmap.c @@ -2,6 +2,7 @@ #include #include +#include struct tdefs { char *symbol; --- sim/ppc/debug.c +++ sim/ppc/debug.c @@ -29,6 +29,10 @@ #include #endif +#ifdef HAVE_STRING_H +#include +#endif + int ppc_trace[nr_trace_options]; typedef struct _trace_option_descriptor { --- sim/ppc/ppc-instructions +++ sim/ppc/ppc-instructions @@ -3965,12 +3965,14 @@ fpscr_vxsnan | fpscr_vximz, 0, /*single?*/ 0) /*negate?*/) { + union { double d; unsigned64 u; } tmp; invalid_arithemetic_operation(processor, cia, - (unsigned64*)&product, *frA, 0, *frC, + &tmp.u, *frA, 0, *frC, 0, /*instruction_is_frsp*/ 0, /*instruction_is_convert_to_64bit*/ 0, /*instruction_is_convert_to_32bit*/ 0); /*single-precision*/ + product = tmp.d; } else { /*HACK!*/ @@ -4010,12 +4012,14 @@ fpscr_vxsnan | fpscr_vximz, 1, /*single?*/ 0) /*negate?*/) { + union { double d; unsigned64 u; } tmp; invalid_arithemetic_operation(processor, cia, - (unsigned64*)&product, *frA, 0, *frC, + &tmp.u, *frA, 0, *frC, 0, /*instruction_is_frsp*/ 0, /*instruction_is_convert_to_64bit*/ 0, /*instruction_is_convert_to_32bit*/ 0); /*single-precision*/ + product = tmp.d; } else { /*HACK!*/ @@ -4055,12 +4059,14 @@ fpscr_vxsnan | fpscr_vximz, 0, /*single?*/ 0) /*negate?*/) { + union { double d; unsigned64 u; } tmp; invalid_arithemetic_operation(processor, cia, - (unsigned64*)&product, *frA, 0, *frC, + &tmp.u, *frA, 0, *frC, 0, /*instruction_is_frsp*/ 0, /*instruction_is_convert_to_64bit*/ 0, /*instruction_is_convert_to_32bit*/ 0); /*single-precision*/ + product = tmp.d; } else { /*HACK!*/ @@ -4100,12 +4106,14 @@ fpscr_vxsnan | fpscr_vximz, 1, /*single?*/ 0) /*negate?*/) { + union { double d; unsigned64 u; } tmp; invalid_arithemetic_operation(processor, cia, - (unsigned64*)&product, *frA, 0, *frC, + &tmp.u, *frA, 0, *frC, 0, /*instruction_is_frsp*/ 0, /*instruction_is_convert_to_64bit*/ 0, /*instruction_is_convert_to_32bit*/ 0); /*single-precision*/ + product = tmp.d; } else { /*HACK!*/ @@ -4145,12 +4153,14 @@ fpscr_vxsnan | fpscr_vximz, 0, /*single?*/ 0) /*negate?*/) { + union { double d; unsigned64 u; } tmp; invalid_arithemetic_operation(processor, cia, - (unsigned64*)&product, *frA, 0, *frC, + &tmp.u, *frA, 0, *frC, 0, /*instruction_is_frsp*/ 0, /*instruction_is_convert_to_64bit*/ 0, /*instruction_is_convert_to_32bit*/ 0); /*single-precision*/ + product = tmp.d; } else { /*HACK!*/ @@ -4190,12 +4200,14 @@ fpscr_vxsnan | fpscr_vximz, 1, /*single?*/ 0) /*negate?*/) { + union { double d; unsigned64 u; } tmp; invalid_arithemetic_operation(processor, cia, - (unsigned64*)&product, *frA, 0, *frC, + &tmp.u, *frA, 0, *frC, 0, /*instruction_is_frsp*/ 0, /*instruction_is_convert_to_64bit*/ 0, /*instruction_is_convert_to_32bit*/ 0); /*single-precision*/ + product = tmp.d; } else { /*HACK!*/ @@ -4235,12 +4247,14 @@ fpscr_vxsnan | fpscr_vximz, 0, /*single?*/ 0) /*negate?*/) { + union { double d; unsigned64 u; } tmp; invalid_arithemetic_operation(processor, cia, - (unsigned64*)&product, *frA, 0, *frC, + &tmp.u, *frA, 0, *frC, 0, /*instruction_is_frsp*/ 0, /*instruction_is_convert_to_64bit*/ 0, /*instruction_is_convert_to_32bit*/ 0); /*single-precision*/ + product = tmp.d; } else { /*HACK!*/ @@ -4280,12 +4294,14 @@ fpscr_vxsnan | fpscr_vximz, 1, /*single?*/ 0) /*negate?*/) { + union { double d; unsigned64 u; } tmp; invalid_arithemetic_operation(processor, cia, - (unsigned64*)&product, *frA, 0, *frC, + &tmp.u, *frA, 0, *frC, 0, /*instruction_is_frsp*/ 0, /*instruction_is_convert_to_64bit*/ 0, /*instruction_is_convert_to_32bit*/ 0); /*single-precision*/ + product = tmp.d; } else { /*HACK!*/