* gdbtypes.c (make_pointer_type, make_reference_type,
[deliverable/binutils-gdb.git] / gdb / buildsym.c
CommitLineData
c906108c 1/* Support routines for building symbol tables in GDB's internal format.
197e01b6 2 Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
0fb0cc75 3 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2007, 2008, 2009
25caa7a8 4 Free Software Foundation, Inc.
c906108c 5
c5aa993b 6 This file is part of GDB.
c906108c 7
c5aa993b
JM
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
a9762ec7 10 the Free Software Foundation; either version 3 of the License, or
c5aa993b 11 (at your option) any later version.
c906108c 12
c5aa993b
JM
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
c906108c 17
c5aa993b 18 You should have received a copy of the GNU General Public License
a9762ec7 19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
c906108c
SS
20
21/* This module provides subroutines used for creating and adding to
22 the symbol table. These routines are called from various symbol-
23 file-reading routines.
24
25 Routines to support specific debugging information formats (stabs,
26 DWARF, etc) belong somewhere else. */
27
28#include "defs.h"
29#include "bfd.h"
04ea0df1 30#include "gdb_obstack.h"
c906108c 31#include "symtab.h"
72367fb4 32#include "symfile.h"
c906108c
SS
33#include "objfiles.h"
34#include "gdbtypes.h"
0c5e171a 35#include "gdb_assert.h"
c906108c
SS
36#include "complaints.h"
37#include "gdb_string.h"
91b9ff21 38#include "expression.h" /* For "enum exp_opcode" used by... */
357e46e7 39#include "bcache.h"
d5166ae1 40#include "filenames.h" /* For DOSish file names */
99d9066e 41#include "macrotab.h"
261397f8 42#include "demangle.h" /* Needed by SYMBOL_INIT_DEMANGLED_NAME. */
fe898f56 43#include "block.h"
9219021c 44#include "cp-support.h"
de4f826b 45#include "dictionary.h"
801e3a5b 46#include "addrmap.h"
9219021c 47
c906108c 48/* Ask buildsym.h to define the vars it normally declares `extern'. */
c5aa993b
JM
49#define EXTERN
50/**/
c906108c
SS
51#include "buildsym.h" /* Our own declarations */
52#undef EXTERN
53
54/* For cleanup_undefined_types and finish_global_stabs (somewhat
55 questionable--see comment where we call them). */
56
57#include "stabsread.h"
58
94d09e04
DE
59/* List of subfiles. */
60
61static struct subfile *subfiles;
62
c906108c
SS
63/* List of free `struct pending' structures for reuse. */
64
65static struct pending *free_pendings;
66
67/* Non-zero if symtab has line number info. This prevents an
68 otherwise empty symtab from being tossed. */
69
70static int have_line_numbers;
801e3a5b
JB
71
72/* The mutable address map for the compilation unit whose symbols
73 we're currently reading. The symtabs' shared blockvector will
74 point to a fixed copy of this. */
75static struct addrmap *pending_addrmap;
76
77/* The obstack on which we allocate pending_addrmap.
78 If pending_addrmap is NULL, this is uninitialized; otherwise, it is
79 initialized (and holds pending_addrmap). */
80static struct obstack pending_addrmap_obstack;
81
82/* Non-zero if we recorded any ranges in the addrmap that are
83 different from those in the blockvector already. We set this to
84 zero when we start processing a symfile, and if it's still zero at
85 the end, then we just toss the addrmap. */
86static int pending_addrmap_interesting;
87
c906108c
SS
88\f
89static int compare_line_numbers (const void *ln1p, const void *ln2p);
90\f
91
92/* Initial sizes of data structures. These are realloc'd larger if
93 needed, and realloc'd down to the size actually used, when
94 completed. */
95
96#define INITIAL_CONTEXT_STACK_SIZE 10
97#define INITIAL_LINE_VECTOR_LENGTH 1000
98\f
99
c906108c
SS
100/* maintain the lists of symbols and blocks */
101
59527da0
JB
102/* Add a pending list to free_pendings. */
103void
104add_free_pendings (struct pending *list)
105{
52f0bd74 106 struct pending *link = list;
59527da0
JB
107
108 if (list)
109 {
110 while (link->next) link = link->next;
111 link->next = free_pendings;
112 free_pendings = list;
113 }
114}
115
9219021c
DC
116/* Add a symbol to one of the lists of symbols. While we're at it, if
117 we're in the C++ case and don't have full namespace debugging info,
118 check to see if it references an anonymous namespace; if so, add an
119 appropriate using directive. */
c906108c
SS
120
121void
122add_symbol_to_list (struct symbol *symbol, struct pending **listhead)
123{
52f0bd74 124 struct pending *link;
c906108c
SS
125
126 /* If this is an alias for another symbol, don't add it. */
127 if (symbol->ginfo.name && symbol->ginfo.name[0] == '#')
128 return;
129
130 /* We keep PENDINGSIZE symbols in each link of the list. If we
131 don't have a link with room in it, add a new link. */
132 if (*listhead == NULL || (*listhead)->nsyms == PENDINGSIZE)
133 {
134 if (free_pendings)
135 {
136 link = free_pendings;
137 free_pendings = link->next;
138 }
139 else
140 {
141 link = (struct pending *) xmalloc (sizeof (struct pending));
142 }
143
144 link->next = *listhead;
145 *listhead = link;
146 link->nsyms = 0;
147 }
148
149 (*listhead)->symbol[(*listhead)->nsyms++] = symbol;
150}
151
152/* Find a symbol named NAME on a LIST. NAME need not be
153 '\0'-terminated; LENGTH is the length of the name. */
154
155struct symbol *
156find_symbol_in_list (struct pending *list, char *name, int length)
157{
158 int j;
159 char *pp;
160
161 while (list != NULL)
162 {
163 for (j = list->nsyms; --j >= 0;)
164 {
3567439c 165 pp = SYMBOL_LINKAGE_NAME (list->symbol[j]);
c906108c
SS
166 if (*pp == *name && strncmp (pp, name, length) == 0 &&
167 pp[length] == '\0')
168 {
169 return (list->symbol[j]);
170 }
171 }
172 list = list->next;
173 }
174 return (NULL);
175}
176
177/* At end of reading syms, or in case of quit, really free as many
178 `struct pending's as we can easily find. */
179
c906108c 180void
bde58177 181really_free_pendings (void *dummy)
c906108c
SS
182{
183 struct pending *next, *next1;
184
185 for (next = free_pendings; next; next = next1)
186 {
187 next1 = next->next;
b8c9b27d 188 xfree ((void *) next);
c906108c
SS
189 }
190 free_pendings = NULL;
191
192 free_pending_blocks ();
193
194 for (next = file_symbols; next != NULL; next = next1)
195 {
196 next1 = next->next;
b8c9b27d 197 xfree ((void *) next);
c906108c
SS
198 }
199 file_symbols = NULL;
200
201 for (next = global_symbols; next != NULL; next = next1)
202 {
203 next1 = next->next;
b8c9b27d 204 xfree ((void *) next);
c906108c
SS
205 }
206 global_symbols = NULL;
99d9066e
JB
207
208 if (pending_macros)
209 free_macro_table (pending_macros);
801e3a5b
JB
210
211 if (pending_addrmap)
212 {
213 obstack_free (&pending_addrmap_obstack, NULL);
214 pending_addrmap = NULL;
215 }
c906108c
SS
216}
217
218/* This function is called to discard any pending blocks. */
219
220void
221free_pending_blocks (void)
222{
89ba75b1
JB
223 /* The links are made in the objfile_obstack, so we only need to
224 reset PENDING_BLOCKS. */
c906108c
SS
225 pending_blocks = NULL;
226}
227
228/* Take one of the lists of symbols and make a block from it. Keep
229 the order the symbols have in the list (reversed from the input
230 file). Put the block on the list of pending blocks. */
231
801e3a5b 232struct block *
c906108c
SS
233finish_block (struct symbol *symbol, struct pending **listhead,
234 struct pending_block *old_blocks,
235 CORE_ADDR start, CORE_ADDR end,
236 struct objfile *objfile)
237{
52f0bd74
AC
238 struct pending *next, *next1;
239 struct block *block;
240 struct pending_block *pblock;
c906108c 241 struct pending_block *opblock;
c906108c 242
4a146b47 243 block = allocate_block (&objfile->objfile_obstack);
c906108c 244
261397f8
DJ
245 if (symbol)
246 {
4a146b47 247 BLOCK_DICT (block) = dict_create_linear (&objfile->objfile_obstack,
de4f826b 248 *listhead);
261397f8
DJ
249 }
250 else
c906108c 251 {
4a146b47 252 BLOCK_DICT (block) = dict_create_hashed (&objfile->objfile_obstack,
de4f826b 253 *listhead);
c906108c
SS
254 }
255
256 BLOCK_START (block) = start;
257 BLOCK_END (block) = end;
258 /* Superblock filled in when containing block is made */
259 BLOCK_SUPERBLOCK (block) = NULL;
9219021c 260 BLOCK_NAMESPACE (block) = NULL;
c906108c 261
c906108c
SS
262 /* Put the block in as the value of the symbol that names it. */
263
264 if (symbol)
265 {
266 struct type *ftype = SYMBOL_TYPE (symbol);
de4f826b 267 struct dict_iterator iter;
c906108c
SS
268 SYMBOL_BLOCK_VALUE (symbol) = block;
269 BLOCK_FUNCTION (block) = symbol;
270
271 if (TYPE_NFIELDS (ftype) <= 0)
272 {
273 /* No parameter type information is recorded with the
274 function's type. Set that from the type of the
275 parameter symbols. */
276 int nparams = 0, iparams;
277 struct symbol *sym;
de4f826b 278 ALL_BLOCK_SYMBOLS (block, iter, sym)
c906108c 279 {
2a2d4dc3
AS
280 if (SYMBOL_IS_ARGUMENT (sym))
281 nparams++;
c906108c
SS
282 }
283 if (nparams > 0)
284 {
285 TYPE_NFIELDS (ftype) = nparams;
286 TYPE_FIELDS (ftype) = (struct field *)
287 TYPE_ALLOC (ftype, nparams * sizeof (struct field));
288
de4f826b
DC
289 iparams = 0;
290 ALL_BLOCK_SYMBOLS (block, iter, sym)
c906108c 291 {
de4f826b
DC
292 if (iparams == nparams)
293 break;
294
2a2d4dc3 295 if (SYMBOL_IS_ARGUMENT (sym))
c906108c 296 {
c906108c 297 TYPE_FIELD_TYPE (ftype, iparams) = SYMBOL_TYPE (sym);
8176bb6d 298 TYPE_FIELD_ARTIFICIAL (ftype, iparams) = 0;
c906108c 299 iparams++;
c906108c
SS
300 }
301 }
302 }
303 }
304 }
305 else
306 {
307 BLOCK_FUNCTION (block) = NULL;
308 }
309
310 /* Now "free" the links of the list, and empty the list. */
311
312 for (next = *listhead; next; next = next1)
313 {
314 next1 = next->next;
315 next->next = free_pendings;
316 free_pendings = next;
317 }
318 *listhead = NULL;
319
c906108c
SS
320 /* Check to be sure that the blocks have an end address that is
321 greater than starting address */
322
323 if (BLOCK_END (block) < BLOCK_START (block))
324 {
325 if (symbol)
326 {
23136709 327 complaint (&symfile_complaints,
3d263c1d 328 _("block end address less than block start address in %s (patched it)"),
de5ad195 329 SYMBOL_PRINT_NAME (symbol));
c906108c
SS
330 }
331 else
332 {
23136709 333 complaint (&symfile_complaints,
3d263c1d 334 _("block end address 0x%s less than block start address 0x%s (patched it)"),
23136709 335 paddr_nz (BLOCK_END (block)), paddr_nz (BLOCK_START (block)));
c906108c
SS
336 }
337 /* Better than nothing */
338 BLOCK_END (block) = BLOCK_START (block);
339 }
c906108c
SS
340
341 /* Install this block as the superblock of all blocks made since the
342 start of this scope that don't have superblocks yet. */
343
344 opblock = NULL;
c0219d42
MS
345 for (pblock = pending_blocks;
346 pblock && pblock != old_blocks;
347 pblock = pblock->next)
c906108c
SS
348 {
349 if (BLOCK_SUPERBLOCK (pblock->block) == NULL)
350 {
c906108c
SS
351 /* Check to be sure the blocks are nested as we receive
352 them. If the compiler/assembler/linker work, this just
14711c82
DJ
353 burns a small amount of time.
354
355 Skip blocks which correspond to a function; they're not
356 physically nested inside this other blocks, only
357 lexically nested. */
358 if (BLOCK_FUNCTION (pblock->block) == NULL
359 && (BLOCK_START (pblock->block) < BLOCK_START (block)
360 || BLOCK_END (pblock->block) > BLOCK_END (block)))
c906108c
SS
361 {
362 if (symbol)
363 {
23136709 364 complaint (&symfile_complaints,
3d263c1d 365 _("inner block not inside outer block in %s"),
de5ad195 366 SYMBOL_PRINT_NAME (symbol));
c906108c
SS
367 }
368 else
369 {
23136709 370 complaint (&symfile_complaints,
3d263c1d 371 _("inner block (0x%s-0x%s) not inside outer block (0x%s-0x%s)"),
23136709
KB
372 paddr_nz (BLOCK_START (pblock->block)),
373 paddr_nz (BLOCK_END (pblock->block)),
374 paddr_nz (BLOCK_START (block)),
375 paddr_nz (BLOCK_END (block)));
c906108c
SS
376 }
377 if (BLOCK_START (pblock->block) < BLOCK_START (block))
378 BLOCK_START (pblock->block) = BLOCK_START (block);
379 if (BLOCK_END (pblock->block) > BLOCK_END (block))
380 BLOCK_END (pblock->block) = BLOCK_END (block);
381 }
c906108c
SS
382 BLOCK_SUPERBLOCK (pblock->block) = block;
383 }
384 opblock = pblock;
385 }
386
27aa8d6a
SW
387 block_set_using (block, using_directives, &objfile->objfile_obstack);
388
c906108c 389 record_pending_block (objfile, block, opblock);
801e3a5b
JB
390
391 return block;
c906108c
SS
392}
393
de4f826b 394
c906108c
SS
395/* Record BLOCK on the list of all blocks in the file. Put it after
396 OPBLOCK, or at the beginning if opblock is NULL. This puts the
397 block in the list after all its subblocks.
398
4a146b47 399 Allocate the pending block struct in the objfile_obstack to save
c906108c
SS
400 time. This wastes a little space. FIXME: Is it worth it? */
401
402void
403record_pending_block (struct objfile *objfile, struct block *block,
404 struct pending_block *opblock)
405{
52f0bd74 406 struct pending_block *pblock;
c906108c
SS
407
408 pblock = (struct pending_block *)
4a146b47 409 obstack_alloc (&objfile->objfile_obstack, sizeof (struct pending_block));
c906108c
SS
410 pblock->block = block;
411 if (opblock)
412 {
413 pblock->next = opblock->next;
414 opblock->next = pblock;
415 }
416 else
417 {
418 pblock->next = pending_blocks;
419 pending_blocks = pblock;
420 }
421}
422
801e3a5b
JB
423
424/* Record that the range of addresses from START to END_INCLUSIVE
425 (inclusive, like it says) belongs to BLOCK. BLOCK's start and end
426 addresses must be set already. You must apply this function to all
427 BLOCK's children before applying it to BLOCK.
428
429 If a call to this function complicates the picture beyond that
430 already provided by BLOCK_START and BLOCK_END, then we create an
431 address map for the block. */
432void
433record_block_range (struct block *block,
434 CORE_ADDR start, CORE_ADDR end_inclusive)
435{
436 /* If this is any different from the range recorded in the block's
437 own BLOCK_START and BLOCK_END, then note that the address map has
438 become interesting. Note that even if this block doesn't have
439 any "interesting" ranges, some later block might, so we still
440 need to record this block in the addrmap. */
441 if (start != BLOCK_START (block)
442 || end_inclusive + 1 != BLOCK_END (block))
443 pending_addrmap_interesting = 1;
444
445 if (! pending_addrmap)
446 {
447 obstack_init (&pending_addrmap_obstack);
448 pending_addrmap = addrmap_create_mutable (&pending_addrmap_obstack);
449 }
450
451 addrmap_set_empty (pending_addrmap, start, end_inclusive, block);
452}
453
454
822e978b 455static struct blockvector *
c906108c
SS
456make_blockvector (struct objfile *objfile)
457{
52f0bd74
AC
458 struct pending_block *next;
459 struct blockvector *blockvector;
460 int i;
c906108c
SS
461
462 /* Count the length of the list of blocks. */
463
464 for (next = pending_blocks, i = 0; next; next = next->next, i++)
465 {;
466 }
467
468 blockvector = (struct blockvector *)
4a146b47 469 obstack_alloc (&objfile->objfile_obstack,
c906108c
SS
470 (sizeof (struct blockvector)
471 + (i - 1) * sizeof (struct block *)));
472
473 /* Copy the blocks into the blockvector. This is done in reverse
474 order, which happens to put the blocks into the proper order
475 (ascending starting address). finish_block has hair to insert
476 each block into the list after its subblocks in order to make
477 sure this is true. */
478
479 BLOCKVECTOR_NBLOCKS (blockvector) = i;
480 for (next = pending_blocks; next; next = next->next)
481 {
482 BLOCKVECTOR_BLOCK (blockvector, --i) = next->block;
483 }
484
89ba75b1 485 free_pending_blocks ();
c906108c 486
801e3a5b
JB
487 /* If we needed an address map for this symtab, record it in the
488 blockvector. */
489 if (pending_addrmap && pending_addrmap_interesting)
490 BLOCKVECTOR_MAP (blockvector)
491 = addrmap_create_fixed (pending_addrmap, &objfile->objfile_obstack);
492 else
493 BLOCKVECTOR_MAP (blockvector) = 0;
494
c906108c
SS
495 /* Some compilers output blocks in the wrong order, but we depend on
496 their being in the right order so we can binary search. Check the
a239dc23 497 order and moan about it. */
c906108c
SS
498 if (BLOCKVECTOR_NBLOCKS (blockvector) > 1)
499 {
500 for (i = 1; i < BLOCKVECTOR_NBLOCKS (blockvector); i++)
501 {
502 if (BLOCK_START (BLOCKVECTOR_BLOCK (blockvector, i - 1))
503 > BLOCK_START (BLOCKVECTOR_BLOCK (blockvector, i)))
504 {
59527da0
JB
505 CORE_ADDR start
506 = BLOCK_START (BLOCKVECTOR_BLOCK (blockvector, i));
c906108c 507
3d263c1d 508 complaint (&symfile_complaints, _("block at %s out of order"),
bb599908 509 hex_string ((LONGEST) start));
c906108c
SS
510 }
511 }
512 }
c906108c
SS
513
514 return (blockvector);
515}
516\f
517/* Start recording information about source code that came from an
518 included (or otherwise merged-in) source file with a different
519 name. NAME is the name of the file (cannot be NULL), DIRNAME is
0b0287a1 520 the directory in which the file was compiled (or NULL if not known). */
c906108c
SS
521
522void
523start_subfile (char *name, char *dirname)
524{
52f0bd74 525 struct subfile *subfile;
c906108c
SS
526
527 /* See if this subfile is already known as a subfile of the current
528 main source file. */
529
530 for (subfile = subfiles; subfile; subfile = subfile->next)
531 {
84ba0adf
DJ
532 char *subfile_name;
533
534 /* If NAME is an absolute path, and this subfile is not, then
535 attempt to create an absolute path to compare. */
536 if (IS_ABSOLUTE_PATH (name)
537 && !IS_ABSOLUTE_PATH (subfile->name)
538 && subfile->dirname != NULL)
539 subfile_name = concat (subfile->dirname, SLASH_STRING,
6eb7ee03 540 subfile->name, (char *) NULL);
84ba0adf
DJ
541 else
542 subfile_name = subfile->name;
543
544 if (FILENAME_CMP (subfile_name, name) == 0)
c906108c
SS
545 {
546 current_subfile = subfile;
84ba0adf
DJ
547 if (subfile_name != subfile->name)
548 xfree (subfile_name);
c906108c
SS
549 return;
550 }
84ba0adf
DJ
551 if (subfile_name != subfile->name)
552 xfree (subfile_name);
c906108c
SS
553 }
554
555 /* This subfile is not known. Add an entry for it. Make an entry
556 for this subfile in the list of all subfiles of the current main
557 source file. */
558
559 subfile = (struct subfile *) xmalloc (sizeof (struct subfile));
59527da0 560 memset ((char *) subfile, 0, sizeof (struct subfile));
c906108c
SS
561 subfile->next = subfiles;
562 subfiles = subfile;
563 current_subfile = subfile;
564
565 /* Save its name and compilation directory name */
1b36a34b
JK
566 subfile->name = (name == NULL) ? NULL : xstrdup (name);
567 subfile->dirname = (dirname == NULL) ? NULL : xstrdup (dirname);
c906108c
SS
568
569 /* Initialize line-number recording for this subfile. */
570 subfile->line_vector = NULL;
571
572 /* Default the source language to whatever can be deduced from the
573 filename. If nothing can be deduced (such as for a C/C++ include
574 file with a ".h" extension), then inherit whatever language the
575 previous subfile had. This kludgery is necessary because there
576 is no standard way in some object formats to record the source
577 language. Also, when symtabs are allocated we try to deduce a
578 language then as well, but it is too late for us to use that
579 information while reading symbols, since symtabs aren't allocated
580 until after all the symbols have been processed for a given
581 source file. */
582
583 subfile->language = deduce_language_from_filename (subfile->name);
584 if (subfile->language == language_unknown &&
585 subfile->next != NULL)
586 {
587 subfile->language = subfile->next->language;
588 }
589
590 /* Initialize the debug format string to NULL. We may supply it
591 later via a call to record_debugformat. */
592 subfile->debugformat = NULL;
593
303b6f5d
DJ
594 /* Similarly for the producer. */
595 subfile->producer = NULL;
596
25caa7a8 597 /* If the filename of this subfile ends in .C, then change the
c906108c 598 language of any pending subfiles from C to C++. We also accept
25caa7a8 599 any other C++ suffixes accepted by deduce_language_from_filename. */
c906108c
SS
600 /* Likewise for f2c. */
601
602 if (subfile->name)
603 {
604 struct subfile *s;
605 enum language sublang = deduce_language_from_filename (subfile->name);
606
607 if (sublang == language_cplus || sublang == language_fortran)
608 for (s = subfiles; s != NULL; s = s->next)
609 if (s->language == language_c)
610 s->language = sublang;
611 }
612
613 /* And patch up this file if necessary. */
614 if (subfile->language == language_c
615 && subfile->next != NULL
616 && (subfile->next->language == language_cplus
617 || subfile->next->language == language_fortran))
618 {
619 subfile->language = subfile->next->language;
620 }
621}
622
623/* For stabs readers, the first N_SO symbol is assumed to be the
624 source file name, and the subfile struct is initialized using that
625 assumption. If another N_SO symbol is later seen, immediately
626 following the first one, then the first one is assumed to be the
627 directory name and the second one is really the source file name.
628
629 So we have to patch up the subfile struct by moving the old name
630 value to dirname and remembering the new name. Some sanity
631 checking is performed to ensure that the state of the subfile
632 struct is reasonable and that the old name we are assuming to be a
633 directory name actually is (by checking for a trailing '/'). */
634
635void
636patch_subfile_names (struct subfile *subfile, char *name)
637{
638 if (subfile != NULL && subfile->dirname == NULL && subfile->name != NULL
639 && subfile->name[strlen (subfile->name) - 1] == '/')
640 {
641 subfile->dirname = subfile->name;
1b36a34b 642 subfile->name = xstrdup (name);
c906108c
SS
643 last_source_file = name;
644
645 /* Default the source language to whatever can be deduced from
646 the filename. If nothing can be deduced (such as for a C/C++
647 include file with a ".h" extension), then inherit whatever
648 language the previous subfile had. This kludgery is
649 necessary because there is no standard way in some object
650 formats to record the source language. Also, when symtabs
651 are allocated we try to deduce a language then as well, but
652 it is too late for us to use that information while reading
653 symbols, since symtabs aren't allocated until after all the
654 symbols have been processed for a given source file. */
655
656 subfile->language = deduce_language_from_filename (subfile->name);
657 if (subfile->language == language_unknown &&
658 subfile->next != NULL)
659 {
660 subfile->language = subfile->next->language;
661 }
662 }
663}
664\f
665/* Handle the N_BINCL and N_EINCL symbol types that act like N_SOL for
666 switching source files (different subfiles, as we call them) within
667 one object file, but using a stack rather than in an arbitrary
668 order. */
669
670void
671push_subfile (void)
672{
52f0bd74 673 struct subfile_stack *tem
c906108c
SS
674 = (struct subfile_stack *) xmalloc (sizeof (struct subfile_stack));
675
676 tem->next = subfile_stack;
677 subfile_stack = tem;
678 if (current_subfile == NULL || current_subfile->name == NULL)
679 {
3d263c1d 680 internal_error (__FILE__, __LINE__, _("failed internal consistency check"));
c906108c
SS
681 }
682 tem->name = current_subfile->name;
683}
684
685char *
686pop_subfile (void)
687{
52f0bd74
AC
688 char *name;
689 struct subfile_stack *link = subfile_stack;
c906108c
SS
690
691 if (link == NULL)
692 {
3d263c1d 693 internal_error (__FILE__, __LINE__, _("failed internal consistency check"));
c906108c
SS
694 }
695 name = link->name;
696 subfile_stack = link->next;
b8c9b27d 697 xfree ((void *) link);
c906108c
SS
698 return (name);
699}
700\f
701/* Add a linetable entry for line number LINE and address PC to the
702 line vector for SUBFILE. */
703
704void
aa1ee363 705record_line (struct subfile *subfile, int line, CORE_ADDR pc)
c906108c
SS
706{
707 struct linetable_entry *e;
708 /* Ignore the dummy line number in libg.o */
709
710 if (line == 0xffff)
711 {
712 return;
713 }
714
715 /* Make sure line vector exists and is big enough. */
716 if (!subfile->line_vector)
717 {
718 subfile->line_vector_length = INITIAL_LINE_VECTOR_LENGTH;
719 subfile->line_vector = (struct linetable *)
720 xmalloc (sizeof (struct linetable)
c5aa993b 721 + subfile->line_vector_length * sizeof (struct linetable_entry));
c906108c
SS
722 subfile->line_vector->nitems = 0;
723 have_line_numbers = 1;
724 }
725
726 if (subfile->line_vector->nitems + 1 >= subfile->line_vector_length)
727 {
728 subfile->line_vector_length *= 2;
729 subfile->line_vector = (struct linetable *)
730 xrealloc ((char *) subfile->line_vector,
731 (sizeof (struct linetable)
732 + (subfile->line_vector_length
733 * sizeof (struct linetable_entry))));
734 }
735
607ae575
DJ
736 /* Normally, we treat lines as unsorted. But the end of sequence
737 marker is special. We sort line markers at the same PC by line
738 number, so end of sequence markers (which have line == 0) appear
739 first. This is right if the marker ends the previous function,
740 and there is no padding before the next function. But it is
741 wrong if the previous line was empty and we are now marking a
742 switch to a different subfile. We must leave the end of sequence
743 marker at the end of this group of lines, not sort the empty line
744 to after the marker. The easiest way to accomplish this is to
745 delete any empty lines from our table, if they are followed by
746 end of sequence markers. All we lose is the ability to set
747 breakpoints at some lines which contain no instructions
748 anyway. */
749 if (line == 0 && subfile->line_vector->nitems > 0)
750 {
751 e = subfile->line_vector->item + subfile->line_vector->nitems - 1;
752 while (subfile->line_vector->nitems > 0 && e->pc == pc)
753 {
754 e--;
755 subfile->line_vector->nitems--;
756 }
757 }
758
c906108c
SS
759 e = subfile->line_vector->item + subfile->line_vector->nitems++;
760 e->line = line;
607ae575 761 e->pc = pc;
c906108c
SS
762}
763
764/* Needed in order to sort line tables from IBM xcoff files. Sigh! */
765
766static int
767compare_line_numbers (const void *ln1p, const void *ln2p)
768{
769 struct linetable_entry *ln1 = (struct linetable_entry *) ln1p;
770 struct linetable_entry *ln2 = (struct linetable_entry *) ln2p;
771
772 /* Note: this code does not assume that CORE_ADDRs can fit in ints.
773 Please keep it that way. */
774 if (ln1->pc < ln2->pc)
775 return -1;
776
777 if (ln1->pc > ln2->pc)
778 return 1;
779
780 /* If pc equal, sort by line. I'm not sure whether this is optimum
781 behavior (see comment at struct linetable in symtab.h). */
782 return ln1->line - ln2->line;
783}
784\f
785/* Start a new symtab for a new source file. Called, for example,
786 when a stabs symbol of type N_SO is seen, or when a DWARF
787 TAG_compile_unit DIE is seen. It indicates the start of data for
0b0287a1
DE
788 one original source file.
789
790 NAME is the name of the file (cannot be NULL). DIRNAME is the directory in
791 which the file was compiled (or NULL if not known). START_ADDR is the
792 lowest address of objects in the file (or 0 if not known). */
c906108c
SS
793
794void
795start_symtab (char *name, char *dirname, CORE_ADDR start_addr)
796{
c906108c
SS
797 last_source_file = name;
798 last_source_start_addr = start_addr;
799 file_symbols = NULL;
800 global_symbols = NULL;
801 within_function = 0;
802 have_line_numbers = 0;
803
804 /* Context stack is initially empty. Allocate first one with room
805 for 10 levels; reuse it forever afterward. */
806 if (context_stack == NULL)
807 {
808 context_stack_size = INITIAL_CONTEXT_STACK_SIZE;
809 context_stack = (struct context_stack *)
810 xmalloc (context_stack_size * sizeof (struct context_stack));
811 }
812 context_stack_depth = 0;
813
801e3a5b
JB
814 /* We shouldn't have any address map at this point. */
815 gdb_assert (! pending_addrmap);
816
c906108c
SS
817 /* Initialize the list of sub source files with one entry for this
818 file (the top-level source file). */
819
820 subfiles = NULL;
821 current_subfile = NULL;
822 start_subfile (name, dirname);
823}
824
4584e32e
DE
825/* Subroutine of end_symtab to simplify it.
826 Look for a subfile that matches the main source file's basename.
827 If there is only one, and if the main source file doesn't have any
828 symbol or line number information, then copy this file's symtab and
829 line_vector to the main source file's subfile and discard the other subfile.
830 This can happen because of a compiler bug or from the user playing games
831 with #line or from things like a distributed build system that manipulates
832 the debug info. */
833
834static void
835watch_main_source_file_lossage (void)
836{
837 struct subfile *mainsub, *subfile;
838
839 /* Find the main source file.
840 This loop could be eliminated if start_symtab saved it for us. */
841 mainsub = NULL;
842 for (subfile = subfiles; subfile; subfile = subfile->next)
843 {
844 /* The main subfile is guaranteed to be the last one. */
845 if (subfile->next == NULL)
846 mainsub = subfile;
847 }
848
849 /* If the main source file doesn't have any line number or symbol info,
850 look for an alias in another subfile.
851 We have to watch for mainsub == NULL here. It's a quirk of end_symtab,
852 it can return NULL so there may not be a main subfile. */
853
854 if (mainsub
855 && mainsub->line_vector == NULL
856 && mainsub->symtab == NULL)
857 {
858 const char *mainbase = lbasename (mainsub->name);
859 int nr_matches = 0;
860 struct subfile *prevsub;
861 struct subfile *mainsub_alias = NULL;
862 struct subfile *prev_mainsub_alias = NULL;
863
864 prevsub = NULL;
865 for (subfile = subfiles;
866 /* Stop before we get to the last one. */
867 subfile->next;
868 subfile = subfile->next)
869 {
870 if (strcmp (lbasename (subfile->name), mainbase) == 0)
871 {
872 ++nr_matches;
873 mainsub_alias = subfile;
874 prev_mainsub_alias = prevsub;
875 }
876 prevsub = subfile;
877 }
878
879 if (nr_matches == 1)
880 {
881 gdb_assert (mainsub_alias != NULL && mainsub_alias != mainsub);
882
883 /* Found a match for the main source file.
884 Copy its line_vector and symtab to the main subfile
885 and then discard it. */
886
887 mainsub->line_vector = mainsub_alias->line_vector;
888 mainsub->line_vector_length = mainsub_alias->line_vector_length;
889 mainsub->symtab = mainsub_alias->symtab;
890
891 if (prev_mainsub_alias == NULL)
892 subfiles = mainsub_alias->next;
893 else
894 prev_mainsub_alias->next = mainsub_alias->next;
895 xfree (mainsub_alias);
896 }
897 }
898}
899
07e7f39f
JK
900/* Helper function for qsort. Parametes are `struct block *' pointers,
901 function sorts them in descending order by their BLOCK_START. */
902
903static int
904block_compar (const void *ap, const void *bp)
905{
906 const struct block *a = *(const struct block **) ap;
907 const struct block *b = *(const struct block **) bp;
908
909 return ((BLOCK_START (b) > BLOCK_START (a))
910 - (BLOCK_START (b) < BLOCK_START (a)));
911}
912
c906108c
SS
913/* Finish the symbol definitions for one main source file, close off
914 all the lexical contexts for that file (creating struct block's for
915 them), then make the struct symtab for that file and put it in the
916 list of all such.
917
918 END_ADDR is the address of the end of the file's text. SECTION is
919 the section number (in objfile->section_offsets) of the blockvector
920 and linetable.
921
922 Note that it is possible for end_symtab() to return NULL. In
923 particular, for the DWARF case at least, it will return NULL when
924 it finds a compilation unit that has exactly one DIE, a
925 TAG_compile_unit DIE. This can happen when we link in an object
926 file that was compiled from an empty source file. Returning NULL
927 is probably not the correct thing to do, because then gdb will
928 never know about this empty file (FIXME). */
929
930struct symtab *
931end_symtab (CORE_ADDR end_addr, struct objfile *objfile, int section)
932{
52f0bd74
AC
933 struct symtab *symtab = NULL;
934 struct blockvector *blockvector;
935 struct subfile *subfile;
936 struct context_stack *cstk;
c906108c
SS
937 struct subfile *nextsub;
938
939 /* Finish the lexical context of the last function in the file; pop
940 the context stack. */
941
942 if (context_stack_depth > 0)
943 {
944 cstk = pop_context ();
945 /* Make a block for the local symbols within. */
946 finish_block (cstk->name, &local_symbols, cstk->old_blocks,
947 cstk->start_addr, end_addr, objfile);
948
949 if (context_stack_depth > 0)
950 {
951 /* This is said to happen with SCO. The old coffread.c
952 code simply emptied the context stack, so we do the
953 same. FIXME: Find out why it is happening. This is not
954 believed to happen in most cases (even for coffread.c);
955 it used to be an abort(). */
23136709 956 complaint (&symfile_complaints,
3d263c1d 957 _("Context stack not empty in end_symtab"));
c906108c
SS
958 context_stack_depth = 0;
959 }
960 }
961
962 /* Reordered executables may have out of order pending blocks; if
963 OBJF_REORDERED is true, then sort the pending blocks. */
964 if ((objfile->flags & OBJF_REORDERED) && pending_blocks)
965 {
07e7f39f
JK
966 unsigned count = 0;
967 struct pending_block *pb;
968 struct block **barray, **bp;
969 struct cleanup *back_to;
c906108c 970
07e7f39f
JK
971 for (pb = pending_blocks; pb != NULL; pb = pb->next)
972 count++;
c906108c 973
07e7f39f
JK
974 barray = xmalloc (sizeof (*barray) * count);
975 back_to = make_cleanup (xfree, barray);
c906108c 976
07e7f39f
JK
977 bp = barray;
978 for (pb = pending_blocks; pb != NULL; pb = pb->next)
979 *bp++ = pb->block;
980
981 qsort (barray, count, sizeof (*barray), block_compar);
982
983 bp = barray;
984 for (pb = pending_blocks; pb != NULL; pb = pb->next)
985 pb->block = *bp++;
986
987 do_cleanups (back_to);
c906108c
SS
988 }
989
990 /* Cleanup any undefined types that have been left hanging around
991 (this needs to be done before the finish_blocks so that
992 file_symbols is still good).
c5aa993b 993
c906108c
SS
994 Both cleanup_undefined_types and finish_global_stabs are stabs
995 specific, but harmless for other symbol readers, since on gdb
996 startup or when finished reading stabs, the state is set so these
997 are no-ops. FIXME: Is this handled right in case of QUIT? Can
998 we make this cleaner? */
999
46bf5051 1000 cleanup_undefined_types (objfile);
c906108c
SS
1001 finish_global_stabs (objfile);
1002
1003 if (pending_blocks == NULL
1004 && file_symbols == NULL
1005 && global_symbols == NULL
99d9066e
JB
1006 && have_line_numbers == 0
1007 && pending_macros == NULL)
c906108c
SS
1008 {
1009 /* Ignore symtabs that have no functions with real debugging
1010 info. */
1011 blockvector = NULL;
1012 }
1013 else
1014 {
1015 /* Define the STATIC_BLOCK & GLOBAL_BLOCK, and build the
1016 blockvector. */
1017 finish_block (0, &file_symbols, 0, last_source_start_addr, end_addr,
1018 objfile);
1019 finish_block (0, &global_symbols, 0, last_source_start_addr, end_addr,
1020 objfile);
1021 blockvector = make_blockvector (objfile);
1022 }
1023
c295b2e5
JB
1024 /* Read the line table if it has to be read separately. */
1025 if (objfile->sf->sym_read_linetable != NULL)
1026 objfile->sf->sym_read_linetable ();
c906108c 1027
4584e32e
DE
1028 /* Handle the case where the debug info specifies a different path
1029 for the main source file. It can cause us to lose track of its
1030 line number information. */
1031 watch_main_source_file_lossage ();
1032
c906108c
SS
1033 /* Now create the symtab objects proper, one for each subfile. */
1034 /* (The main file is the last one on the chain.) */
1035
1036 for (subfile = subfiles; subfile; subfile = nextsub)
1037 {
1038 int linetablesize = 0;
1039 symtab = NULL;
1040
1041 /* If we have blocks of symbols, make a symtab. Otherwise, just
1042 ignore this file and any line number info in it. */
1043 if (blockvector)
1044 {
1045 if (subfile->line_vector)
1046 {
1047 linetablesize = sizeof (struct linetable) +
1048 subfile->line_vector->nitems * sizeof (struct linetable_entry);
c906108c
SS
1049
1050 /* Like the pending blocks, the line table may be
1051 scrambled in reordered executables. Sort it if
1052 OBJF_REORDERED is true. */
1053 if (objfile->flags & OBJF_REORDERED)
1054 qsort (subfile->line_vector->item,
1055 subfile->line_vector->nitems,
c5aa993b 1056 sizeof (struct linetable_entry), compare_line_numbers);
c906108c
SS
1057 }
1058
1059 /* Now, allocate a symbol table. */
cb1df416
DJ
1060 if (subfile->symtab == NULL)
1061 symtab = allocate_symtab (subfile->name, objfile);
1062 else
1063 symtab = subfile->symtab;
c906108c
SS
1064
1065 /* Fill in its components. */
1066 symtab->blockvector = blockvector;
99d9066e 1067 symtab->macro_table = pending_macros;
c906108c
SS
1068 if (subfile->line_vector)
1069 {
1070 /* Reallocate the line table on the symbol obstack */
1071 symtab->linetable = (struct linetable *)
4a146b47 1072 obstack_alloc (&objfile->objfile_obstack, linetablesize);
c906108c
SS
1073 memcpy (symtab->linetable, subfile->line_vector, linetablesize);
1074 }
1075 else
1076 {
1077 symtab->linetable = NULL;
1078 }
1079 symtab->block_line_section = section;
1080 if (subfile->dirname)
1081 {
1082 /* Reallocate the dirname on the symbol obstack */
1083 symtab->dirname = (char *)
4a146b47 1084 obstack_alloc (&objfile->objfile_obstack,
c906108c
SS
1085 strlen (subfile->dirname) + 1);
1086 strcpy (symtab->dirname, subfile->dirname);
1087 }
1088 else
1089 {
1090 symtab->dirname = NULL;
1091 }
1092 symtab->free_code = free_linetable;
de4f826b 1093 symtab->free_func = NULL;
c906108c
SS
1094
1095 /* Use whatever language we have been using for this
1096 subfile, not the one that was deduced in allocate_symtab
1097 from the filename. We already did our own deducing when
1098 we created the subfile, and we may have altered our
1099 opinion of what language it is from things we found in
1100 the symbols. */
1101 symtab->language = subfile->language;
1102
1103 /* Save the debug format string (if any) in the symtab */
1104 if (subfile->debugformat != NULL)
1105 {
1106 symtab->debugformat = obsavestring (subfile->debugformat,
c5aa993b 1107 strlen (subfile->debugformat),
4a146b47 1108 &objfile->objfile_obstack);
c906108c
SS
1109 }
1110
303b6f5d
DJ
1111 /* Similarly for the producer. */
1112 if (subfile->producer != NULL)
1113 symtab->producer = obsavestring (subfile->producer,
1114 strlen (subfile->producer),
1115 &objfile->objfile_obstack);
1116
c906108c
SS
1117 /* All symtabs for the main file and the subfiles share a
1118 blockvector, so we need to clear primary for everything
1119 but the main file. */
1120
1121 symtab->primary = 0;
1122 }
24be086d
JB
1123 else
1124 {
1125 if (subfile->symtab)
1126 {
1127 /* Since we are ignoring that subfile, we also need
1128 to unlink the associated empty symtab that we created.
1129 Otherwise, we can into trouble because various parts
1130 such as the block-vector are uninitialized whereas
1131 the rest of the code assumes that they are.
1132
1133 We can only unlink the symtab because it was allocated
1134 on the objfile obstack. */
1135 struct symtab *s;
1136
1137 if (objfile->symtabs == subfile->symtab)
1138 objfile->symtabs = objfile->symtabs->next;
1139 else
1140 ALL_OBJFILE_SYMTABS (objfile, s)
1141 if (s->next == subfile->symtab)
1142 {
1143 s->next = s->next->next;
1144 break;
1145 }
1146 subfile->symtab = NULL;
1147 }
1148 }
c906108c
SS
1149 if (subfile->name != NULL)
1150 {
b8c9b27d 1151 xfree ((void *) subfile->name);
c906108c
SS
1152 }
1153 if (subfile->dirname != NULL)
1154 {
b8c9b27d 1155 xfree ((void *) subfile->dirname);
c906108c
SS
1156 }
1157 if (subfile->line_vector != NULL)
1158 {
b8c9b27d 1159 xfree ((void *) subfile->line_vector);
c906108c
SS
1160 }
1161 if (subfile->debugformat != NULL)
1162 {
b8c9b27d 1163 xfree ((void *) subfile->debugformat);
c906108c 1164 }
303b6f5d
DJ
1165 if (subfile->producer != NULL)
1166 xfree (subfile->producer);
c906108c
SS
1167
1168 nextsub = subfile->next;
b8c9b27d 1169 xfree ((void *) subfile);
c906108c
SS
1170 }
1171
1172 /* Set this for the main source file. */
1173 if (symtab)
1174 {
1175 symtab->primary = 1;
1176 }
1177
cb1df416
DJ
1178 /* Default any symbols without a specified symtab to the primary
1179 symtab. */
1180 if (blockvector)
1181 {
1182 int block_i;
1183
1184 for (block_i = 0; block_i < BLOCKVECTOR_NBLOCKS (blockvector); block_i++)
1185 {
1186 struct block *block = BLOCKVECTOR_BLOCK (blockvector, block_i);
1187 struct symbol *sym;
1188 struct dict_iterator iter;
1189
edb3359d
DJ
1190 /* Inlined functions may have symbols not in the global or static
1191 symbol lists. */
1192 if (BLOCK_FUNCTION (block) != NULL)
1193 if (SYMBOL_SYMTAB (BLOCK_FUNCTION (block)) == NULL)
1194 SYMBOL_SYMTAB (BLOCK_FUNCTION (block)) = symtab;
1195
cb1df416
DJ
1196 for (sym = dict_iterator_first (BLOCK_DICT (block), &iter);
1197 sym != NULL;
1198 sym = dict_iterator_next (&iter))
1199 if (SYMBOL_SYMTAB (sym) == NULL)
1200 SYMBOL_SYMTAB (sym) = symtab;
1201 }
1202 }
1203
c906108c
SS
1204 last_source_file = NULL;
1205 current_subfile = NULL;
99d9066e 1206 pending_macros = NULL;
801e3a5b
JB
1207 if (pending_addrmap)
1208 {
1209 obstack_free (&pending_addrmap_obstack, NULL);
1210 pending_addrmap = NULL;
1211 }
c906108c
SS
1212
1213 return symtab;
1214}
1215
1216/* Push a context block. Args are an identifying nesting level
1217 (checkable when you pop it), and the starting PC address of this
1218 context. */
1219
1220struct context_stack *
1221push_context (int desc, CORE_ADDR valu)
1222{
52f0bd74 1223 struct context_stack *new;
c906108c
SS
1224
1225 if (context_stack_depth == context_stack_size)
1226 {
1227 context_stack_size *= 2;
1228 context_stack = (struct context_stack *)
1229 xrealloc ((char *) context_stack,
c5aa993b 1230 (context_stack_size * sizeof (struct context_stack)));
c906108c
SS
1231 }
1232
1233 new = &context_stack[context_stack_depth++];
1234 new->depth = desc;
1235 new->locals = local_symbols;
1236 new->params = param_symbols;
1237 new->old_blocks = pending_blocks;
1238 new->start_addr = valu;
27aa8d6a 1239 new->using_directives = using_directives;
c906108c
SS
1240 new->name = NULL;
1241
1242 local_symbols = NULL;
1243 param_symbols = NULL;
27aa8d6a 1244 using_directives = NULL;
c906108c
SS
1245
1246 return new;
1247}
0c5e171a 1248
a672ef13
KD
1249/* Pop a context block. Returns the address of the context block just
1250 popped. */
1251
0c5e171a
KD
1252struct context_stack *
1253pop_context (void)
1254{
1255 gdb_assert (context_stack_depth > 0);
1256 return (&context_stack[--context_stack_depth]);
1257}
1258
c906108c 1259\f
357e46e7 1260
c906108c
SS
1261/* Compute a small integer hash code for the given name. */
1262
1263int
1264hashname (char *name)
1265{
357e46e7 1266 return (hash(name,strlen(name)) % HASHSIZE);
c906108c
SS
1267}
1268\f
1269
1270void
1271record_debugformat (char *format)
1272{
1b36a34b 1273 current_subfile->debugformat = xstrdup (format);
c906108c
SS
1274}
1275
303b6f5d
DJ
1276void
1277record_producer (const char *producer)
1278{
05279ca0
JB
1279 /* The producer is not always provided in the debugging info.
1280 Do nothing if PRODUCER is NULL. */
1281 if (producer == NULL)
1282 return;
1283
1b36a34b 1284 current_subfile->producer = xstrdup (producer);
303b6f5d
DJ
1285}
1286
c906108c
SS
1287/* Merge the first symbol list SRCLIST into the second symbol list
1288 TARGETLIST by repeated calls to add_symbol_to_list(). This
1289 procedure "frees" each link of SRCLIST by adding it to the
1290 free_pendings list. Caller must set SRCLIST to a null list after
1291 calling this function.
1292
1293 Void return. */
1294
1295void
1296merge_symbol_lists (struct pending **srclist, struct pending **targetlist)
1297{
52f0bd74 1298 int i;
c906108c
SS
1299
1300 if (!srclist || !*srclist)
1301 return;
1302
1303 /* Merge in elements from current link. */
1304 for (i = 0; i < (*srclist)->nsyms; i++)
1305 add_symbol_to_list ((*srclist)->symbol[i], targetlist);
1306
1307 /* Recurse on next. */
1308 merge_symbol_lists (&(*srclist)->next, targetlist);
1309
1310 /* "Free" the current link. */
1311 (*srclist)->next = free_pendings;
1312 free_pendings = (*srclist);
1313}
1314\f
1315/* Initialize anything that needs initializing when starting to read a
1316 fresh piece of a symbol file, e.g. reading in the stuff
1317 corresponding to a psymtab. */
1318
1319void
fba45db2 1320buildsym_init (void)
c906108c
SS
1321{
1322 free_pendings = NULL;
1323 file_symbols = NULL;
1324 global_symbols = NULL;
1325 pending_blocks = NULL;
99d9066e 1326 pending_macros = NULL;
801e3a5b
JB
1327
1328 /* We shouldn't have any address map at this point. */
1329 gdb_assert (! pending_addrmap);
1330 pending_addrmap_interesting = 0;
c906108c
SS
1331}
1332
1333/* Initialize anything that needs initializing when a completely new
1334 symbol file is specified (not just adding some symbols from another
1335 file, e.g. a shared library). */
1336
1337void
fba45db2 1338buildsym_new_init (void)
c906108c
SS
1339{
1340 buildsym_init ();
1341}
This page took 0.659378 seconds and 4 git commands to generate.