From patchwork Mon Oct 7 17:25:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 98462 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 67CCE385B50D for ; Mon, 7 Oct 2024 17:25:45 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail-io1-xd36.google.com (mail-io1-xd36.google.com [IPv6:2607:f8b0:4864:20::d36]) by sourceware.org (Postfix) with ESMTPS id E4BDE385C6CE for ; Mon, 7 Oct 2024 17:25:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E4BDE385C6CE Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E4BDE385C6CE Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::d36 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728321921; cv=none; b=qaTXlzDZVZJ++ql7KDwh8k288H6+R1SBDhB0WF8ocRJ68a5WOwdO/UPNoRO07BWntzPsP8uZtd4E0DM4jjp4S1hUTMWZpgjReQwles0TbxYastehRC0fVGGyoHBd1MNxiFFtzqvx0P23FcLPejEwsFiYhFoKqraEDU6SnL5qclI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728321921; c=relaxed/simple; bh=83ac/g31ZMaMxkST2jZAcSAuw98EY1xXJpr57tAnODM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=rMoxkK6yjVW9s8zdjyG3xAHy6EhHXO0Ge1X1Cl3+TPgJCcR24TjRp1XTG3/MmQDgNpKIIfg19RseWyr/JNUyTkBkW6sXaX6uSdhiBrMi0xcZNUBFi8tP50EWtrA5lDPciummBP4mbj1xSQF1ZgsXaszjAwfvyWPVa5+8kWyp1rg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-io1-xd36.google.com with SMTP id ca18e2360f4ac-82aad6c83ecso177904439f.3 for ; Mon, 07 Oct 2024 10:25:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1728321916; x=1728926716; 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=2bpuK2PupS+KyCtQ5jme5NNyx808mo8YbycQPOb1xK8=; b=X3WWoXbQKBpUdzv2vRxENE76VsUGCu57pB5LWunlJ/n0xUb6GE2h/Hnk/9KjXsIE0E kcIdqqjB6lN1crRStev41izvz67pXaRrfg8NUvkcwuD61CjDgBDNMCDG0BXS7peNYaio N8dIsbE65k/eDPiewnfiSGc9OexeJYch8wXz3vhnH315C57kagjYIuxH5IsVjqfYDQ4n kVjFpZClzT3iyHtCXT2HUStfOEZZkHBRv/fBZFLVEdQBS0ny5nA8ohYsedJiHefzeccg X7YoeiICR6xgcZ84GLZrPwYBYrmaGildenUqWXCg6iIc+XYOe1qLx7vIf9Yi2g7MfTab G3SQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728321916; x=1728926716; 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=2bpuK2PupS+KyCtQ5jme5NNyx808mo8YbycQPOb1xK8=; b=lyr3eK2s3ph5tTVBKNv6+eFHt6mJLCSV014R94F8SBmH5exVf35xZCgNGEbl2IQMLr UHEP8jbsoE+QFZAtp8M1KXKvTlc21RaWLQojqGPY71vDbuKGvKoex4Gl9Q7l/m3DdSsZ EqzCW8l6GYxIhTYGWMQsRsHfsPB1IlE9uGgKl678I1uTUV+UCssLxkQIrZ0cZ8OPaGsV D0vG1kSaSljb6iA9rAvbvswH7KhRIOf28VJWExH7u/WPOq+dPgSBGanOcWoQsY0o+PqM 9+cRyL8a/tR8Ef/aErPE6XD32Z4bsLv6DkP96beSkKWpmEQrVFk8hhnlBNellvC5l5mN wJcw== X-Gm-Message-State: AOJu0YzEdojhsXfeVViw2Z8Yb9iZduHh+/WhKo4rho/K+HApE3sN8PlL 2dQImtWRCHgUJbjnNwwM3TvazIMEQAc8NA4DEeQDQiOiB5HIuqMfSEX5e64R77G/UPxYzKA1Wo8 = X-Google-Smtp-Source: AGHT+IFuyb69VwbaCWrKg4Lpz4O6lSBoERqOCVkx61I2qT/8i0VDCO5UiwpI6Z/t9WoSEf9AX1UPMQ== X-Received: by 2002:a05:6602:150d:b0:82d:835:e66d with SMTP id ca18e2360f4ac-834f7d22b45mr1280452739f.9.1728321915759; Mon, 07 Oct 2024 10:25:15 -0700 (PDT) Received: from localhost.localdomain (97-122-122-36.hlrn.qwest.net. [97.122.122.36]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4db8d3a7966sm298938173.45.2024.10.07.10.25.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Oct 2024 10:25:15 -0700 (PDT) From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH] Implement 'Object_Size Date: Mon, 7 Oct 2024 11:25:09 -0600 Message-ID: <20241007172509.678632-1-tromey@adacore.com> X-Mailer: git-send-email 2.46.2 MIME-Version: 1.0 X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, 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 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org This patch started as an attempt to allow the 'Size attribute to be applied to types, and not just objects. However, that turns out to be difficult due to the Ada semantcs of 'Size. In particular, Ada requires 'Size to denote the size of the representation of the value, so for example Boolean'Size must be 1. Implementing this properly requires information not readily available to gdb... and while we could synthesize this information in many cases, it also seemed to me that this wasn't strictly very useful when debugging. So instead, this patch adds support for the 'Object_Size attribute, which is somewhat closer to 'sizeof'. Note also that while 'Object_Size is defined for some dynamic types, I chose not to implement this here, as again this information is not readily available -- and I think it's preferable to error than to print something that might be incorrect. Reviewed-By: Eli Zaretskii --- gdb/NEWS | 2 + gdb/ada-exp.h | 20 +++++-- gdb/ada-exp.y | 12 ++-- gdb/ada-lang.c | 27 +++++++-- gdb/ada-lex.l | 1 + gdb/doc/gdb.texinfo | 6 ++ gdb/testsuite/gdb.ada/type-tick-size.exp | 50 +++++++++++++++++ gdb/testsuite/gdb.ada/type-tick-size/pck.adb | 21 +++++++ gdb/testsuite/gdb.ada/type-tick-size/pck.ads | 36 ++++++++++++ gdb/testsuite/gdb.ada/type-tick-size/prog.adb | 56 +++++++++++++++++++ .../gdb.ada/type-tick-size/support.adb | 21 +++++++ .../gdb.ada/type-tick-size/support.ads | 18 ++++++ 12 files changed, 254 insertions(+), 16 deletions(-) create mode 100644 gdb/testsuite/gdb.ada/type-tick-size.exp create mode 100644 gdb/testsuite/gdb.ada/type-tick-size/pck.adb create mode 100644 gdb/testsuite/gdb.ada/type-tick-size/pck.ads create mode 100644 gdb/testsuite/gdb.ada/type-tick-size/prog.adb create mode 100644 gdb/testsuite/gdb.ada/type-tick-size/support.adb create mode 100644 gdb/testsuite/gdb.ada/type-tick-size/support.ads diff --git a/gdb/NEWS b/gdb/NEWS index 42668cbc057..42b8a88fd8a 100644 --- a/gdb/NEWS +++ b/gdb/NEWS @@ -49,6 +49,8 @@ history has been reached. It also specifies that the forward execution can continue, and the recording will also continue. +* The Ada 'Object_Size attribute is now supported. + * Python API ** Added gdb.record.clear. Clears the trace data of the current recording. diff --git a/gdb/ada-exp.h b/gdb/ada-exp.h index 94e4ea0f47e..53d48988eda 100644 --- a/gdb/ada-exp.h +++ b/gdb/ada-exp.h @@ -30,10 +30,6 @@ extern struct value *ada_atr_tag (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1); -extern struct value *ada_atr_size (struct type *expect_type, - struct expression *exp, - enum noside noside, enum exp_opcode op, - struct value *arg1); extern struct value *ada_abs (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, @@ -200,10 +196,24 @@ class ada_ternop_range_operation using ada_neg_operation = unop_operation; using ada_atr_tag_operation = unop_operation; -using ada_atr_size_operation = unop_operation; using ada_abs_operation = unop_operation; using ada_pos_operation = unop_operation; +/* Implementation of the 'Size and 'Object_Size attribute. The + boolean parameter is true for 'Size and false for 'Object_Size. */ +class ada_atr_size_operation + : public maybe_constant_operation +{ + using maybe_constant_operation::maybe_constant_operation; + + value *evaluate (struct type *expect_type, + struct expression *exp, + enum noside noside) override; + + enum exp_opcode opcode () const override + { return OP_ATR_SIZE; } +}; + /* The in-range operation, given a type. */ class ada_unop_range_operation : public tuple_holding_operation diff --git a/gdb/ada-exp.y b/gdb/ada-exp.y index ed8ed443f82..cffeada7695 100644 --- a/gdb/ada-exp.y +++ b/gdb/ada-exp.y @@ -185,12 +185,12 @@ ada_pop (bool deprocedure_p = true, struct type *context_type = nullptr) } /* Like parser_state::wrap, but use ada_pop to pop the value. */ -template +template void -ada_wrap () +ada_wrap (Args... args) { operation_up arg = ada_pop (); - pstate->push_new (std::move (arg)); + pstate->push_new (std::move (arg), std::forward (args)...); } /* Create and push an address-of operation, as appropriate for Ada. @@ -519,7 +519,7 @@ make_tick_completer (struct stoken tok) %right TICK_ACCESS TICK_ADDRESS TICK_FIRST TICK_LAST TICK_LENGTH %right TICK_MAX TICK_MIN TICK_MODULUS -%right TICK_POS TICK_RANGE TICK_SIZE TICK_TAG TICK_VAL +%right TICK_POS TICK_RANGE TICK_SIZE TICK_OBJECT_SIZE TICK_TAG TICK_VAL %right TICK_COMPLETE TICK_ENUM_REP TICK_ENUM_VAL /* The following are right-associative only so that reductions at this precedence have lower precedence than '.' and '('. The syntax still @@ -914,7 +914,9 @@ primary : primary TICK_ACCESS (std::move (arg), OP_ATR_LENGTH, $3); } | primary TICK_SIZE - { ada_wrap (); } + { ada_wrap (true); } + | primary TICK_OBJECT_SIZE + { ada_wrap (false); } | primary TICK_TAG { ada_wrap (); } | opt_type_prefix TICK_MIN '(' exp ',' exp ')' diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index d14a556540f..dc1b841c5d4 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -10101,15 +10101,28 @@ ada_atr_tag (struct type *expect_type, return ada_value_tag (arg1); } -/* A helper function for OP_ATR_SIZE. */ +namespace expr +{ value * -ada_atr_size (struct type *expect_type, - struct expression *exp, - enum noside noside, enum exp_opcode op, - struct value *arg1) +ada_atr_size_operation::evaluate (struct type *expect_type, + struct expression *exp, + enum noside noside) { - struct type *type = arg1->type (); + bool is_type = std::get<0> (m_storage)->opcode () == OP_TYPE; + bool is_size = std::get<1> (m_storage); + + enum noside sub_noside = is_type ? EVAL_AVOID_SIDE_EFFECTS : noside; + value *val = std::get<0> (m_storage)->evaluate (nullptr, exp, sub_noside); + struct type *type = ada_check_typedef (val->type ()); + + if (is_type) + { + if (is_size) + error (_("gdb cannot apply 'Size to a type")); + if (is_dynamic_type (type) || find_base_type (type) != nullptr) + error (_("cannot apply 'Object_Size to dynamic type")); + } /* If the argument is a reference, then dereference its type, since the user is really asking for the size of the actual object, @@ -10124,6 +10137,8 @@ ada_atr_size (struct type *expect_type, TARGET_CHAR_BIT * type->length ()); } +} /* namespace expr */ + /* A helper function for UNOP_ABS. */ value * diff --git a/gdb/ada-lex.l b/gdb/ada-lex.l index 3fe0c2e6d08..8291595eae2 100644 --- a/gdb/ada-lex.l +++ b/gdb/ada-lex.l @@ -672,6 +672,7 @@ attributes[] = { { "max", TICK_MAX }, { "min", TICK_MIN }, { "modulus", TICK_MODULUS }, + { "object_size", TICK_OBJECT_SIZE }, { "pos", TICK_POS }, { "range", TICK_RANGE }, { "size", TICK_SIZE }, diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 46ca62ec0c3..ca80672ed7e 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -18821,6 +18821,12 @@ operand of the membership (@code{in}) operator. @item @t{'Address}. + +@item +@t{'Size} is available for objects (not types). + +@item +@t{'Object_Size} is available, but not for indefinite types. @end itemize @item diff --git a/gdb/testsuite/gdb.ada/type-tick-size.exp b/gdb/testsuite/gdb.ada/type-tick-size.exp new file mode 100644 index 00000000000..c696a31699d --- /dev/null +++ b/gdb/testsuite/gdb.ada/type-tick-size.exp @@ -0,0 +1,50 @@ +# Copyright 2024 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +load_lib "ada.exp" + +require allow_ada_tests + +standard_ada_testfile prog + +if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} { + return -1 +} + +clean_restart ${testfile} + +set bp_location [gdb_get_line_number "STOP" ${testdir}/prog.adb] +runto "prog.adb:$bp_location" + +foreach type {boolean color simple small_int} { + # Log all the values for easier debugging. + gdb_test "print ${type}_val'object_size" " = $decimal" + gdb_test "print ${type}'object_size" " = $decimal" + gdb_test "print ${type}_size" " = $decimal" + gdb_test "print ${type}_type_size" " = $decimal" + + gdb_test "print ${type}_val'object_size = ${type}_size" " = true" + gdb_test "print ${type}'object_size = ${type}_type_size" " = true" + + gdb_test "print ${type}'size" "gdb cannot apply 'Size to a type" +} + +gdb_test "print rec_val'object_size" " = $decimal" +gdb_test "print rec'object_size" "cannot apply 'Object_Size to dynamic type" + +# Check that 'Size can be applied to values, regardless of whether +# their declared type is dynamic. +gdb_test "print static_blob'size = static_blob_size" " = true" +gdb_test "print dynamic_blob'size = dynamic_blob_size" " = true" diff --git a/gdb/testsuite/gdb.ada/type-tick-size/pck.adb b/gdb/testsuite/gdb.ada/type-tick-size/pck.adb new file mode 100644 index 00000000000..ffff1b63b55 --- /dev/null +++ b/gdb/testsuite/gdb.ada/type-tick-size/pck.adb @@ -0,0 +1,21 @@ +-- Copyright 2024 Free Software Foundation, Inc. +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . + +package body Pck is +procedure Do_Nothing (A : System.Address) is + begin + null; + end Do_Nothing; +end Pck; diff --git a/gdb/testsuite/gdb.ada/type-tick-size/pck.ads b/gdb/testsuite/gdb.ada/type-tick-size/pck.ads new file mode 100644 index 00000000000..a3c3cd102c0 --- /dev/null +++ b/gdb/testsuite/gdb.ada/type-tick-size/pck.ads @@ -0,0 +1,36 @@ +-- Copyright 2024 Free Software Foundation, Inc. +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . + +with System; +with Support; use Support; + +package Pck is + subtype Length is Natural range 0 .. 10; + type Bounded_String (Max_Length : Length := Length'Last) is + record + Current_Length : Length := 0; + Buffer : String (1 .. Max_Length); + end record; + + type Blob is array (Integer range <>) of Bounded_String; + + Static_Blob : Blob (1 .. 10); + Static_Blob_Size : Integer := Static_Blob'Size; + + Dynamic_Blob : Blob (1 .. Ident (10)); + Dynamic_Blob_Size : Integer := Dynamic_Blob'Size; + + procedure Do_Nothing (A : System.Address); +end Pck; diff --git a/gdb/testsuite/gdb.ada/type-tick-size/prog.adb b/gdb/testsuite/gdb.ada/type-tick-size/prog.adb new file mode 100644 index 00000000000..c911583d0cf --- /dev/null +++ b/gdb/testsuite/gdb.ada/type-tick-size/prog.adb @@ -0,0 +1,56 @@ +-- Copyright 2024 Free Software Foundation, Inc. +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . + +with Pck; use Pck; + +procedure Prog is + type Color is (Red, Orange, Yellow, Green, Blue, Indigo, Violet); + + type Simple is record + I : Integer; + end record; + + subtype Small_Int is Natural range 0 .. 100; + type Rec (L : Small_Int := 0) is record + S : String (1 .. L); + end record; + + Boolean_Val : Boolean := True; + Boolean_Size : Integer := Boolean_Val'Size; + Boolean_Type_Size : Integer := Boolean'Object_Size; + + Color_Val : Color := Indigo; + Color_Size : Integer := Color_Val'Size; + Color_Type_Size : Integer := Color'Object_Size; + + Simple_Val : Simple := (I => 91); + Simple_Size : Integer := Simple_Val'Size; + Simple_Type_Size : Integer := Simple'Object_Size; + + Small_Int_Val : Small_Int := 31; + Small_Int_Size : Integer := Small_Int_Val'Size; + Small_Int_Type_Size : Integer := Small_Int'Object_Size; + + Rec_Val : Rec := (L => 2, S => "xy"); + -- This is implementation defined, so the compiler does provide + -- something, but gdb does not. + Rec_Size : Integer := Rec_Val'Size; + Rec_Type_Size : Integer := Rec'Object_Size; + +begin + Do_Nothing (Static_Blob'Address); + Do_Nothing (Dynamic_Blob'Address); + null; -- STOP +end Prog; diff --git a/gdb/testsuite/gdb.ada/type-tick-size/support.adb b/gdb/testsuite/gdb.ada/type-tick-size/support.adb new file mode 100644 index 00000000000..b694653c6a3 --- /dev/null +++ b/gdb/testsuite/gdb.ada/type-tick-size/support.adb @@ -0,0 +1,21 @@ +-- Copyright 2024 Free Software Foundation, Inc. +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . + +package body Support is + function Ident (I : Integer) return Integer is + begin + return I; + end Ident; +end Support; diff --git a/gdb/testsuite/gdb.ada/type-tick-size/support.ads b/gdb/testsuite/gdb.ada/type-tick-size/support.ads new file mode 100644 index 00000000000..b86b14e6a50 --- /dev/null +++ b/gdb/testsuite/gdb.ada/type-tick-size/support.ads @@ -0,0 +1,18 @@ +-- Copyright 2024 Free Software Foundation, Inc. +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . + +package Support is + function Ident (I : Integer) return Integer; +end Support;