From 732f3f122e676d05dd5618a648764b0de6473013 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 18 Nov 2011 15:38:58 +0000 Subject: [PATCH] PR build/7196: * remote.c (putpkt_for_catch_errors): New function. (remote_kill): Use it. --- gdb/ChangeLog | 6 ++++++ gdb/remote.c | 10 +++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 393cdf0359..1a5d5f771e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2011-11-18 Tom Tromey + + PR build/7196: + * remote.c (putpkt_for_catch_errors): New function. + (remote_kill): Use it. + 2011-11-18 Yao Qi * breakpoint.c (create_breakpoint): Produce query message according to diff --git a/gdb/remote.c b/gdb/remote.c index 6e9e242eeb..6ac5fc0449 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -7369,12 +7369,20 @@ getpkt_or_notif_sane (char **buf, long *sizeof_buf, int forever) } +/* A helper function that just calls putpkt; for type correctness. */ + +static int +putpkt_for_catch_errors (void *arg) +{ + return putpkt (arg); +} + static void remote_kill (struct target_ops *ops) { /* Use catch_errors so the user can quit from gdb even when we aren't on speaking terms with the remote system. */ - catch_errors ((catch_errors_ftype *) putpkt, "k", "", RETURN_MASK_ERROR); + catch_errors (putpkt_for_catch_errors, "k", "", RETURN_MASK_ERROR); /* Don't wait for it to die. I'm not really sure it matters whether we do or not. For the existing stubs, kill is a noop. */ -- 2.34.1