From patchwork Mon Apr 24 16:22:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 68228 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 21F243852741 for ; Mon, 24 Apr 2023 16:24:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 21F243852741 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1682353460; bh=kkUe9erIq6gfnk+uuT17j43vpqKBF56SJ0tTwjnCpzw=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=a5L4FFp4GOi5saAF78/h60AVZtMkk82ABGWH29oVnaDVx9zMtF8KbtGtvhBgVNKqV b0rKlU624Fd48DtEhKydkjjqx/8HdrJ+CrmXUFoq5JJkSUPZOxyqEuq/pD5WZQjt2d EaVElJireYYb3IjTM8x5nghdXBAO8HDStNKW2gOg= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) by sourceware.org (Postfix) with ESMTPS id BD280385841D for ; Mon, 24 Apr 2023 16:22:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BD280385841D Received: by mail-io1-xd2b.google.com with SMTP id ca18e2360f4ac-763da065494so16654639f.0 for ; Mon, 24 Apr 2023 09:22:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682353348; x=1684945348; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kkUe9erIq6gfnk+uuT17j43vpqKBF56SJ0tTwjnCpzw=; b=cWQSA0gVhhND2ATeIxdwV7G2dXslvWke5sInVkl1DkuKUU5nufgT5WzG26hlRjVM0y TminGY8VS9LMAV2ypZEpcx8JGKPFm9WybvPR8Pg1ODlxlpS114PwKNyWkKmT+P/VKDUQ mr+8zcX1QGoe9wBlKtmWWxt3LQ7pkCEowLEft8RAHN5jLvqvOCm6uA4cxeLBHkjC3MED t9u6DQIPpoc3IGdGfV5ay//ddqWqxcYlXz5uEz3Qhi2KQrmPmzliINNNOl2mU2Oo9x2s faRkcbHJTqsbJQhuTAnJoiaQpjjwYBAeMZ87lDzsSk8c/x4P7hmfC+OMcr7MbCubM5tr HMQA== X-Gm-Message-State: AAQBX9eTEmqY6JG1SBu6uoBVprhPlfrBzyiSSH+osFZ+rB/y6Y6hfGyi rzaVM5JVbiMAI8RVggvwniR4pO1IvDEm7p87FOEUpQ== X-Google-Smtp-Source: AKy350bBFFp6aq3gKVdrfrH5rbTctC+6aCIq/P9PfFNwqTH5yXwfHzaO9KEZZREAm+Z2qlj8eiJ/Ww== X-Received: by 2002:a5d:8197:0:b0:758:6d1e:2978 with SMTP id u23-20020a5d8197000000b007586d1e2978mr5427640ion.10.1682353348097; Mon, 24 Apr 2023 09:22:28 -0700 (PDT) Received: from localhost.localdomain (71-211-191-82.hlrn.qwest.net. [71.211.191.82]) by smtp.gmail.com with ESMTPSA id cx27-20020a056638491b00b0040fa19472bcsm3444049jab.92.2023.04.24.09.22.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Apr 2023 09:22:27 -0700 (PDT) To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFC 08/10] Constify dwarf2_cie::augmentation Date: Mon, 24 Apr 2023 10:22:09 -0600 Message-Id: <20230424162211.682763-9-tromey@adacore.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230424162211.682763-1-tromey@adacore.com> References: <20230424162211.682763-1-tromey@adacore.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org 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: , X-Patchwork-Original-From: Tom Tromey via Gdb-patches From: Tom Tromey Reply-To: Tom Tromey Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" I noticed that dwarf2_cie::augmentation could be 'const'. --- gdb/dwarf2/frame.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gdb/dwarf2/frame.c b/gdb/dwarf2/frame.c index a561aaf3100..8f8add201f4 100644 --- a/gdb/dwarf2/frame.c +++ b/gdb/dwarf2/frame.c @@ -80,7 +80,7 @@ struct dwarf2_cie const gdb_byte *end; /* Saved augmentation, in case it's needed later. */ - char *augmentation; + const char *augmentation; /* Encoding of addresses. */ gdb_byte encoding; @@ -1746,7 +1746,7 @@ decode_frame_entry_1 (struct gdbarch *gdbarch, { /* This is a CIE. */ struct dwarf2_cie *cie; - char *augmentation; + const char *augmentation; unsigned int cie_version; /* Check that a CIE was expected. */ @@ -1780,7 +1780,7 @@ decode_frame_entry_1 (struct gdbarch *gdbarch, buf += 1; /* Interpret the interesting bits of the augmentation. */ - cie->augmentation = augmentation = (char *) buf; + cie->augmentation = augmentation = (const char *) buf; buf += (strlen (augmentation) + 1); /* Ignore armcc augmentations. We only use them for quirks,