1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<html> 3<!-- Copyright (C) 1988-2021 Free Software Foundation, Inc. 4 5Permission is granted to copy, distribute and/or modify this document 6under the terms of the GNU Free Documentation License, Version 1.3 or 7any later version published by the Free Software Foundation; with the 8Invariant Sections being "Free Software" and "Free Software Needs 9Free Documentation", with the Front-Cover Texts being "A GNU Manual," 10and with the Back-Cover Texts as in (a) below. 11 12(a) The FSF's Back-Cover Text is: "You are free to copy and modify 13this GNU Manual. Buying copies from GNU Press supports the FSF in 14developing GNU and promoting software freedom." --> 15<!-- Created by GNU Texinfo 5.1, http://www.gnu.org/software/texinfo/ --> 16<head> 17<title>Debugging with GDB: Omissions from Ada</title> 18 19<meta name="description" content="Debugging with GDB: Omissions from Ada"> 20<meta name="keywords" content="Debugging with GDB: Omissions from Ada"> 21<meta name="resource-type" content="document"> 22<meta name="distribution" content="global"> 23<meta name="Generator" content="makeinfo"> 24<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 25<link href="index.html#Top" rel="start" title="Top"> 26<link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index"> 27<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> 28<link href="Ada.html#Ada" rel="up" title="Ada"> 29<link href="Additions-to-Ada.html#Additions-to-Ada" rel="next" title="Additions to Ada"> 30<link href="Ada-Mode-Intro.html#Ada-Mode-Intro" rel="previous" title="Ada Mode Intro"> 31<style type="text/css"> 32<!-- 33a.summary-letter {text-decoration: none} 34blockquote.smallquotation {font-size: smaller} 35div.display {margin-left: 3.2em} 36div.example {margin-left: 3.2em} 37div.indentedblock {margin-left: 3.2em} 38div.lisp {margin-left: 3.2em} 39div.smalldisplay {margin-left: 3.2em} 40div.smallexample {margin-left: 3.2em} 41div.smallindentedblock {margin-left: 3.2em; font-size: smaller} 42div.smalllisp {margin-left: 3.2em} 43kbd {font-style:oblique} 44pre.display {font-family: inherit} 45pre.format {font-family: inherit} 46pre.menu-comment {font-family: serif} 47pre.menu-preformatted {font-family: serif} 48pre.smalldisplay {font-family: inherit; font-size: smaller} 49pre.smallexample {font-size: smaller} 50pre.smallformat {font-family: inherit; font-size: smaller} 51pre.smalllisp {font-size: smaller} 52span.nocodebreak {white-space:nowrap} 53span.nolinebreak {white-space:nowrap} 54span.roman {font-family:serif; font-weight:normal} 55span.sansserif {font-family:sans-serif; font-weight:normal} 56ul.no-bullet {list-style: none} 57--> 58</style> 59 60 61</head> 62 63<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> 64<a name="Omissions-from-Ada"></a> 65<div class="header"> 66<p> 67Next: <a href="Additions-to-Ada.html#Additions-to-Ada" accesskey="n" rel="next">Additions to Ada</a>, Previous: <a href="Ada-Mode-Intro.html#Ada-Mode-Intro" accesskey="p" rel="previous">Ada Mode Intro</a>, Up: <a href="Ada.html#Ada" accesskey="u" rel="up">Ada</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p> 68</div> 69<hr> 70<a name="Omissions-from-Ada-1"></a> 71<h4 class="subsubsection">15.4.10.2 Omissions from Ada</h4> 72<a name="index-Ada_002c-omissions-from"></a> 73 74<p>Here are the notable omissions from the subset: 75</p> 76<ul> 77<li> Only a subset of the attributes are supported: 78 79<ul class="no-bullet"> 80<li>- <tt>'First</tt>, <tt>'Last</tt>, and <tt>'Length</tt> 81 on array objects (not on types and subtypes). 82 83</li><li>- <tt>'Min</tt> and <tt>'Max</tt>. 84 85</li><li>- <tt>'Pos</tt> and <tt>'Val</tt>. 86 87</li><li>- <tt>'Tag</tt>. 88 89</li><li>- <tt>'Range</tt> on array objects (not subtypes), but only as the right 90operand of the membership (<code>in</code>) operator. 91 92</li><li>- <tt>'Access</tt>, <tt>'Unchecked_Access</tt>, and 93<tt>'Unrestricted_Access</tt> (a GNAT extension). 94 95</li><li>- <tt>'Address</tt>. 96</li></ul> 97 98</li><li> The names in 99<code>Characters.Latin_1</code> are not available and 100concatenation is not implemented. Thus, escape characters in strings are 101not currently available. 102 103</li><li> Equality tests (‘<samp>=</samp>’ and ‘<samp>/=</samp>’) on arrays test for bitwise 104equality of representations. They will generally work correctly 105for strings and arrays whose elements have integer or enumeration types. 106They may not work correctly for arrays whose element 107types have user-defined equality, for arrays of real values 108(in particular, IEEE-conformant floating point, because of negative 109zeroes and NaNs), and for arrays whose elements contain unused bits with 110indeterminate values. 111 112</li><li> The other component-by-component array operations (<code>and</code>, <code>or</code>, 113<code>xor</code>, <code>not</code>, and relational tests other than equality) 114are not implemented. 115 116</li><li> <a name="index-array-aggregates-_0028Ada_0029"></a> 117<a name="index-record-aggregates-_0028Ada_0029"></a> 118<a name="index-aggregates-_0028Ada_0029"></a> 119There is limited support for array and record aggregates. They are 120permitted only on the right sides of assignments, as in these examples: 121 122<div class="smallexample"> 123<pre class="smallexample">(gdb) set An_Array := (1, 2, 3, 4, 5, 6) 124(gdb) set An_Array := (1, others => 0) 125(gdb) set An_Array := (0|4 => 1, 1..3 => 2, 5 => 6) 126(gdb) set A_2D_Array := ((1, 2, 3), (4, 5, 6), (7, 8, 9)) 127(gdb) set A_Record := (1, "Peter", True); 128(gdb) set A_Record := (Name => "Peter", Id => 1, Alive => True) 129</pre></div> 130 131<p>Changing a 132discriminant’s value by assigning an aggregate has an 133undefined effect if that discriminant is used within the record. 134However, you can first modify discriminants by directly assigning to 135them (which normally would not be allowed in Ada), and then performing an 136aggregate assignment. For example, given a variable <code>A_Rec</code> 137declared to have a type such as: 138</p> 139<div class="smallexample"> 140<pre class="smallexample">type Rec (Len : Small_Integer := 0) is record 141 Id : Integer; 142 Vals : IntArray (1 .. Len); 143end record; 144</pre></div> 145 146<p>you can assign a value with a different size of <code>Vals</code> with two 147assignments: 148</p> 149<div class="smallexample"> 150<pre class="smallexample">(gdb) set A_Rec.Len := 4 151(gdb) set A_Rec := (Id => 42, Vals => (1, 2, 3, 4)) 152</pre></div> 153 154<p>As this example also illustrates, <small>GDB</small> is very loose about the usual 155rules concerning aggregates. You may leave out some of the 156components of an array or record aggregate (such as the <code>Len</code> 157component in the assignment to <code>A_Rec</code> above); they will retain their 158original values upon assignment. You may freely use dynamic values as 159indices in component associations. You may even use overlapping or 160redundant component associations, although which component values are 161assigned in such cases is not defined. 162</p> 163</li><li> Calls to dispatching subprograms are not implemented. 164 165</li><li> The overloading algorithm is much more limited (i.e., less selective) 166than that of real Ada. It makes only limited use of the context in 167which a subexpression appears to resolve its meaning, and it is much 168looser in its rules for allowing type matches. As a result, some 169function calls will be ambiguous, and the user will be asked to choose 170the proper resolution. 171 172</li><li> The <code>new</code> operator is not implemented. 173 174</li><li> Entry calls are not implemented. 175 176</li><li> Aside from printing, arithmetic operations on the native VAX floating-point 177formats are not supported. 178 179</li><li> It is not possible to slice a packed array. 180 181</li><li> The names <code>True</code> and <code>False</code>, when not part of a qualified name, 182are interpreted as if implicitly prefixed by <code>Standard</code>, regardless of 183context. 184Should your program 185redefine these names in a package or procedure (at best a dubious practice), 186you will have to use fully qualified names to access their new definitions. 187</li></ul> 188 189<hr> 190<div class="header"> 191<p> 192Next: <a href="Additions-to-Ada.html#Additions-to-Ada" accesskey="n" rel="next">Additions to Ada</a>, Previous: <a href="Ada-Mode-Intro.html#Ada-Mode-Intro" accesskey="p" rel="previous">Ada Mode Intro</a>, Up: <a href="Ada.html#Ada" accesskey="u" rel="up">Ada</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p> 193</div> 194 195 196 197</body> 198</html> 199