From 46905982ed56fe8c844d6c645a77cc6767b5715c Mon Sep 17 00:00:00 2001 From: Randolph Chung Date: Wed, 1 Dec 2004 06:54:56 +0000 Subject: [PATCH] 2004-11-30 Randolph Chung * breakpoint.c (break_at_finish_command): Delete. (break_at_finish_command_1): Delete. (break_at_finish_at_depth_command): Delete. (break_at_finish_at_depth_command_1): Delete. (tbreak_at_finish_command): Delete. * hppa-tdep.c (_initialize_hppa_tdep): Remove deprecated xbreak, tbreak and bx commands. --- gdb/ChangeLog | 10 +++ gdb/breakpoint.c | 191 ----------------------------------------------- gdb/hppa-tdep.c | 33 -------- 3 files changed, 10 insertions(+), 224 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 55d503a7c7..379b0e1290 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,13 @@ +2004-11-30 Randolph Chung + + * breakpoint.c (break_at_finish_command): Delete. + (break_at_finish_command_1): Delete. + (break_at_finish_at_depth_command): Delete. + (break_at_finish_at_depth_command_1): Delete. + (tbreak_at_finish_command): Delete. + * hppa-tdep.c (_initialize_hppa_tdep): Remove deprecated xbreak, tbreak + and bx commands. + 2004-11-30 Andrew Cagney * config/nm-gnu.h: Delete file. diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 0c0dd1e56f..5774920374 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -86,11 +86,6 @@ static void watch_command (char *, int); static int can_use_hardware_watchpoint (struct value *); -extern void break_at_finish_command (char *, int); -extern void break_at_finish_at_depth_command (char *, int); - -extern void tbreak_at_finish_command (char *, int); - static int break_command_1 (char *, int, int, struct breakpoint *); static void mention (struct breakpoint *); @@ -181,11 +176,6 @@ static void create_fork_vfork_event_catchpoint (int tempflag, char *cond_string, enum bptype bp_kind); -static void break_at_finish_at_depth_command_1 (char *arg, - int flag, int from_tty); - -static void break_at_finish_command_1 (char *arg, int flag, int from_tty); - static void stop_command (char *arg, int from_tty); static void stopin_command (char *arg, int from_tty); @@ -5449,169 +5439,6 @@ gdb_breakpoint (char *address, char *condition, } -static void -break_at_finish_at_depth_command_1 (char *arg, int flag, int from_tty) -{ - struct frame_info *frame; - CORE_ADDR low, high, selected_pc = 0; - char *extra_args = NULL; - char *level_arg; - int extra_args_len = 0, if_arg = 0; - - if (!arg || - (arg[0] == 'i' && arg[1] == 'f' && (arg[2] == ' ' || arg[2] == '\t'))) - { - - if (default_breakpoint_valid) - { - if (deprecated_selected_frame) - { - selected_pc = get_frame_pc (deprecated_selected_frame); - if (arg) - if_arg = 1; - } - else - error ("No selected frame."); - } - else - error ("No default breakpoint address now."); - } - else - { - extra_args = strchr (arg, ' '); - if (extra_args) - { - extra_args++; - extra_args_len = strlen (extra_args); - level_arg = (char *) xmalloc (extra_args - arg); - strncpy (level_arg, arg, extra_args - arg - 1); - level_arg[extra_args - arg - 1] = '\0'; - } - else - { - level_arg = (char *) xmalloc (strlen (arg) + 1); - strcpy (level_arg, arg); - } - - frame = parse_frame_specification (level_arg); - if (frame) - selected_pc = get_frame_pc (frame); - else - selected_pc = 0; - } - if (if_arg) - { - extra_args = arg; - extra_args_len = strlen (arg); - } - - if (selected_pc) - { - if (find_pc_partial_function (selected_pc, (char **) NULL, &low, &high)) - { - char *addr_string; - if (extra_args_len) - addr_string = xstrprintf ("*0x%s %s", paddr_nz (high), extra_args); - else - addr_string = xstrprintf ("*0x%s", paddr_nz (high)); - break_command_1 (addr_string, flag, from_tty, NULL); - xfree (addr_string); - } - else - error ("No function contains the specified address"); - } - else - error ("Unable to set breakpoint at procedure exit"); -} - - -static void -break_at_finish_command_1 (char *arg, int flag, int from_tty) -{ - char *addr_string, *break_string, *beg_addr_string; - CORE_ADDR low, high; - struct symtabs_and_lines sals; - struct symtab_and_line sal; - struct cleanup *old_chain; - char *extra_args = NULL; - int extra_args_len = 0; - int i, if_arg = 0; - - if (!arg || - (arg[0] == 'i' && arg[1] == 'f' && (arg[2] == ' ' || arg[2] == '\t'))) - { - if (default_breakpoint_valid) - { - if (deprecated_selected_frame) - { - addr_string = xstrprintf ("*0x%s", - paddr_nz (get_frame_pc (deprecated_selected_frame))); - if (arg) - if_arg = 1; - } - else - error ("No selected frame."); - } - else - error ("No default breakpoint address now."); - } - else - { - addr_string = (char *) xmalloc (strlen (arg) + 1); - strcpy (addr_string, arg); - } - - if (if_arg) - { - extra_args = arg; - extra_args_len = strlen (arg); - } - else if (arg) - { - /* get the stuff after the function name or address */ - extra_args = strchr (arg, ' '); - if (extra_args) - { - extra_args++; - extra_args_len = strlen (extra_args); - } - } - - sals.sals = NULL; - sals.nelts = 0; - - beg_addr_string = addr_string; - sals = decode_line_1 (&addr_string, 1, (struct symtab *) NULL, 0, - (char ***) NULL, NULL); - - xfree (beg_addr_string); - old_chain = make_cleanup (xfree, sals.sals); - for (i = 0; (i < sals.nelts); i++) - { - sal = sals.sals[i]; - if (find_pc_partial_function (sal.pc, (char **) NULL, &low, &high)) - { - break_string; - if (extra_args_len) - break_string = xstrprintf ("*0x%s %s", paddr_nz (high), - extra_args); - else - break_string = xstrprintf ("*0x%s", paddr_nz (high)); - break_command_1 (break_string, flag, from_tty, NULL); - xfree (break_string); - } - else - error ("No function contains the specified address"); - } - if (sals.nelts > 1) - { - warning ("Multiple breakpoints were set.\n"); - warning ("Use the \"delete\" command to delete unwanted breakpoints."); - } - do_cleanups (old_chain); -} - - /* Helper function for break_command_1 and disassemble_command. */ void @@ -5667,30 +5494,12 @@ break_command (char *arg, int from_tty) break_command_1 (arg, 0, from_tty, NULL); } -void -break_at_finish_command (char *arg, int from_tty) -{ - break_at_finish_command_1 (arg, 0, from_tty); -} - -void -break_at_finish_at_depth_command (char *arg, int from_tty) -{ - break_at_finish_at_depth_command_1 (arg, 0, from_tty); -} - void tbreak_command (char *arg, int from_tty) { break_command_1 (arg, BP_TEMPFLAG, from_tty, NULL); } -void -tbreak_at_finish_command (char *arg, int from_tty) -{ - break_at_finish_command_1 (arg, BP_TEMPFLAG, from_tty); -} - static void hbreak_command (char *arg, int from_tty) { diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index fb6e7ebea7..2fc5a391fd 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c @@ -2604,9 +2604,6 @@ void _initialize_hppa_tdep (void) { struct cmd_list_element *c; - void break_at_finish_command (char *arg, int from_tty); - void tbreak_at_finish_command (char *arg, int from_tty); - void break_at_finish_at_depth_command (char *arg, int from_tty); gdbarch_register (bfd_arch_hppa, hppa_gdbarch_init, hppa_dump_tdep); @@ -2616,36 +2613,6 @@ _initialize_hppa_tdep (void) "Print unwind table entry at given address.", &maintenanceprintlist); - deprecate_cmd (add_com ("xbreak", class_breakpoint, - break_at_finish_command, - concat ("Set breakpoint at procedure exit. \n\ -Argument may be function name, or \"*\" and an address.\n\ -If function is specified, break at end of code for that function.\n\ -If an address is specified, break at the end of the function that contains \n\ -that exact address.\n", - "With no arg, uses current execution address of selected stack frame.\n\ -This is useful for breaking on return to a stack frame.\n\ -\n\ -Multiple breakpoints at one place are permitted, and useful if conditional.\n\ -\n\ -Do \"help breakpoints\" for info on other commands dealing with breakpoints.", NULL)), NULL); - deprecate_cmd (add_com_alias ("xb", "xbreak", class_breakpoint, 1), NULL); - deprecate_cmd (add_com_alias ("xbr", "xbreak", class_breakpoint, 1), NULL); - deprecate_cmd (add_com_alias ("xbre", "xbreak", class_breakpoint, 1), NULL); - deprecate_cmd (add_com_alias ("xbrea", "xbreak", class_breakpoint, 1), NULL); - - deprecate_cmd (c = add_com ("txbreak", class_breakpoint, - tbreak_at_finish_command, -"Set temporary breakpoint at procedure exit. Either there should\n\ -be no argument or the argument must be a depth.\n"), NULL); - set_cmd_completer (c, location_completer); - - if (xdb_commands) - deprecate_cmd (add_com ("bx", class_breakpoint, - break_at_finish_at_depth_command, -"Set breakpoint at procedure exit. Either there should\n\ -be no argument or the argument must be a depth.\n"), NULL); - /* Debug this files internals. */ add_setshow_boolean_cmd ("hppa", class_maintenance, &hppa_debug, "\ Set whether hppa target specific debugging information should be displayed.", "\ -- 2.34.1