diff options
Diffstat (limited to 'devel/gdb6/patches/patch-remote_c')
-rw-r--r-- | devel/gdb6/patches/patch-remote_c | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/devel/gdb6/patches/patch-remote_c b/devel/gdb6/patches/patch-remote_c new file mode 100644 index 00000000000..d7a4d268675 --- /dev/null +++ b/devel/gdb6/patches/patch-remote_c @@ -0,0 +1,91 @@ +$NetBSD: patch-remote_c,v 1.1.1.1 2004/06/01 19:29:30 shannonjr Exp $ + +--- gdb/remote.c.orig 2004-02-25 13:41:00.000000000 -0700 ++++ gdb/remote.c +@@ -645,8 +645,6 @@ add_packet_config_cmd (struct packet_con + struct cmd_list_element **show_remote_list, + int legacy) + { +- struct cmd_list_element *set_cmd; +- struct cmd_list_element *show_cmd; + char *set_doc; + char *show_doc; + char *cmd_name; +@@ -2324,8 +2322,6 @@ remote_detach (char *args, int from_tty) + static void + remote_disconnect (char *args, int from_tty) + { +- struct remote_state *rs = get_remote_state (); +- char *buf = alloca (rs->remote_packet_size); + + if (args) + error ("Argument given to \"detach\" when remotely debugging."); +@@ -2718,11 +2714,18 @@ async_remote_interrupt_twice (gdb_client + static void + cleanup_sigint_signal_handler (void *dummy) + { ++ struct async_signal_handler *tmp; + signal (SIGINT, handle_sigint); + if (sigint_remote_twice_token) +- delete_async_signal_handler ((struct async_signal_handler **) & sigint_remote_twice_token); ++ { ++ tmp = (struct async_signal_handler *) sigint_remote_twice_token; ++ delete_async_signal_handler (&tmp); ++ } + if (sigint_remote_token) +- delete_async_signal_handler ((struct async_signal_handler **) & sigint_remote_token); ++ { ++ tmp = (struct async_signal_handler *) sigint_remote_token; ++ delete_async_signal_handler (&tmp); ++ } + } + + /* Send ^C to target to halt it. Target will respond, and send us a +@@ -2895,7 +2898,6 @@ remote_wait (ptid_t ptid, struct target_ + continue; + case 'T': /* Status with PC, SP, FP, ... */ + { +- int i; + char regs[MAX_REGISTER_SIZE]; + + /* Expedited reply, containing Signal, {regno, reg} repeat */ +@@ -3084,7 +3086,6 @@ remote_async_wait (ptid_t ptid, struct t + continue; + case 'T': /* Status with PC, SP, FP, ... */ + { +- int i; + char regs[MAX_REGISTER_SIZE]; + + /* Expedited reply, containing Signal, {regno, reg} repeat */ +@@ -3385,7 +3386,6 @@ store_register_using_P (int regnum) + char *buf = alloca (rs->remote_packet_size); + char regp[MAX_REGISTER_SIZE]; + char *p; +- int i; + + sprintf (buf, "P%s=", phex_nz (reg->pnum, 0)); + p = buf + strlen (buf); +@@ -3406,7 +3406,6 @@ remote_store_registers (int regnum) + struct remote_state *rs = get_remote_state (); + char *buf; + char *regs; +- int i; + char *p; + + set_thread (PIDGET (inferior_ptid), 1); +@@ -4978,7 +4977,6 @@ remote_rcmd (char *command, + struct ui_file *outbuf) + { + struct remote_state *rs = get_remote_state (); +- int i; + char *buf = alloca (rs->remote_packet_size); + char *p = buf; + +@@ -5453,7 +5451,6 @@ _initialize_remote (void) + { + static struct cmd_list_element *remote_set_cmdlist; + static struct cmd_list_element *remote_show_cmdlist; +- struct cmd_list_element *tmpcmd; + + /* architecture specific data */ + remote_gdbarch_data_handle = register_gdbarch_data (init_remote_state); |