projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* h8300s now new target, not alias of h8300h
[deliverable/binutils-gdb.git]
/
gdb
/
dwarfread.c
diff --git
a/gdb/dwarfread.c
b/gdb/dwarfread.c
index 70557173be9d87c042035d508b800eccd99af497..dc72f87661d2b2d72989e709b1c8cfa5d8a375ba 100644
(file)
--- a/
gdb/dwarfread.c
+++ b/
gdb/dwarfread.c
@@
-1,5
+1,6
@@
/* DWARF debugging format support for GDB.
/* DWARF debugging format support for GDB.
- Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1998
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ 2001, 2002
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.
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.
@@
-238,11
+239,6
@@
typedef unsigned int DIE_REF; /* Reference to a DIE */
#define AT_short_element_list (0x00f0|FORM_BLOCK2)
#define AT_short_element_list (0x00f0|FORM_BLOCK2)
-/* External variables referenced. */
-
-extern int info_verbose; /* From main.c; nonzero => verbose */
-extern char *warning_pre_print; /* From utils.c */
-
/* The DWARF debugging information consists of two major pieces,
one is a block of DWARF Information Entries (DIE's) and the other
is a line number table. The "struct dieinfo" structure contains
/* The DWARF debugging information consists of two major pieces,
one is a block of DWARF Information Entries (DIE's) and the other
is a line number table. The "struct dieinfo" structure contains
@@
-694,7
+690,7
@@
dwarf_build_psymtabs (struct objfile *objfile, int mainline, file_ptr dbfoff,
dbbase = xmalloc (dbsize);
dbroff = 0;
if ((bfd_seek (abfd, dbfoff, SEEK_SET) != 0) ||
dbbase = xmalloc (dbsize);
dbroff = 0;
if ((bfd_seek (abfd, dbfoff, SEEK_SET) != 0) ||
- (bfd_
read (dbbase, dbsize, 1
, abfd) != dbsize))
+ (bfd_
bread (dbbase, dbsize
, abfd) != dbsize))
{
xfree (dbbase);
error ("can't read DWARF data from '%s'", bfd_get_filename (abfd));
{
xfree (dbbase);
error ("can't read DWARF data from '%s'", bfd_get_filename (abfd));
@@
-705,8
+701,9
@@
dwarf_build_psymtabs (struct objfile *objfile, int mainline, file_ptr dbfoff,
Since we have no idea how many DIES we are looking at, we just guess
some arbitrary value. */
Since we have no idea how many DIES we are looking at, we just guess
some arbitrary value. */
- if (mainline || objfile->global_psymbols.size == 0 ||
- objfile->static_psymbols.size == 0)
+ if (mainline
+ || (objfile->global_psymbols.size == 0
+ && objfile->static_psymbols.size == 0))
{
init_psymbol_list (objfile, 1024);
}
{
init_psymbol_list (objfile, 1024);
}
@@
-1146,7
+1143,7
@@
read_structure_scope (struct dieinfo *dip, char *thisdie, char *enddie,
struct symbol *sym;
type = struct_type (dip, thisdie, enddie, objfile);
struct symbol *sym;
type = struct_type (dip, thisdie, enddie, objfile);
- if (!
(TYPE_FLAGS (type) & TYPE_FLAG_STUB
))
+ if (!
TYPE_STUB (type
))
{
sym = new_symbol (dip, objfile);
if (sym != NULL)
{
sym = new_symbol (dip, objfile);
if (sym != NULL)
@@
-1838,7
+1835,11
@@
handle_producer (char *producer)
{
if (STREQN (producer, GPLUS_PRODUCER, strlen (GPLUS_PRODUCER)))
{
{
if (STREQN (producer, GPLUS_PRODUCER, strlen (GPLUS_PRODUCER)))
{
+#if 0
+ /* For now, stay with AUTO_DEMANGLING for g++ output, as we don't
+ know whether it will use the old style or v3 mangling. */
set_demangling_style (GNU_DEMANGLING_STYLE_STRING);
set_demangling_style (GNU_DEMANGLING_STYLE_STRING);
+#endif
}
else if (STREQN (producer, LCC_PRODUCER, strlen (LCC_PRODUCER)))
{
}
else if (STREQN (producer, LCC_PRODUCER, strlen (LCC_PRODUCER)))
{
@@
-1951,11
+1952,9
@@
process_dies (char *thisdie, char *enddie, struct objfile *objfile)
{
nextdie = thisdie + di.die_length;
}
{
nextdie = thisdie + di.die_length;
}
-#ifdef SMASH_TEXT_ADDRESS
/* I think that these are always text, not data, addresses. */
/* I think that these are always text, not data, addresses. */
- SMASH_TEXT_ADDRESS (di.at_low_pc);
- SMASH_TEXT_ADDRESS (di.at_high_pc);
-#endif
+ di.at_low_pc = SMASH_TEXT_ADDRESS (di.at_low_pc);
+ di.at_high_pc = SMASH_TEXT_ADDRESS (di.at_high_pc);
switch (di.die_tag)
{
case TAG_compile_unit:
switch (di.die_tag)
{
case TAG_compile_unit:
@@
-2263,7
+2262,7
@@
read_ofile_symtab (struct partial_symtab *pst)
base_section_offsets = pst->section_offsets;
baseaddr = ANOFFSET (pst->section_offsets, 0);
if (bfd_seek (abfd, foffset, SEEK_SET) ||
base_section_offsets = pst->section_offsets;
baseaddr = ANOFFSET (pst->section_offsets, 0);
if (bfd_seek (abfd, foffset, SEEK_SET) ||
- (bfd_
read (dbbase, dbsize, 1
, abfd) != dbsize))
+ (bfd_
bread (dbbase, dbsize
, abfd) != dbsize))
{
xfree (dbbase);
error ("can't read DWARF data");
{
xfree (dbbase);
error ("can't read DWARF data");
@@
-2279,8
+2278,8
@@
read_ofile_symtab (struct partial_symtab *pst)
if (LNFOFF (pst))
{
if (bfd_seek (abfd, LNFOFF (pst), SEEK_SET) ||
if (LNFOFF (pst))
{
if (bfd_seek (abfd, LNFOFF (pst), SEEK_SET) ||
- (bfd_
read ((PTR) lnsizedata, sizeof (lnsizedata), 1, abfd) !=
- sizeof (lnsizedata)))
+ (bfd_
bread ((PTR) lnsizedata, sizeof (lnsizedata), abfd)
+
!=
sizeof (lnsizedata)))
{
error ("can't read DWARF line number table size");
}
{
error ("can't read DWARF line number table size");
}
@@
-2288,7
+2287,7
@@
read_ofile_symtab (struct partial_symtab *pst)
GET_UNSIGNED, pst->objfile);
lnbase = xmalloc (lnsize);
if (bfd_seek (abfd, LNFOFF (pst), SEEK_SET) ||
GET_UNSIGNED, pst->objfile);
lnbase = xmalloc (lnsize);
if (bfd_seek (abfd, LNFOFF (pst), SEEK_SET) ||
- (bfd_
read (lnbase, lnsize, 1
, abfd) != lnsize))
+ (bfd_
bread (lnbase, lnsize
, abfd) != lnsize))
{
xfree (lnbase);
error ("can't read DWARF line numbers");
{
xfree (lnbase);
error ("can't read DWARF line numbers");
This page took
0.024949 seconds
and
4
git commands to generate.