static int restore_pc_queue PARAMS ((struct frame_saved_regs *fsr));
static int hppa_alignof PARAMS ((struct type *arg));
+CORE_ADDR frame_saved_pc PARAMS ((FRAME frame));
\f
/* Routines to extract various sized constants out of hppa
return 0;
}
\f
+int
+frameless_function_invocation (frame)
+ FRAME frame;
+{
+
+ if (use_unwind)
+ {
+ struct unwind_table_entry *u;
+
+ u = find_unwind_entry (frame->pc);
+
+ if (u == 0)
+ return 0;
+
+ return (u->Total_frame_size == 0);
+ }
+ else
+ return frameless_look_for_prologue (frame);
+}
+
CORE_ADDR
saved_pc_after_call (frame)
FRAME frame;
{
CORE_ADDR pc = get_frame_pc (frame);
- if (frameless_look_for_prologue (frame))
+ if (frameless_function_invocation (frame))
{
int ret_regnum;
else
frame->frame = read_register (SP_REGNUM) - framesize;
- if (!frameless_look_for_prologue (frame)) /* Frameless? */
+ if (!frameless_function_invocation (frame)) /* Frameless? */
return; /* No, quit now */
/* For frameless functions, we need to look at the caller's frame */
if (!chain)
return 0;
- msym = lookup_minimal_symbol_by_pc (FRAME_SAVED_PC (thisframe));
+ if (use_unwind)
+ {
- if (msym
- && (strcmp (SYMBOL_NAME (msym), "_start") == 0))
- return 0;
+ struct unwind_table_entry *u;
+
+ u = find_unwind_entry (thisframe->pc);
+
+ if (u && (u->Save_SP || u->Total_frame_size))
+ return 1;
+ else
+ return 0;
+ }
else
- return 1;
+ {
+ msym = lookup_minimal_symbol_by_pc (FRAME_SAVED_PC (thisframe));
+
+ if (msym
+ && (strcmp (SYMBOL_NAME (msym), "_start") == 0))
+ return 0;
+ else
+ return 1;
+ }
}
/*
CORE_ADDR struct_addr;
{
/* array of arguments' offsets */
- int *offset = (int *)alloca(nargs);
+ int *offset = (int *)alloca(nargs * sizeof (int));
int cum = 0;
int i, alignment;