1 /* Memory-access and commands for inferior process, for GDB.
2 Copyright (C) 1986, 1987, 1988, 1989 Free Software Foundation, Inc.
4 This file is part of GDB.
6 GDB is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 1, or (at your option)
11 GDB is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GDB; see the file COPYING. If not, write to
18 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
30 #include <sys/param.h>
32 extern char *sys_siglist[];
34 #define ERROR_NO_INFERIOR \
35 if (inferior_pid == 0) error ("The program is not being run.");
37 /* String containing arguments to give to the program,
38 with a space added at the front. Just a space means no args. */
40 static char *inferior_args;
42 /* File name for default use for standard in/out in the inferior. */
44 char *inferior_io_terminal;
46 /* Pid of our debugged inferior, or 0 if no inferior now. */
50 /* Last signal that the inferior received (why it stopped). */
54 /* Address at which inferior stopped. */
58 /* Stack frame when program stopped. */
60 FRAME_ADDR stop_frame_address;
62 /* Number of breakpoint it stopped at, or 0 if none. */
66 /* Nonzero if stopped due to a step command. */
70 /* Nonzero if stopped due to completion of a stack dummy routine. */
74 /* Nonzero if stopped due to a random (unexpected) signal in inferior
77 int stopped_by_random_signal;
79 /* Range to single step within.
80 If this is nonzero, respond to a single-step signal
81 by continuing to step if the pc is in this range. */
83 CORE_ADDR step_range_start; /* Inclusive */
84 CORE_ADDR step_range_end; /* Exclusive */
86 /* Stack frame address as of when stepping command was issued.
87 This is how we know when we step into a subroutine call,
88 and how to set the frame for the breakpoint used to step out. */
90 FRAME_ADDR step_frame_address;
92 /* 1 means step over all subroutine calls.
93 -1 means step over calls to undebuggable functions. */
97 /* If stepping, nonzero means step count is > 1
98 so don't print frame next time inferior stops
99 if it stops due to stepping. */
103 /* Environment to use for running inferior,
104 in format described in environ.h. */
106 struct environ *inferior_environ;
108 CORE_ADDR read_pc ();
109 struct command_line *get_breakpoint_commands ();
110 void breakpoint_clear_ignore_counts ();
116 return inferior_pid != 0;
120 set_args_command (args)
123 free (inferior_args);
124 if (!args) args = "";
125 inferior_args = concat (" ", args, "");
129 tty_command (file, from_tty)
134 error_no_arg ("terminal name for running target process");
136 inferior_io_terminal = savestring (file, strlen (file));
140 run_command (args, from_tty)
144 extern char **environ;
150 extern char *sys_errlist[];
158 !query ("The program being debugged has been started already.\n\
159 Start it from the beginning? "))
160 error ("Program not restarted.");
165 /* On the other hand, some users want to do
169 So it's not clear what is best. */
171 /* It is confusing to the user for ignore counts to stick around
172 from previous runs of the inferior. So clear them. */
173 breakpoint_clear_ignore_counts ();
176 exec_file = (char *) get_exec_file (1);
178 if (remote_debugging)
182 printf ("Starting program: %s\n", exec_file);
189 set_args_command (args);
193 printf ("Starting program: %s%s\n",
194 exec_file, inferior_args);
198 allargs = concat ("exec ", exec_file, inferior_args);
199 inferior_pid = create_inferior (allargs, environ_vector (inferior_environ));
202 clear_proceed_status ();
208 cont_command (proc_count_exp, from_tty)
209 char *proc_count_exp;
214 clear_proceed_status ();
216 /* If have argument, set proceed count of breakpoint we stopped at. */
218 if (stop_breakpoint > 0 && proc_count_exp)
220 set_ignore_count (stop_breakpoint,
221 parse_and_eval_address (proc_count_exp) - 1,
228 printf ("Continuing.\n");
233 /* Step until outside of current statement. */
234 static void step_1 ();
237 step_command (count_string)
239 step_1 (0, 0, count_string);
242 /* Likewise, but skip over subroutine calls as if single instructions. */
245 next_command (count_string)
247 step_1 (1, 0, count_string);
250 /* Likewise, but step only one instruction. */
253 stepi_command (count_string)
255 step_1 (0, 1, count_string);
259 nexti_command (count_string)
261 step_1 (1, 1, count_string);
265 step_1 (skip_subroutines, single_inst, count_string)
266 int skip_subroutines;
270 register int count = 1;
273 count = count_string ? parse_and_eval_address (count_string) : 1;
275 for (; count > 0; count--)
277 clear_proceed_status ();
279 step_frame_address = FRAME_FP (get_current_frame ());
283 find_pc_line_pc_range (stop_pc, &step_range_start, &step_range_end);
284 if (step_range_end == 0)
288 misc = find_pc_misc_function (stop_pc);
290 printf ("Current function has no line number information.\n");
293 /* No info or after _etext ("Can't happen") */
294 if (misc == -1 || misc == misc_function_count - 1)
295 error ("No data available on pc function.");
297 printf ("Single stepping until function exit.\n");
300 step_range_start = misc_function_vector[misc].address;
301 step_range_end = misc_function_vector[misc + 1].address;
306 /* Say we are stepping, but stop after one insn whatever it does.
307 Don't step through subroutine calls even to undebuggable
309 step_range_start = step_range_end = 1;
310 if (!skip_subroutines)
314 if (skip_subroutines)
317 step_multi = (count > 1);
324 /* Continue program at specified address. */
327 jump_command (arg, from_tty)
331 register CORE_ADDR addr;
332 struct symtabs_and_lines sals;
333 struct symtab_and_line sal;
338 error_no_arg ("starting address");
340 sals = decode_line_spec_1 (arg, 1);
343 error ("Unreasonable jump request");
349 if (sal.symtab == 0 && sal.pc == 0)
350 error ("No source file has been specified.");
353 sal.pc = find_line_pc (sal.symtab, sal.line);
356 struct symbol *fn = get_frame_function (get_current_frame ());
357 struct symbol *sfn = find_pc_function (sal.pc);
358 if (fn != 0 && sfn != fn
359 && ! query ("Line %d is not in `%s'. Jump anyway? ",
360 sal.line, SYMBOL_NAME (fn)))
361 error ("Not confirmed.");
365 error ("No line %d in file \"%s\".", sal.line, sal.symtab->filename);
369 clear_proceed_status ();
372 printf ("Continuing at 0x%x.\n", addr);
374 proceed (addr, 0, 0);
377 /* Continue program giving it specified signal. */
380 signal_command (signum_exp, from_tty)
386 dont_repeat (); /* Too dangerous. */
390 error_no_arg ("signal number");
392 signum = parse_and_eval_address (signum_exp);
394 clear_proceed_status ();
397 printf ("Continuing with signal %d.\n", signum);
399 proceed (stop_pc, signum, 0);
402 /* Execute a "stack dummy", a piece of code stored in the stack
403 by the debugger to be executed in the inferior.
405 To call: first, do PUSH_DUMMY_FRAME.
406 Then push the contents of the dummy. It should end with a breakpoint insn.
407 Then call here, passing address at which to start the dummy.
409 The contents of all registers are saved before the dummy frame is popped
410 and copied into the buffer BUFFER.
412 The dummy's frame is automatically popped whenever that break is hit.
413 If that is the first time the program stops, run_stack_dummy
414 returns to its caller with that frame already gone.
415 Otherwise, the caller never gets returned to. */
417 /* 4 => return instead of letting the stack dummy run. */
419 static int stack_dummy_testing = 0;
422 run_stack_dummy (addr, buffer)
424 REGISTER_TYPE *buffer;
426 /* Now proceed, having reached the desired place. */
427 clear_proceed_status ();
428 if (stack_dummy_testing & 4)
433 proceed (addr, 0, 0);
435 if (!stop_stack_dummy)
436 error ("Cannot continue previously requested operation.");
438 /* On return, the stack dummy has been popped already. */
440 bcopy (stop_registers, buffer, sizeof stop_registers);
443 /* Proceed until we reach the given line as argument or exit the
444 function. When called with no argument, proceed until we reach a
445 different source line with pc greater than our current one or exit
446 the function. We skip calls in both cases.
448 The effect of this command with an argument is identical to setting
449 a momentary breakpoint at the line specified and executing
452 Note that eventually this command should probably be changed so
453 that only source lines are printed out when we hit the breakpoint
454 we set. I'm going to postpone this until after a hopeful rewrite
455 of wait_for_inferior and the proceed status code. -- randy */
458 until_next_command (arg, from_tty)
465 struct symtab_and_line sal;
467 clear_proceed_status ();
469 frame = get_current_frame ();
471 /* Step until either exited from this function or greater
472 than the current line (if in symbolic section) or pc (if
476 func = find_pc_function (pc);
480 int misc_func = find_pc_misc_function (pc);
483 error ("Execution is not within a known function.");
485 step_range_start = misc_function_vector[misc_func].address;
490 sal = find_pc_line (pc, 0);
492 step_range_start = BLOCK_START (SYMBOL_BLOCK_VALUE (func));
493 step_range_end = sal.end;
497 step_frame_address = FRAME_FP (frame);
499 step_multi = 0; /* Only one call to proceed */
505 until_command (arg, from_tty)
509 if (!have_inferior_p ())
510 error ("The program is not being run.");
513 until_break_command (arg, from_tty);
515 until_next_command (arg, from_tty);
518 /* "finish": Set a temporary breakpoint at the place
519 the selected frame will return to, then continue. */
522 finish_command (arg, from_tty)
526 struct symtab_and_line sal;
527 register FRAME frame;
528 struct frame_info *fi;
529 register struct symbol *function;
531 if (!have_inferior_p ())
532 error ("The program is not being run.");
534 error ("The \"finish\" command does not take any arguments.");
536 frame = get_prev_frame (selected_frame);
538 error ("\"finish\" not meaningful in the outermost frame.");
540 clear_proceed_status ();
542 fi = get_frame_info (frame);
543 sal = find_pc_line (fi->pc, 0);
545 set_momentary_breakpoint (sal, frame);
547 /* Find the function we will return from. */
549 fi = get_frame_info (selected_frame);
550 function = find_pc_function (fi->pc);
554 printf ("Run till exit from ");
555 print_selected_frame ();
560 if (stop_breakpoint == -3 && function != 0)
562 struct type *value_type;
566 value_type = TYPE_TARGET_TYPE (SYMBOL_TYPE (function));
568 fatal ("internal: finish_command: function has no target type");
570 if (TYPE_CODE (value_type) == TYPE_CODE_VOID)
573 funcaddr = BLOCK_START (SYMBOL_BLOCK_VALUE (function));
575 val = value_being_returned (value_type, stop_registers,
576 using_struct_return (function,
580 printf ("Value returned is $%d = ", record_latest_value (val));
581 value_print (val, stdout, 0, Val_no_prettyprint);
589 if (inferior_pid == 0)
591 printf ("The program being debugged is not being run.\n");
595 printf ("Program being debugged is in process %d, stopped at 0x%x.\n",
596 inferior_pid, stop_pc);
598 printf ("It stopped after being stepped.\n");
599 else if (stop_breakpoint > 0)
600 printf ("It stopped at breakpoint %d.\n", stop_breakpoint);
601 else if (stop_signal)
602 printf ("It stopped with signal %d (%s).\n",
603 stop_signal, sys_siglist[stop_signal]);
605 printf ("\nType \"info stack\" or \"info reg\" for more information.\n");
609 environment_info (var)
614 register char *val = get_in_environ (inferior_environ, var);
616 printf ("%s = %s\n", var, val);
618 printf ("Environment variable \"%s\" not defined.\n", var);
622 register char **vector = environ_vector (inferior_environ);
624 printf ("%s\n", *vector++);
629 set_environment_command (arg)
632 register char *p, *val, *var;
636 error_no_arg ("environment variable and value");
638 /* Find seperation between variable name and value */
639 p = (char *) index (arg, '=');
640 val = (char *) index (arg, ' ');
642 if (p != 0 && val != 0)
644 /* We have both a space and an equals. If the space is before the
645 equals and the only thing between the two is more space, use
651 /* Take the smaller of the two. If there was space before the
652 "=", they will be the same right now. */
653 p = arg + min (p - arg, val - arg);
655 else if (val != 0 && p == 0)
659 error_no_arg ("environment variable to set");
661 if (p == 0 || p[1] == 0)
665 p = arg + strlen (arg); /* So that savestring below will work */
669 /* Not setting variable value to null */
671 while (*val == ' ' || *val == '\t')
675 while (p != arg && (p[-1] == ' ' || p[-1] == '\t')) p--;
677 var = savestring (arg, p - arg);
680 printf ("Setting environment variable \"%s\" to null value.\n", var);
681 set_in_environ (inferior_environ, var, "");
684 set_in_environ (inferior_environ, var, val);
689 unset_environment_command (var, from_tty)
694 /* If there is no argument, delete all environment variables.
695 Ask for confirmation if reading from the terminal. */
696 if (!from_tty || query ("Delete all environment variables? "))
698 free_environ (inferior_environ);
699 inferior_environ = make_environ ();
702 unset_in_environ (inferior_environ, var);
705 /* Read an integer from debugged memory, given address and number of bytes. */
708 read_memory_integer (memaddr, len)
718 extern char *sys_errlist[];
720 if (len == sizeof (char))
722 result_err = read_memory (memaddr, &cbuf, len);
724 error ("Error reading memory address 0x%x: %s (%d).",
725 memaddr, (result_err < sys_nerr ?
726 sys_errlist[result_err] :
727 "uknown error"), result_err);
730 if (len == sizeof (short))
732 result_err = read_memory (memaddr, &sbuf, len);
734 error ("Error reading memory address 0x%x: %s (%d).",
735 memaddr, (result_err < sys_nerr ?
736 sys_errlist[result_err] :
737 "uknown error"), result_err);
740 if (len == sizeof (int))
742 result_err = read_memory (memaddr, &ibuf, len);
744 error ("Error reading memory address 0x%x: %s (%d).",
745 memaddr, (result_err < sys_nerr ?
746 sys_errlist[result_err] :
747 "uknown error"), result_err);
750 if (len == sizeof (lbuf))
752 result_err = read_memory (memaddr, &lbuf, len);
754 error ("Error reading memory address 0x%x: %s (%d).",
755 memaddr, (result_err < sys_nerr ?
756 sys_errlist[result_err] :
757 "uknown error"), result_err);
760 error ("Cannot handle integers of %d bytes.", len);
766 return (CORE_ADDR) read_register (PC_REGNUM);
773 write_register (PC_REGNUM, (long) val);
775 write_register (NPC_REGNUM, (long) val+4);
779 char *reg_names[] = REGISTER_NAMES;
781 /* Print out the machine register regnum. If regnum is -1,
783 For most machines, having all_registers_info() print the
784 register(s) one per line is good enough. If a different format
785 is required, (eg, for SPARC or Pyramid 90x, which both have
786 lots of regs), or there is an existing convention for showing
787 all the registers, define the macro DO_REGISTERS_INFO(regnum)
788 to provide that format. */
789 #if !defined (DO_REGISTERS_INFO)
790 #define DO_REGISTERS_INFO(regnum) do_registers_info(regnum)
791 static void do_registers_info (regnum)
798 "Register Contents (relative to selected stack frame)\n\n");
800 for (i = 0; i < NUM_REGS; i++)
802 unsigned char raw_buffer[MAX_REGISTER_RAW_SIZE];
803 unsigned char virtual_buffer[MAX_REGISTER_VIRTUAL_SIZE];
806 if (regnum != -1 && i != regnum)
809 /* Get the data in raw format, then convert also to virtual format. */
810 read_relative_register_raw_bytes (i, raw_buffer);
811 REGISTER_CONVERT_TO_VIRTUAL (i, raw_buffer, virtual_buffer);
813 fputs_filtered (reg_names[i], stdout);
814 print_spaces_filtered (15 - strlen (reg_names[i]), stdout);
816 /* If virtual format is floating, print it that way. */
817 if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT
818 && ! INVALID_FLOAT (virtual_buffer, REGISTER_VIRTUAL_SIZE (i)))
819 val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0,
820 stdout, 0, 1, 0, Val_pretty_default);
821 /* Else if virtual format is too long for printf,
822 print in hex a byte at a time. */
823 else if (REGISTER_VIRTUAL_SIZE (i) > sizeof (long))
826 printf_filtered ("0x");
827 for (j = 0; j < REGISTER_VIRTUAL_SIZE (i); j++)
828 printf_filtered ("%02x", virtual_buffer[j]);
830 /* Else print as integer in hex and in decimal. */
835 bcopy (virtual_buffer, &val, sizeof (long));
837 printf_filtered ("0");
839 printf_filtered ("0x%08x %d", val, val);
842 /* If register has different raw and virtual formats,
843 print the raw format in hex now. */
845 if (REGISTER_CONVERTIBLE (i))
849 printf_filtered (" (raw 0x");
850 for (j = 0; j < REGISTER_RAW_SIZE (i); j++)
851 printf_filtered ("%02x", raw_buffer[j]);
852 printf_filtered (")");
854 printf_filtered ("\n");
857 #endif /* no DO_REGISTERS_INFO. */
860 registers_info (addr_exp)
865 if (!have_inferior_p () && !have_core_file_p ())
866 error ("No inferior or core file");
870 if (*addr_exp >= '0' && *addr_exp <= '9')
871 regnum = atoi (addr_exp);
874 register char *p = addr_exp;
877 for (regnum = 0; regnum < NUM_REGS; regnum++)
878 if (!strcmp (p, reg_names[regnum]))
880 if (regnum == NUM_REGS)
881 error ("%s: invalid register name.", addr_exp);
887 DO_REGISTERS_INFO(regnum);
891 #define PROCESS_ATTACH_ALLOWED 1
893 #define PROCESS_ATTACH_ALLOWED 0
897 * Should save/restore the tty state since it might be that the
898 * program to be debugged was started on this tty and it wants
899 * the tty in some state other than what we want. If it's running
900 * on another terminal or without a terminal, then saving and
901 * restoring the tty state is a harmless no-op.
902 * This only needs to be done if we are attaching to a process.
907 * takes a program started up outside of gdb and ``attaches'' to it.
908 * This stops it cold in its tracks and allows us to start tracing it.
909 * For this to work, we must be able to send the process a
910 * signal and we must have the same effective uid as the program.
913 attach_command (args, from_tty)
924 error_no_arg ("process-id or device file to attach");
926 while (*args == ' ' || *args == '\t') args++;
931 #ifndef ATTACH_DETACH
932 error ("Can't attach to a process on this machine.");
939 if (query ("A program is being debugged already. Kill it? "))
942 error ("Inferior not killed.");
945 exec_file = (char *) get_exec_file (1);
950 printf ("Attaching remote machine\n");
952 printf ("Attaching program: %s pid %d\n",
961 remote_open (args, from_tty);
966 attach_program (pid);
972 * takes a program previously attached to and detaches it.
973 * The program resumes execution and will no longer stop
974 * on signals, etc. We better not have left any breakpoints
975 * in the program or it'll die when it hits one. For this
976 * to work, it may be necessary for the process to have been
977 * previously attached. It *might* work if the program was
978 * started via the normal ptrace (PTRACE_TRACEME).
982 detach_command (args, from_tty)
993 char *exec_file = (char *)get_exec_file (0);
996 printf ("Detaching program: %s pid %d\n",
997 exec_file, inferior_pid);
1001 signal = atoi (args);
1009 if (!remote_debugging)
1010 error ("Not currently attached to subsidiary or remote process.");
1013 error ("Argument given to \"detach\" when remotely debugging.");
1015 remote_close (from_tty);
1021 float_info (addr_exp)
1027 printf ("No floating point info available for this processor.\n");
1031 extern struct cmd_list_element *setlist, *deletelist;
1034 _initialize_infcmd ()
1036 add_com ("tty", class_run, tty_command,
1037 "Set terminal for future runs of program being debugged.");
1039 add_cmd ("args", class_run, set_args_command,
1040 "Specify arguments to give program being debugged when it is started.\n\
1041 Follow this command with any number of args, to be passed to the program.",
1044 add_info ("environment", environment_info,
1045 "The environment to give the program, or one variable's value.\n\
1046 With an argument VAR, prints the value of environment variable VAR to\n\
1047 give the program being debugged. With no arguments, prints the entire\n\
1048 environment to be given to the program.");
1050 add_cmd ("environment", class_run, unset_environment_command,
1051 "Cancel environment variable VAR for the program.\n\
1052 This does not affect the program until the next \"run\" command.",
1055 add_cmd ("environment", class_run, set_environment_command,
1056 "Set environment variable value to give the program.\n\
1057 Arguments are VAR VALUE where VAR is variable name and VALUE is value.\n\
1058 VALUES of environment variables are uninterpreted strings.\n\
1059 This does not affect the program until the next \"run\" command.",
1062 #ifdef ATTACH_DETACH
1063 add_com ("attach", class_run, attach_command,
1064 "Attach to a process that was started up outside of GDB.\n\
1065 This command may take as argument a process id or a device file.\n\
1066 For a process id, you must have permission to send the process a signal,\n\
1067 and it must have the same effective uid as the debugger.\n\
1068 For a device file, the file must be a connection to a remote debug server.\n\n\
1069 Before using \"attach\", you must use the \"exec-file\" command\n\
1070 to specify the program running in the process,\n\
1071 and the \"symbol-file\" command to load its symbol table.");
1073 add_com ("attach", class_run, attach_command,
1074 "Attach to a process that was started up outside of GDB.\n\
1075 This commands takes as an argument the name of a device file.\n\
1076 This file must be a connection to a remote debug server.\n\n\
1077 Before using \"attach\", you must use the \"exec-file\" command\n\
1078 to specify the program running in the process,\n\
1079 and the \"symbol-file\" command to load its symbol table.");
1081 add_com ("detach", class_run, detach_command,
1082 "Detach the process previously attached.\n\
1083 The process is no longer traced and continues its execution.");
1085 add_com ("signal", class_run, signal_command,
1086 "Continue program giving it signal number SIGNUMBER.");
1088 add_com ("stepi", class_run, stepi_command,
1089 "Step one instruction exactly.\n\
1090 Argument N means do this N times (or till program stops for another reason).");
1091 add_com_alias ("si", "stepi", class_alias, 0);
1093 add_com ("nexti", class_run, nexti_command,
1094 "Step one instruction, but proceed through subroutine calls.\n\
1095 Argument N means do this N times (or till program stops for another reason).");
1096 add_com_alias ("ni", "nexti", class_alias, 0);
1098 add_com ("finish", class_run, finish_command,
1099 "Execute until selected stack frame returns.\n\
1100 Upon return, the value returned is printed and put in the value history.");
1102 add_com ("next", class_run, next_command,
1103 "Step program, proceeding through subroutine calls.\n\
1104 Like the \"step\" command as long as subroutine calls do not happen;\n\
1105 when they do, the call is treated as one instruction.\n\
1106 Argument N means do this N times (or till program stops for another reason).");
1107 add_com_alias ("n", "next", class_run, 1);
1109 add_com ("step", class_run, step_command,
1110 "Step program until it reaches a different source line.\n\
1111 Argument N means do this N times (or till program stops for another reason).");
1112 add_com_alias ("s", "step", class_run, 1);
1114 add_com ("until", class_run, until_command,
1115 "Execute until the program reaches a source line greater than the current\n\
1116 or a specified line or address or function (same args as break command).\n\
1117 Execution will also stop upon exit from the current stack frame.");
1118 add_com_alias ("u", "until", class_run, 1);
1120 add_com ("jump", class_run, jump_command,
1121 "Continue program being debugged at specified line or address.\n\
1122 Give as argument either LINENUM or *ADDR, where ADDR is an expression\n\
1123 for an address to start at.");
1125 add_com ("cont", class_run, cont_command,
1126 "Continue program being debugged, after signal or breakpoint.\n\
1127 If proceeding from breakpoint, a number N may be used as an argument:\n\
1128 then the same breakpoint won't break until the Nth time it is reached.");
1129 add_com_alias ("c", "cont", class_run, 1);
1131 add_com ("run", class_run, run_command,
1132 "Start debugged program. You may specify arguments to give it.\n\
1133 Args may include \"*\", or \"[...]\"; they are expanded using \"sh\".\n\
1134 Input and output redirection with \">\", \"<\", or \">>\" are also allowed.\n\n\
1135 With no arguments, uses arguments last specified (with \"run\" or \"set args\".\n\
1136 To cancel previous arguments and run with no arguments,\n\
1137 use \"set args\" without arguments.");
1138 add_com_alias ("r", "run", class_run, 1);
1140 add_info ("registers", registers_info,
1141 "List of registers and their contents, for selected stack frame.\n\
1142 Register name as argument means describe only that register.");
1144 add_info ("program", program_info,
1145 "Execution status of the program.");
1147 add_info ("float", float_info,
1148 "Print the status of the floating point unit\n");
1150 inferior_args = savestring (" ", 1); /* By default, no args. */
1151 inferior_environ = make_environ ();
1152 init_environ (inferior_environ);