From nobody Mon Feb 9 00:43:09 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.221.47 as permitted sender) client-ip=209.85.221.47; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-f47.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.47 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1646571695; cv=none; d=zohomail.com; s=zohoarc; b=Wg1wsdUYw0aoFEbro1TZv15CpXzbD2cj8sMm7fz7ZcnTiD0RsjDpVocMP6y8CXzUuFOKTikC4KoD4D2zhCvB5FyMZKSlZrrDdVbN8XmCTFFaWfy+pfX3SD700z4mFgUfDVEsPHyw9GtA46IFlipD+HsRjcF8jR2R5yf55EEcP50= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1646571695; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=4vyygDOBnk9bKTxtb+m75TQN1xCbltFK11ClvcGoXRc=; b=aet4FCsdtyvAJwT3EI+YoyT1K8bQvS7mMh6XhUPbHC7i/+P8SmXUCKIX3JVN9YFW24jUEdfyvPTk1yvXvpZLft83GI0svwrrjirSfrqYlc1EjpCahtpbI/zp3tnfmWKXZ+w1q+M7BccZGD8r9ZgFB0EuE+pfniA0E/eyaR0C4dU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.47 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com; dmarc=pass header.from= (p=none dis=none) Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by mx.zohomail.com with SMTPS id 1646571695098671.1825069840529; Sun, 6 Mar 2022 05:01:35 -0800 (PST) Received: by mail-wr1-f47.google.com with SMTP id r10so19339381wrp.3 for ; Sun, 06 Mar 2022 05:01:34 -0800 (PST) Return-Path: Return-Path: Received: from nuc.lan ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id h17-20020a05600c351100b00381807bd920sm11164766wmq.28.2022.03.06.05.01.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Mar 2022 05:01:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4vyygDOBnk9bKTxtb+m75TQN1xCbltFK11ClvcGoXRc=; b=cdC5ozCHo1AYa+D4A747xx8L7TKxqTSRBKECm5hVWcRonloZ8Axd55QgqP5D1d61yh CD6fmDrQO5ZA9LuwyhYeDBz0SIKFZpGamjZJZXqE90SJ/BXpExFCA0gXHN99inaIgUyu YnPKtwuB/atkr3YBS33TJosaBkqhyMFfbnsPEnrpquVZJUGp7dZhy9ozxV78SEQaFCkp RAG2N34dMjSRi/X3t7gaNSKn3t05gWnqMSkwwtf0fWYwRRX1b/SKjFVCNwDrESDABNU9 2LqkkL8VqWSh46aHLsUr8HAd9xeVwjZ6zlCByJfy3tlFnmK+PohG1zQT4jwDBXUCugpZ vJTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4vyygDOBnk9bKTxtb+m75TQN1xCbltFK11ClvcGoXRc=; b=nBmoy7nbN7MWoEo9DIX7615oBOpJwOMpugLApwLRdBW3NWdTUG0LAvyOCWZNedfJqT 5CyyUJ5Uk/ITnNORfa1XY9KCY0XC/vJVpoDvNC7Sw9vHVswkN7EMEslCGJaIfGT5aJcH Jb4nFbU1Mya6NFxlMEwjd/mPDU/jZjNnoR0QVD6lgd6FabEJbqmD8OIClpJI2L4VMMOY ox6o/2IaAM0+Uvs7XkSjzyhUCWitbri/x6PgKWA99133W1k4X4a6MbkqDmjM0Nb9PlsG WuzLTpVLc6PlmY7dllA94pxXvlcXw6iAnzcgX+n/ujrWvpUzaadP/D7UD4BJ3i/nWcgi UTMA== X-Gm-Message-State: AOAM533Fy6wqL/EOd0Fft3U5Ubs70YENRcjJ2fcmpzOpb3+iqUhaIi+N LaFtJg8xoGtD2CaQr9r2tEp0LbU6P2E= X-Google-Smtp-Source: ABdhPJyk2kWyvD1VVSDXMFoy6h+X8UoF5J0FOrV1xu6dxhLtUE13OZi10QfFlK1eb6oYxE0Ha7fBBg== X-Received: by 2002:a5d:66c5:0:b0:1f1:d7e3:7068 with SMTP id k5-20020a5d66c5000000b001f1d7e37068mr5080724wrw.410.1646571693293; Sun, 06 Mar 2022 05:01:33 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Thomas Huth , Eduardo Habkost , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 17/33] exec/gdbstub: Make gdb_exit() / gdb_set_stop_cpu() target agnostic Date: Sun, 6 Mar 2022 13:59:44 +0100 Message-Id: <20220306130000.8104-18-philippe.mathieu.daude@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220306130000.8104-1-philippe.mathieu.daude@gmail.com> References: <20220306130000.8104-1-philippe.mathieu.daude@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1646571697410100001 From: Philippe Mathieu-Daud=C3=A9 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. Reviewed-by: Richard Henderson Reviewed-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20220207075426.81934-19-f4bug@amsat.org> --- include/exec/gdbstub.h | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h index a024a0350df..89edf94d286 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 /** @@ -165,7 +154,7 @@ static inline uint8_t * gdb_get_reg_ptr(GByteArray *buf= , int len) #define ldtul_p(addr) ldl_p(addr) #endif =20 -#endif +#endif /* NEED_CPU_H */ =20 /** * gdbserver_start: start the gdb server @@ -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.35.1