diff options
author | Jim Blandy <jimb@codesourcery.com> | 2000-02-18 22:15:46 +0000 |
---|---|---|
committer | Jim Blandy <jimb@codesourcery.com> | 2000-02-18 22:15:46 +0000 |
commit | 59527da01ed91d3e1b397499a5ecff7f58a0912b (patch) | |
tree | e3d497a26b66f40406c6d34eafefa71581d013df | |
parent | 8c8281f46f707b415184bd8bc1f23dcdf03fd37c (diff) | |
download | gdb-59527da01ed91d3e1b397499a5ecff7f58a0912b.zip gdb-59527da01ed91d3e1b397499a5ecff7f58a0912b.tar.gz gdb-59527da01ed91d3e1b397499a5ecff7f58a0912b.tar.bz2 |
* buildsym.h (add_free_pendings): Declare.
* buildsym.c (add_free_pendings): New function.
(make_blockvector): 32x64 fix using longest_local_hex_string().
(start_subfile): initialize variable 'subfile'.
-rw-r--r-- | gdb/buildsym.c | 29 | ||||
-rw-r--r-- | gdb/buildsym.h | 2 |
2 files changed, 21 insertions, 10 deletions
diff --git a/gdb/buildsym.c b/gdb/buildsym.c index 867a5db..27dad46 100644 --- a/gdb/buildsym.c +++ b/gdb/buildsym.c @@ -81,10 +81,24 @@ struct complaint innerblock_anon_complaint = {"inner block (0x%lx-0x%lx) not inside outer block (0x%lx-0x%lx)", 0, 0}; struct complaint blockvector_complaint = -{"block at 0x%lx out of order", 0, 0}; +{"block at %s out of order", 0, 0}; /* maintain the lists of symbols and blocks */ +/* Add a pending list to free_pendings. */ +void +add_free_pendings (struct pending *list) +{ + register struct pending *link = list; + + if (list) + { + while (link->next) link = link->next; + link->next = free_pendings; + free_pendings = list; + } +} + /* Add a symbol to one of the lists of symbols. */ void @@ -487,17 +501,11 @@ make_blockvector (struct objfile *objfile) if (BLOCK_START (BLOCKVECTOR_BLOCK (blockvector, i - 1)) > BLOCK_START (BLOCKVECTOR_BLOCK (blockvector, i))) { - - /* FIXME-32x64: loses if CORE_ADDR doesn't fit in a - long. Possible solutions include a version of - complain which takes a callback, a - sprintf_address_numeric to match - print_address_numeric, or a way to set up a UI_FILE - which causes sprintf rather than fprintf to be - called. */ + CORE_ADDR start + = BLOCK_START (BLOCKVECTOR_BLOCK (blockvector, i)); complain (&blockvector_complaint, - (unsigned long) BLOCK_START (BLOCKVECTOR_BLOCK (blockvector, i))); + longest_local_hex_string ((LONGEST) start)); } } } @@ -533,6 +541,7 @@ start_subfile (char *name, char *dirname) source file. */ subfile = (struct subfile *) xmalloc (sizeof (struct subfile)); + memset ((char *) subfile, 0, sizeof (struct subfile)); subfile->next = subfiles; subfiles = subfile; current_subfile = subfile; diff --git a/gdb/buildsym.h b/gdb/buildsym.h index a67d722..f9ef5f1 100644 --- a/gdb/buildsym.h +++ b/gdb/buildsym.h @@ -231,6 +231,8 @@ EXTERN int type_vector_length; #define INITIAL_TYPE_VECTOR_LENGTH 160 +extern void add_free_pendings (struct pending *list); + extern void add_symbol_to_list (struct symbol *symbol, struct pending **listhead); |