From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14704 invoked by alias); 10 Nov 2004 00:00:37 -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 14510 invoked from network); 10 Nov 2004 00:00:23 -0000 Received: from unknown (HELO pippin.tausq.org) (64.81.244.94) by sourceware.org with SMTP; 10 Nov 2004 00:00:23 -0000 Received: by pippin.tausq.org (Postfix, from userid 1000) id C906BCDCF9; Tue, 9 Nov 2004 16:00:26 -0800 (PST) Date: Wed, 10 Nov 2004 00:00:00 -0000 From: Randolph Chung To: gdb-patches@sources.redhat.com Subject: [patch/hppa] Several cleanups for hppa-tdep.c Message-ID: <20041110000026.GA15714@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/msg00182.txt.bz2 will commit as obvious tomorrow, unless i hear otherwise. 2004-11-09 Randolph Chung * hppa-tdep.c (hppa32_register_name, hppa64_register_name): Make static. (hppa32_push_dummy_call, hppa64_push_dummy_call): Likewise. (hppa_fetch_pointer_argument): Likewise. (hppa_frame_cache): Use safe_frame_unwind_memory instead of deprecated_read_memory_nobpt. (_initialize_hppa_tdep): Replace deprecated_add_show_from_set/ add_set_cmd sequence with add_setshow_boolean_cmd. Index: hppa-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/hppa-tdep.c,v retrieving revision 1.176 diff -u -p -r1.176 hppa-tdep.c --- hppa-tdep.c 3 Nov 2004 23:20:43 -0000 1.176 +++ hppa-tdep.c 9 Nov 2004 23:52:47 -0000 @@ -632,7 +632,7 @@ hppa_breakpoint_from_pc (CORE_ADDR *pc, /* Return the name of a register. */ -const char * +static const char * hppa32_register_name (int i) { static char *names[] = { @@ -675,7 +675,7 @@ hppa32_register_name (int i) return names[i]; } -const char * +static const char * hppa64_register_name (int i) { static char *names[] = { @@ -720,7 +720,7 @@ hppa64_register_name (int i) We simply allocate the appropriate amount of stack space and put arguments into their proper slots. */ -CORE_ADDR +static CORE_ADDR hppa32_push_dummy_call (struct gdbarch *gdbarch, struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, @@ -892,7 +892,7 @@ hppa32_push_dummy_call (struct gdbarch * This ABI also requires that the caller provide an argument pointer to the callee, so we do that too. */ -CORE_ADDR +static CORE_ADDR hppa64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, @@ -1653,7 +1670,8 @@ hppa_frame_cache (struct frame_info *nex { int reg; char buf4[4]; - long status = deprecated_read_memory_nobpt (pc, buf4, sizeof buf4); + long status = safe_frame_unwind_memory (next_frame, pc, buf4, + sizeof buf4); long inst = extract_unsigned_integer (buf4, sizeof buf4); /* Note the interesting effects of this instruction. */ @@ -2339,7 +2357,7 @@ hppa_smash_text_address (CORE_ADDR addr) } /* Get the ith function argument for the current function. */ -CORE_ADDR +static CORE_ADDR hppa_fetch_pointer_argument (struct frame_info *frame, int argi, struct type *type) { @@ -2627,9 +2645,11 @@ be no argument or the argument must be a be no argument or the argument must be a depth.\n"), NULL); /* Debug this files internals. */ - deprecated_add_show_from_set - (add_set_cmd ("hppa", class_maintenance, var_zinteger, - &hppa_debug, "Set hppa debugging.\n\ -When non-zero, hppa specific debugging is enabled.", &setdebuglist), - &showdebuglist); + add_setshow_boolean_cmd ("hppa", class_maintenance, &hppa_debug, "\ +Set whether hppa target specific debugging information should be displayed.", "\ +Show whether hppa target specific debugging information is displayed.", "\ +This flag controls whether hppa target specific debugging information is\n\ +displayed. This information is particularly useful for debugging frame\n\ +unwinding problems.", "hppa debug flag is %s.", + NULL, NULL, &setdebuglist, &showdebuglist); } -- Randolph Chung Debian GNU/Linux Developer, hppa/ia64 ports http://www.tausq.org/