From patchwork Mon Mar 17 14:28:11 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 874163 Delivered-To: patch@linaro.org Received: by 2002:a5d:4308:0:b0:38f:210b:807b with SMTP id h8csp2022764wrq; Mon, 17 Mar 2025 07:31:09 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX/cbUVD3j8aQI1ZSRracyQyMKNJrOwNaMQbRiB7XhtFk0lA+45oGFlQX0sMNHkt+lBtI7eAw==@linaro.org X-Google-Smtp-Source: AGHT+IHy6tN4FoFyITRyS5Pa6BUYSZt7ROrRx/m4vpzxhXt9X1Q7E3saAQ2+jTaKJENu2Dy01lPv X-Received: by 2002:a05:6102:26c2:b0:4bb:d062:447 with SMTP id ada2fe7eead31-4c38311d242mr7121528137.5.1742221869525; Mon, 17 Mar 2025 07:31:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742221869; cv=none; d=google.com; s=arc-20240605; b=kZ25c9IePYelh2MnRo6u0d6kJrlXRe7ZW/9VF+z6+InkRiL+huNR+zyu6CKnyqK9Um H/RLeKGjxYv0ykvAt4CkGOR7ftXSrd5vAdgdGmpiYaPL7arSLaHG8REwIOEdZzYSHrUr g9e2jzKRrfGV60mpsDTqp6edRCay+buas04niMvZWa7LHMSj8l5Vi0J3vIYZ+1zUClPy 9LJWLmEqP1bxbVSoA4nFdBhKFzhQesHi6kPRv4CRA5ciEN0eBV0/WKVXktKDZkiokhIQ mPUn504eZr5A1/BiWNpe4YuwkU2Hrz8XojqBVVal+UXpMZBHUUhbTX1U8j4hsK7BAo98 Azog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=WnEm4y4Gb1gILlyNJ1p6kywDDvqp6Y8gIMTA4arfee4=; fh=9XScnG9nQVVeTNZVv+hdPs+CCrCQc3eKMFx8i1+IOhc=; b=TrlvdPLqV8r6Uml75XeZWOX2IFvdz3sPofS/ZhpEc7e04NL4b2aMw7k7CommOlBOew Jvcz/kvBh2NPUJ2RPwX1tKZqTRXmudbdNgsYf6abxfq156tJ+20aNoHizvijfdOzVZks OvCyWJllQd4gGctlAqbmuqN8sgJGjoSfL0mD25R2caE3gaWvbzJHz3aSWzrTisdbFI+H eoNGjmZ7eLzKBB2C/bMEkI64aQhkDokSACLUHC5RJxafN+rtHwBc1TkjgGvR2sT4to1x XGa7+O4DDwKLLJv4t5PweaVWjqHcb076Y6Wy4b5phgmQlR71abw31GR+D8zkzw+SABeR Mn0g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dYyt+Q9Z; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ada2fe7eead31-4c374a7fab8si2735468137.214.2025.03.17.07.31.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 Mar 2025 07:31:09 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dYyt+Q9Z; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org 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) 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-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) 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) 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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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_name()") Signed-off-by: Peter Maydell Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- 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 stop * before the insn which triggers a watchpoint rather than after it. * @gdb_arch_name: Optional callback that returns the architecture name known - * 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.