1 /* Everything about breakpoints, for GDB.
2 Copyright (C) 1986, 1987 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!
22 #include "initialize.h"
29 /* This is the sequence of bytes we insert for a breakpoint. */
31 static char break_insn[] = BREAKPOINT;
33 /* States of enablement of breakpoint.
34 `temporary' means disable when hit.
35 `once' means delete when hit. */
37 enum enable { disabled, enabled, temporary, delete};
41 struct breakpoint *next;
42 /* Number assigned to distinguish breakpoints. */
44 /* Address to break at. */
46 /* Line number of this address. Redundant. */
48 /* Symtab of file of this address. Redundant. */
49 struct symtab *symtab;
50 /* Zero means disabled; remember the info but don't break here. */
52 /* Number of stops at this breakpoint that should
53 be continued automatically before really stopping. */
55 /* "Real" contents of byte where breakpoint has been inserted.
56 Valid only when breakpoints are in the program. */
57 char shadow_contents[sizeof break_insn];
58 /* Nonzero if this breakpoint is now inserted. */
60 /* Nonzero if this is not the first breakpoint in the list
61 for the given address. */
63 /* Chain of command lines to execute when this breakpoint is hit. */
64 struct command_line *commands;
65 /* Stack depth (frame). If nonzero, break only if fp equals this. */
67 /* Conditional. Break only if this expression's value is nonzero. */
68 struct expression *cond;
71 #define ALL_BREAKPOINTS(b) for (b = breakpoint_chain; b; b = b->next)
73 /* Chain of all breakpoints defined. */
75 struct breakpoint *breakpoint_chain;
77 /* Number of last breakpoint made. */
79 static int breakpoint_count;
81 /* Default address, symtab and line to put a breakpoint at
82 for "break" command with no arg.
83 if default_breakpoint_valid is zero, the other three are
84 not valid, and "break" with no arg is an error.
86 This set by print_stack_frame, which calls set_default_breakpoint. */
88 int default_breakpoint_valid;
89 CORE_ADDR default_breakpoint_address;
90 struct symtab *default_breakpoint_symtab;
91 int default_breakpoint_line;
93 /* Remaining commands (not yet executed)
94 of last breakpoint hit. */
96 struct command_line *breakpoint_commands;
100 extern char *read_line ();
102 static void delete_breakpoint ();
103 void clear_momentary_breakpoints ();
104 void breakpoint_auto_delete ();
106 /* condition N EXP -- set break condition of breakpoint N to EXP. */
109 condition_command (arg, from_tty)
113 register struct breakpoint *b;
116 register struct expression *expr;
119 error_no_arg ("breakpoint number");
122 while (*p >= '0' && *p <= '9') p++;
126 if (b->number == bnum)
134 printf ("Breakpoint %d now unconditional.\n", bnum);
138 if (*p != ' ' && *p != '\t')
139 error ("Arguments must be an integer (breakpoint number) and an expression.");
141 /* Find start of expression */
142 while (*p == ' ' || *p == '\t') p++;
145 b->cond = (struct expression *) parse_c_1 (&arg, block_for_pc (b->address), 0);
147 error ("Junk at end of expression");
152 error ("No breakpoint number %d.", bnum);
156 commands_command (arg)
159 register struct breakpoint *b;
160 register char *p, *p1;
162 struct command_line *l;
165 error_no_arg ("breakpoint number");
167 /* If we allowed this, we would have problems with when to
168 free the storage, if we change the commands currently
171 if (breakpoint_commands)
172 error ("Can't use the \"commands\" command among a breakpoint's commands.");
175 if (! (*p >= '0' && *p <= '9'))
176 error ("Argument must be integer (a breakpoint number).");
178 while (*p >= '0' && *p <= '9') p++;
180 error ("Unexpected extra arguments following breakpoint number.");
185 if (b->number == bnum)
187 if (input_from_terminal_p ())
189 printf ("Type commands for when breakpoint %d is hit, one per line.\n\
190 End with a line saying just \"end\".\n", bnum);
193 l = read_command_lines ();
194 free_command_lines (&b->commands);
198 error ("No breakpoint number %d.", bnum);
201 /* Called from command loop to execute the commands
202 associated with the breakpoint we just stopped at. */
205 do_breakpoint_commands ()
207 while (breakpoint_commands)
209 char *line = breakpoint_commands->line;
210 breakpoint_commands = breakpoint_commands->next;
211 execute_command (line, 0);
212 /* If command was "cont", breakpoint_commands is now 0,
213 of if we stopped at yet another breakpoint which has commands,
214 it is now the commands for the new breakpoint. */
216 clear_momentary_breakpoints ();
219 /* Used when the program is proceeded, to eliminate any remaining
220 commands attached to the previous breakpoint we stopped at. */
223 clear_breakpoint_commands ()
225 breakpoint_commands = 0;
226 breakpoint_auto_delete (0);
229 /* Functions to get and set the current list of pending
230 breakpoint commands. These are used by run_stack_dummy
231 to preserve the commands around a function call. */
233 struct command_line *
234 get_breakpoint_commands ()
236 return breakpoint_commands;
240 set_breakpoint_commands (cmds)
241 struct command_line *cmds;
243 breakpoint_commands = cmds;
246 /* insert_breakpoints is used when starting or continuing the program.
247 remove_breakpoints is used when the program stops.
248 Both return zero if successful,
249 or an `errno' value if could not write the inferior. */
252 insert_breakpoints ()
254 register struct breakpoint *b;
257 /* printf ("Inserting breakpoints.\n"); */
259 if (b->enable != disabled && ! b->inserted && ! b->duplicate)
261 read_memory (b->address, b->shadow_contents, sizeof break_insn);
262 val = write_memory (b->address, break_insn, sizeof break_insn);
265 /* printf ("Inserted breakpoint at 0x%x, shadow 0x%x, 0x%x.\n",
266 b->address, b->shadow_contents[0], b->shadow_contents[1]); */
273 remove_breakpoints ()
275 register struct breakpoint *b;
278 /* printf ("Removing breakpoints.\n"); */
282 val = write_memory (b->address, b->shadow_contents, sizeof break_insn);
286 /* printf ("Removed breakpoint at 0x%x, shadow 0x%x, 0x%x.\n",
287 b->address, b->shadow_contents[0], b->shadow_contents[1]); */
293 /* Clear the "inserted" flag in all breakpoints.
294 This is done when the inferior is loaded. */
297 mark_breakpoints_out ()
299 register struct breakpoint *b;
305 /* breakpoint_here_p (PC) returns 1 if an enabled breakpoint exists at PC.
306 When continuing from a location with a breakpoint,
307 we actually single step once before calling insert_breakpoints. */
310 breakpoint_here_p (pc)
313 register struct breakpoint *b;
316 if (b->enable != disabled && b->address == pc)
322 /* Evaluate the expression EXP and return 1 if value is zero.
323 This is used inside a catch_errors to evaluate the breakpoint condition. */
326 breakpoint_cond_eval (exp)
327 struct expression *exp;
329 return value_zerop (evaluate_expression (exp));
332 /* Return 0 if PC is not the address just after a breakpoint,
333 or -1 if breakpoint says do not stop now,
334 or -2 if breakpoint says it has deleted itself and don't stop,
335 or -3 if hit a breakpoint number -3 (delete when program stops),
336 or else the number of the breakpoint,
337 with 0x1000000 added for a silent breakpoint. */
340 breakpoint_stop_status (pc, frame)
344 register struct breakpoint *b;
345 register int cont = 0;
347 /* Get the address where the breakpoint would have been. */
348 pc -= DECR_PC_AFTER_BREAK;
351 if (b->enable != disabled && b->address == pc)
353 if (b->frame && b->frame != frame)
361 = catch_errors (breakpoint_cond_eval, b->cond,
362 "Error occurred in testing breakpoint condition.");
365 if (b->cond && value_zero)
369 else if (b->ignore_count > 0)
376 if (b->enable == temporary)
377 b->enable = disabled;
378 breakpoint_commands = b->commands;
379 if (breakpoint_commands
380 && !strcmp ("silent", breakpoint_commands->line))
382 breakpoint_commands = breakpoint_commands->next;
383 return 0x1000000 + b->number;
397 register struct breakpoint *b;
398 register struct command_line *l;
399 register struct symbol *sym;
400 CORE_ADDR last_addr = -1;
403 if (bnum == -1 || bnum == b->number)
405 printf ("#%-3d %c 0x%08x ", b->number,
406 "nyod"[(int) b->enable],
408 last_addr = b->address;
411 sym = find_pc_function (b->address);
413 printf (" in %s (%s line %d)", SYMBOL_NAME (sym),
414 b->symtab->filename, b->line_number);
416 printf ("%s line %d", b->symtab->filename, b->line_number);
421 printf ("\tignore next %d hits\n", b->ignore_count);
423 printf ("\tstop only in stack frame at 0x%x\n", b->frame);
426 printf ("\tbreak only if ");
427 print_expression (b->cond, stdout);
433 printf ("\t%s\n", l->line);
439 set_next_address (last_addr);
443 breakpoints_info (bnum_exp)
449 bnum = parse_and_eval_address (bnum_exp);
450 else if (breakpoint_chain == 0)
451 printf ("No breakpoints.\n");
453 printf ("Breakpoints:\n\
454 Num Enb Address Where\n");
459 /* Print a message describing any breakpoints set at PC. */
462 describe_other_breakpoints (pc)
463 register CORE_ADDR pc;
465 register int others = 0;
466 register struct breakpoint *b;
469 if (b->address == pc)
473 printf ("Note: breakpoint%s ", (others > 1) ? "s" : "");
475 if (b->address == pc)
480 (b->enable == disabled) ? " (disabled)" : "",
481 (others > 1) ? "," : ((others == 1) ? " and" : ""));
483 printf (" also set at pc 0x%x\n", pc);
487 /* Set the default place to put a breakpoint
488 for the `break' command with no arguments. */
491 set_default_breakpoint (valid, addr, symtab, line)
494 struct symtab *symtab;
497 default_breakpoint_valid = valid;
498 default_breakpoint_address = addr;
499 default_breakpoint_symtab = symtab;
500 default_breakpoint_line = line;
503 /* Rescan breakpoints at address ADDRESS,
504 marking the first one as "first" and any others as "duplicates".
505 This is so that the bpt instruction is only inserted once. */
508 check_duplicates (address)
511 register struct breakpoint *b;
512 register int count = 0;
515 if (b->enable != disabled && b->address == address)
518 b->duplicate = count > 1;
522 /* Low level routine to set a breakpoint.
523 Takes as args the three things that every breakpoint must have.
524 Returns the breakpoint object so caller can set other things.
525 Does not set the breakpoint number!
526 Does not print anything. */
528 static struct breakpoint *
529 set_raw_breakpoint (sal)
530 struct symtab_and_line sal;
532 register struct breakpoint *b, *b1;
534 b = (struct breakpoint *) xmalloc (sizeof (struct breakpoint));
535 bzero (b, sizeof *b);
537 b->symtab = sal.symtab;
538 b->line_number = sal.line;
542 /* Add this breakpoint to the end of the chain
543 so that a list of breakpoints will come out in order
544 of increasing numbers. */
546 b1 = breakpoint_chain;
548 breakpoint_chain = b;
556 check_duplicates (sal.pc);
561 /* Set a breakpoint that will evaporate an end of command
562 at address specified by SAL.
563 Restrict it to frame FRAME if FRAME is nonzero. */
566 set_momentary_breakpoint (sal, frame)
567 struct symtab_and_line sal;
570 register struct breakpoint *b;
571 b = set_raw_breakpoint (sal);
578 clear_momentary_breakpoints ()
580 register struct breakpoint *b;
584 delete_breakpoint (b);
589 /* Set a breakpoint from a symtab and line.
590 If TEMPFLAG is nonzero, it is a temporary breakpoint.
591 Print the same confirmation messages that the breakpoint command prints. */
594 set_breakpoint (s, line, tempflag)
599 register struct breakpoint *b;
600 struct symtab_and_line sal;
604 sal.pc = find_line_pc (sal.symtab, sal.line);
606 error ("No line %d in file \"%s\".\n", sal.line, sal.symtab->filename);
609 describe_other_breakpoints (sal.pc);
611 b = set_raw_breakpoint (sal);
612 b->number = ++breakpoint_count;
615 b->enable = temporary;
617 printf ("Breakpoint %d at 0x%x", b->number, b->address);
619 printf (": file %s, line %d.", b->symtab->filename, b->line_number);
624 /* Set a breakpoint according to ARG (function, linenum or *address)
625 and make it temporary if TEMPFLAG is nonzero.
627 LINE_NUM is for C++. */
630 break_command_1 (arg, tempflag, from_tty, line_num)
632 int tempflag, from_tty, line_num;
634 struct symtabs_and_lines sals;
635 struct symtab_and_line sal;
636 register struct expression *cond = 0;
637 register struct breakpoint *b;
644 sal.line = sal.pc = sal.end = 0;
650 sals = decode_line_1 (&arg, 1, 0, 0);
652 if (! sals.nelts) return;
654 for (i = 0; i < sals.nelts; i++)
657 if (sal.pc == 0 && sal.symtab != 0)
659 pc = find_line_pc (sal.symtab, sal.line);
661 error ("No line %d in file \"%s\".",
662 sal.line, sal.symtab->filename);
668 if (arg[0] == 'i' && arg[1] == 'f'
669 && (arg[2] == ' ' || arg[2] == '\t'))
670 cond = (struct expression *) parse_c_1 ((arg += 2, &arg),
671 block_for_pc (pc), 0);
673 error ("Junk at end of arguments.");
676 sals.sals[i].pc = pc;
679 else if (default_breakpoint_valid)
681 sals.sals = (struct symtab_and_line *) malloc (sizeof (struct symtab_and_line));
682 sal.pc = default_breakpoint_address;
683 sal.line = default_breakpoint_line;
684 sal.symtab = default_breakpoint_symtab;
689 error ("No default breakpoint address now.");
691 for (i = 0; i < sals.nelts; i++)
694 sal.line += line_num; /** C++ **/
696 { /* get the pc for a particular line */
697 sal.pc = find_line_pc (sal.symtab, sal.line);
701 describe_other_breakpoints (sal.pc);
703 b = set_raw_breakpoint (sal);
704 b->number = ++breakpoint_count;
707 b->enable = temporary;
709 printf ("Breakpoint %d at 0x%x", b->number, b->address);
711 printf (": file %s, line %d.", b->symtab->filename, b->line_number);
718 break_command (arg, from_tty)
722 break_command_1 (arg, 0, from_tty, 0);
726 tbreak_command (arg, from_tty)
730 break_command_1 (arg, 1, from_tty, 0);
734 clear_command (arg, from_tty)
738 register struct breakpoint *b, *b1;
739 struct symtabs_and_lines sals;
740 struct symtab_and_line sal;
741 register struct breakpoint *found;
745 sals = decode_line_spec (arg, 1);
748 sals.sals = (struct symtab_and_line *) malloc (sizeof (struct symtab_and_line));
749 sal.line = default_breakpoint_line;
750 sal.symtab = default_breakpoint_symtab;
753 error ("No source file specified.");
759 for (i = 0; i < sals.nelts; i++)
761 /* If exact pc given, clear bpts at that pc.
762 But if sal.pc is zero, clear all bpts on specified line. */
764 found = (struct breakpoint *) 0;
765 while (breakpoint_chain
766 && (sal.pc ? breakpoint_chain->address == sal.pc
767 : (breakpoint_chain->symtab == sal.symtab
768 && breakpoint_chain->line_number == sal.line)))
770 b1 = breakpoint_chain;
771 breakpoint_chain = b1->next;
778 && (sal.pc ? b->next->address == sal.pc
779 : (b->next->symtab == sal.symtab
780 && b->next->line_number == sal.line)))
789 error ("No breakpoint at %s.", arg);
791 if (found->next) from_tty = 1; /* Always report if deleted more than one */
792 if (from_tty) printf ("Deleted breakpoint%s ", found->next ? "s" : "");
795 if (from_tty) printf ("%d ", found->number);
797 delete_breakpoint (found);
800 if (from_tty) putchar ('\n');
805 /* Delete breakpoint number BNUM if it is a `delete' breakpoint.
806 This is called after breakpoint BNUM has been hit.
807 Also delete any breakpoint numbered -3 unless there are breakpoint
808 commands to be executed. */
811 breakpoint_auto_delete (bnum)
814 register struct breakpoint *b;
817 if (b->number == bnum)
819 if (b->enable == delete)
820 delete_breakpoint (b);
823 if (breakpoint_commands == 0)
824 clear_momentary_breakpoints ();
828 delete_breakpoint (bpt)
829 struct breakpoint *bpt;
831 register struct breakpoint *b;
834 write_memory (bpt->address, bpt->shadow_contents, sizeof break_insn);
836 if (breakpoint_chain == bpt)
837 breakpoint_chain = bpt->next;
846 check_duplicates (bpt->address);
848 free_command_lines (&bpt->commands);
854 void map_breakpoint_numbers ();
857 delete_command (arg, from_tty)
861 register struct breakpoint *b, *b1;
865 if (!from_tty || query ("Delete all breakpoints? "))
867 /* No arg; clear all breakpoints. */
868 while (breakpoint_chain)
869 delete_breakpoint (breakpoint_chain);
873 map_breakpoint_numbers (arg, delete_breakpoint);
876 /* Delete all breakpoints.
877 Done when new symtabs are loaded, since the break condition expressions
878 may become invalid, and the breakpoints are probably wrong anyway. */
883 delete_command (0, 0);
886 /* Set ignore-count of breakpoint number BPTNUM to COUNT.
887 If from_tty is nonzero, it prints a message to that effect,
888 which ends with a period (no newline). */
891 set_ignore_count (bptnum, count, from_tty)
892 int bptnum, count, from_tty;
894 register struct breakpoint *b;
900 if (b->number == bptnum)
902 b->ignore_count = count;
906 printf ("Will stop next time breakpoint %d is reached.", bptnum);
908 printf ("Will ignore next crossing of breakpoint %d.", bptnum);
910 printf ("Will ignore next %d crossings of breakpoint %d.",
915 error ("No breakpoint number %d.", bptnum);
918 /* Command to set ignore-count of breakpoint N to COUNT. */
921 ignore_command (args, from_tty)
925 register char *p = args;
929 error_no_arg ("a breakpoint number");
931 while (*p >= '0' && *p <= '9') p++;
932 if (*p && *p != ' ' && *p != '\t')
933 error ("First argument must be a breakpoint number.");
938 error ("Second argument (specified ignore-count) is missing.");
940 set_ignore_count (num, parse_and_eval_address (p), from_tty);
944 /* Call FUNCTION on each of the breakpoints
945 whose numbers are given in ARGS. */
948 map_breakpoint_numbers (args, function)
952 register char *p = args;
955 register struct breakpoint *b;
958 error_no_arg ("one or more breakpoint numbers");
963 while (*p1 >= '0' && *p1 <= '9') p1++;
964 if (*p1 && *p1 != ' ' && *p1 != '\t')
965 error ("Arguments must be breakpoint numbers.");
970 if (b->number == num)
975 printf ("No breakpoint number %d.\n", num);
978 while (*p == ' ' || *p == '\t') p++;
983 enable_breakpoint (bpt)
984 struct breakpoint *bpt;
986 bpt->enable = enabled;
988 check_duplicates (bpt->address);
992 enable_command (args)
995 map_breakpoint_numbers (args, enable_breakpoint);
999 disable_breakpoint (bpt)
1000 struct breakpoint *bpt;
1002 bpt->enable = disabled;
1004 check_duplicates (bpt->address);
1008 disable_command (args)
1011 register struct breakpoint *bpt;
1013 ALL_BREAKPOINTS (bpt)
1014 disable_breakpoint (bpt);
1016 map_breakpoint_numbers (args, disable_breakpoint);
1020 enable_once_breakpoint (bpt)
1021 struct breakpoint *bpt;
1023 bpt->enable = temporary;
1025 check_duplicates (bpt->address);
1029 enable_once_command (args)
1032 map_breakpoint_numbers (args, enable_once_breakpoint);
1036 enable_delete_breakpoint (bpt)
1037 struct breakpoint *bpt;
1039 bpt->enable = delete;
1041 check_duplicates (bpt->address);
1045 enable_delete_command (args)
1048 map_breakpoint_numbers (args, enable_delete_breakpoint);
1052 /* Chain containing all defined enable commands. */
1054 struct cmd_list_element *enablelist;
1056 extern struct cmd_list_element *cmdlist;
1061 breakpoint_chain = 0;
1062 breakpoint_count = 0;
1065 add_com ("ignore", class_breakpoint, ignore_command,
1066 "Set ignore-count of breakpoint number N to COUNT.");
1068 add_com ("commands", class_breakpoint, commands_command,
1069 "Set commands to be executed when a breakpoint is hit.\n\
1070 Give breakpoint number as argument after \"commands\".\n\
1071 The commands themselves follow starting on the next line.\n\
1072 Type a line containing \"end\" to indicate the end of them.\n\
1073 Give \"silent\" as the first line to make the breakpoint silent;\n\
1074 then no output is printed when it is hit, except what the commands print.");
1076 add_com ("condition", class_breakpoint, condition_command,
1077 "Specify breakpoint number N to break only if COND is true.\n\
1078 N is an integer; COND is a C expression to be evaluated whenever\n\
1079 breakpoint N is reached. Actually break only when COND is nonzero.");
1081 add_com ("tbreak", class_breakpoint, tbreak_command,
1082 "Set a temporary breakpoint. Args like \"break\" command.\n\
1083 Like \"break\" except the breakpoint is only enabled temporarily,\n\
1084 so it will be disabled when hit. Equivalent to \"break\" followed\n\
1085 by using \"enable once\" on the breakpoint number.");
1087 add_prefix_cmd ("enable", class_breakpoint, enable_command,
1088 "Enable some breakpoints. Give breakpoint numbers as arguments.\n\
1089 With no subcommand, breakpoints are enabled until you command otherwise.\n\
1090 This is used to cancel the effect of the \"disable\" command.\n\
1091 With a subcommand you can enable temporarily.",
1092 &enablelist, "enable ", 1, &cmdlist);
1094 add_cmd ("delete", 0, enable_delete_command,
1095 "Enable breakpoints and delete when hit. Give breakpoint numbers.\n\
1096 If a breakpoint is hit while enabled in this fashion, it is deleted.",
1099 add_cmd ("once", 0, enable_once_command,
1100 "Enable breakpoints for one hit. Give breakpoint numbers.\n\
1101 If a breakpoint is hit while enabled in this fashion, it becomes disabled.\n\
1102 See the \"tbreak\" command which sets a breakpoint and enables it once.",
1105 add_com ("disable", class_breakpoint, disable_command,
1106 "Disable some breakpoints. Give breakpoint numbers as arguments.\n\
1107 With no arguments, disable all breakpoints.\n\
1108 A disabled breakpoint is not forgotten,\n\
1109 but it has no effect until enabled again.");
1110 add_com_alias ("dis", "disable", class_breakpoint, 1);
1112 add_com ("delete", class_breakpoint, delete_command,
1113 "Delete breakpoints, specifying breakpoint numbers; or all breakpoints.\n\
1114 Arguments are breakpoint numbers with spaces in between.\n\
1115 To delete all breakpoints, give no argument.");
1116 add_com_alias ("d", "delete", class_breakpoint, 1);
1118 add_com ("clear", class_breakpoint, clear_command,
1119 "Clear breakpoint at specified line or function.\n\
1120 Argument may be line number, function name, or \"*\" and an address.\n\
1121 If line number is specified, all breakpoints in that line are cleared.\n\
1122 If function is specified, breakpoints at beginning of function are cleared.\n\
1123 If an address is specified, breakpoints at that address are cleared.\n\n\
1124 With no argument, clears all breakpoints in the line that the selected frame\n\
1127 See also the \"delete\" command which clears breakpoints by number.");
1129 add_com ("break", class_breakpoint, break_command,
1130 "Set breakpoint at specified line or function.\n\
1131 Argument may be line number, function name, or \"*\" and an address.\n\
1132 If line number is specified, break at start of code for that line.\n\
1133 If function is specified, break at start of code for that function.\n\
1134 If an address is specified, break at that exact address.\n\
1135 With no arg, uses current execution address of selected stack frame.\n\
1136 This is useful for breaking on return to a stack frame.\n\
1138 Multiple breakpoints at one place are permitted, and useful if conditional.\n\
1140 Do \"help breakpoints\" for info on other commands dealing with breakpoints.");
1141 add_com_alias ("b", "break", class_run, 1);
1142 add_com_alias ("br", "break", class_run, 1);
1143 add_com_alias ("bre", "break", class_run, 1);
1144 add_com_alias ("brea", "break", class_run, 1);
1146 add_info ("breakpoints", breakpoints_info,
1147 "Status of all breakpoints, or breakpoint number NUMBER.\n\
1148 Second column is \"y\" for enabled breakpoint, \"n\" for disabled,\n\
1149 \"o\" for enabled once (disable when hit), \"d\" for enable but delete when hit.\n\
1150 Then come the address and the file/line number.\n\n\
1151 Convenience variable \"$_\" and default examine address for \"x\"\n\
1152 are set to the address of the last breakpoint listed.");