From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12506 invoked by alias); 22 Nov 2004 23:46:09 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 12359 invoked from network); 22 Nov 2004 23:45:50 -0000 Received: from unknown (HELO pippin.tausq.org) (64.81.244.94) by sourceware.org with SMTP; 22 Nov 2004 23:45:50 -0000 Received: by pippin.tausq.org (Postfix, from userid 1000) id 0655ECD312; Mon, 22 Nov 2004 15:45:49 -0800 (PST) Date: Mon, 22 Nov 2004 23:46:00 -0000 From: Randolph Chung To: gdb-patches@sources.redhat.com Subject: [patch/hppa] remove deprecated hppa-only gdb commands Message-ID: <20041122234548.GH9148@tausq.org> Reply-To: Randolph Chung Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-GPG: for GPG key, see http://www.tausq.org/gpg.txt User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-11/txt/msg00441.txt.bz2 These hppa-specific commands have been deprecated for ~2.5 years, so I'm removing them now. If they are really useful we can reintroduce them as standard gdb commands. will commit this in a week or so unless somebody complains :) randolph 2004-11-22 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. Index: breakpoint.c =================================================================== RCS file: /cvs/src/src/gdb/breakpoint.c,v retrieving revision 1.185 diff -u -p -r1.185 breakpoint.c --- breakpoint.c 12 Nov 2004 21:45:05 -0000 1.185 +++ breakpoint.c 22 Nov 2004 23:36:07 -0000 @@ -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_catc 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 *con } -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 @@ -5668,29 +5495,11 @@ break_command (char *arg, int from_tty) } 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) { Index: hppa-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/hppa-tdep.c,v retrieving revision 1.181 diff -u -p -r1.181 hppa-tdep.c --- hppa-tdep.c 13 Nov 2004 02:15:32 -0000 1.181 +++ hppa-tdep.c 22 Nov 2004 23:36:07 -0000 @@ -2600,9 +2605,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); @@ -2612,36 +2614,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.", "\ -- Randolph Chung Debian GNU/Linux Developer, hppa/ia64 ports http://www.tausq.org/