aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gdb')
-rw-r--r--gdb/.Sanitize27
-rw-r--r--gdb/ChangeLog-9629
-rw-r--r--gdb/configure.tgt2
-rw-r--r--gdb/valops.c63
4 files changed, 41 insertions, 80 deletions
diff --git a/gdb/.Sanitize b/gdb/.Sanitize
index faea153..8f5c04e 100644
--- a/gdb/.Sanitize
+++ b/gdb/.Sanitize
@@ -521,33 +521,6 @@ else
done
fi
-if ( echo $* | grep keep\-d10v > /dev/null ) ; then
- for i in * ; do
- if test ! -d $i && (grep sanitize-d10v $i > /dev/null) ; then
- if [ -n "${verbose}" ] ; then
- echo Keeping d10v stuff in $i
- fi
- fi
- done
-else
- for i in * ; do
- if test ! -d $i && (grep sanitize-d10v $i > /dev/null) ; then
- if [ -n "${verbose}" ] ; then
- echo Removing traces of \"d10v\" from $i...
- fi
- cp $i new
- sed '/start\-sanitize\-d10v/,/end-\sanitize\-d10v/d' < $i > new
- if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
- if [ -n "${verbose}" ] ; then
- echo Caching $i in .Recover...
- fi
- mv $i .Recover
- fi
- mv new $i
- fi
- done
-fi
-
if ( echo $* | grep keep\-gm > /dev/null ) ; then
for i in * ; do
if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
diff --git a/gdb/ChangeLog-96 b/gdb/ChangeLog-96
index 9134242..e8c1204 100644
--- a/gdb/ChangeLog-96
+++ b/gdb/ChangeLog-96
@@ -90,13 +90,11 @@ Mon Dec 23 02:25:58 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
to reflect the fact that we are now using an AT_ENTRY_POINT
call dummy.
-start-sanitize-d10v
Sun Dec 22 15:52:25 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* d10v-tdep.c (d10v_skip_prologue): PR11287. Fix problem where
some breakpoints weren't being set.
-end-sanitize-d10v
Sat Dec 21 12:57:59 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
* config/mips/tm-mips.h (PC_IN_CALL_DUMMY): Removed, the default
@@ -244,14 +242,12 @@ Sun Dec 8 00:36:31 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
(xfer_link_map_member): Work around problem with alignments
in struct obj when compiling GDB under N32 ABI.
-start-sanitize-d10v
Thu Dec 5 23:30:44 1996 Stan Shebs <shebs@andros.cygnus.com>
* d10v-tdep.c: Add support for examination and interpretation
of instruction trace buffer.
(trace, untrace, info trace, tdisassemble): New commands.
-end-sanitize-d10v
Thu Dec 5 14:06:23 1996 Doug Evans <dje@canuck.cygnus.com>
* config/sparc/tm-sparclet.h (TARGET_BYTE_ORDER): Undef.
@@ -562,7 +558,6 @@ Mon Nov 25 13:17:16 1996 Fred Fish <fnf@ninemoons.com>
From: Paul Eggert <eggert@twinsun.com>
* remote-bug.c (wait_strings): Avoid creating a trigraph.
-start-sanitize-d10v
Fri Nov 22 15:55:22 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* valops.c (value_at, value_fetch_lazy): Put in D10V call
@@ -570,7 +565,6 @@ Fri Nov 22 15:55:22 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* values.c (value_from_longest): Removed previous d10v changes.
* config/d10v/tm-d10v.h (TARGET_PTR_BIT): Change to 4 bytes.
-end-sanitize-d10v
Fri Nov 22 10:06:19 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
* config/i386/nm-i386v4.h (LOSING_POLL): Define, needed for
@@ -593,7 +587,6 @@ Wed Nov 20 19:09:16 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
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.
@@ -608,7 +601,7 @@ start-sanitize-d10v
(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 <noer@cygnus.com>
* config/i386/cygwin32.mh: add MMALLOC_CFLAGS = -I$(MMALLOC_SRC)
@@ -667,10 +660,8 @@ Thu Nov 14 15:54:20 1996 Michael Meissner <meissner@tiktok.cygnus.com>
instead of doing addr>>32 to eliminate a warning produced by GCC
on 32-bit systems.
-start-sanitize-d10v
* config/d10v/tm-d10v.h (ULONGEST): Define.
-end-sanitize-d10v
Tue Nov 12 12:25:27 1996 Jim Wilson <wilson@cygnus.com>
* c-typeprint.c (cp_type_print_method_args): Pass -1 for show in
@@ -768,14 +759,12 @@ Fri Nov 8 12:29:51 1996 Stan Shebs <shebs@andros.cygnus.com>
* remote-sim.c (simulator_command): Set up callbacks before
entering the simulator.
-start-sanitize-d10v
Thu Nov 7 15:19:08 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* d10v-tdep.c: Fix some problems with inferior function calls.
* config/d10v/tm-d10v.h (EXTRA_FRAME_INFO): Change dummy to be
a pointer to the dummy's stack instead of just a flag.
-end-sanitize-d10v
start-sanitize-m32r
Tue Nov 5 10:21:02 1996 Michael Snyder <msnyder@cleaver.cygnus.com>
@@ -808,14 +797,12 @@ Sat Nov 2 03:54:13 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
for shared libraries from the minimal symbol table of the main
executable first.
-start-sanitize-d10v
Fri Nov 1 13:59:28 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* d10v-tdep.c, config/d10v/tm-d10v.h: Major fixes to support
inferior function calls and proper stack backtracing on D10V-EVA
board.
-end-sanitize-d10v
Fri Nov 1 10:50:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
* config/powerpc/linux.mh (NATDEPFILES): Fix up things so that it
@@ -859,7 +846,6 @@ Tue Oct 29 14:59:20 1996 Stan Shebs <shebs@andros.cygnus.com>
* TODO: Add item suggesting an "info bfd" command.
-start-sanitize-d10v
Tue Oct 29 12:48:04 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* d10v-tdep.c: Snapshot that supports D10V-EVA board.
@@ -867,7 +853,6 @@ Tue Oct 29 12:48:04 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/d10v/tm-d10v.h (REGISTER_NAMES): Add imap0,imap1,dmap.
(TARGET_READ_FP,TARGET_WRITE_FP): Define.
-end-sanitize-d10v
Mon Oct 28 17:34:24 1996 Stu Grossman (grossman@critters.cygnus.com)
* mswin/genmakes mswin/recordit: New scripts to generate make
@@ -939,13 +924,11 @@ Tue Oct 22 16:28:20 1996 Stu Grossman (grossman@critters.cygnus.com)
* (v850_frame_chain): Use new calling convention for scan_prologue.
end-sanitize-v850
-start-sanitize-d10v
Tue Oct 22 10:25:29 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* d10v-tdep.c, config/d10v/tm-d10v.h: Changes to allow stack
backtraces and inferior function calls.
-end-sanitize-d10v
Tue Oct 22 10:32:46 1996 Stan Shebs <shebs@andros.cygnus.com>
* mpw-make.sed: Update init.c editing to work with Oct 8 change.
@@ -1252,13 +1235,11 @@ start-sanitize-gdbtk
15 seconds to 30 seconds.
end-sanitize-gdbtk
-start-sanitize-d10v
Fri Sep 27 13:32:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
* config/d10v/tm-d10v.h (TARGET_{INT,PTR}_BIT): Define.
(TARGET_{,LONG_}DOUBLE_BIT): Ditto.
-end-sanitize-d10v
Thu Sep 26 23:10:26 1996 Mark Alexander <marka@cygnus.com>
* configure.in, config/i386/tm-linux.h: Fix configure
@@ -1271,14 +1252,12 @@ Wed Sep 25 18:31:33 1996 Stan Shebs <shebs@andros.cygnus.com>
* config/m68k/monitor.mt (TDEPFILES): Add it.
* NEWS: Mention it.
-start-sanitize-d10v
Mon Sep 23 16:13:50 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/d10v/tm-d10v.h (SAVED_PC_AFTER_CALL): Fixed.
Now single-steps correctly.
* d10v-tdep.c (d10v_pop_frame): Fixed.
-end-sanitize-d10v
Fri Sep 20 16:10:58 1996 Stan Shebs <shebs@andros.cygnus.com>
* config/sh/tm-sh.h (REGISTER_NAMES): Move fp registers to
@@ -1289,7 +1268,6 @@ Fri Sep 20 16:10:58 1996 Stan Shebs <shebs@andros.cygnus.com>
Rearrange to match REGISTER_NAMES.
* sh3-rom.c (sh3_regnames, sh3e_regnames): Ditto.
-start-sanitize-d10v
Thu Sep 19 16:19:01 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* d10v-tdep.c: Stack chain should work now.
@@ -1298,7 +1276,6 @@ Tue Sep 17 18:46:57 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* d10v-tdep.c, config/d10v/tm-d10v.h: Snapshot.
-end-sanitize-d10v
Tue Sep 17 12:20:50 1996 Ian Lance Taylor <ian@cygnus.com>
* configure.in: Add cases for MIPS 5000 like MIPS 4300.
@@ -1498,7 +1475,6 @@ Tue Aug 27 04:25:08 1996 Geoffrey Noer <noer@cygnus.com>
to before the first.
* configure: regenerated
-start-sanitize-d10v
Mon Aug 26 18:36:54 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/d10v/d10v.mt: New file.
@@ -1506,7 +1482,6 @@ Mon Aug 26 18:36:54 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* configure.in: New target D10V.
* d10v-tdep.c: New file.
-end-sanitize-d10v
Sun Aug 25 00:09:47 1996 Fred Fish <fnf@rtl.cygnus.com>
* rs6000-tdep.c: Fix typo in comment.
@@ -5552,7 +5527,7 @@ Tue Jan 2 13:41:14 1996 Stan Shebs <shebs@andros.cygnus.com>
For older changes see ChangeLog-95
Local Variables:
-mode: indented-text
+mode: change-log
left-margin: 8
fill-column: 74
version-control: never
diff --git a/gdb/configure.tgt b/gdb/configure.tgt
index f596678..6bdffbe 100644
--- a/gdb/configure.tgt
+++ b/gdb/configure.tgt
@@ -54,9 +54,7 @@ arm-*-*) gdb_target=arm ;;
c1-*-*) gdb_target=convex ;;
c2-*-*) gdb_target=convex ;;
-# start-sanitize-d10v
d10v-*-*) gdb_target=d10v ;;
-# end-sanitize-d10v
h8300-*-*) gdb_target=h8300 ;;
h8500-*-*) gdb_target=h8500 ;;
diff --git a/gdb/valops.c b/gdb/valops.c
index fc98c95..f902304 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -45,7 +45,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
static int typecmp PARAMS ((int staticp, struct type *t1[], value_ptr t2[]));
+#ifdef CALL_DUMMY
static CORE_ADDR find_function_addr PARAMS ((value_ptr, struct type **));
+static value_ptr value_arg_coerce PARAMS ((value_ptr, struct type *));
+#endif
+
#ifndef PUSH_ARGUMENTS
static CORE_ADDR value_push PARAMS ((CORE_ADDR, value_ptr));
@@ -64,8 +68,6 @@ static CORE_ADDR allocate_space_in_inferior PARAMS ((int));
static value_ptr cast_into_complex PARAMS ((struct type *, value_ptr));
-static value_ptr value_arg_coerce PARAMS ((value_ptr, struct type *));
-
#define VALUE_SUBSTRING_START(VAL) VALUE_FRAME(VAL)
/* Flag for whether we want to abandon failed expression evals by default. */
@@ -178,7 +180,7 @@ value_cast (type, arg2)
low_bound = 0, high_bound = 0;
new_length = val_length / element_length;
if (val_length % element_length != 0)
- warning("array element type size does not divide object size in cast");
+ warning("array element type size does not divide object size in cast");
/* FIXME-type-allocation: need a way to free this type when we are
done with it. */
range_type = create_range_type ((struct type *) NULL,
@@ -303,7 +305,8 @@ value_cast (type, arg2)
}
else if (VALUE_LVAL (arg2) == lval_memory)
{
- return value_at_lazy (type, VALUE_ADDRESS (arg2) + VALUE_OFFSET (arg2));
+ return value_at_lazy (type, VALUE_ADDRESS (arg2) + VALUE_OFFSET (arg2),
+ VALUE_BFD_SECTION (arg2));
}
else if (code1 == TYPE_CODE_VOID)
{
@@ -341,9 +344,10 @@ value_zero (type, lv)
the contents are actually required. */
value_ptr
-value_at (type, addr)
+value_at (type, addr, sect)
struct type *type;
CORE_ADDR addr;
+ asection *sect;
{
register value_ptr val;
@@ -352,7 +356,6 @@ value_at (type, addr)
val = allocate_value (type);
-/* start-sanitize-d10v */
#ifdef GDB_TARGET_IS_D10V
if (TYPE_TARGET_TYPE(type) && TYPE_CODE(TYPE_TARGET_TYPE(type)) == TYPE_CODE_FUNC)
{
@@ -364,12 +367,12 @@ value_at (type, addr)
}
else
#endif
-/* end-sanitize-d10v */
- read_memory (addr, VALUE_CONTENTS_RAW (val), TYPE_LENGTH (type));
+ read_memory_section (addr, VALUE_CONTENTS_RAW (val), TYPE_LENGTH (type), sect);
VALUE_LVAL (val) = lval_memory;
VALUE_ADDRESS (val) = addr;
+ VALUE_BFD_SECTION (val) = sect;
return val;
}
@@ -377,9 +380,10 @@ value_at (type, addr)
/* Return a lazy value with type TYPE located at ADDR (cf. value_at). */
value_ptr
-value_at_lazy (type, addr)
+value_at_lazy (type, addr, sect)
struct type *type;
CORE_ADDR addr;
+ asection *sect;
{
register value_ptr val;
@@ -391,6 +395,7 @@ value_at_lazy (type, addr)
VALUE_LVAL (val) = lval_memory;
VALUE_ADDRESS (val) = addr;
VALUE_LAZY (val) = 1;
+ VALUE_BFD_SECTION (val) = sect;
return val;
}
@@ -414,7 +419,6 @@ value_fetch_lazy (val)
CORE_ADDR addr = VALUE_ADDRESS (val) + VALUE_OFFSET (val);
int length = TYPE_LENGTH (VALUE_TYPE (val));
-/* start-sanitize-d10v */
#ifdef GDB_TARGET_IS_D10V
struct type *type = VALUE_TYPE(val);
if (TYPE_TARGET_TYPE(type) && TYPE_CODE(TYPE_TARGET_TYPE(type)) == TYPE_CODE_FUNC)
@@ -427,10 +431,10 @@ value_fetch_lazy (val)
}
else
#endif
-/* end-sanitize-d10v */
if (length)
- read_memory (addr, VALUE_CONTENTS_RAW (val), length);
+ read_memory_section (addr, VALUE_CONTENTS_RAW (val), length,
+ VALUE_BFD_SECTION (val));
VALUE_LAZY (val) = 0;
return 0;
}
@@ -710,7 +714,7 @@ value_of_variable (var, b)
struct block *b;
{
value_ptr val;
- struct frame_info *frame;
+ struct frame_info *frame = NULL;
if (!b)
frame = NULL; /* Use selected frame. */
@@ -776,12 +780,15 @@ value_ptr
value_coerce_function (arg1)
value_ptr arg1;
{
+ value_ptr retval;
if (VALUE_LVAL (arg1) != lval_memory)
error ("Attempt to take address of value not located in memory.");
- return value_from_longest (lookup_pointer_type (VALUE_TYPE (arg1)),
- (LONGEST) (VALUE_ADDRESS (arg1) + VALUE_OFFSET (arg1)));
+ retval = value_from_longest (lookup_pointer_type (VALUE_TYPE (arg1)),
+ (LONGEST) (VALUE_ADDRESS (arg1) + VALUE_OFFSET (arg1)));
+ VALUE_BFD_SECTION (retval) = VALUE_BFD_SECTION (arg1);
+ return retval;
}
/* Return a pointer value for the object for which ARG1 is the contents. */
@@ -790,6 +797,8 @@ value_ptr
value_addr (arg1)
value_ptr arg1;
{
+ value_ptr retval;
+
struct type *type = check_typedef (VALUE_TYPE (arg1));
if (TYPE_CODE (type) == TYPE_CODE_REF)
{
@@ -806,8 +815,10 @@ value_addr (arg1)
if (VALUE_LVAL (arg1) != lval_memory)
error ("Attempt to take address of value not located in memory.");
- return value_from_longest (lookup_pointer_type (VALUE_TYPE (arg1)),
- (LONGEST) (VALUE_ADDRESS (arg1) + VALUE_OFFSET (arg1)));
+ retval = value_from_longest (lookup_pointer_type (VALUE_TYPE (arg1)),
+ (LONGEST) (VALUE_ADDRESS (arg1) + VALUE_OFFSET (arg1)));
+ VALUE_BFD_SECTION (retval) = VALUE_BFD_SECTION (arg1);
+ return retval;
}
/* Given a value of a pointer type, apply the C unary * operator to it. */
@@ -829,9 +840,11 @@ value_ind (arg1)
BUILTIN_TYPE_LONGEST would seem to be a mistake. */
if (TYPE_CODE (type1) == TYPE_CODE_INT)
return value_at (builtin_type_int,
- (CORE_ADDR) value_as_long (arg1));
+ (CORE_ADDR) value_as_long (arg1),
+ VALUE_BFD_SECTION (arg1));
else if (TYPE_CODE (type1) == TYPE_CODE_PTR)
- return value_at_lazy (TYPE_TARGET_TYPE (type1), value_as_pointer (arg1));
+ return value_at_lazy (TYPE_TARGET_TYPE (type1), value_as_pointer (arg1),
+ VALUE_BFD_SECTION (arg1));
error ("Attempt to take contents of a non-pointer value.");
return 0; /* For lint -- never reached */
}
@@ -903,6 +916,7 @@ value_push (sp, arg)
#endif /* !PUSH_ARGUMENTS */
+#ifdef CALL_DUMMY
/* Perform the standard coercions that are specified
for arguments to be passed to C functions.
@@ -1030,7 +1044,6 @@ find_function_addr (function, retval_type)
return funaddr;
}
-#if defined (CALL_DUMMY)
/* All this stuff with a dummy frame may seem unnecessarily complicated
(why not just save registers in GDB?). The purpose of pushing a dummy
frame which looks just like a real frame is so that if you call a
@@ -1466,6 +1479,7 @@ value_array (lowbound, highbound, elemvec)
VALUE_CONTENTS (elemvec[idx]),
typelength);
}
+ VALUE_BFD_SECTION (val) = VALUE_BFD_SECTION (elemvec[0]);
return val;
}
@@ -1483,7 +1497,7 @@ value_array (lowbound, highbound, elemvec)
/* Create the array type and set up an array value to be evaluated lazily. */
- val = value_at_lazy (arraytype, addr);
+ val = value_at_lazy (arraytype, addr, VALUE_BFD_SECTION (elemvec[0]));
return (val);
}
@@ -1523,7 +1537,7 @@ value_string (ptr, len)
addr = allocate_space_in_inferior (len);
write_memory (addr, ptr, len);
- val = value_at_lazy (stringtype, addr);
+ val = value_at_lazy (stringtype, addr, NULL);
return (val);
}
@@ -1648,7 +1662,7 @@ search_struct_field (name, arg1, offset, type, looking_for_baseclass)
error ("Internal error: could not find physical static variable named %s",
phys_name);
v = value_at (TYPE_FIELD_TYPE (type, i),
- SYMBOL_VALUE_ADDRESS (sym));
+ SYMBOL_VALUE_ADDRESS (sym), SYMBOL_BFD_SECTION (sym));
}
else
v = value_primitive_field (arg1, offset, i, type);
@@ -2104,7 +2118,8 @@ value_struct_elt_for_reference (domain, offset, curtype, name, intype)
error ("Internal error: could not find physical static variable named %s",
phys_name);
return value_at (SYMBOL_TYPE (sym),
- SYMBOL_VALUE_ADDRESS (sym));
+ SYMBOL_VALUE_ADDRESS (sym),
+ SYMBOL_BFD_SECTION (sym));
}
if (TYPE_FIELD_PACKED (t, i))
error ("pointers to bitfield members not allowed");