2002-10-02 Nathanael Nerode <neroden@gcc.gnu.org>
[binutils.git] / binutils / rdcoff.c
blob2091964e89b4cded8bf3eae37729389f2f2c0701
1 /* stabs.c -- Parse COFF debugging information
2 Copyright 1996, 2000 Free Software Foundation, Inc.
3 Written by Ian Lance Taylor <ian@cygnus.com>.
5 This file is part of GNU Binutils.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
20 02111-1307, USA. */
22 /* This file contains code which parses COFF debugging information. */
24 #include "bfd.h"
25 #include "coff/internal.h"
26 #include "bucomm.h"
27 #include "libiberty.h"
28 #include "debug.h"
29 #include "budbg.h"
31 /* FIXME: We should not need this BFD internal file. We need it for
32 the N_BTMASK, etc., values. */
33 #include "libcoff.h"
35 /* These macros extract the right mask and shifts for this BFD. They
36 assume that there is a local variable named ABFD. This is so that
37 macros like ISFCN and DECREF, from coff/internal.h, will work
38 without modification. */
39 #define N_BTMASK (coff_data (abfd)->local_n_btmask)
40 #define N_BTSHFT (coff_data (abfd)->local_n_btshft)
41 #define N_TMASK (coff_data (abfd)->local_n_tmask)
42 #define N_TSHIFT (coff_data (abfd)->local_n_tshift)
44 /* This structure is used to hold the symbols, as well as the current
45 location within the symbols. */
47 struct coff_symbols
49 /* The symbols. */
50 asymbol **syms;
51 /* The number of symbols. */
52 long symcount;
53 /* The index of the current symbol. */
54 long symno;
55 /* The index of the current symbol in the COFF symbol table (where
56 each auxent counts as a symbol). */
57 long coff_symno;
60 /* The largest basic type we are prepared to handle. */
62 #define T_MAX (T_LNGDBL)
64 /* This structure is used to hold slots. */
66 struct coff_slots
68 /* Next set of slots. */
69 struct coff_slots *next;
70 /* Slots. */
71 #define COFF_SLOTS (16)
72 debug_type slots[COFF_SLOTS];
75 /* This structure is used to map symbol indices to types. */
77 struct coff_types
79 /* Slots. */
80 struct coff_slots *slots;
81 /* Basic types. */
82 debug_type basic[T_MAX + 1];
85 static debug_type *coff_get_slot PARAMS ((struct coff_types *, int));
86 static debug_type parse_coff_type
87 PARAMS ((bfd *, struct coff_symbols *, struct coff_types *, long, int,
88 union internal_auxent *, boolean, PTR));
89 static debug_type parse_coff_base_type
90 PARAMS ((bfd *, struct coff_symbols *, struct coff_types *, long, int,
91 union internal_auxent *, PTR));
92 static debug_type parse_coff_struct_type
93 PARAMS ((bfd *, struct coff_symbols *, struct coff_types *, int,
94 union internal_auxent *, PTR));
95 static debug_type parse_coff_enum_type
96 PARAMS ((bfd *, struct coff_symbols *, struct coff_types *,
97 union internal_auxent *, PTR));
98 static boolean parse_coff_symbol
99 PARAMS ((bfd *, struct coff_types *, asymbol *, long,
100 struct internal_syment *, PTR, debug_type, boolean));
101 static boolean external_coff_symbol_p PARAMS ((int sym_class));
103 /* Return the slot for a type. */
105 static debug_type *
106 coff_get_slot (types, indx)
107 struct coff_types *types;
108 int indx;
110 struct coff_slots **pps;
112 pps = &types->slots;
114 while (indx >= COFF_SLOTS)
116 if (*pps == NULL)
118 *pps = (struct coff_slots *) xmalloc (sizeof **pps);
119 memset (*pps, 0, sizeof **pps);
121 pps = &(*pps)->next;
122 indx -= COFF_SLOTS;
125 if (*pps == NULL)
127 *pps = (struct coff_slots *) xmalloc (sizeof **pps);
128 memset (*pps, 0, sizeof **pps);
131 return (*pps)->slots + indx;
134 /* Parse a COFF type code in NTYPE. */
136 static debug_type
137 parse_coff_type (abfd, symbols, types, coff_symno, ntype, pauxent, useaux,
138 dhandle)
139 bfd *abfd;
140 struct coff_symbols *symbols;
141 struct coff_types *types;
142 long coff_symno;
143 int ntype;
144 union internal_auxent *pauxent;
145 boolean useaux;
146 PTR dhandle;
148 debug_type type;
150 if ((ntype & ~N_BTMASK) != 0)
152 int newtype;
154 newtype = DECREF (ntype);
156 if (ISPTR (ntype))
158 type = parse_coff_type (abfd, symbols, types, coff_symno, newtype,
159 pauxent, useaux, dhandle);
160 type = debug_make_pointer_type (dhandle, type);
162 else if (ISFCN (ntype))
164 type = parse_coff_type (abfd, symbols, types, coff_symno, newtype,
165 pauxent, useaux, dhandle);
166 type = debug_make_function_type (dhandle, type, (debug_type *) NULL,
167 false);
169 else if (ISARY (ntype))
171 int n;
173 if (pauxent == NULL)
174 n = 0;
175 else
177 unsigned short *dim;
178 int i;
180 /* FIXME: If pauxent->x_sym.x_tagndx.l == 0, gdb sets
181 the c_naux field of the syment to 0. */
183 /* Move the dimensions down, so that the next array
184 picks up the next one. */
185 dim = pauxent->x_sym.x_fcnary.x_ary.x_dimen;
186 n = dim[0];
187 for (i = 0; *dim != 0 && i < DIMNUM - 1; i++, dim++)
188 *dim = *(dim + 1);
189 *dim = 0;
192 type = parse_coff_type (abfd, symbols, types, coff_symno, newtype,
193 pauxent, false, dhandle);
194 type = debug_make_array_type (dhandle, type,
195 parse_coff_base_type (abfd, symbols,
196 types,
197 coff_symno,
198 T_INT,
199 NULL, dhandle),
200 0, n - 1, false);
202 else
204 non_fatal (_("parse_coff_type: Bad type code 0x%x"), ntype);
205 return DEBUG_TYPE_NULL;
208 return type;
211 if (pauxent != NULL && pauxent->x_sym.x_tagndx.l > 0)
213 debug_type *slot;
215 /* This is a reference to an existing type. FIXME: gdb checks
216 that the class is not C_STRTAG, nor C_UNTAG, nor C_ENTAG. */
217 slot = coff_get_slot (types, pauxent->x_sym.x_tagndx.l);
218 if (*slot != DEBUG_TYPE_NULL)
219 return *slot;
220 else
221 return debug_make_indirect_type (dhandle, slot, (const char *) NULL);
224 /* If the aux entry has already been used for something, useaux will
225 have been set to false, indicating that parse_coff_base_type
226 should not use it. We need to do it this way, rather than simply
227 passing pauxent as NULL, because we need to be able handle
228 multiple array dimensions while still discarding pauxent after
229 having handled all of them. */
230 if (! useaux)
231 pauxent = NULL;
233 return parse_coff_base_type (abfd, symbols, types, coff_symno, ntype,
234 pauxent, dhandle);
237 /* Parse a basic COFF type in NTYPE. */
239 static debug_type
240 parse_coff_base_type (abfd, symbols, types, coff_symno, ntype, pauxent,
241 dhandle)
242 bfd *abfd;
243 struct coff_symbols *symbols;
244 struct coff_types *types;
245 long coff_symno;
246 int ntype;
247 union internal_auxent *pauxent;
248 PTR dhandle;
250 debug_type ret;
251 boolean set_basic;
252 const char *name;
253 debug_type *slot;
255 if (ntype >= 0
256 && ntype <= T_MAX
257 && types->basic[ntype] != DEBUG_TYPE_NULL)
258 return types->basic[ntype];
260 set_basic = true;
261 name = NULL;
263 switch (ntype)
265 default:
266 ret = debug_make_void_type (dhandle);
267 break;
269 case T_NULL:
270 case T_VOID:
271 ret = debug_make_void_type (dhandle);
272 name = "void";
273 break;
275 case T_CHAR:
276 ret = debug_make_int_type (dhandle, 1, false);
277 name = "char";
278 break;
280 case T_SHORT:
281 ret = debug_make_int_type (dhandle, 2, false);
282 name = "short";
283 break;
285 case T_INT:
286 /* FIXME: Perhaps the size should depend upon the architecture. */
287 ret = debug_make_int_type (dhandle, 4, false);
288 name = "int";
289 break;
291 case T_LONG:
292 ret = debug_make_int_type (dhandle, 4, false);
293 name = "long";
294 break;
296 case T_FLOAT:
297 ret = debug_make_float_type (dhandle, 4);
298 name = "float";
299 break;
301 case T_DOUBLE:
302 ret = debug_make_float_type (dhandle, 8);
303 name = "double";
304 break;
306 case T_LNGDBL:
307 ret = debug_make_float_type (dhandle, 12);
308 name = "long double";
309 break;
311 case T_UCHAR:
312 ret = debug_make_int_type (dhandle, 1, true);
313 name = "unsigned char";
314 break;
316 case T_USHORT:
317 ret = debug_make_int_type (dhandle, 2, true);
318 name = "unsigned short";
319 break;
321 case T_UINT:
322 ret = debug_make_int_type (dhandle, 4, true);
323 name = "unsigned int";
324 break;
326 case T_ULONG:
327 ret = debug_make_int_type (dhandle, 4, true);
328 name = "unsigned long";
329 break;
331 case T_STRUCT:
332 if (pauxent == NULL)
333 ret = debug_make_struct_type (dhandle, true, 0,
334 (debug_field *) NULL);
335 else
336 ret = parse_coff_struct_type (abfd, symbols, types, ntype, pauxent,
337 dhandle);
339 slot = coff_get_slot (types, coff_symno);
340 *slot = ret;
342 set_basic = false;
343 break;
345 case T_UNION:
346 if (pauxent == NULL)
347 ret = debug_make_struct_type (dhandle, false, 0, (debug_field *) NULL);
348 else
349 ret = parse_coff_struct_type (abfd, symbols, types, ntype, pauxent,
350 dhandle);
352 slot = coff_get_slot (types, coff_symno);
353 *slot = ret;
355 set_basic = false;
356 break;
358 case T_ENUM:
359 if (pauxent == NULL)
360 ret = debug_make_enum_type (dhandle, (const char **) NULL,
361 (bfd_signed_vma *) NULL);
362 else
363 ret = parse_coff_enum_type (abfd, symbols, types, pauxent, dhandle);
365 slot = coff_get_slot (types, coff_symno);
366 *slot = ret;
368 set_basic = false;
369 break;
372 if (name != NULL)
373 ret = debug_name_type (dhandle, name, ret);
375 if (set_basic
376 && ntype >= 0
377 && ntype <= T_MAX)
378 types->basic[ntype] = ret;
380 return ret;
383 /* Parse a struct type. */
385 static debug_type
386 parse_coff_struct_type (abfd, symbols, types, ntype, pauxent, dhandle)
387 bfd *abfd;
388 struct coff_symbols *symbols;
389 struct coff_types *types;
390 int ntype;
391 union internal_auxent *pauxent;
392 PTR dhandle;
394 long symend;
395 int alloc;
396 debug_field *fields;
397 int count;
398 boolean done;
400 symend = pauxent->x_sym.x_fcnary.x_fcn.x_endndx.l;
402 alloc = 10;
403 fields = (debug_field *) xmalloc (alloc * sizeof *fields);
404 count = 0;
406 done = false;
407 while (! done
408 && symbols->coff_symno < symend
409 && symbols->symno < symbols->symcount)
411 asymbol *sym;
412 long this_coff_symno;
413 struct internal_syment syment;
414 union internal_auxent auxent;
415 union internal_auxent *psubaux;
416 bfd_vma bitpos = 0, bitsize = 0;
418 sym = symbols->syms[symbols->symno];
420 if (! bfd_coff_get_syment (abfd, sym, &syment))
422 non_fatal (_("bfd_coff_get_syment failed: %s"),
423 bfd_errmsg (bfd_get_error ()));
424 return DEBUG_TYPE_NULL;
427 this_coff_symno = symbols->coff_symno;
429 ++symbols->symno;
430 symbols->coff_symno += 1 + syment.n_numaux;
432 if (syment.n_numaux == 0)
433 psubaux = NULL;
434 else
436 if (! bfd_coff_get_auxent (abfd, sym, 0, &auxent))
438 non_fatal (_("bfd_coff_get_auxent failed: %s"),
439 bfd_errmsg (bfd_get_error ()));
440 return DEBUG_TYPE_NULL;
442 psubaux = &auxent;
445 switch (syment.n_sclass)
447 case C_MOS:
448 case C_MOU:
449 bitpos = 8 * bfd_asymbol_value (sym);
450 bitsize = 0;
451 break;
453 case C_FIELD:
454 bitpos = bfd_asymbol_value (sym);
455 bitsize = auxent.x_sym.x_misc.x_lnsz.x_size;
456 break;
458 case C_EOS:
459 done = true;
460 break;
463 if (! done)
465 debug_type ftype;
466 debug_field f;
468 ftype = parse_coff_type (abfd, symbols, types, this_coff_symno,
469 syment.n_type, psubaux, true, dhandle);
470 f = debug_make_field (dhandle, bfd_asymbol_name (sym), ftype,
471 bitpos, bitsize, DEBUG_VISIBILITY_PUBLIC);
472 if (f == DEBUG_FIELD_NULL)
473 return DEBUG_TYPE_NULL;
475 if (count + 1 >= alloc)
477 alloc += 10;
478 fields = ((debug_field *)
479 xrealloc (fields, alloc * sizeof *fields));
482 fields[count] = f;
483 ++count;
487 fields[count] = DEBUG_FIELD_NULL;
489 return debug_make_struct_type (dhandle, ntype == T_STRUCT,
490 pauxent->x_sym.x_misc.x_lnsz.x_size,
491 fields);
494 /* Parse an enum type. */
496 static debug_type
497 parse_coff_enum_type (abfd, symbols, types, pauxent, dhandle)
498 bfd *abfd;
499 struct coff_symbols *symbols;
500 struct coff_types *types ATTRIBUTE_UNUSED;
501 union internal_auxent *pauxent;
502 PTR dhandle;
504 long symend;
505 int alloc;
506 const char **names;
507 bfd_signed_vma *vals;
508 int count;
509 boolean done;
511 symend = pauxent->x_sym.x_fcnary.x_fcn.x_endndx.l;
513 alloc = 10;
514 names = (const char **) xmalloc (alloc * sizeof *names);
515 vals = (bfd_signed_vma *) xmalloc (alloc * sizeof *vals);
516 count = 0;
518 done = false;
519 while (! done
520 && symbols->coff_symno < symend
521 && symbols->symno < symbols->symcount)
523 asymbol *sym;
524 struct internal_syment syment;
526 sym = symbols->syms[symbols->symno];
528 if (! bfd_coff_get_syment (abfd, sym, &syment))
530 non_fatal (_("bfd_coff_get_syment failed: %s"),
531 bfd_errmsg (bfd_get_error ()));
532 return DEBUG_TYPE_NULL;
535 ++symbols->symno;
536 symbols->coff_symno += 1 + syment.n_numaux;
538 switch (syment.n_sclass)
540 case C_MOE:
541 if (count + 1 >= alloc)
543 alloc += 10;
544 names = ((const char **)
545 xrealloc (names, alloc * sizeof *names));
546 vals = ((bfd_signed_vma *)
547 xrealloc (vals, alloc * sizeof *vals));
550 names[count] = bfd_asymbol_name (sym);
551 vals[count] = bfd_asymbol_value (sym);
552 ++count;
553 break;
555 case C_EOS:
556 done = true;
557 break;
561 names[count] = NULL;
563 return debug_make_enum_type (dhandle, names, vals);
566 /* Handle a single COFF symbol. */
568 static boolean
569 parse_coff_symbol (abfd, types, sym, coff_symno, psyment, dhandle, type,
570 within_function)
571 bfd *abfd ATTRIBUTE_UNUSED;
572 struct coff_types *types;
573 asymbol *sym;
574 long coff_symno;
575 struct internal_syment *psyment;
576 PTR dhandle;
577 debug_type type;
578 boolean within_function;
580 switch (psyment->n_sclass)
582 case C_NULL:
583 break;
585 case C_AUTO:
586 if (! debug_record_variable (dhandle, bfd_asymbol_name (sym), type,
587 DEBUG_LOCAL, bfd_asymbol_value (sym)))
588 return false;
589 break;
591 case C_WEAKEXT:
592 case C_EXT:
593 if (! debug_record_variable (dhandle, bfd_asymbol_name (sym), type,
594 DEBUG_GLOBAL, bfd_asymbol_value (sym)))
595 return false;
596 break;
598 case C_STAT:
599 if (! debug_record_variable (dhandle, bfd_asymbol_name (sym), type,
600 (within_function
601 ? DEBUG_LOCAL_STATIC
602 : DEBUG_STATIC),
603 bfd_asymbol_value (sym)))
604 return false;
605 break;
607 case C_REG:
608 /* FIXME: We may need to convert the register number. */
609 if (! debug_record_variable (dhandle, bfd_asymbol_name (sym), type,
610 DEBUG_REGISTER, bfd_asymbol_value (sym)))
611 return false;
612 break;
614 case C_LABEL:
615 break;
617 case C_ARG:
618 if (! debug_record_parameter (dhandle, bfd_asymbol_name (sym), type,
619 DEBUG_PARM_STACK, bfd_asymbol_value (sym)))
620 return false;
621 break;
623 case C_REGPARM:
624 /* FIXME: We may need to convert the register number. */
625 if (! debug_record_parameter (dhandle, bfd_asymbol_name (sym), type,
626 DEBUG_PARM_REG, bfd_asymbol_value (sym)))
627 return false;
628 break;
630 case C_TPDEF:
631 type = debug_name_type (dhandle, bfd_asymbol_name (sym), type);
632 if (type == DEBUG_TYPE_NULL)
633 return false;
634 break;
636 case C_STRTAG:
637 case C_UNTAG:
638 case C_ENTAG:
640 debug_type *slot;
642 type = debug_tag_type (dhandle, bfd_asymbol_name (sym), type);
643 if (type == DEBUG_TYPE_NULL)
644 return false;
646 /* Store the named type into the slot, so that references get
647 the name. */
648 slot = coff_get_slot (types, coff_symno);
649 *slot = type;
651 break;
653 default:
654 break;
657 return true;
660 /* Determine if a symbol has external visibility. */
662 static boolean
663 external_coff_symbol_p (sym_class)
664 int sym_class;
666 switch (sym_class)
668 case C_EXT:
669 case C_WEAKEXT:
670 return true;
671 default:
672 break;
674 return false;
677 /* This is the main routine. It looks through all the symbols and
678 handles them. */
680 boolean
681 parse_coff (abfd, syms, symcount, dhandle)
682 bfd *abfd;
683 asymbol **syms;
684 long symcount;
685 PTR dhandle;
687 struct coff_symbols symbols;
688 struct coff_types types;
689 int i;
690 long next_c_file;
691 const char *fnname;
692 int fnclass;
693 int fntype;
694 bfd_vma fnend;
695 alent *linenos;
696 boolean within_function;
697 long this_coff_symno;
699 symbols.syms = syms;
700 symbols.symcount = symcount;
701 symbols.symno = 0;
702 symbols.coff_symno = 0;
704 types.slots = NULL;
705 for (i = 0; i <= T_MAX; i++)
706 types.basic[i] = DEBUG_TYPE_NULL;
708 next_c_file = -1;
709 fnname = NULL;
710 fnclass = 0;
711 fntype = 0;
712 fnend = 0;
713 linenos = NULL;
714 within_function = false;
716 while (symbols.symno < symcount)
718 asymbol *sym;
719 const char *name;
720 struct internal_syment syment;
721 union internal_auxent auxent;
722 union internal_auxent *paux;
723 debug_type type;
725 sym = syms[symbols.symno];
727 if (! bfd_coff_get_syment (abfd, sym, &syment))
729 non_fatal (_("bfd_coff_get_syment failed: %s"),
730 bfd_errmsg (bfd_get_error ()));
731 return false;
734 name = bfd_asymbol_name (sym);
736 this_coff_symno = symbols.coff_symno;
738 ++symbols.symno;
739 symbols.coff_symno += 1 + syment.n_numaux;
741 /* We only worry about the first auxent, because that is the
742 only one which is relevant for debugging information. */
743 if (syment.n_numaux == 0)
744 paux = NULL;
745 else
747 if (! bfd_coff_get_auxent (abfd, sym, 0, &auxent))
749 non_fatal (_("bfd_coff_get_auxent failed: %s"),
750 bfd_errmsg (bfd_get_error ()));
751 return false;
753 paux = &auxent;
756 if (this_coff_symno == next_c_file && syment.n_sclass != C_FILE)
758 /* The last C_FILE symbol points to the first external
759 symbol. */
760 if (! debug_set_filename (dhandle, "*globals*"))
761 return false;
764 switch (syment.n_sclass)
766 case C_EFCN:
767 case C_EXTDEF:
768 case C_ULABEL:
769 case C_USTATIC:
770 case C_LINE:
771 case C_ALIAS:
772 case C_HIDDEN:
773 /* Just ignore these classes. */
774 break;
776 case C_FILE:
777 next_c_file = syment.n_value;
778 if (! debug_set_filename (dhandle, name))
779 return false;
780 break;
782 case C_STAT:
783 /* Ignore static symbols with a type of T_NULL. These
784 represent section entries. */
785 if (syment.n_type == T_NULL)
786 break;
787 /* Fall through. */
788 case C_WEAKEXT:
789 case C_EXT:
790 if (ISFCN (syment.n_type))
792 fnname = name;
793 fnclass = syment.n_sclass;
794 fntype = syment.n_type;
795 if (syment.n_numaux > 0)
796 fnend = bfd_asymbol_value (sym) + auxent.x_sym.x_misc.x_fsize;
797 else
798 fnend = 0;
799 linenos = BFD_SEND (abfd, _get_lineno, (abfd, sym));
800 break;
802 type = parse_coff_type (abfd, &symbols, &types, this_coff_symno,
803 syment.n_type, paux, true, dhandle);
804 if (type == DEBUG_TYPE_NULL)
805 return false;
806 if (! parse_coff_symbol (abfd, &types, sym, this_coff_symno, &syment,
807 dhandle, type, within_function))
808 return false;
809 break;
811 case C_FCN:
812 if (strcmp (name, ".bf") == 0)
814 if (fnname == NULL)
816 non_fatal (_("%ld: .bf without preceding function"),
817 this_coff_symno);
818 return false;
821 type = parse_coff_type (abfd, &symbols, &types, this_coff_symno,
822 DECREF (fntype), paux, false, dhandle);
823 if (type == DEBUG_TYPE_NULL)
824 return false;
826 if (! debug_record_function (dhandle, fnname, type,
827 external_coff_symbol_p (fnclass),
828 bfd_asymbol_value (sym)))
829 return false;
831 if (linenos != NULL)
833 int base;
834 bfd_vma addr;
836 if (syment.n_numaux == 0)
837 base = 0;
838 else
839 base = auxent.x_sym.x_misc.x_lnsz.x_lnno - 1;
841 addr = bfd_get_section_vma (abfd, bfd_get_section (sym));
843 ++linenos;
845 while (linenos->line_number != 0)
847 if (! debug_record_line (dhandle,
848 linenos->line_number + base,
849 linenos->u.offset + addr))
850 return false;
851 ++linenos;
855 fnname = NULL;
856 linenos = NULL;
857 fnclass = 0;
858 fntype = 0;
860 within_function = true;
862 else if (strcmp (name, ".ef") == 0)
864 if (! within_function)
866 non_fatal (_("%ld: unexpected .ef\n"), this_coff_symno);
867 return false;
870 if (bfd_asymbol_value (sym) > fnend)
871 fnend = bfd_asymbol_value (sym);
872 if (! debug_end_function (dhandle, fnend))
873 return false;
875 fnend = 0;
876 within_function = false;
878 break;
880 case C_BLOCK:
881 if (strcmp (name, ".bb") == 0)
883 if (! debug_start_block (dhandle, bfd_asymbol_value (sym)))
884 return false;
886 else if (strcmp (name, ".eb") == 0)
888 if (! debug_end_block (dhandle, bfd_asymbol_value (sym)))
889 return false;
891 break;
893 default:
894 type = parse_coff_type (abfd, &symbols, &types, this_coff_symno,
895 syment.n_type, paux, true, dhandle);
896 if (type == DEBUG_TYPE_NULL)
897 return false;
898 if (! parse_coff_symbol (abfd, &types, sym, this_coff_symno, &syment,
899 dhandle, type, within_function))
900 return false;
901 break;
905 return true;