This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Just not this (macro's are bad m'kay :-). The code should instead do something like:+#define FIND_GLOBAL_POINTER \ + (gdbarch_tdep (current_gdbarch)->find_global_pointer) +
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); ... ... = tdep->find_global_pointer (...);
static CORE_ADDR +hppa32_convert_from_func_ptr_addr (struct gdbarch *gdbarch, + CORE_ADDR addr, + struct target_ops *targ) +{ + if (addr & 2) + { + ULONGEST gp; + + addr &= ~3; + + gp = read_memory_unsigned_integer (addr + 4, 4); + write_register (19, gp); + addr = read_memory_unsigned_integer (addr, 4); + } + + return addr; +} + +static CORE_ADDR
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |