From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) by sourceware.org (Postfix) with ESMTPS id 7F1253858C41 for ; Tue, 5 Sep 2023 18:36:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7F1253858C41 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-io1-xd29.google.com with SMTP id ca18e2360f4ac-77acb04309dso112058339f.2 for ; Tue, 05 Sep 2023 11:36:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1693938987; x=1694543787; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=rjcm+IcrQlvF3f+T6Q/ZyVZWThMqQCzZLu4L8CU6uD4=; b=CPfSu6DOvoxYqYQbPhHabTg3swaq3yhZwu3xx2fwVvJFd5R5GRyTkEs9H9S+qk6m6T dQFDFL4FYaJvXtfploVud8dBLTV+ysfSKWDsXJNV/3Itnzi/G+Y/zDatw3h64Ve54Lrl sS8viNCobM75Ubu2/3KQkoKmSlKMTeiDarJIPaRbyx5VReVKE2jwfPlDQIKG9ktnhFPr hmm0BTCEqKuonNb8rTW9sCTdCUUg47PUDxONQDIRXnKdQAqUgawOIiFUZCHcdckwTwkV AEL+8xzm+Fq4G9NXGCBWtAnFILe5C6RtWX5U7W9stkhhShogCcYI/inoYLOFWW9fco6F kPfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693938987; x=1694543787; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=rjcm+IcrQlvF3f+T6Q/ZyVZWThMqQCzZLu4L8CU6uD4=; b=RbXkvASGuxChQotlJ8EpCLsAUUU0ITHvXLH6i9bYeRnzW1976Jl6zLJ+Ginkm8qT8Q aWF7o67TAKzVKMwyydDpTyM4Rf3bPWpZRplm62NeE6FTkcP7Zn6DcQrx29WFDzLGmN37 8J/iRkMWhScFqCCrudffvp0xi95Ae/cscS2XanTTTK77WbFYOvAFAktThsbFnj5Fbs/D 6HhQv0JlwTi/KIlRNHB8sW8WrPg6v6br6MWncL+9TMp2xx7OIMXFsg8ufBazVB2vl3hQ XV7Pu5hAG3pedWuj6TJWh5cN6s+C2ituGcMNt8XhNyMjonJqkoPJ+4omwnYm6zKZA9rP ZNqA== X-Gm-Message-State: AOJu0Yx3D8wY9vY5pM705Y9tss/VDZp85YQKwz7Vbrch9UOqoZoCsNSo vXylIQeKyLVnK7o63ExwyGJua5iFBbllyNrItVJUxA== X-Google-Smtp-Source: AGHT+IGcPsYb71+jBTnW1ExAhtkNw4T4Adg6UT7Z4yFFSW3YKYIC8VsttP23fWQluwEBbQQt7b0UyQ== X-Received: by 2002:a5d:84ca:0:b0:790:ff32:eb3 with SMTP id z10-20020a5d84ca000000b00790ff320eb3mr15901987ior.17.1693938986783; Tue, 05 Sep 2023 11:36:26 -0700 (PDT) Received: from localhost.localdomain (75-166-150-212.hlrn.qwest.net. [75.166.150.212]) by smtp.gmail.com with ESMTPSA id c16-20020a5ea910000000b0079263d9b6a8sm4372778iod.11.2023.09.05.11.36.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Sep 2023 11:36:26 -0700 (PDT) From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH] Move val_prettyformat to valprint.h Date: Tue, 5 Sep 2023 12:36:16 -0600 Message-Id: <20230905183616.2042673-1-tromey@adacore.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.6 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 autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: I stumbled across an ancient FIXME comment that was easy to fix -- val_prettyformat does not need to be in defs.h, and is easily moved to valprint.h, where (despite what the comment says) it belongs. Tested by rebuilding. --- gdb/defs.h | 14 -------------- gdb/valprint.h | 11 +++++++++++ 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/gdb/defs.h b/gdb/defs.h index 454475b203c..f5af3e617c4 100644 --- a/gdb/defs.h +++ b/gdb/defs.h @@ -410,20 +410,6 @@ enum info_proc_what extern unsigned input_radix; extern unsigned output_radix; -/* * Possibilities for prettyformat parameters to routines which print - things. Like enum language, this should be in value.h, but needs - to be here for the same reason. FIXME: If we can eliminate this - as an arg to LA_VAL_PRINT, then we can probably move it back to - value.h. */ - -enum val_prettyformat - { - Val_no_prettyformat = 0, - Val_prettyformat, - /* * Use the default setting which the user has specified. */ - Val_prettyformat_default - }; - /* * Optional native machine support. Non-native (and possibly pure multi-arch) targets do not need a "nm.h" file. This will be a symlink to one of the nm-*.h files, built by the `configure' diff --git a/gdb/valprint.h b/gdb/valprint.h index cf5e2f210e4..0a8878055d7 100644 --- a/gdb/valprint.h +++ b/gdb/valprint.h @@ -22,6 +22,17 @@ #include "cli/cli-option.h" +/* Possibilities for prettyformat parameters to routines which print + things. */ + +enum val_prettyformat + { + Val_no_prettyformat = 0, + Val_prettyformat, + /* * Use the default setting which the user has specified. */ + Val_prettyformat_default + }; + /* This is used to pass formatting options to various value-printing functions. */ struct value_print_options -- 2.40.1