From d716b33d85ee84e8b69f395977c479b8e66474d5 Mon Sep 17 00:00:00 2001 From: Martin Hunt Date: Thu, 21 Nov 1996 03:19:37 +0000 Subject: [PATCH] Wed Nov 20 19:09:16 1996 Martin M. Hunt * infcmd.c (do_registers_info): Call val_print with the virtual buf instead of the raw buf. Needed for REGISTER_CONVERT to work with non-floating point regs. start-sanitize-d10v * d10v-tdep.c (d10v_skip_prologue): If we have line debugging information, then the end of the prologue should the first assembly instruction of the first source line. * values.c (value_from_longest): Put in D10V call to fix up address pointers. * config/d10v/tm-d10v.h (REGISTER_VIRTUAL_SIZE): Modified. (REGISTER_VIRTUAL_TYPE): Modified for PC_REGNUM and SP_REGNUM. (REGISTER_CONVERTIBLE): Make PC and SP convertible. (REGISTER_CONVERT_TO_VIRTUAL): Define. (REGISTER_CONVERT_TO_RAW): Define. (D10V_MAKE_DADDR): Define. (D10V_MAKE_IADDR): Define. end-sanitize-d10v --- gdb/ChangeLog | 22 ++++++++++++++++++++++ gdb/d10v-tdep.c | 11 +++++++++++ gdb/values.c | 8 ++++++++ 3 files changed, 41 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index cbbcacc6d3c..33c63276df9 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,25 @@ +Wed Nov 20 19:09:16 1996 Martin M. Hunt + + * infcmd.c (do_registers_info): Call val_print with the + virtual buf instead of the raw buf. Needed for REGISTER_CONVERT + to work with non-floating point regs. + +start-sanitize-d10v + * d10v-tdep.c (d10v_skip_prologue): If we have line debugging + information, then the end of the prologue should the first + assembly instruction of the first source line. + + * values.c (value_from_longest): Put in D10V call to + fix up address pointers. + + * config/d10v/tm-d10v.h (REGISTER_VIRTUAL_SIZE): Modified. + (REGISTER_VIRTUAL_TYPE): Modified for PC_REGNUM and SP_REGNUM. + (REGISTER_CONVERTIBLE): Make PC and SP convertible. + (REGISTER_CONVERT_TO_VIRTUAL): Define. + (REGISTER_CONVERT_TO_RAW): Define. + (D10V_MAKE_DADDR): Define. + (D10V_MAKE_IADDR): Define. +end-sanitize-d10v Wed Nov 20 16:15:15 1996 Geoffrey Noer * config/i386/cygwin32.mh: add MMALLOC_CFLAGS = -I$(MMALLOC_SRC) diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c index 7920c4fdfb8..3ac0572ef24 100644 --- a/gdb/d10v-tdep.c +++ b/gdb/d10v-tdep.c @@ -123,7 +123,18 @@ d10v_skip_prologue (pc) { unsigned long op; unsigned short op1, op2; + CORE_ADDR func_addr, func_end; + struct symtab_and_line sal; + /* If we have line debugging information, then the end of the */ + /* prologue should the first assembly instruction of the first source line */ + if (find_pc_partial_function (pc, NULL, &func_addr, &func_end)) + { + sal = find_pc_line (func_addr, 0); + if (sal.end < func_end) + return sal.end; + } + if (target_read_memory (pc, (char *)&op, 4)) return pc; /* Can't access it -- assume no prologue. */ diff --git a/gdb/values.c b/gdb/values.c index 3f9e7bbb808..404485dacff 100644 --- a/gdb/values.c +++ b/gdb/values.c @@ -1259,6 +1259,14 @@ value_from_longest (type, num) case TYPE_CODE_PTR: /* This assumes that all pointers of a given length have the same form. */ + +/* start-sanitize-d10v */ +#ifdef GDB_TARGET_IS_D10V + /* D10V function pointers need adjusted */ + if (TYPE_TARGET_TYPE(type) && TYPE_CODE(TYPE_TARGET_TYPE(type)) == TYPE_CODE_FUNC) + num = D10V_MAKE_IADDR (num); +#endif +/* end-sanitize-d10v */ store_address (VALUE_CONTENTS_RAW (val), len, (CORE_ADDR) num); break; -- 2.30.2