From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id qFyGMxNB2WADAgAAWB0awg (envelope-from ) for ; Sun, 27 Jun 2021 23:25:07 -0400 Received: by simark.ca (Postfix, from userid 112) id C1B0F1F1F2; Sun, 27 Jun 2021 23:25:07 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 006681E939 for ; Sun, 27 Jun 2021 23:25:05 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 53F58383B807 for ; Mon, 28 Jun 2021 03:25:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 53F58383B807 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1624850705; bh=fkHBlDdtqLFBPv+ceXnvHReU54s3JqsrIXKNCLCla6U=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=MMdaM2uLo672T/qB4RUtpQ0jzs7vMtbFkLkV2xtrC6eL/FYOBf1CcYNpLLE0VphNt p3qAnCR1j/hBptURhZBLNofTrCJ7/mOYupaTMvfdMXeF03zcO3FEMCZAc44refEReR d2AbprFAqaDhzzFafaK8CpgYVDVwjKHVk07bD7c4= Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id BB531383F40D for ; Mon, 28 Jun 2021 03:24:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BB531383F40D Received: from vapier.lan (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 46D3B33E830 for ; Mon, 28 Jun 2021 03:24:42 +0000 (UTC) To: gdb-patches@sourceware.org Subject: [PATCH 1/3] sim: callback: drop unused printf helpers Date: Sun, 27 Jun 2021 23:24:37 -0400 Message-Id: <20210628032439.14514-1-vapier@gentoo.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Mike Frysinger via Gdb-patches Reply-To: Mike Frysinger Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" These cover functions aren't used anywhere, so drop them. There was one caller, but it's old DOS code that most likely hasn't been tested in years, so just delete that too. --- sim/common/callback.c | 61 ++---------------------------------------- sim/common/sim-utils.h | 7 ----- 2 files changed, 2 insertions(+), 66 deletions(-) diff --git a/sim/common/callback.c b/sim/common/callback.c index c0ace6e4c8e5..f773de1c19f0 100644 --- a/sim/common/callback.c +++ b/sim/common/callback.c @@ -49,12 +49,6 @@ #define PIPE_BUF 512 #endif -/* ??? sim_cb_printf should be cb_printf, but until the callback support is - broken out of the simulator directory, these are here to not require - sim-utils.h. */ -void sim_cb_printf (host_callback *, const char *, ...); -void sim_cb_eprintf (host_callback *, const char *, ...); - extern CB_TARGET_DEFS_MAP cb_init_syscall_map[]; extern CB_TARGET_DEFS_MAP cb_init_errno_map[]; extern CB_TARGET_DEFS_MAP cb_init_signal_map[]; @@ -148,43 +142,21 @@ os_close (host_callback *p, int fd) /* taken from gdb/util.c:notice_quit() - should be in a library */ -#if defined(__GO32__) || defined (_MSC_VER) +#if defined(_MSC_VER) static int os_poll_quit (host_callback *p) { -#if defined(__GO32__) - int kbhit (); - int getkey (); - if (kbhit ()) - { - int k = getkey (); - if (k == 1) - { - return 1; - } - else if (k == 2) - { - return 1; - } - else - { - sim_cb_eprintf (p, "CTRL-A to quit, CTRL-B to quit harder\n"); - } - } -#endif -#if defined (_MSC_VER) /* NB - this will not compile! */ int k = win32pollquit (); if (k == 1) return 1; else if (k == 2) return 1; -#endif return 0; } #else #define os_poll_quit 0 -#endif /* defined(__GO32__) || defined(_MSC_VER) */ +#endif /* defined(_MSC_VER) */ static int os_get_errno (host_callback *p) @@ -1078,35 +1050,6 @@ cb_host_to_target_stat (host_callback *cb, const struct stat *hs, void *ts) return p - (char *) ts; } -/* Cover functions to the vfprintf callbacks. - - ??? If one thinks of the callbacks as a subsystem onto itself [or part of - a larger "remote target subsystem"] with a well defined interface, then - one would think that the subsystem would provide these. However, until - one is allowed to create such a subsystem (with its own source tree - independent of any particular user), such a critter can't exist. Thus - these functions are here for the time being. */ - -void -sim_cb_printf (host_callback *p, const char *fmt, ...) -{ - va_list ap; - - va_start (ap, fmt); - p->vprintf_filtered (p, fmt, ap); - va_end (ap); -} - -void -sim_cb_eprintf (host_callback *p, const char *fmt, ...) -{ - va_list ap; - - va_start (ap, fmt); - p->evprintf_filtered (p, fmt, ap); - va_end (ap); -} - int cb_is_stdin (host_callback *cb, int fd) { diff --git a/sim/common/sim-utils.h b/sim/common/sim-utils.h index bfc8ac72d08e..1af4ea206b82 100644 --- a/sim/common/sim-utils.h +++ b/sim/common/sim-utils.h @@ -73,13 +73,6 @@ void sim_do_commandf (SIM_DESC sd, const char *fmt, ...) ATTRIBUTE_PRINTF (2, 3); -/* These are defined in callback.c as cover functions to the vprintf - callbacks. */ - -void sim_cb_printf (host_callback *, const char *, ...); -void sim_cb_eprintf (host_callback *, const char *, ...); - - /* sim-basics.h defines a number of enumerations, convert each of them to a string representation */ const char *map_to_str (unsigned map); -- 2.31.1