diff options
author | John Gilmore <gnu@cygnus> | 1991-11-21 18:42:05 +0000 |
---|---|---|
committer | John Gilmore <gnu@cygnus> | 1991-11-21 18:42:05 +0000 |
commit | 7d9884b92772d5b4fa0de57de5caca2d9308c16c (patch) | |
tree | 061a8482b03bad9fd11d08bec0cc8e14ad99b839 /gdb/findvar.c | |
parent | d51bea8d2c6f8392d6a981c7293aee126e5914d5 (diff) | |
download | gdb-7d9884b92772d5b4fa0de57de5caca2d9308c16c.zip gdb-7d9884b92772d5b4fa0de57de5caca2d9308c16c.tar.gz gdb-7d9884b92772d5b4fa0de57de5caca2d9308c16c.tar.bz2 |
* defs.h: Incorporate param.h. All users changed.
* param-no-tm.h: Change users to define TM_FILE_OVERRIDE instead.
* param.h, param-no-tm.h: Removed.
* Update copyrights in all changed files.
* dbxread.c, dwarfread.c, inflow.c, infrun.c, m2-exp.y, putenv.c,
solib.c, symtab.h, tm-umax.h, valprint.c: Lint.
* tm-convex.h, tm-hp300hpux.h, tm-merlin.h, tm-sparc.h,
xm-merlin.h: Avoid host include files in target descriptions.
* getpagesize.h: Removed, libiberty copes now.
Diffstat (limited to 'gdb/findvar.c')
-rw-r--r-- | gdb/findvar.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/gdb/findvar.c b/gdb/findvar.c index 58da6b6..b65853e 100644 --- a/gdb/findvar.c +++ b/gdb/findvar.c @@ -1,5 +1,5 @@ /* Find a variable's value in memory, for GDB, the GNU debugger. - Copyright (C) 1986, 1987, 1989 Free Software Foundation, Inc. + Copyright 1986, 1987, 1989, 1991 Free Software Foundation, Inc. This file is part of GDB. @@ -19,7 +19,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <stdio.h> #include "defs.h" -#include "param.h" #include "symtab.h" #include "frame.h" #include "value.h" @@ -399,7 +398,6 @@ read_var_value (var, frame) } case LOC_STATIC: - case LOC_EXTERNAL: addr = SYMBOL_VALUE_ADDRESS (var); break; @@ -646,7 +644,6 @@ locate_var_value (var, frame) { CORE_ADDR addr = 0; struct type *type = SYMBOL_TYPE (var); - struct type *result_type; value lazy_value; /* Evaluate it first; if the result is a memory address, we're fine. @@ -672,14 +669,7 @@ locate_var_value (var, frame) type = TYPE_TARGET_TYPE (type); } - /* Address of an array is of the type of address of it's elements. */ - /* FIXME, this is probably wrong now for ANSI C. */ - result_type = - lookup_pointer_type (TYPE_CODE (type) == TYPE_CODE_ARRAY ? - TYPE_TARGET_TYPE (type) : type); - - return value_cast (result_type, - value_from_long (builtin_type_long, (LONGEST) addr)); + return value_from_longest (lookup_pointer_type (type), (LONGEST) addr); } /* Not a memory address; check what the problem was. */ |