From nobody Fri Apr 4 05:08:44 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1742221872; cv=none; d=zohomail.com; s=zohoarc; b=nYRTHpY75tQkHrezcKoFuRTUPjQCI9+20yeb2jnYP/RuvQfQFiGapMBVUzAosASnw58IaybJwlJkiXpy+RR4uro8pM7tU7mLmirDtyJZe8I/L8NL3tlQakhZwbU0779iKHoIC7rHhLeX/THfnMTwn57TAYrhHfEiVThPf2AqrUk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1742221872; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=WnEm4y4Gb1gILlyNJ1p6kywDDvqp6Y8gIMTA4arfee4=; b=UumNjoyhzfh6Jg8E0SGmGvU2wH/0DfmAGqWBQE1mneboV6jbjDU8F+b2Ov/gZCJeo8Z21+VpAdxbVl3dWy7YJYh1g03Asv1nTzYTRhES9oZc0a3gOGFmcIqkowQ8yHtU3Tsu1pfCBlZ8qL3F9hMDqLbVNEMt6Wrh+23cA9KhJnM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1742221872474347.6510304503812; Mon, 17 Mar 2025 07:31:12 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tuBSM-0000le-Lc; Mon, 17 Mar 2025 10:28:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tuBS8-0000Zl-PA for qemu-devel@nongnu.org; Mon, 17 Mar 2025 10:28:29 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tuBS3-000183-V5 for qemu-devel@nongnu.org; Mon, 17 Mar 2025 10:28:28 -0400 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-43cef035a3bso15637945e9.1 for ; Mon, 17 Mar 2025 07:28:23 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43d1fe60ad4sm107914985e9.29.2025.03.17.07.28.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Mar 2025 07:28:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742221702; x=1742826502; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=WnEm4y4Gb1gILlyNJ1p6kywDDvqp6Y8gIMTA4arfee4=; b=dYyt+Q9Z+KjmsvzUO/yn9zAV8xrPZdBm3S8gHuDWO6tJwJ1zCRRpg5H0P5eE/vOaY/ S8X9Yan0NQY9O7zgiYtFPydqPYY5UNmdgtoDkupBMMSy3/j0L+LLB7cF/T1X3UnnO+LC i4tqLYpUDN8wTYVqIxwy8KG9lyWc+DFFxjYOAGiL//LhZKnC6dchQWFx+4/sg69i/eh0 3Pm9iMktMUQxo6RaUuVc2IL/eQOesq7HjUq2BFwMSQCIddxTUXyEu8j3XzaQ72loty/T GqDCpyku2fOztZLOm9yuZy2qxtAQObxbXOEeCArQakHjo+1T05tuJE9RQqsJXPzDZAGT o2lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742221702; x=1742826502; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WnEm4y4Gb1gILlyNJ1p6kywDDvqp6Y8gIMTA4arfee4=; b=V/MvV0UfIeuzMpL9ejHlfz19JBpjOqdgbelIXE8+c/ZcR9C6iq84VETcyuM31vLawt wGMTScj3RQ+FcIq4JRhQujWg5gCHdcBJnexuvdcstuDXOMSOokCdKhlCTERroLjEIO/r yfOQdWGd45yrnrjy+IHSrqfKPzFUxtvmlZQXSTmqcbGEKm6MfIplF0sWn54WMQx0Vmt4 mKKJNVSoet19KEzEDNjI2ylZT2JvoGkeuaC0UKwINoCa2XP1RbuNRIVydUVYt7xyeM8+ dbxC14tBcdIF29IbUEl6VICS8Rb/3YY+eK2lZdJjGmAmtAkVdPGxgCzLRVMY9qTQRyqj XlHQ== X-Forwarded-Encrypted: i=1; AJvYcCV7p+PP3mVLksHHjI9CSBbozLlMlGhpkD23yef6ecr5sqY8VvXNAoSY9DmgcaADaER6wefEiQ3jxcQF@nongnu.org X-Gm-Message-State: AOJu0YwIokvZz6TS756zYXchZ1+qCUQcAG9suiNDPzUWspfv4rh1RlXg cvk8cg3EPpAiL+ytc03ofGpQActu9qxpE1a9qIoGzwtTfBdOj6ZF3TT8Q6t9jaxM4fbq0Mj/fAo b X-Gm-Gg: ASbGncuttxPWy9t02+rsmDocRvkOeXJdMlVgA6f2h2dGC54OIlbfQEVVB7jH9J1/psp l53AGeH91/a2CiXnXlS2/XV4gc7AA50fkUP9oseDMDZ4k8JMpAB3pfJny5sKBif6f6iI3yaQm7h qNr0ofGseeUyIIcASSyBew3FPdySo/ob/ZsAeCzDfPQqDSSTzRJ5HtqQAO5suQueHtHgtWaPx48 kd8n7ycnMWIPeqCboUlwBTiOTlwPWaKgFLsPBPcUm6Ef4AZWMD2JbAKXa9EhWAAX3XYsTJyVe2U psDEb/P7EALMIOE8VBLERXI84P0DbVwf/I7IwbK6wH6qeqrbyjw= X-Google-Smtp-Source: AGHT+IFCuNubSvporwNQeOrEKbXRcIAl2JhiKpVerUwCSFLHM7VcelS2McAOBblwWQtBME9Dr7RZvQ== X-Received: by 2002:a05:600c:338a:b0:43d:b3:fb1 with SMTP id 5b1f17b1804b1-43d2021a1bdmr96258065e9.27.1742221702200; Mon, 17 Mar 2025 07:28:22 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH for-10.1 1/9] core/cpu.h: gdb_arch_name string should not be freed Date: Mon, 17 Mar 2025 14:28:11 +0000 Message-ID: <20250317142819.900029-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250317142819.900029-1-peter.maydell@linaro.org> References: <20250317142819.900029-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x329.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1742221873913019000 Content-Type: text/plain; charset="utf-8" The documentation for the CPUClass::gdb_arch_name method claims that the returned string should be freed with g_free(). This is not correct: in commit a650683871ba728 we changed this method to instead return a simple constant string, but forgot to update the documentation. Make the documentation match the new semantics. Fixes: a650683871ba728 ("hw/core/cpu: Return static value with gdb_arch_nam= e()") Signed-off-by: Peter Maydell Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/core/cpu.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 5d11d26556a..5873ee5998f 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -135,7 +135,8 @@ struct SysemuCPUOps; * @gdb_stop_before_watchpoint: Indicates whether GDB expects the CPU to s= top * before the insn which triggers a watchpoint rather than after= it. * @gdb_arch_name: Optional callback that returns the architecture name kn= own - * to GDB. The caller must free the returned string with g_free. + * to GDB. The returned value is expected to be a simple constant string: + * the caller will not g_free() it. * @disas_set_info: Setup architecture specific components of disassembly = info * @adjust_watchpoint_address: Perform a target-specific adjustment to an * address before attempting to match it against watchpoints. --=20 2.43.0