From nobody Tue Feb 10 10:03:40 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.221.51 as permitted sender) client-ip=209.85.221.51; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-f51.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.51 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com; dmarc=fail(p=none dis=none) header.from=amsat.org ARC-Seal: i=1; a=rsa-sha256; t=1621252577; cv=none; d=zohomail.com; s=zohoarc; b=O3S3xxv/Oy++Wj5NX/mCzs0f+2gCjWa5/sv75HBCi4PjI3R18AZTx+dlKde0FuBHk1nxZLPRUD1GlPMHiwQS1OdeAgEao8QlXvkicbLhqV3WJqv+P+5+HDsNnrXaq8cgBwGpzh873xVjoazM77e9DnIP40FkNScna7fHawwhfr8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621252577; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=beAyqo4khbDHbaVb949CqGnk/6fQrvukzuYEC9WsMck=; b=MwIb6pQK10hJjwCVj9mLb7xaOrYkx1j2gSz6dPlFjiELctsknfybWYXB7hhDxWNN4O1Mb2gS+FBHZDmWgFKCrlQMNxCnpC2oapTxBxq/dpYLLAZxCeAdqJYWkmOsyGVDtTzfPByvikloVFyYBdC/eoA2kpMpKwiMhI2JNXwd5kQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.51 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) by mx.zohomail.com with SMTPS id 1621252577848632.3424282737686; Mon, 17 May 2021 04:56:17 -0700 (PDT) Received: by mail-wr1-f51.google.com with SMTP id i17so6059788wrq.11 for ; Mon, 17 May 2021 04:56:17 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (31.red-83-51-215.dynamicip.rima-tde.net. [83.51.215.31]) by smtp.gmail.com with ESMTPSA id t18sm14339758wmq.19.2021.05.17.04.56.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 04:56:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=beAyqo4khbDHbaVb949CqGnk/6fQrvukzuYEC9WsMck=; b=JRY1NAieOPp/dBnMJEmPysFuZB3xGnjgVH61HrHtiElyqCVaqkrCDhfuBby3TNJ30R aABaFXwzjgXo/JqHYMrqkRTZQGkKuZatKVnl+QONCAKibQdodPTbnWlmBzWqmZadLT6l xSKZNWDU7dteRuftvnIw3jMjcjZNUy+fTthMJsm506PvWKH3+w0E51kIYmjr6r0Pn7uw RGAnKSG7INXM9ge6uwJDbAJY+G0Y12P6usKk8D/d5GCkLot7ZkMEw8jxskLwfZcl29vm sqWLsI5ZIfMbjl8mOxYvj+y5VH3iNRe79YcGbIIFt1CSAL3TJ6UUkD3YN9VUOglN7fPi qpjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=beAyqo4khbDHbaVb949CqGnk/6fQrvukzuYEC9WsMck=; b=KQheh1WytSOENtXyLf9kU1TPrK3sbtfj8upA5QMUO2+s8dJp/E6OULhRI4nXNDRCdO zcJ2FGYWiNFF9RoXE9Lb371pxH/20zKDs+lfMBysN4ij5P7xJ7CDYGa9w36mZHK2lEke ZV/ZyPIpuvDhr+zsM+RzEUEWFfVi4lUSd5tFekPLoT9nsUh+/74nrqDt8wY+vwRaiXi6 rUIV4+Hj2PiCGoo/Mf+Gauf3cwymt703FjZm1MLJB4bSeGbknxwST93QrO/+JsGWDXZj I8RBnUeUg8adpGlA8JXb9lelSJt4ijLjhXJld6STOnCbju6besE5Xvny/SiF87IOMCpu zaVw== X-Gm-Message-State: AOAM531yMjDrLXUcgzpZBGEGQ15XRvPH5TOD7khNy4ntKZzTWgcMiEVw RVUd4Lq017I0kj0BQQ78cQo= X-Google-Smtp-Source: ABdhPJxqxc6ewOrse+3AEqCoD+AeX2NuUq3cDBb/DWs4OuBlHH1TxtZvjCJhwsX2WX2tpgaWUceYgg== X-Received: by 2002:adf:cc81:: with SMTP id p1mr765179wrj.175.1621252576149; Mon, 17 May 2021 04:56:16 -0700 (PDT) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Richard Henderson , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [RFC PATCH 10/15] exec/gdbstub: Make gdb_exit() / gdb_set_stop_cpu() target agnostic Date: Mon, 17 May 2021 13:55:20 +0200 Message-Id: <20210517115525.1088693-11-f4bug@amsat.org> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210517115525.1088693-1-f4bug@amsat.org> References: <20210517115525.1088693-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) gdb_exit() and gdb_set_stop_cpu() prototypes don't have to be target specific. Remove this limitation to be able to build softmmu/cpus.c and softmmu/runstate.c once for all targets. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- include/exec/gdbstub.h | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h index a024a0350df..84b1f2ff2aa 100644 --- a/include/exec/gdbstub.h +++ b/include/exec/gdbstub.h @@ -45,17 +45,6 @@ void gdb_do_syscall(gdb_syscall_complete_cb cb, const ch= ar *fmt, ...); */ void gdb_do_syscallv(gdb_syscall_complete_cb cb, const char *fmt, va_list = va); int use_gdb_syscalls(void); -void gdb_set_stop_cpu(CPUState *cpu); - -/** - * gdb_exit: exit gdb session, reporting inferior status - * @code: exit code reported - * - * This closes the session and sends a final packet to GDB reporting - * the exit status of the program. It also cleans up any connections - * detritus before returning. - */ -void gdb_exit(int code); =20 #ifdef CONFIG_USER_ONLY /** @@ -177,6 +166,18 @@ static inline uint8_t * gdb_get_reg_ptr(GByteArray *bu= f, int len) */ int gdbserver_start(const char *port_or_device); =20 +/** + * gdb_exit: exit gdb session, reporting inferior status + * @code: exit code reported + * + * This closes the session and sends a final packet to GDB reporting + * the exit status of the program. It also cleans up any connections + * detritus before returning. + */ +void gdb_exit(int code); + +void gdb_set_stop_cpu(CPUState *cpu); + /** * gdb_has_xml: * This is an ugly hack to cope with both new and old gdb. --=20 2.26.3