as parameter.
* gdbarch.{c,h}: Regenerate.
* alpha-tdep.c (alpha_skip_prologue): Add gdbarch as parameter.
* amd64-tdep.c (amd64_skip_prologue): Likewise.
* avr-tdep.c (avr_skip_prologue): Likewise.
* cris-tdep.c (cris_skip_prologue): Likewise.
* frv-tdep.c (frv_skip_prologue): Likewise.
* h8300-tdep.c (h8300_skip_prologue): Likewise.
* hppa-tdep.c (hppa_skip_prologue): Likewise.
* i386-tdep.c (i386_skip_prologue): Likewise.
* ia64-tdep.c (ia64_skip_prologue): Likewise.
* iq2000-tdep.c (iq2000_skip_prologue): Likewise.
* m32r-tdep.c (m32r_skip_prologue): Likewise.
* m68hc11-tdep.c (m68hc11_skip_prologue): Likewise.
* m68k-tdep.c (m68k_skip_prologue): Likewise.
* m88k-tdep.c (m88k_skip_prologue): Likewise.
* mep-tdep.c (mep_skip_prologue): Likewise.
* mips-tdep.c (mips_skip_prologue): Likewise.
* mn10300-tdep.c (mn10300_skip_prologue): Likewise.
* mt-tdep.c (mt_skip_prologue): Likewise.
* rs6000-tdep.c (rs6000_skip_prologue): Likewise.
* score-tdep.c (score_skip_prologue): Likewise.
* sh64-tdep.c (sh64_skip_prologue): Likewise.
* sh-tdep.c (sh_skip_prologue): Likewise.
* sparc64-tdep.c (sparc64_skip_prologue): Likewise.
* sparc-tdep.c (sparc32_skip_prologue): Likewise.
* spu-tdep.c (spu_skip_prologue): Likewise.
* v850-tdep.c (v850_skip_prologue): Likewise.
* vax-tdep.c (vax_skip_prologue): Likewise.
* xstormy16-tdep.c (xstormy16_skip_prologue): Likewise.
* xtensa-tdep.c (xtensa_skip_prologue): Likewise.
* arm-tdep.c (arm_skip_prologue): Add gdbarch as parameter. Replace
current_gdbarch by gdbarch.
* m32c-tdep.c (m32c_skip_prologue): Likewise.
* s390-tdep.c (s390_skip_prologue): Likewise.
+2008-01-11 Markus Deuling <deuling@de.ibm.com>
+
+ * gdbarch.sh (skip_prologue): Add gdbarch
+ as parameter.
+ * gdbarch.{c,h}: Regenerate.
+
+ * alpha-tdep.c (alpha_skip_prologue): Add gdbarch as parameter.
+ * amd64-tdep.c (amd64_skip_prologue): Likewise.
+ * avr-tdep.c (avr_skip_prologue): Likewise.
+ * cris-tdep.c (cris_skip_prologue): Likewise.
+ * frv-tdep.c (frv_skip_prologue): Likewise.
+ * h8300-tdep.c (h8300_skip_prologue): Likewise.
+ * hppa-tdep.c (hppa_skip_prologue): Likewise.
+ * i386-tdep.c (i386_skip_prologue): Likewise.
+ * ia64-tdep.c (ia64_skip_prologue): Likewise.
+ * iq2000-tdep.c (iq2000_skip_prologue): Likewise.
+ * m32r-tdep.c (m32r_skip_prologue): Likewise.
+ * m68hc11-tdep.c (m68hc11_skip_prologue): Likewise.
+ * m68k-tdep.c (m68k_skip_prologue): Likewise.
+ * m88k-tdep.c (m88k_skip_prologue): Likewise.
+ * mep-tdep.c (mep_skip_prologue): Likewise.
+ * mips-tdep.c (mips_skip_prologue): Likewise.
+ * mn10300-tdep.c (mn10300_skip_prologue): Likewise.
+ * mt-tdep.c (mt_skip_prologue): Likewise.
+ * rs6000-tdep.c (rs6000_skip_prologue): Likewise.
+ * score-tdep.c (score_skip_prologue): Likewise.
+ * sh64-tdep.c (sh64_skip_prologue): Likewise.
+ * sh-tdep.c (sh_skip_prologue): Likewise.
+ * sparc64-tdep.c (sparc64_skip_prologue): Likewise.
+ * sparc-tdep.c (sparc32_skip_prologue): Likewise.
+ * spu-tdep.c (spu_skip_prologue): Likewise.
+ * v850-tdep.c (v850_skip_prologue): Likewise.
+ * vax-tdep.c (vax_skip_prologue): Likewise.
+ * xstormy16-tdep.c (xstormy16_skip_prologue): Likewise.
+ * xtensa-tdep.c (xtensa_skip_prologue): Likewise.
+
+ * arm-tdep.c (arm_skip_prologue): Add gdbarch as parameter. Replace
+ current_gdbarch by gdbarch.
+ * m32c-tdep.c (m32c_skip_prologue): Likewise.
+ * s390-tdep.c (s390_skip_prologue): Likewise.
+
2008-01-10 Doug Evans <dje@google.com>
* defs.h (struct continuation_arg): Fix typo in comment.
anything which might clobber the registers which are being saved. */
static CORE_ADDR
-alpha_skip_prologue (CORE_ADDR pc)
+alpha_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
{
unsigned long inst;
int offset;
/* Return PC of first real instruction. */
static CORE_ADDR
-amd64_skip_prologue (CORE_ADDR start_pc)
+amd64_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc)
{
struct amd64_frame_cache cache;
CORE_ADDR pc;
sub fp, ip, #nn @@ nn == 20 or 4 depending on second insn */
static CORE_ADDR
-arm_skip_prologue (CORE_ADDR pc)
+arm_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
{
unsigned long inst;
CORE_ADDR skip_pc;
/* Check if this is Thumb code. */
if (arm_pc_is_thumb (pc))
- return thumb_analyze_prologue (current_gdbarch, pc, func_end, NULL);
+ return thumb_analyze_prologue (gdbarch, pc, func_end, NULL);
for (skip_pc = pc; skip_pc < func_end; skip_pc += 4)
{
}
static CORE_ADDR
-avr_skip_prologue (CORE_ADDR pc)
+avr_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
{
CORE_ADDR func_addr, func_end;
CORE_ADDR prologue_end = pc;
of the first instruction after the function prologue. */
static CORE_ADDR
-cris_skip_prologue (CORE_ADDR pc)
+cris_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
{
CORE_ADDR func_addr, func_end;
struct symtab_and_line sal;
static CORE_ADDR
-frv_skip_prologue (CORE_ADDR pc)
+frv_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
{
CORE_ADDR func_addr, func_end, new_pc;
gdb_assert (gdbarch->skip_prologue != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
- return gdbarch->skip_prologue (ip);
+ return gdbarch->skip_prologue (gdbarch, ip);
}
void
extern enum return_value_convention gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf);
extern void set_gdbarch_return_value (struct gdbarch *gdbarch, gdbarch_return_value_ftype *return_value);
-typedef CORE_ADDR (gdbarch_skip_prologue_ftype) (CORE_ADDR ip);
+typedef CORE_ADDR (gdbarch_skip_prologue_ftype) (struct gdbarch *gdbarch, CORE_ADDR ip);
extern CORE_ADDR gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip);
extern void set_gdbarch_skip_prologue (struct gdbarch *gdbarch, gdbarch_skip_prologue_ftype *skip_prologue);
M:enum return_value_convention:return_value:struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf:valtype, regcache, readbuf, writebuf
-f:CORE_ADDR:skip_prologue:CORE_ADDR ip:ip:0:0
+m:CORE_ADDR:skip_prologue:CORE_ADDR ip:ip:0:0
f:int:inner_than:CORE_ADDR lhs, CORE_ADDR rhs:lhs, rhs:0:0
m:const gdb_byte *:breakpoint_from_pc:CORE_ADDR *pcptr, int *lenptr:pcptr, lenptr::0:
M:CORE_ADDR:adjust_breakpoint_address:CORE_ADDR bpaddr:bpaddr
};
static CORE_ADDR
-h8300_skip_prologue (CORE_ADDR pc)
+h8300_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
{
CORE_ADDR func_addr = 0 , func_end = 0;
skip over the branch in that case. */
static CORE_ADDR
-hppa_skip_prologue (CORE_ADDR pc)
+hppa_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
{
unsigned long inst;
int offset;
/* Return PC of first real instruction. */
static CORE_ADDR
-i386_skip_prologue (CORE_ADDR start_pc)
+i386_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc)
{
static gdb_byte pic_pat[6] =
{
}
CORE_ADDR
-ia64_skip_prologue (CORE_ADDR pc)
+ia64_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
{
struct ia64_frame_cache cache;
cache.base = 0;
stepped into a function call. */
static CORE_ADDR
-iq2000_skip_prologue (CORE_ADDR pc)
+iq2000_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
{
CORE_ADDR func_addr = 0 , func_end = 0;
static CORE_ADDR
-m32c_skip_prologue (CORE_ADDR ip)
+m32c_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
{
char *name;
CORE_ADDR func_addr, func_end, sal_end;
return ip;
/* Find end by prologue analysis. */
- m32c_analyze_prologue (current_gdbarch, ip, func_end, &p);
+ m32c_analyze_prologue (gdbarch, ip, func_end, &p);
/* Find end by line info. */
sal_end = skip_prologue_using_sal (ip);
/* Return whichever is lower. */
#define DEFAULT_SEARCH_LIMIT 128
CORE_ADDR
-m32r_skip_prologue (CORE_ADDR pc)
+m32r_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
{
CORE_ADDR func_addr, func_end;
struct symtab_and_line sal;
}
static CORE_ADDR
-m68hc11_skip_prologue (CORE_ADDR pc)
+m68hc11_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
{
CORE_ADDR func_addr, func_end;
struct symtab_and_line sal;
/* Return PC of first real instruction. */
static CORE_ADDR
-m68k_skip_prologue (CORE_ADDR start_pc)
+m68k_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc)
{
struct m68k_frame_cache cache;
CORE_ADDR pc;
starting at PC. */
static CORE_ADDR
-m88k_skip_prologue (CORE_ADDR pc)
+m88k_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
{
struct symtab_and_line sal;
CORE_ADDR func_start, func_end;
static CORE_ADDR
-mep_skip_prologue (CORE_ADDR pc)
+mep_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
{
char *name;
CORE_ADDR func_addr, func_end;
delay slot of a non-prologue instruction). */
static CORE_ADDR
-mips_skip_prologue (CORE_ADDR pc)
+mips_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
{
CORE_ADDR limit_pc;
CORE_ADDR func_addr;
Return the address of the first inst past the prologue of the function. */
static CORE_ADDR
-mn10300_skip_prologue (CORE_ADDR pc)
+mn10300_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
{
return mn10300_analyze_prologue (NULL, NULL, pc);
}
call. */
static CORE_ADDR
-mt_skip_prologue (CORE_ADDR pc)
+mt_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
{
CORE_ADDR func_addr = 0, func_end = 0;
char *func_name;
}
static CORE_ADDR
-rs6000_skip_prologue (CORE_ADDR pc)
+rs6000_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
{
struct rs6000_framedata frame;
CORE_ADDR limit_pc, func_addr;
/* Advance PC across any function entry prologue instructions to reach
some "real" code. */
static CORE_ADDR
-s390_skip_prologue (CORE_ADDR pc)
+s390_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
{
struct s390_prologue_data data;
CORE_ADDR skip_pc;
- skip_pc = s390_analyze_prologue (current_gdbarch, pc, (CORE_ADDR)-1, &data);
+ skip_pc = s390_analyze_prologue (gdbarch, pc, (CORE_ADDR)-1, &data);
return skip_pc ? skip_pc : pc;
}
}
static CORE_ADDR
-score_skip_prologue (CORE_ADDR pc)
+score_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
{
CORE_ADDR cpc = pc;
int iscan = 32, stack_sub = 0;
}
static CORE_ADDR
-sh_skip_prologue (CORE_ADDR start_pc)
+sh_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc)
{
CORE_ADDR pc;
struct sh_frame_cache cache;
}
static CORE_ADDR
-sh64_skip_prologue (CORE_ADDR pc)
+sh64_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
{
CORE_ADDR post_prologue_pc;
START_PC. */
static CORE_ADDR
-sparc32_skip_prologue (CORE_ADDR start_pc)
+sparc32_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc)
{
struct symtab_and_line sal;
CORE_ADDR func_start, func_end;
START_PC. */
static CORE_ADDR
-sparc64_skip_prologue (CORE_ADDR start_pc)
+sparc64_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc)
{
struct symtab_and_line sal;
CORE_ADDR func_start, func_end;
/* Return the first instruction after the prologue starting at PC. */
static CORE_ADDR
-spu_skip_prologue (CORE_ADDR pc)
+spu_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
{
struct spu_prologue_data data;
return spu_analyze_prologue (pc, (CORE_ADDR)-1, &data);
/* Return the address of the first code past the prologue of the function. */
static CORE_ADDR
-v850_skip_prologue (CORE_ADDR pc)
+v850_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
{
CORE_ADDR func_addr, func_end;
to reach some "real" code. */
static CORE_ADDR
-vax_skip_prologue (CORE_ADDR pc)
+vax_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
{
gdb_byte op = read_memory_unsigned_integer (pc, 1);
stepped into a function call. */
static CORE_ADDR
-xstormy16_skip_prologue (CORE_ADDR pc)
+xstormy16_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
{
CORE_ADDR func_addr = 0, func_end = 0;
char *func_name;
/* #define DONT_SKIP_PROLOGUE */
CORE_ADDR
-xtensa_skip_prologue (CORE_ADDR start_pc)
+xtensa_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc)
{
struct symtab_and_line prologue_sal;
CORE_ADDR body_pc;