Subversion Repositories Kolibri OS

Rev

Rev 5222 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5222 Rev 6324
Line 1... Line 1...
1
/* ECOFF debugging support.
1
/* ECOFF debugging support.
2
   Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-
 
3
   2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
-
 
4
   Free Software Foundation, Inc.
2
   Copyright (C) 1993-2015 Free Software Foundation, Inc.
5
   Contributed by Cygnus Support.
3
   Contributed by Cygnus Support.
6
   This file was put together by Ian Lance Taylor .  A
4
   This file was put together by Ian Lance Taylor .  A
7
   good deal of it comes directly from mips-tfile.c, by Michael
5
   good deal of it comes directly from mips-tfile.c, by Michael
8
   Meissner .
6
   Meissner .
Line 1552... Line 1550...
1552
add_string (varray_t *vp,			/* string obstack */
1550
add_string (varray_t *vp,			/* string obstack */
1553
	    struct hash_control *hash_tbl,	/* ptr to hash table */
1551
	    struct hash_control *hash_tbl,	/* ptr to hash table */
1554
	    const char *str,			/* string */
1552
	    const char *str,			/* string */
1555
	    shash_t **ret_hash			/* return hash pointer */)
1553
	    shash_t **ret_hash			/* return hash pointer */)
1556
{
1554
{
1557
  register unsigned long len = strlen (str);
1555
  unsigned long len = strlen (str);
1558
  register shash_t *hash_ptr;
1556
  shash_t *hash_ptr;
Line 1559... Line 1557...
1559
 
1557
 
1560
  if (len >= PAGE_USIZE)
1558
  if (len >= PAGE_USIZE)
Line 1561... Line 1559...
1561
    as_fatal (_("string too big (%lu bytes)"), len);
1559
    as_fatal (_("string too big (%lu bytes)"), len);
1562
 
1560
 
1563
  hash_ptr = (shash_t *) hash_find (hash_tbl, str);
1561
  hash_ptr = (shash_t *) hash_find (hash_tbl, str);
1564
  if (hash_ptr == (shash_t *) NULL)
1562
  if (hash_ptr == (shash_t *) NULL)
Line 1565... Line 1563...
1565
    {
1563
    {
1566
      register const char *err;
1564
      const char *err;
1567
 
1565
 
1568
      if (vp->objects_last_page + len >= PAGE_USIZE)
1566
      if (vp->objects_last_page + len >= PAGE_USIZE)
Line 1604... Line 1602...
1604
		  bfd_vma addend,	/* addend to sym_value.  */
1602
		  bfd_vma addend,	/* addend to sym_value.  */
1605
		  symint_t value,	/* value of symbol */
1603
		  symint_t value,	/* value of symbol */
1606
		  symint_t indx		/* index to local/aux. syms */)
1604
		  symint_t indx		/* index to local/aux. syms */)
1607
{
1605
{
1608
  localsym_t *psym;
1606
  localsym_t *psym;
1609
  register scope_t *pscope;
1607
  scope_t *pscope;
1610
  register thead_t *ptag_head;
1608
  thead_t *ptag_head;
1611
  register tag_t *ptag;
1609
  tag_t *ptag;
1612
  register tag_t *ptag_next;
1610
  tag_t *ptag_next;
1613
  register varray_t *vp;
1611
  varray_t *vp;
1614
  register int scope_delta = 0;
1612
  int scope_delta = 0;
1615
  shash_t *hash_ptr = (shash_t *) NULL;
1613
  shash_t *hash_ptr = (shash_t *) NULL;
Line 1616... Line 1614...
1616
 
1614
 
1617
  if (cur_file_ptr == (efdr_t *) NULL)
1615
  if (cur_file_ptr == (efdr_t *) NULL)
Line 1802... Line 1800...
1802
   for integral aux types, not just symints.  */
1800
   for integral aux types, not just symints.  */
Line 1803... Line 1801...
1803
 
1801
 
1804
static symint_t
1802
static symint_t
1805
add_aux_sym_symint (symint_t aux_word /* auxiliary information word */)
1803
add_aux_sym_symint (symint_t aux_word /* auxiliary information word */)
1806
{
1804
{
1807
  register varray_t *vp;
1805
  varray_t *vp;
Line 1808... Line 1806...
1808
  register aux_t *aux_ptr;
1806
  aux_t *aux_ptr;
1809
 
1807
 
Line 1810... Line 1808...
1810
  if (cur_file_ptr == (efdr_t *) NULL)
1808
  if (cur_file_ptr == (efdr_t *) NULL)
Line 1825... Line 1823...
1825
/* Add an auxiliary symbol (passing a file/symbol index combo).  */
1823
/* Add an auxiliary symbol (passing a file/symbol index combo).  */
Line 1826... Line 1824...
1826
 
1824
 
1827
static symint_t
1825
static symint_t
1828
add_aux_sym_rndx (int file_index, symint_t sym_index)
1826
add_aux_sym_rndx (int file_index, symint_t sym_index)
1829
{
1827
{
1830
  register varray_t *vp;
1828
  varray_t *vp;
Line 1831... Line 1829...
1831
  register aux_t *aux_ptr;
1829
  aux_t *aux_ptr;
1832
 
1830
 
Line 1833... Line 1831...
1833
  if (cur_file_ptr == (efdr_t *) NULL)
1831
  if (cur_file_ptr == (efdr_t *) NULL)
Line 1852... Line 1850...
1852
static symint_t
1850
static symint_t
1853
add_aux_sym_tir (type_info_t *t,	/* current type information */
1851
add_aux_sym_tir (type_info_t *t,	/* current type information */
1854
		 hash_state_t state,	/* whether to hash type or not */
1852
		 hash_state_t state,	/* whether to hash type or not */
1855
		 thash_t **hash_tbl	/* pointer to hash table to use */)
1853
		 thash_t **hash_tbl	/* pointer to hash table to use */)
1856
{
1854
{
1857
  register varray_t *vp;
1855
  varray_t *vp;
1858
  register aux_t *aux_ptr;
1856
  aux_t *aux_ptr;
1859
  static AUXU init_aux;
1857
  static AUXU init_aux;
1860
  symint_t ret;
1858
  symint_t ret;
1861
  int i;
1859
  int i;
1862
  AUXU aux;
1860
  AUXU aux;
Line 1900... Line 1898...
1900
     and others can be put into the hash list, but cannot use existing
1898
     and others can be put into the hash list, but cannot use existing
1901
     types because other aux entries precede this one.  */
1899
     types because other aux entries precede this one.  */
Line 1902... Line 1900...
1902
 
1900
 
1903
  if (state != hash_no)
1901
  if (state != hash_no)
1904
    {
1902
    {
1905
      register thash_t *hash_ptr;
1903
      thash_t *hash_ptr;
Line 1906... Line 1904...
1906
      register symint_t hi;
1904
      symint_t hi;
1907
 
1905
 
Line 1908... Line 1906...
1908
      hi = aux.isym & ((1 << HASHBITS) - 1);
1906
      hi = aux.isym & ((1 << HASHBITS) - 1);
Line 1957... Line 1955...
1957
 
1955
 
1958
  if (t->basic_type == bt_Struct
1956
  if (t->basic_type == bt_Struct
1959
      || t->basic_type == bt_Union
1957
      || t->basic_type == bt_Union
1960
      || t->basic_type == bt_Enum)
1958
      || t->basic_type == bt_Enum)
1961
    {
1959
    {
1962
      register symint_t file_index = t->tag_ptr->ifd;
1960
      symint_t file_index = t->tag_ptr->ifd;
1963
      register localsym_t *sym = t->tag_ptr->sym;
1961
      localsym_t *sym = t->tag_ptr->sym;
Line 1964... Line 1962...
1964
      register forward_t *forward_ref = allocate_forward ();
1962
      forward_t *forward_ref = allocate_forward ();
1965
 
1963
 
1966
      if (sym != (localsym_t *) NULL)
1964
      if (sym != (localsym_t *) NULL)
1967
	{
1965
	{
Line 2114... Line 2112...
2114
   this is the current procedure.  */
2112
   this is the current procedure.  */
Line 2115... Line 2113...
2115
 
2113
 
2116
static void
2114
static void
2117
add_procedure (char *func /* func name */)
2115
add_procedure (char *func /* func name */)
2118
{
2116
{
2119
  register varray_t *vp;
2117
  varray_t *vp;
2120
  register proc_t *new_proc_ptr;
2118
  proc_t *new_proc_ptr;
Line 2121... Line 2119...
2121
  symbolS *sym;
2119
  symbolS *sym;
2122
 
2120
 
2123
#ifdef ECOFF_DEBUG
2121
#ifdef ECOFF_DEBUG
Line 2184... Line 2182...
2184
   where the current file structure lives.  */
2182
   where the current file structure lives.  */
Line 2185... Line 2183...
2185
 
2183
 
2186
static void
2184
static void
2187
add_file (const char *file_name, int indx ATTRIBUTE_UNUSED, int fake)
2185
add_file (const char *file_name, int indx ATTRIBUTE_UNUSED, int fake)
2188
{
2186
{
2189
  register int first_ch;
2187
  int first_ch;
Line 2190... Line 2188...
2190
  register efdr_t *fil_ptr;
2188
  efdr_t *fil_ptr;
2191
 
2189
 
2192
#ifdef ECOFF_DEBUG
2190
#ifdef ECOFF_DEBUG
2193
  if (debug)
2191
  if (debug)
Line 2434... Line 2432...
2434
      as_warn (_(".begin directive without a preceding .ent directive"));
2432
      as_warn (_(".begin directive without a preceding .ent directive"));
2435
      demand_empty_rest_of_line ();
2433
      demand_empty_rest_of_line ();
2436
      return;
2434
      return;
2437
    }
2435
    }
Line 2438... Line -...
2438
 
-
 
2439
  name = input_line_pointer;
2436
 
Line 2440... Line 2437...
2440
  name_end = get_symbol_end ();
2437
  name_end = get_symbol_name (&name);
2441
 
2438
 
2442
  (void) add_ecoff_symbol ((const char *) NULL, st_Block, sc_Text,
2439
  (void) add_ecoff_symbol ((const char *) NULL, st_Block, sc_Text,
Line 2443... Line 2440...
2443
			   symbol_find_or_make (name),
2440
			   symbol_find_or_make (name),
Line 2444... Line 2441...
2444
			   (bfd_vma) 0, (symint_t) 0, (symint_t) 0);
2441
			   (bfd_vma) 0, (symint_t) 0, (symint_t) 0);
2445
 
2442
 
2446
  *input_line_pointer = name_end;
2443
  (void) restore_line_pointer (name_end);
2447
 
2444
 
Line 2472... Line 2469...
2472
      as_warn (_(".bend directive without a preceding .ent directive"));
2469
      as_warn (_(".bend directive without a preceding .ent directive"));
2473
      demand_empty_rest_of_line ();
2470
      demand_empty_rest_of_line ();
2474
      return;
2471
      return;
2475
    }
2472
    }
Line 2476... Line -...
2476
 
-
 
2477
  name = input_line_pointer;
2473
 
Line 2478... Line 2474...
2478
  name_end = get_symbol_end ();
2474
  name_end = get_symbol_name (&name);
2479
 
2475
 
2480
  /* The value is the distance between the .bend directive and the
2476
  /* The value is the distance between the .bend directive and the
2481
     corresponding symbol.  We fill in the offset when we write out
2477
     corresponding symbol.  We fill in the offset when we write out
Line 2485... Line 2481...
2485
    as_warn (_(".bend directive names unknown symbol"));
2481
    as_warn (_(".bend directive names unknown symbol"));
2486
  else
2482
  else
2487
    (void) add_ecoff_symbol ((const char *) NULL, st_End, sc_Text, endsym,
2483
    (void) add_ecoff_symbol ((const char *) NULL, st_End, sc_Text, endsym,
2488
			     (bfd_vma) 0, (symint_t) 0, (symint_t) 0);
2484
			     (bfd_vma) 0, (symint_t) 0, (symint_t) 0);
Line 2489... Line 2485...
2489
 
2485
 
Line 2490... Line 2486...
2490
  *input_line_pointer = name_end;
2486
  restore_line_pointer (name_end);
2491
 
2487
 
2492
  /* The line number follows, but we don't use it.  */
2488
  /* The line number follows, but we don't use it.  */
2493
  (void) get_absolute_expression ();
2489
  (void) get_absolute_expression ();
Line 2519... Line 2515...
2519
 
2515
 
Line 2520... Line 2516...
2520
  ecoff_debugging_seen = 1;
2516
  ecoff_debugging_seen = 1;
Line 2521... Line -...
2521
 
-
 
2522
  SKIP_WHITESPACE ();
2517
 
Line 2523... Line 2518...
2523
 
2518
  SKIP_WHITESPACE ();
2524
  name = input_line_pointer;
2519
 
2525
  name_end = get_symbol_end ();
2520
  name_end = get_symbol_name (&name);
2526
 
2521
 
Line 2544... Line 2539...
2544
      coff_value = 0;
2539
      coff_value = 0;
2545
      coff_sym_value = (symbolS *) NULL;
2540
      coff_sym_value = (symbolS *) NULL;
2546
      coff_sym_addend = 0;
2541
      coff_sym_addend = 0;
2547
    }
2542
    }
Line 2548... Line 2543...
2548
 
2543
 
Line 2549... Line 2544...
2549
  *input_line_pointer = name_end;
2544
  restore_line_pointer (name_end);
2550
 
2545
 
Line 2551... Line 2546...
2551
  demand_empty_rest_of_line ();
2546
  demand_empty_rest_of_line ();
Line 2757... Line 2752...
2757
      as_warn (_(".tag pseudo-op used outside of .def/.endef; ignored"));
2752
      as_warn (_(".tag pseudo-op used outside of .def/.endef; ignored"));
2758
      demand_empty_rest_of_line ();
2753
      demand_empty_rest_of_line ();
2759
      return;
2754
      return;
2760
    }
2755
    }
Line 2761... Line -...
2761
 
-
 
2762
  name = input_line_pointer;
2756
 
Line 2763... Line 2757...
2763
  name_end = get_symbol_end ();
2757
  name_end = get_symbol_name (&name);
Line 2764... Line 2758...
2764
 
2758
 
Line 2765... Line 2759...
2765
  coff_tag = xstrdup (name);
2759
  coff_tag = xstrdup (name);
2766
 
2760
 
Line 2767... Line 2761...
2767
  *input_line_pointer = name_end;
2761
  (void) restore_line_pointer (name_end);
Line 3004... Line 2998...
3004
      as_warn (_(".end directive without a preceding .ent directive"));
2998
      as_warn (_(".end directive without a preceding .ent directive"));
3005
      demand_empty_rest_of_line ();
2999
      demand_empty_rest_of_line ();
3006
      return;
3000
      return;
3007
    }
3001
    }
Line 3008... Line -...
3008
 
-
 
3009
  name = input_line_pointer;
3002
 
Line 3010... Line 3003...
3010
  name_end = get_symbol_end ();
3003
  name_end = get_symbol_name (&name);
3011
 
3004
 
3012
  if (name == input_line_pointer)
3005
  if (name == input_line_pointer)
3013
    {
3006
    {
3014
      as_warn (_(".end directive has no name"));
3007
      as_warn (_(".end directive has no name"));
3015
      *input_line_pointer = name_end;
3008
      (void) restore_line_pointer (name_end);
3016
      demand_empty_rest_of_line ();
3009
      demand_empty_rest_of_line ();
Line 3017... Line 3010...
3017
      return;
3010
      return;
Line 3031... Line 3024...
3031
					 frag_now),
3024
					 frag_now),
3032
			     (bfd_vma) 0, (symint_t) 0, (symint_t) 0);
3025
			     (bfd_vma) 0, (symint_t) 0, (symint_t) 0);
Line 3033... Line 3026...
3033
 
3026
 
Line 3034... Line 3027...
3034
  cur_proc_ptr = (proc_t *) NULL;
3027
  cur_proc_ptr = (proc_t *) NULL;
3035
 
3028
 
3036
  *input_line_pointer = name_end;
3029
  (void) restore_line_pointer (name_end);
3037
  demand_empty_rest_of_line ();
3030
  demand_empty_rest_of_line ();
3038
}
3031
}
Line 3053... Line 3046...
3053
      as_warn (_("second .ent directive found before .end directive"));
3046
      as_warn (_("second .ent directive found before .end directive"));
3054
      demand_empty_rest_of_line ();
3047
      demand_empty_rest_of_line ();
3055
      return;
3048
      return;
3056
    }
3049
    }
Line 3057... Line -...
3057
 
-
 
3058
  name = input_line_pointer;
3050
 
Line 3059... Line 3051...
3059
  name_end = get_symbol_end ();
3051
  name_end = get_symbol_name (&name);
3060
 
3052
 
3061
  if (name == input_line_pointer)
3053
  if (name == input_line_pointer)
3062
    {
3054
    {
3063
      as_warn (_(".ent directive has no name"));
3055
      as_warn (_(".ent directive has no name"));
3064
      *input_line_pointer = name_end;
3056
      (void) restore_line_pointer (name_end);
3065
      demand_empty_rest_of_line ();
3057
      demand_empty_rest_of_line ();
Line 3066... Line 3058...
3066
      return;
3058
      return;
Line 3067... Line 3059...
3067
    }
3059
    }
Line 3068... Line 3060...
3068
 
3060
 
3069
  add_procedure (name);
3061
  add_procedure (name);
3070
 
3062
 
3071
  *input_line_pointer = name_end;
3063
  (void) restore_line_pointer (name_end);
Line 3095... Line 3087...
3095
  char *name;
3087
  char *name;
3096
  int c;
3088
  int c;
3097
  symbolS *symbolp;
3089
  symbolS *symbolp;
3098
  valueT size;
3090
  valueT size;
Line 3099... Line -...
3099
 
-
 
3100
  name = input_line_pointer;
3091
 
3101
  c = get_symbol_end ();
3092
  c = get_symbol_name (&name);
3102
  symbolp = symbol_find_or_make (name);
3093
  symbolp = symbol_find_or_make (name);
Line 3103... Line 3094...
3103
  *input_line_pointer = c;
3094
  (void) restore_line_pointer (c);
Line 3104... Line 3095...
3104
 
3095
 
3105
  S_SET_EXTERNAL (symbolp);
3096
  S_SET_EXTERNAL (symbolp);
Line 3348... Line 3339...
3348
  char *name;
3339
  char *name;
3349
  int c;
3340
  int c;
3350
  symbolS *symbolP;
3341
  symbolS *symbolP;
3351
  expressionS exp;
3342
  expressionS exp;
Line 3352... Line -...
3352
 
-
 
3353
  name = input_line_pointer;
3343
 
3354
  c = get_symbol_end ();
3344
  c = get_symbol_name (&name);
3355
  symbolP = symbol_find_or_make (name);
3345
  symbolP = symbol_find_or_make (name);
Line 3356... Line 3346...
3356
  *input_line_pointer = c;
3346
  (void) restore_line_pointer (c);
Line 3357... Line 3347...
3357
 
3347
 
3358
  SKIP_WHITESPACE ();
3348
  SKIP_WHITESPACE ();
Line 3489... Line 3479...
3489
	  as_warn (_("line number (%d) for .stab%c directive cannot fit in index field (20 bits)"),
3479
	  as_warn (_("line number (%d) for .stab%c directive cannot fit in index field (20 bits)"),
3490
		   desc, what);
3480
		   desc, what);
3491
	  return;
3481
	  return;
3492
	}
3482
	}
Line 3493... Line -...
3493
 
-
 
3494
      name = input_line_pointer;
3483
 
3495
      name_end = get_symbol_end ();
-
 
3496
 
3484
      name_end = get_symbol_name (&name);
3497
      sym = symbol_find_or_make (name);
3485
      sym = symbol_find_or_make (name);
Line 3498... Line 3486...
3498
      *input_line_pointer = name_end;
3486
      (void) restore_line_pointer (name_end);
3499
 
3487
 
3500
      value = 0;
3488
      value = 0;
3501
      addend = 0;
3489
      addend = 0;
Line 3667... Line 3655...
3667
		    char **bufend,
3655
		    char **bufend,
3668
		    unsigned long offset,
3656
		    unsigned long offset,
3669
		    long *linecntptr)
3657
		    long *linecntptr)
