From 30d20d15456466459d4ec80a14667bff20fb5338 Mon Sep 17 00:00:00 2001 From: Peter Schauer Date: Fri, 17 Sep 1993 11:46:50 +0000 Subject: [PATCH] * findvar.c (extract_signed_integer): Cast *p to LONGEST before doing the xor and subtract. Otherwise it will not sign extend if the type of LONGEST is larger than int. * cp-valprint.c (cp_print_class_method): Inhibit core dump if domain is an undefined cross reference. * valops.c (call_function_by_hand): Set real_pc to correct --- gdb/ChangeLog | 10 ++++++++++ gdb/cp-valprint.c | 6 ++++++ gdb/valops.c | 10 +++++----- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3dff28e8b51..f9cdb275f27 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,13 @@ +Fri Sep 17 04:41:17 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) + + * findvar.c (extract_signed_integer): Cast *p to LONGEST before doing + the xor and subtract. Otherwise it will not sign extend if the type + of LONGEST is larger than int. + * cp-valprint.c (cp_print_class_method): Inhibit core dump if + domain is an undefined cross reference. + * valops.c (call_function_by_hand): Set real_pc to correct + value if CALL_DUMMY_LOCATION != ON_STACK. + Thu Sep 16 20:37:06 1993 Jim Kingdon (kingdon@cirdan.cygnus.com) * config/a29k/tm-a29k.h (FRAME_CHAIN): If rsize is zero, return zero. diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c index f5cb15e29c4..a3a5c585927 100644 --- a/gdb/cp-valprint.c +++ b/gdb/cp-valprint.c @@ -78,7 +78,13 @@ cp_print_class_method (valaddr, type, stream) unsigned len; unsigned int i; + check_stub_type (TYPE_TARGET_TYPE (type)); domain = TYPE_DOMAIN_TYPE (TYPE_TARGET_TYPE (type)); + if (domain == (struct type *)NULL) + { + fprintf_filtered (stream, ""); + return; + } addr = unpack_pointer (lookup_pointer_type (builtin_type_void), valaddr); if (METHOD_PTR_IS_VIRTUAL (addr)) { diff --git a/gdb/valops.c b/gdb/valops.c index fa75ea6f4bd..02ab2ed5c9c 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -910,16 +910,16 @@ call_function_by_hand (function, nargs, args) error ("text segment full -- no place to put call"); checked = 1; sp = old_sp; - start_sp = text_end - sizeof dummy; - write_memory (start_sp, (char *)dummy1, sizeof dummy); + real_pc = text_end - sizeof dummy; + write_memory (real_pc, (char *)dummy1, sizeof dummy); } #else /* After text_end. */ { extern CORE_ADDR text_end; int errcode; sp = old_sp; - start_sp = text_end; - errcode = target_write_memory (start_sp, (char *)dummy1, sizeof dummy); + real_pc = text_end; + errcode = target_write_memory (real_pc, (char *)dummy1, sizeof dummy); if (errcode != 0) error ("Cannot write text segment -- call_function failed"); } @@ -1072,7 +1072,7 @@ call_function_by_hand (function, nargs, args) wrong things (like set stop_bpstat to the wrong thing). */ discard_cleanups (old_chain); /* Prevent memory leak. */ - bpstat_clear (inf_status.stop_bpstat); + bpstat_clear (&inf_status.stop_bpstat); /* The following error message used to say "The expression which contained the function call has been discarded." It -- 2.30.2