1 /* Print values for GNU debugger GDB.
2 Copyright (C) 1986, 1987, 1988 Free Software Foundation, Inc.
4 GDB is distributed in the hope that it will be useful, but WITHOUT ANY
5 WARRANTY. No author or distributor accepts responsibility to anyone
6 for the consequences of using it or for whether it serves any
7 particular purpose or works at all, unless he says so in writing.
8 Refer to the GDB General Public License for full details.
10 Everyone is granted permission to copy, modify and redistribute GDB,
11 but only under the conditions described in the GDB General Public
12 License. A copy of this license is supposed to have been given to you
13 along with GDB so you can know your rights and responsibilities. It
14 should be in a file named COPYING. Among other things, the copyright
15 notice and this notice must be preserved on all copies.
17 In other words, go ahead and share GDB, but don't try to stop
18 anyone else from sharing it farther. Help stamp out software hoarding!
23 #include "initialize.h"
27 #include "expression.h"
36 /* Last specified output format. */
38 static char last_format = 'x';
40 /* Last specified examination size. 'b', 'h', 'w' or `q'. */
42 static char last_size = 'w';
44 /* Default address to examine next. */
46 static CORE_ADDR next_address;
48 /* Last address examined. */
50 static CORE_ADDR last_examine_address;
52 /* Contents of last address examined.
53 This is not valid past the end of the `x' command! */
55 static value last_examine_value;
57 /* Number of auto-display expression currently being displayed.
58 So that we can deleted it if we get an error or a signal within it.
59 -1 when not doing one. */
61 int current_display_number;
63 static void do_one_display ();
66 void print_address ();
67 void print_scalar_formatted ();
71 /* Decode a format specification. *STRING_PTR should point to it.
72 OFORMAT and OSIZE are used as defaults for the format and size
73 if none are given in the format specification.
74 The structure returned describes all the data
75 found in the specification. In addition, *STRING_PTR is advanced
76 past the specification and past all whitespace following it. */
79 decode_format (string_ptr, oformat, osize)
84 struct format_data val;
85 register char *p = *string_ptr;
91 if (*p >= '0' && *p <= '9')
93 while (*p >= '0' && *p <= '9') p++;
95 /* Now process size or format letters that follow. */
99 if (*p == 'b' || *p == 'h' || *p == 'w' || *p == 'g')
101 else if (*p >= 'a' && *p <= 'z')
107 /* Make sure 'g' size is not used on integer types. */
108 if (val.size == 'g' && val.format != 'f')
111 while (*p == ' ' || *p == '\t') p++;
117 /* Print value VAL on stdout according to FORMAT, a letter or 0.
118 Do not end with a newline.
119 0 means print VAL according to its own type.
120 SIZE is the letter for the size of datum being printed.
121 This is used to pad hex numbers so they line up. */
124 print_formatted (val, format, size)
126 register char format;
129 register CORE_ADDR val_long;
130 int len = TYPE_LENGTH (VALUE_TYPE (val));
132 if (VALUE_LVAL (val) == lval_memory)
133 next_address = VALUE_ADDRESS (val) + len;
138 next_address = VALUE_ADDRESS (val)
139 + value_print (value_addr (val), stdout, 0);
143 next_address = VALUE_ADDRESS (val)
144 + print_insn (VALUE_ADDRESS (val), stdout);
149 || TYPE_CODE (VALUE_TYPE (val)) == TYPE_CODE_ARRAY
150 || TYPE_CODE (VALUE_TYPE (val)) == TYPE_CODE_STRUCT
151 || TYPE_CODE (VALUE_TYPE (val)) == TYPE_CODE_UNION)
152 value_print (val, stdout, format);
154 print_scalar_formatted (VALUE_CONTENTS (val), VALUE_TYPE (val),
155 format, size, stdout);
159 /* Print a scalar of data of type TYPE, pointed to in GDB by VALADDR,
160 according to letters FORMAT and SIZE on STREAM.
161 FORMAT may not be zero. Formats s and i are not supported at this level.
163 This is how the elements of an array or structure are printed
167 print_scalar_formatted (valaddr, type, format, size, stream)
175 int len = TYPE_LENGTH (type);
177 val_long = unpack_long (type, valaddr);
179 /* If value is unsigned, truncate it in case negative. */
182 if (len == sizeof (char))
183 val_long &= (1 << 8 * sizeof(char)) - 1;
184 else if (len == sizeof (short))
185 val_long &= (1 << 8 * sizeof(short)) - 1;
194 printf ("0x%02x", val_long);
197 printf ("0x%04x", val_long);
199 case 0: /* no size specified, like in print */
201 printf ("0x%08x", val_long);
204 printf ("0x%16x", val_long);
207 error ("Undefined output size \"%c\".", size);
212 printf ("%d", val_long);
216 printf ("%u", val_long);
221 printf ("0%o", val_long);
227 print_address (val_long, stream);
231 value_print (value_from_long (builtin_type_char, val_long), stream, 0);
235 if (len == sizeof (float))
236 type = builtin_type_float;
237 if (len == sizeof (double))
238 type = builtin_type_double;
240 if (is_nan (unpack_double (type, valaddr)))
246 printf ("%g", unpack_double (type, valaddr));
253 error ("Undefined output format \"%c\".", format);
257 /* Specify default address for `x' command.
258 `info lines' uses this. */
261 set_next_address (addr)
266 /* Make address available to the user as $_. */
267 set_internalvar (lookup_internalvar ("_"),
268 value_from_long (builtin_type_int, addr));
271 /* Print address ADDR symbolically on STREAM.
272 First print it as a number. Then perhaps print
273 <SYMBOL + OFFSET> after the number. */
276 print_address (addr, stream)
282 fprintf (stream, "0x%x", addr);
284 i = find_pc_misc_function (addr);
286 if (misc_function_vector[i].address != addr)
287 fprintf (stream, " <%s+%d>",
288 misc_function_vector[i].name,
289 addr - misc_function_vector[i].address);
291 fprintf (stream, " <%s>", misc_function_vector[i].name);
295 /* Examine data at address ADDR in format FMT.
296 Fetch it from memory and print on stdout. */
299 do_examine (fmt, addr)
300 struct format_data fmt;
303 register char format = 0;
305 register int count = 1;
306 struct type *val_type;
308 register int maxelts;
315 /* String or instruction format implies fetch single bytes
316 regardless of the specified size. */
317 if (format == 's' || format == 'i')
321 val_type = builtin_type_char;
322 else if (size == 'h')
323 val_type = builtin_type_short;
324 else if (size == 'w')
325 val_type = builtin_type_long;
326 else if (size == 'g')
327 val_type = builtin_type_double;
334 if (format == 's' || format == 'i')
337 /* Print as many objects as specified in COUNT, at most maxelts per line,
338 with the address of the next one at the start of each line. */
342 print_address (next_address, stdout);
348 fputc ('\t', stdout);
349 /* Note that this sets next_address for the next object. */
350 last_examine_address = next_address;
351 last_examine_value = value_at (val_type, next_address);
352 print_formatted (last_examine_value, format, size);
354 fputc ('\n', stdout);
360 validate_format (fmt, cmdname)
361 struct format_data fmt;
365 error ("Size letters are meaningless in \"%s\" command.", cmdname);
367 error ("Item count other than 1 is meaningless in \"%s\" command.",
369 if (fmt.format == 'i' || fmt.format == 's')
370 error ("Format letter \"%c\" is meaningless in \"%s\" command.",
371 fmt.format, cmdname);
378 struct expression *expr;
379 register struct cleanup *old_chain = 0;
380 register char format = 0;
382 struct format_data fmt;
386 if (exp && *exp == '/')
389 fmt = decode_format (&exp, last_format, 0);
390 validate_format (fmt, "print");
391 last_format = format = fmt.format;
396 expr = parse_c_expression (exp);
397 old_chain = make_cleanup (free_current_contents, &expr);
399 val = evaluate_expression (expr);
402 val = access_value_history (0);
404 histindex = record_latest_value (val);
405 printf ("$%d = ", histindex);
407 print_formatted (val, format, fmt.size);
411 do_cleanups (old_chain);
418 struct expression *expr;
419 register struct cleanup *old_chain;
420 register char format = 0;
422 struct format_data fmt;
424 if (exp && *exp == '/')
427 fmt = decode_format (&exp, 0, 0);
428 validate_format (fmt, "print");
432 expr = parse_c_expression (exp);
433 old_chain = make_cleanup (free_current_contents, &expr);
435 val = evaluate_expression (expr);
437 print_formatted (val, format, fmt.size);
439 do_cleanups (old_chain);
446 struct expression *expr = parse_c_expression (exp);
447 register struct cleanup *old_chain
448 = make_cleanup (free_current_contents, &expr);
449 evaluate_expression (expr);
450 do_cleanups (old_chain);
457 register struct symbol *sym;
458 register CORE_ADDR val;
461 error ("Argument required.");
463 sym = lookup_symbol (exp, get_selected_block (), VAR_NAMESPACE);
468 for (i = 0; i < misc_function_count; i++)
469 if (!strcmp (misc_function_vector[i].name, exp))
472 if (i < misc_function_count)
473 printf ("Symbol \"%s\" is at 0x%x in a file compiled without -g.\n",
474 exp, misc_function_vector[i].address);
476 error ("No symbol \"%s\" in current context.", exp);
480 printf ("Symbol \"%s\" is ", SYMBOL_NAME (sym));
481 val = SYMBOL_VALUE (sym);
483 switch (SYMBOL_CLASS (sym))
486 case LOC_CONST_BYTES:
491 printf ("a label at address 0x%x", val);
495 printf ("a variable in register %s", reg_names[val]);
499 printf ("static at address 0x%x", val);
503 printf ("an argument at offset %d", val);
507 printf ("a local variable at frame offset %d", val);
511 printf ("a typedef");
515 printf ("a function at address 0x%x",
516 BLOCK_START (SYMBOL_BLOCK_VALUE (sym)));
523 x_command (exp, from_tty)
527 struct expression *expr;
528 struct format_data fmt;
529 struct cleanup *old_chain;
531 fmt.format = last_format;
532 fmt.size = last_size;
535 if (exp && *exp == '/')
538 fmt = decode_format (&exp, last_format, last_size);
539 last_size = fmt.size;
540 last_format = fmt.format;
543 /* If we have an expression, evaluate it and use it as the address. */
545 if (exp != 0 && *exp != 0)
547 expr = parse_c_expression (exp);
548 /* Cause expression not to be there any more
549 if this command is repeated with Newline.
550 But don't clobber a user-defined command's definition. */
553 old_chain = make_cleanup (free_current_contents, &expr);
554 next_address = value_as_long (evaluate_expression (expr));
555 do_cleanups (old_chain);
558 do_examine (fmt, next_address);
560 /* Make last address examined available to the user as $_. */
561 set_internalvar (lookup_internalvar ("_"),
562 value_from_long (builtin_type_int, last_examine_address));
564 /* Make contents of last address examined available to the user as $__. */
565 set_internalvar (lookup_internalvar ("__"), last_examine_value);
568 /* Commands for printing types of things. */
574 struct expression *expr;
576 register struct cleanup *old_chain;
580 expr = parse_c_expression (exp);
581 old_chain = make_cleanup (free_current_contents, &expr);
582 val = evaluate_type (expr);
585 val = access_value_history (0);
588 type_print (VALUE_TYPE (val), "", stdout, 1);
592 do_cleanups (old_chain);
596 ptype_command (typename)
599 register char *p = typename;
601 extern struct block *get_current_block ();
602 register struct block *b
603 = (have_inferior_p () || have_core_file_p ()) ? get_current_block () : 0;
604 register struct type *type;
607 error_no_arg ("type name");
609 while (*p && *p != ' ' && *p != '\t') p++;
611 while (*p == ' ' || *p == '\t') p++;
613 if (len == 6 && !strncmp (typename, "struct", 6))
614 type = lookup_struct (p, b);
615 else if (len == 5 && !strncmp (typename, "union", 5))
616 type = lookup_union (p, b);
617 else if (len == 4 && !strncmp (typename, "enum", 4))
618 type = lookup_enum (p, b);
621 type = lookup_typename (typename, b, 1);
624 register struct symbol *sym
625 = lookup_symbol (typename, b, STRUCT_NAMESPACE);
627 error ("No type named %s.", typename);
628 printf ("No type named %s, but there is a ",
630 switch (TYPE_CODE (SYMBOL_TYPE (sym)))
632 case TYPE_CODE_STRUCT:
636 case TYPE_CODE_UNION:
643 printf (" %s. Type \"help ptype\".\n", typename);
644 type = SYMBOL_TYPE (sym);
648 type_print (type, "", stdout, 1);
654 /* Chain link to next auto-display item. */
655 struct display *next;
656 /* Expression to be evaluated and displayed. */
657 struct expression *exp;
658 /* Item number of this auto-display item. */
660 /* Display format specified. */
661 struct format_data format;
662 /* Block in which expression is to be evaluated. */
666 /* Chain of expressions whose values should be displayed
667 automatically each time the program stops. */
669 static struct display *display_chain;
671 static int display_number;
673 /* Add an expression to the auto-display chain.
674 Specify the expression. */
677 display_command (exp, from_tty)
681 struct format_data fmt;
682 register struct expression *expr;
683 register struct display *new;
694 fmt = decode_format (&exp, 0, 0);
695 if (fmt.size && fmt.format == 0)
697 if (fmt.format == 'i' || fmt.format == 's')
707 expr = parse_c_expression (exp);
709 new = (struct display *) xmalloc (sizeof (struct display));
712 new->next = display_chain;
713 new->number = ++display_number;
718 do_one_display (new);
731 /* Clear out the display_chain.
732 Done when new symtabs are loaded, since this invalidates
733 the types stored in many expressions. */
738 register struct display *d;
740 while (d = display_chain)
743 display_chain = d->next;
748 /* Delete the auto-display number NUM. */
754 register struct display *d1, *d;
757 error ("No display number %d.", num);
759 if (display_chain->number == num)
762 display_chain = d1->next;
766 for (d = display_chain; ; d = d->next)
769 error ("No display number %d.", num);
770 if (d->next->number == num)
780 /* Delete some values from the auto-display chain.
781 Specify the element numbers. */
784 undisplay_command (args)
787 register char *p = args;
790 register struct display *d, *d1;
794 if (query ("Delete all auto-display expressions? "))
803 while (*p1 >= '0' && *p1 <= '9') p1++;
804 if (*p1 && *p1 != ' ' && *p1 != '\t')
805 error ("Arguments must be display numbers.");
809 delete_display (num);
812 while (*p == ' ' || *p == '\t') p++;
817 /* Display a single auto-display. */
823 current_display_number = d->number;
825 printf ("%d: ", d->number);
829 if (d->format.count != 1)
830 printf ("%d", d->format.count);
831 printf ("%c", d->format.format);
832 if (d->format.format != 'i' && d->format.format != 's')
833 printf ("%c", d->format.size);
835 print_expression (d->exp, stdout);
836 if (d->format.count != 1)
840 do_examine (d->format,
841 value_as_long (evaluate_expression (d->exp)));
845 if (d->format.format)
846 printf ("/%c ", d->format.format);
847 print_expression (d->exp, stdout);
849 print_formatted (evaluate_expression (d->exp),
850 d->format.format, d->format.size);
855 current_display_number = -1;
858 /* Display all of the values on the auto-display chain. */
863 register struct display *d;
865 for (d = display_chain; d; d = d->next)
869 /* Delete the auto-display which we were in the process of displaying.
870 This is done when there is an error or a signal. */
873 delete_current_display ()
875 if (current_display_number >= 0)
877 delete_display (current_display_number);
878 fprintf (stderr, "Deleting display %d to avoid infinite recursion.\n",
879 current_display_number);
881 current_display_number = -1;
887 register struct display *d;
890 printf ("There are no auto-display expressions now.\n");
892 printf ("Auto-display expressions now in effect:\n");
893 for (d = display_chain; d; d = d->next)
895 printf ("%d: ", d->number);
897 printf ("/%d%c%c ", d->format.count, d->format.size,
899 else if (d->format.format)
900 printf ("/%c ", d->format.format);
901 print_expression (d->exp, stdout);
907 /* Print the value in stack frame FRAME of a variable
908 specified by a struct symbol. */
911 print_variable_value (var, frame, stream)
916 value val = read_var_value (var, frame);
917 value_print (val, stream, 0);
920 /* Print the arguments of a stack frame, given the function FUNC
921 running in that frame (as a symbol), the address of the arglist,
922 and the number of args according to the stack frame (or -1 if unknown). */
924 static void print_frame_nameless_args ();
926 print_frame_args (func, addr, num, stream)
928 register CORE_ADDR addr;
936 register int last_offset = FRAME_ARGS_SKIP;
937 register struct symbol *sym, *nextsym;
942 b = SYMBOL_BLOCK_VALUE (func);
943 nsyms = BLOCK_NSYMS (b);
948 /* Find first arg that is not before LAST_OFFSET. */
950 for (i = 0; i < nsyms; i++)
953 sym = BLOCK_SYM (b, i);
954 if (SYMBOL_CLASS (sym) == LOC_ARG
955 && SYMBOL_VALUE (sym) >= last_offset
957 || SYMBOL_VALUE (sym) < SYMBOL_VALUE (nextsym)))
963 /* Print any nameless args between the last arg printed
965 if (last_offset != (SYMBOL_VALUE (sym) / sizeof (int)) * sizeof (int))
967 print_frame_nameless_args (addr, last_offset, SYMBOL_VALUE (sym),
971 /* Print the next arg. */
972 val = value_at (SYMBOL_TYPE (sym), addr + SYMBOL_VALUE (sym));
974 fprintf (stream, ", ");
975 fprintf (stream, "%s=", SYMBOL_NAME (sym));
976 value_print (val, stream, 0);
978 last_offset = SYMBOL_VALUE (sym) + TYPE_LENGTH (SYMBOL_TYPE (sym));
979 /* Round up address of next arg to multiple of size of int. */
981 = ((last_offset + sizeof (int) - 1) / sizeof (int)) * sizeof (int);
983 if (num >= 0 && num * sizeof (int) + FRAME_ARGS_SKIP > last_offset)
984 print_frame_nameless_args (addr, last_offset,
985 num * sizeof (int) + FRAME_ARGS_SKIP, stream);
989 print_frame_nameless_args (argsaddr, start, end, stream)
998 if (start != FRAME_ARGS_SKIP)
999 fprintf (stream, ", ");
1000 fprintf (stream, "%d",
1001 read_memory_integer (argsaddr + start, sizeof (int)));
1002 start += sizeof (int);
1007 printf_command (arg)
1011 register char *s = arg;
1015 int allocated_args = 20;
1022 val_args = (value *) xmalloc (allocated_args * sizeof (value));
1025 error_no_arg ("format-control string and values to print");
1027 /* Skip white space before format string */
1028 while (*s == ' ' || *s == '\t') s++;
1030 /* A format string should follow, enveloped in double quotes */
1032 error ("Bad format string, missing '\"'.");
1034 /* Parse the format-control string and copy it into the string STRING,
1035 processing some kinds of escape sequence. */
1037 f = string = (char *) alloca (strlen (s) + 1);
1044 error ("Bad format string, non-terminated '\"'.");
1045 /* doesn't return */
1066 /* ??? TODO: handle other escape sequences */
1067 error ("Unrecognized \\ escape character in format string.");
1076 /* Skip over " and following space and comma. */
1079 while (*s == ' ' || *s == '\t') s++;
1081 if (*s != ',' && *s != 0)
1082 error ("Invalid argument syntax");
1085 while (*s == ' ' || *s == '\t') s++;
1087 /* Now scan the string for %-specs and see what kinds of args they want.
1088 argclass[I] is set to 1 if the Ith arg should be a string. */
1090 argclass = (char *) alloca (strlen (s));
1096 while (index ("0123456789.hlL-+ #", *f)) f++;
1098 argclass[nargs_wanted++] = 1;
1100 argclass[nargs_wanted++] = 0;
1104 /* Now, parse all arguments and evaluate them.
1105 Store the VALUEs in VAL_ARGS. */
1110 if (nargs == allocated_args)
1111 val_args = (value *) xrealloc (val_args,
1112 (allocated_args *= 2)
1115 val_args[nargs++] = parse_to_comma_and_eval (&s1);
1121 if (nargs != nargs_wanted)
1122 error ("Wrong number of arguments for specified format-string");
1124 /* Now lay out an argument-list containing the arguments
1125 as doubles, integers and C pointers. */
1127 arg_bytes = (char *) alloca (sizeof (double) * nargs);
1129 for (i = 0; i < nargs; i++)
1135 tem = value_as_long (val_args[i]);
1137 /* This is a %s argument. Find the length of the string. */
1142 read_memory (tem + j, &c, 1);
1147 /* Copy the string contents into a string inside GDB. */
1148 str = (char *) alloca (j + 1);
1149 read_memory (tem, str, j);
1152 /* Pass address of internal copy as the arg to vprintf. */
1153 *((int *) &arg_bytes[argindex]) = (int) str;
1154 argindex += sizeof (int);
1156 else if (VALUE_TYPE (val_args[i])->code == TYPE_CODE_FLT)
1158 *((double *) &arg_bytes[argindex]) = value_as_double (val_args[i]);
1159 argindex += sizeof (double);
1163 *((int *) &arg_bytes[argindex]) = value_as_long (val_args[i]);
1164 argindex += sizeof (int);
1168 vprintf (string, arg_bytes);
1174 current_display_number = -1;
1176 add_info ("address", address_info,
1177 "Describe where variable VAR is stored.");
1179 add_com ("x", class_vars, x_command,
1180 "Examine memory: x/FMT ADDRESS.\n\
1181 ADDRESS is an expression for the memory address to examine.\n\
1182 FMT is a repeat count followed by a format letter and a size letter.\n\
1183 Format letters are o(octal), x(hex), d(decimal), u(unsigned decimal),\n\
1184 f(float), a(address), i(instruction), c(char) and s(string).\n\
1185 Size letters are b(byte), h(halfword), w(word), g(giant, 8 bytes).\n\
1186 g is meaningful only with f, for type double.\n\
1187 The specified number of objects of the specified size are printed\n\
1188 according to the format.\n\n\
1189 Defaults for format and size letters are those previously used.\n\
1190 Default count is 1. Default address is following last thing printed\n\
1191 with this command or \"print\".");
1193 add_com ("ptype", class_vars, ptype_command,
1194 "Print definition of type TYPE.\n\
1195 Argument may be a type name defined by typedef, or \"struct STRUCTNAME\"\n\
1196 or \"union UNIONNAME\" or \"enum ENUMNAME\".\n\
1197 The selected stack frame's lexical context is used to look up the name.");
1199 add_com ("whatis", class_vars, whatis_command,
1200 "Print data type of expression EXP.");
1202 add_info ("display", display_info,
1203 "Expressions to display when program stops, with code numbers.");
1204 add_com ("undisplay", class_vars, undisplay_command,
1205 "Cancel some expressions to be displayed whenever program stops.\n\
1206 Arguments are the code numbers of the expressions to stop displaying.\n\
1207 No argument means cancel all automatic-display expressions.\n\
1208 Do \"info display\" to see current list of code numbers.");
1209 add_com ("display", class_vars, display_command,
1210 "Print value of expression EXP each time the program stops.\n\
1211 /FMT may be used before EXP as in the \"print\" command.\n\
1212 /FMT \"i\" or \"s\" or including a size-letter is allowed,\n\
1213 as in the \"x\" command, and then EXP is used to get the address to examine\n\
1214 and examining is done as in the \"x\" command.\n\n\
1215 With no argument, display all currently requested auto-display expressions.\n\
1216 Use \"undisplay\" to cancel display requests previously made.");
1218 add_com ("printf", class_vars, printf_command,
1219 "printf \"printf format string\", arg1, arg2, arg3, ..., argn\n\
1220 This is useful for formatted output in user-defined commands.");
1221 add_com ("output", class_vars, output_command,
1222 "Like \"print\" but don't put in value history and don't print newline.\n\
1223 This is useful in user-defined commands.");
1225 add_com ("set", class_vars, set_command,
1226 "Perform an assignment VAR = EXP. You must type the \"=\".\n\
1227 VAR may be a debugger \"convenience\" variables (names starting with $),\n\
1228 a register (a few standard names starting with $), or an actual variable\n\
1229 in the program being debugger. EXP is any expression.");
1231 add_com ("print", class_vars, print_command,
1232 concat ("Print value of expression EXP.\n\
1233 Variables accessible are those of the lexical environment of the selected\n\
1234 stack frame, plus all those whose scope is global or an entire file.\n\
1236 $NUM gets previous value number NUM. $ and $$ are the last two values.\n\
1237 $$NUM refers to NUM'th value back from the last one.\n\
1238 Names starting with $ refer to registers (with the values they would have\n\
1239 if the program were to return to the stack frame now selected, restoring\n\
1240 all registers saved by frames farther in) or else to debugger\n\
1241 \"convenience\" variables (any such name not a known register).\n\
1242 Use assignment expressions to give values to convenience variables.\n",
1244 \{TYPE}ADREXP refers to a datum of data type TYPE, located at address ADREXP.\n\
1245 @ is a binary operator for treating consecutive data objects\n\
1246 anywhere in memory as an array. FOO@NUM gives an array whose first\n\
1247 element is FOO, whose second element is stored in the space following\n\
1248 where FOO is stored, etc. FOO must be an expression whose value\n\
1249 resides in memory.\n",
1251 EXP may be preceded with /FMT, where FMT is a format letter\n\
1252 but no count or size letter (see \"x\" command)."));
1253 add_com_alias ("p", "print", class_vars, 1);