3670
{
3658
{
3671
  char *bufptr;
3659
  char *bufptr;
3672
  register lineno_list_t *l;
3660
  lineno_list_t *l;
3673
  lineno_list_t *last;
3661
  lineno_list_t *last;
3674
  efdr_t *file;
3662
  efdr_t *file;
3675
  proc_t *proc;
3663
  proc_t *proc;
3676
  unsigned long c;
3664
  unsigned long c;
3677
  long iline;
3665
  long iline;
Line 4592... Line 4580...
4592
   calls a backend function to deal with it.  */
4580
   calls a backend function to deal with it.  */
Line 4593... Line 4581...
4593
 
4581
 
4594
static void
4582
static void
4595
ecoff_setup_ext (void)
4583
ecoff_setup_ext (void)
4596
{
4584
{
Line 4597... Line 4585...
4597
  register symbolS *sym;
4585
  symbolS *sym;
4598
 
4586
 
4599
  for (sym = symbol_rootP; sym != (symbolS *) NULL; sym = symbol_next (sym))
4587
  for (sym = symbol_rootP; sym != (symbolS *) NULL; sym = symbol_next (sym))
4600
    {
4588
    {
Line 4788... Line 4776...
4788
#ifndef MALLOC_CHECK
4776
#ifndef MALLOC_CHECK
Line 4789... Line 4777...
4789
 
4777
 
4790
static page_type *
4778
static page_type *
4791
allocate_cluster (unsigned long npages)
4779
allocate_cluster (unsigned long npages)
4792
{
4780
{
Line 4793... Line 4781...
4793
  register page_type *value = (page_type *) xmalloc (npages * PAGE_USIZE);
4781
  page_type *value = (page_type *) xmalloc (npages * PAGE_USIZE);
4794
 
4782
 
4795
#ifdef ECOFF_DEBUG
4783
#ifdef ECOFF_DEBUG
4796
  if (debug > 3)
4784
  if (debug > 3)
Line 4837... Line 4825...
4837
/* Allocate scoping information.  */
4825
/* Allocate scoping information.  */
Line 4838... Line 4826...
4838
 
4826
 
4839
static scope_t *
4827
static scope_t *
4840
allocate_scope (void)
4828
allocate_scope (void)
4841
{
4829
{
4842
  register scope_t *ptr;
4830
  scope_t *ptr;
Line 4843... Line 4831...
4843
  static scope_t initial_scope;
4831
  static scope_t initial_scope;
Line 4844... Line 4832...
4844
 
4832
 
4845
#ifndef MALLOC_CHECK
4833
#ifndef MALLOC_CHECK
4846
 
4834
 
4847
  ptr = alloc_counts[(int) alloc_type_scope].free_list.f_scope;
4835
  ptr = alloc_counts[(int) alloc_type_scope].free_list.f_scope;
4848
  if (ptr != (scope_t *) NULL)
4836
  if (ptr != (scope_t *) NULL)
4849
    alloc_counts[(int) alloc_type_scope].free_list.f_scope = ptr->free;
4837
    alloc_counts[(int) alloc_type_scope].free_list.f_scope = ptr->free;
4850
  else
4838
  else
Line 4851... Line 4839...
4851
    {
4839
    {
4852
      register int unallocated	= alloc_counts[(int) alloc_type_scope].unallocated;
4840
      int unallocated	= alloc_counts[(int) alloc_type_scope].unallocated;
4853
      register page_type *cur_page	= alloc_counts[(int) alloc_type_scope].cur_page;
4841
      page_type *cur_page	= alloc_counts[(int) alloc_type_scope].cur_page;
4854
 
4842
 
Line 4892... Line 4880...
4892
/* Allocate links for pages in a virtual array.  */
4880
/* Allocate links for pages in a virtual array.  */
Line 4893... Line 4881...
4893
 
4881
 
4894
static vlinks_t *
4882
static vlinks_t *
4895
allocate_vlinks (void)
4883
allocate_vlinks (void)
4896
{
4884
{
4897
  register vlinks_t *ptr;
4885
  vlinks_t *ptr;
Line 4898... Line 4886...
4898
  static vlinks_t initial_vlinks;
4886
  static vlinks_t initial_vlinks;
Line 4899... Line 4887...
4899
 
4887
 
4900
#ifndef MALLOC_CHECK
4888
#ifndef MALLOC_CHECK
Line 4901... Line 4889...
4901
 
4889
 
4902
  register int unallocated = alloc_counts[(int) alloc_type_vlinks].unallocated;
4890
  int unallocated = alloc_counts[(int) alloc_type_vlinks].unallocated;
4903
  register page_type *cur_page = alloc_counts[(int) alloc_type_vlinks].cur_page;
4891
  page_type *cur_page = alloc_counts[(int) alloc_type_vlinks].cur_page;
4904
 
4892
 
Line 4926... Line 4914...
4926
/* Allocate string hash buckets.  */
4914
/* Allocate string hash buckets.  */
Line 4927... Line 4915...
4927
 
4915
 
4928
static shash_t *
4916
static shash_t *
4929
allocate_shash (void)
4917
allocate_shash (void)
4930
{
4918
{
4931
  register shash_t *ptr;
4919
  shash_t *ptr;
Line 4932... Line 4920...
4932
  static shash_t initial_shash;
4920
  static shash_t initial_shash;
Line 4933... Line 4921...
4933
 
4921
 
4934
#ifndef MALLOC_CHECK
4922
#ifndef MALLOC_CHECK
Line 4935... Line 4923...
4935
 
4923
 
4936
  register int unallocated = alloc_counts[(int) alloc_type_shash].unallocated;
4924
  int unallocated = alloc_counts[(int) alloc_type_shash].unallocated;
4937
  register page_type *cur_page = alloc_counts[(int) alloc_type_shash].cur_page;
4925
  page_type *cur_page = alloc_counts[(int) alloc_type_shash].cur_page;
4938
 
4926
 
Line 4960... Line 4948...
4960
/* Allocate type hash buckets.  */
4948
/* Allocate type hash buckets.  */
Line 4961... Line 4949...
4961
 
4949
 
4962
static thash_t *
4950
static thash_t *
4963
allocate_thash (void)
4951
allocate_thash (void)
4964
{
4952
{
4965
  register thash_t *ptr;
4953
  thash_t *ptr;
Line 4966... Line 4954...
4966
  static thash_t initial_thash;
4954
  static thash_t initial_thash;
Line 4967... Line 4955...
4967
 
4955
 
4968
#ifndef MALLOC_CHECK
4956
#ifndef MALLOC_CHECK
Line 4969... Line 4957...
4969
 
4957
 
4970
  register int unallocated = alloc_counts[(int) alloc_type_thash].unallocated;
4958
  int unallocated = alloc_counts[(int) alloc_type_thash].unallocated;
4971
  register page_type *cur_page = alloc_counts[(int) alloc_type_thash].cur_page;
4959
  page_type *cur_page = alloc_counts[(int) alloc_type_thash].cur_page;
4972
 
4960
 
Line 4994... Line 4982...
4994
/* Allocate structure, union, or enum tag information.  */
4982
/* Allocate structure, union, or enum tag information.  */
Line 4995... Line 4983...
4995
 
4983
 
4996
static tag_t *
4984
static tag_t *
4997
allocate_tag (void)
4985
allocate_tag (void)
4998
{
4986
{
4999
  register tag_t *ptr;
4987
  tag_t *ptr;
Line 5000... Line 4988...
5000
  static tag_t initial_tag;
4988
  static tag_t initial_tag;
Line 5001... Line 4989...
5001
 
4989
 
5002
#ifndef MALLOC_CHECK
4990
#ifndef MALLOC_CHECK
5003
 
4991
 
5004
  ptr = alloc_counts[(int) alloc_type_tag].free_list.f_tag;
4992
  ptr = alloc_counts[(int) alloc_type_tag].free_list.f_tag;
5005
  if (ptr != (tag_t *) NULL)
4993
  if (ptr != (tag_t *) NULL)
5006
    alloc_counts[(int) alloc_type_tag].free_list.f_tag = ptr->free;
4994
    alloc_counts[(int) alloc_type_tag].free_list.f_tag = ptr->free;
5007
  else
4995
  else
Line 5008... Line 4996...
5008
    {
4996
    {
5009
      register int unallocated = alloc_counts[(int) alloc_type_tag].unallocated;
4997
      int unallocated = alloc_counts[(int) alloc_type_tag].unallocated;
5010
      register page_type *cur_page = alloc_counts[(int) alloc_type_tag].cur_page;
4998
      page_type *cur_page = alloc_counts[(int) alloc_type_tag].cur_page;
5011
 
4999
 
Line 5049... Line 5037...
5049
/* Allocate forward reference to a yet unknown tag.  */
5037
/* Allocate forward reference to a yet unknown tag.  */
Line 5050... Line 5038...
5050
 
5038
 
5051
static forward_t *
5039
static forward_t *
5052
allocate_forward (void)
5040
allocate_forward (void)
5053
{
5041
{
5054
  register forward_t *ptr;
5042
  forward_t *ptr;
Line 5055... Line 5043...
5055
  static forward_t initial_forward;
5043
  static forward_t initial_forward;
Line 5056... Line 5044...
5056
 
5044
 
5057
#ifndef MALLOC_CHECK
5045
#ifndef MALLOC_CHECK
Line 5058... Line 5046...
5058
 
5046
 
5059
  register int unallocated = alloc_counts[(int) alloc_type_forward].unallocated;
5047
  int unallocated = alloc_counts[(int) alloc_type_forward].unallocated;
5060
  register page_type *cur_page = alloc_counts[(int) alloc_type_forward].cur_page;
5048
  page_type *cur_page = alloc_counts[(int) alloc_type_forward].cur_page;
5061
 
5049
 
Line 5083... Line 5071...
5083
/* Allocate head of type hash list.  */
5071
/* Allocate head of type hash list.  */
Line 5084... Line 5072...
5084
 
5072
 
5085
static thead_t *
5073
static thead_t *
5086
allocate_thead (void)
5074
allocate_thead (void)
5087
{
5075
{
5088
  register thead_t *ptr;
5076
  thead_t *ptr;
Line 5089... Line 5077...
5089
  static thead_t initial_thead;
5077
  static thead_t initial_thead;
Line 5090... Line 5078...
5090
 
5078
 
5091
#ifndef MALLOC_CHECK
5079
#ifndef MALLOC_CHECK
5092
 
5080
 
5093
  ptr = alloc_counts[(int) alloc_type_thead].free_list.f_thead;
5081
  ptr = alloc_counts[(int) alloc_type_thead].free_list.f_thead;
5094
  if (ptr != (thead_t *) NULL)
5082
  if (ptr != (thead_t *) NULL)
5095
    alloc_counts[(int) alloc_type_thead].free_list.f_thead = ptr->free;
5083
    alloc_counts[(int) alloc_type_thead].free_list.f_thead = ptr->free;
5096
  else
5084
  else
Line 5097... Line 5085...
5097
    {
5085
    {
5098
      register int unallocated = alloc_counts[(int) alloc_type_thead].unallocated;
5086
      int unallocated = alloc_counts[(int) alloc_type_thead].unallocated;
5099
      register page_type *cur_page = alloc_counts[(int) alloc_type_thead].cur_page;
5087
      page_type *cur_page = alloc_counts[(int) alloc_type_thead].cur_page;
5100
 
5088
 
Line 5136... Line 5124...
5136
}
5124
}
5137

5125

5138
static lineno_list_t *
5126
static lineno_list_t *
5139
allocate_lineno_list (void)
5127
allocate_lineno_list (void)
5140
{
5128
{
5141
  register lineno_list_t *ptr;
5129
  lineno_list_t *ptr;
5142
  static lineno_list_t initial_lineno_list;
5130
  static lineno_list_t initial_lineno_list;
Line 5143... Line 5131...
5143
 
5131
 
Line 5144... Line 5132...
5144
#ifndef MALLOC_CHECK
5132
#ifndef MALLOC_CHECK
5145
 
5133
 
Line 5146... Line 5134...
5146
  register int unallocated = alloc_counts[(int) alloc_type_lineno].unallocated;
5134
  int unallocated = alloc_counts[(int) alloc_type_lineno].unallocated;
5147
  register page_type *cur_page = alloc_counts[(int) alloc_type_lineno].cur_page;
5135
  page_type *cur_page = alloc_counts[(int) alloc_type_lineno].cur_page;
5148
 
5136
 
5149
  if (unallocated == 0)
5137
  if (unallocated == 0)