2004-11-10 Randolph Chung <tausq@debian.org>

* 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.
This commit is contained in:
Randolph Chung 2004-11-10 16:26:55 +00:00
parent 2b25cacb21
commit 4a302917ab
2 changed files with 32 additions and 12 deletions

View file

@ -1,3 +1,13 @@
2004-11-10 Randolph Chung <tausq@debian.org>
* 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.
2004-11-09 Andrew Cagney <cagney@gnu.org> 2004-11-09 Andrew Cagney <cagney@gnu.org>
GDB 6.3 released from GDB 6.3 branch. GDB 6.3 released from GDB 6.3 branch.

View file

@ -632,7 +632,7 @@ hppa_breakpoint_from_pc (CORE_ADDR *pc, int *len)
/* Return the name of a register. */ /* Return the name of a register. */
const char * static const char *
hppa32_register_name (int i) hppa32_register_name (int i)
{ {
static char *names[] = { static char *names[] = {
@ -675,7 +675,7 @@ hppa32_register_name (int i)
return names[i]; return names[i];
} }
const char * static const char *
hppa64_register_name (int i) hppa64_register_name (int i)
{ {
static char *names[] = { static char *names[] = {
@ -720,7 +720,7 @@ hppa64_register_name (int i)
We simply allocate the appropriate amount of stack space and put We simply allocate the appropriate amount of stack space and put
arguments into their proper slots. */ arguments into their proper slots. */
CORE_ADDR static CORE_ADDR
hppa32_push_dummy_call (struct gdbarch *gdbarch, struct value *function, hppa32_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct regcache *regcache, CORE_ADDR bp_addr, struct regcache *regcache, CORE_ADDR bp_addr,
int nargs, struct value **args, CORE_ADDR sp, int nargs, struct value **args, CORE_ADDR sp,
@ -892,7 +892,7 @@ hppa32_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
This ABI also requires that the caller provide an argument pointer This ABI also requires that the caller provide an argument pointer
to the callee, so we do that too. */ to the callee, so we do that too. */
CORE_ADDR static CORE_ADDR
hppa64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, hppa64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct regcache *regcache, CORE_ADDR bp_addr, struct regcache *regcache, CORE_ADDR bp_addr,
int nargs, struct value **args, CORE_ADDR sp, int nargs, struct value **args, CORE_ADDR sp,
@ -1653,8 +1653,16 @@ hppa_frame_cache (struct frame_info *next_frame, void **this_cache)
{ {
int reg; int reg;
char buf4[4]; char buf4[4];
long status = deprecated_read_memory_nobpt (pc, buf4, sizeof buf4); long inst;
long inst = extract_unsigned_integer (buf4, sizeof buf4);
if (!safe_frame_unwind_memory (next_frame, pc, buf4,
sizeof buf4))
{
error ("Cannot read instruction at 0x%s\n", paddr_nz (pc));
return (*this_cache);
}
inst = extract_unsigned_integer (buf4, sizeof buf4);
/* Note the interesting effects of this instruction. */ /* Note the interesting effects of this instruction. */
frame_size += prologue_inst_adjust_sp (inst); frame_size += prologue_inst_adjust_sp (inst);
@ -2339,7 +2347,7 @@ hppa_smash_text_address (CORE_ADDR addr)
} }
/* Get the ith function argument for the current function. */ /* Get the ith function argument for the current function. */
CORE_ADDR static CORE_ADDR
hppa_fetch_pointer_argument (struct frame_info *frame, int argi, hppa_fetch_pointer_argument (struct frame_info *frame, int argi,
struct type *type) struct type *type)
{ {
@ -2627,9 +2635,11 @@ be no argument or the argument must be a depth.\n"), NULL);
be no argument or the argument must be a depth.\n"), NULL); be no argument or the argument must be a depth.\n"), NULL);
/* Debug this files internals. */ /* Debug this files internals. */
deprecated_add_show_from_set add_setshow_boolean_cmd ("hppa", class_maintenance, &hppa_debug, "\
(add_set_cmd ("hppa", class_maintenance, var_zinteger, Set whether hppa target specific debugging information should be displayed.", "\
&hppa_debug, "Set hppa debugging.\n\ Show whether hppa target specific debugging information is displayed.", "\
When non-zero, hppa specific debugging is enabled.", &setdebuglist), This flag controls whether hppa target specific debugging information is\n\
&showdebuglist); displayed. This information is particularly useful for debugging frame\n\
unwinding problems.", "hppa debug flag is %s.",
NULL, NULL, &setdebuglist, &showdebuglist);
} }