projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* Makefile.in (CC-LD): Rename to CC_LD, so MPW xform works.
[deliverable/binutils-gdb.git]
/
gdb
/
dwarfread.c
diff --git
a/gdb/dwarfread.c
b/gdb/dwarfread.c
index 8c13087095f1b032e8c287a19584cbec01ccd0e4..bd92ad15be4a2533fc2bc8ea7ea550b0bd9e73ab 100644
(file)
--- a/
gdb/dwarfread.c
+++ b/
gdb/dwarfread.c
@@
-1,5
+1,5
@@
/* DWARF debugging format support for GDB.
/* DWARF debugging format support for GDB.
- Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1992, 1993, 1994
, 1995
Free Software Foundation, Inc.
Written by Fred Fish at Cygnus Support. Portions based on dbxread.c,
mipsread.c, coffread.c, and dwarfread.c from a Data General SVR4 gdb port.
Written by Fred Fish at Cygnus Support. Portions based on dbxread.c,
mipsread.c, coffread.c, and dwarfread.c from a Data General SVR4 gdb port.
@@
-17,7
+17,7
@@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc.,
675 Mass Ave, Cambridge, MA 02139
, USA. */
+Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307
, USA. */
/*
/*
@@
-51,17
+51,12
@@
other things to work on, if you get bored. :-)
#include "complaints.h"
#include <fcntl.h>
#include "complaints.h"
#include <fcntl.h>
-#include
<string.h>
+#include
"gdb_string.h"
#ifndef NO_SYS_FILE
#include <sys/file.h>
#endif
#ifndef NO_SYS_FILE
#include <sys/file.h>
#endif
-/* FIXME -- convert this to SEEK_SET a la POSIX, move to config files. */
-#ifndef L_SET
-#define L_SET 0
-#endif
-
/* Some macros to provide DIE info for complaints. */
#define DIE_ID (curdie!=NULL ? curdie->die_ref : 0)
/* Some macros to provide DIE info for complaints. */
#define DIE_ID (curdie!=NULL ? curdie->die_ref : 0)
@@
-327,6
+322,7
@@
static int dbsize; /* Size of dwarf info in bytes */
static int dbroff; /* Relative offset from start of .debug section */
static char *lnbase; /* Base pointer to line section */
static int isreg; /* Kludge to identify register variables */
static int dbroff; /* Relative offset from start of .debug section */
static char *lnbase; /* Base pointer to line section */
static int isreg; /* Kludge to identify register variables */
+static int optimized_out; /* Kludge to identify optimized out variables */
/* Kludge to identify basereg references. Nonzero if we have an offset
relative to a basereg. */
static int offreg;
/* Kludge to identify basereg references. Nonzero if we have an offset
relative to a basereg. */
static int offreg;
@@
-730,7
+726,7
@@
dwarf_build_psymtabs (objfile, section_offsets, mainline, dbfoff, dbfsize,
dbsize = dbfsize;
dbbase = xmalloc (dbsize);
dbroff = 0;
dbsize = dbfsize;
dbbase = xmalloc (dbsize);
dbroff = 0;
- if ((bfd_seek (abfd, dbfoff,
L
_SET) != 0) ||
+ if ((bfd_seek (abfd, dbfoff,
SEEK
_SET) != 0) ||
(bfd_read (dbbase, dbsize, 1, abfd) != dbsize))
{
free (dbbase);
(bfd_read (dbbase, dbsize, 1, abfd) != dbsize))
{
free (dbbase);
@@
-2151,6
+2147,9
@@
DESCRIPTION
Given pointer to a string of bytes that define a location, compute
the location and return the value.
Given pointer to a string of bytes that define a location, compute
the location and return the value.
+ A location description containing no atoms indicates that the
+ object is optimized out. The global optimized_out flag is set for
+ those, the return value is meaningless.
When computing values involving the current value of the frame pointer,
the value zero is used, which results in a value relative to the frame
When computing values involving the current value of the frame pointer,
the value zero is used, which results in a value relative to the frame
@@
-2189,9
+2188,11
@@
locval (loc)
stack[stacki] = 0;
isreg = 0;
offreg = 0;
stack[stacki] = 0;
isreg = 0;
offreg = 0;
+ optimized_out = 1;
loc_value_size = TARGET_FT_LONG_SIZE (current_objfile);
while (loc < end)
{
loc_value_size = TARGET_FT_LONG_SIZE (current_objfile);
while (loc < end)
{
+ optimized_out = 0;
loc_atom_code = target_to_host (loc, SIZEOF_LOC_ATOM_CODE, GET_UNSIGNED,
current_objfile);
loc += SIZEOF_LOC_ATOM_CODE;
loc_atom_code = target_to_host (loc, SIZEOF_LOC_ATOM_CODE, GET_UNSIGNED,
current_objfile);
loc += SIZEOF_LOC_ATOM_CODE;
@@
-2290,7
+2291,7
@@
read_ofile_symtab (pst)
foffset = DBFOFF(pst) + dbroff;
base_section_offsets = pst->section_offsets;
baseaddr = ANOFFSET (pst->section_offsets, 0);
foffset = DBFOFF(pst) + dbroff;
base_section_offsets = pst->section_offsets;
baseaddr = ANOFFSET (pst->section_offsets, 0);
- if (bfd_seek (abfd, foffset,
L
_SET) ||
+ if (bfd_seek (abfd, foffset,
SEEK
_SET) ||
(bfd_read (dbbase, dbsize, 1, abfd) != dbsize))
{
free (dbbase);
(bfd_read (dbbase, dbsize, 1, abfd) != dbsize))
{
free (dbbase);
@@
-2306,7
+2307,7
@@
read_ofile_symtab (pst)
lnbase = NULL;
if (LNFOFF (pst))
{
lnbase = NULL;
if (LNFOFF (pst))
{
- if (bfd_seek (abfd, LNFOFF (pst),
L
_SET) ||
+ if (bfd_seek (abfd, LNFOFF (pst),
SEEK
_SET) ||
(bfd_read ((PTR) lnsizedata, sizeof (lnsizedata), 1, abfd) !=
sizeof (lnsizedata)))
{
(bfd_read ((PTR) lnsizedata, sizeof (lnsizedata), 1, abfd) !=
sizeof (lnsizedata)))
{
@@
-2315,7
+2316,7
@@
read_ofile_symtab (pst)
lnsize = target_to_host (lnsizedata, SIZEOF_LINETBL_LENGTH,
GET_UNSIGNED, pst -> objfile);
lnbase = xmalloc (lnsize);
lnsize = target_to_host (lnsizedata, SIZEOF_LINETBL_LENGTH,
GET_UNSIGNED, pst -> objfile);
lnbase = xmalloc (lnsize);
- if (bfd_seek (abfd, LNFOFF (pst),
L
_SET) ||
+ if (bfd_seek (abfd, LNFOFF (pst),
SEEK
_SET) ||
(bfd_read (lnbase, lnsize, 1, abfd) != lnsize))
{
free (lnbase);
(bfd_read (lnbase, lnsize, 1, abfd) != lnsize))
{
free (lnbase);
@@
-2934,7
+2935,11
@@
new_symbol (dip, objfile)
{
SYMBOL_VALUE (sym) = locval (dip -> at_location);
add_symbol_to_list (sym, list_in_scope);
{
SYMBOL_VALUE (sym) = locval (dip -> at_location);
add_symbol_to_list (sym, list_in_scope);
- if (isreg)
+ if (optimized_out)
+ {
+ SYMBOL_CLASS (sym) = LOC_OPTIMIZED_OUT;
+ }
+ else if (isreg)
{
SYMBOL_CLASS (sym) = LOC_REGISTER;
}
{
SYMBOL_CLASS (sym) = LOC_REGISTER;
}
This page took
0.024252 seconds
and
4
git commands to generate.