Changeset 304


Ignore:
Timestamp:
Jun 6, 2003, 11:12:04 PM (22 years ago)
Author:
bird
Message:

emxomf.c

Location:
trunk/src/emx/src/emxomf
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/src/emxomf/emxomf.c

    • Property cvs2svn:cvs-rev changed from 1.11 to 1.12
    r303 r304  
    174174int *sst_boundary = NULL;
    175175int *tt_boundary = NULL;
    176 
     176/** The HLL version of the HLL debuginfo we're generating.
     177 * Default level is 4.
     178 *
     179 * VisualAge 3.65 iLink support HLL v6
     180 * VisualAge 3.08 iLink support HLL v4
     181 * Link386              support HLL v3 (?)
     182 */
     183int hll_version = 4;
    177184
    178185/* Private variables. */
     
    575582
    576583
    577 /* Add a symbol to weak symbol list */
     584/* Add a symbol to 0 symbol list */
    578585
    579586static struct weaksym *add_weak (const char *symname, const char *modname)
    580587{
    581   struct weaksym *newsym = malloc (sizeof (struct weaksym));
     588  struct weaksym *newsym = xmalloc (sizeof (struct weaksym));
    582589  newsym->name = xstrdup (symname);
    583590  newsym->module = xstrdup (modname);
     
    16481655      while (boundary_idx < boundary_count && boundary[boundary_idx] < end)
    16491656        ++boundary_idx;
     1657      #if 1/* kso #456 2003-06-05: This must be wrong cause we're splitting unneedingly.
     1658            *                      Check if we acutally hit the '< end' check.  */
     1659      if (boundary_idx > 0 && boundary_idx < boundary_count)
     1660      #else
    16501661      if (boundary_idx > 0)
     1662      #endif
    16511663        {
    16521664          tmp = boundary[boundary_idx-1] - off;
     
    18721884  put_8 (0x80);
    18731885  put_8 (0xa1);                 /* Debug info style */
    1874   put_8 (3);                    /* Version 3 */
     1886  put_8 (hll_version);          /* Version */
    18751887  put_mem ("HL", 2);            /* HLL style debug tables */
    18761888  write_rec ();
     
    26912703}
    26922704
     2705/* Write linenumber fixups for HLL v4 records
     2706 * We need fixups for segment idx and offset in the special
     2707 * first entry. */
     2708static void write_linenumfixup(void)
     2709{
     2710  /* ASSUME! flat_thread is defined. */
     2711  /* ASSUME! base seg idx of linnum rec < 128. */
     2712  init_rec (FIXUPP|REC32);
     2713  /* LOC=16-bit sel;I=1;M=1; */
     2714  put_8 (0xc8);
     2715  /* offset 6 (segment number). */
     2716  put_8 (0x06);
     2717  /* F=1;Frame=flat_thread;T=0;P=1;TARGT=0; */
     2718  put_8 (0x84 | (flat_thread << 4));
     2719  /* target seg index? */
     2720  put_8 (text_index);
     2721
     2722  /* LOC=32-offset sel;I=1;M=1; */
     2723  put_8 (0xe4);
     2724  /* offset 8 (offset). */
     2725  put_8 (0x08);
     2726  /* F=1;Frame=flat_thread;T=0;P=1;TARGT=0; */
     2727  put_8 (0x84 | (flat_thread << 4));
     2728  /* target seg index? */
     2729  put_8 (text_index);
     2730  write_rec ();
     2731}
     2732
    26932733
    26942734/* Write line number information to the output file.  Unfortunately,
     
    27582798    len += 1 + strlen (file_list[i]);
    27592799
    2760 /*
    2761  * This is the VAC way, but link386 doesn't like this.
    2762  * too bad :/
    2763  */
    2764 #if 0
    2765 
    2766   /* Filename table first  -  a first entry like visual age does it and does hints on */
    2767 
    2768   init_rec (LINNUM|REC32);
    2769   started = TRUE;
    2770   put_idx (0);                  /* Base Group */
    2771   put_idx (0);                  /* Base Segment */
    2772 
    2773   put_16 (0);                   /* Line number = 0 (special entry) */
    2774   put_8 (3);                    /* Entry type: some visual age stuff I believe */
    2775   put_8 (0);                    /* Reserved */
    2776   put_16 (1);                   /* Count of line number entries */
    2777   put_16 (0);                   /* Segment number */
    2778   put_32 (len);                 /* Size of file names table */
    2779   /* no linenumber */
    2780   put_32 (0);                   /* First column */
    2781   put_32 (0);                   /* Number of columns */
    2782   put_32 (file_grow.count);     /* Number of source and listing files */
    2783 
    2784   for (i = 0; i < file_grow.count; ++i)
    2785     {
    2786       len = strlen (file_list[i]);
    2787       if (len > sizeof (buf) - 1)
    2788         len = sizeof (buf) - 1;
    2789       memcpy (buf, file_list[i], len);
    2790       buf[len] = 0;
    2791       convert_filename (buf);
    2792       if (started && !fits (1 + len))
     2800  /*
     2801   * This is the VAC way, too bad link386 doesn't fancy it.
     2802   */
     2803  if (hll_version >= 4)
     2804    {
     2805      int first_linnum;
     2806      /* Filename table first  -  a first entry like visual age does it and does hints on */
     2807
     2808      init_rec (LINNUM|REC32);
     2809      started = TRUE;
     2810      put_idx (0);                  /* Base Group */
     2811      put_idx (0);                  /* Base Segment */
     2812
     2813      put_16 (0);                   /* Line number = 0 (special entry) */
     2814      put_8 (3);                    /* Entry type: some visual age stuff I believe */
     2815      put_8 (0);                    /* Reserved */
     2816      put_16 (1);                   /* Count of line number entries */
     2817      put_16 (0);                   /* Segment number */
     2818      put_32 (len);                 /* Size of file names table */
     2819      /* no linenumber */
     2820      put_32 (0);                   /* First column */
     2821      put_32 (0);                   /* Number of columns */
     2822      put_32 (file_grow.count);     /* Number of source and listing files */
     2823
     2824      for (i = 0; i < file_grow.count; ++i)
     2825        {
     2826          len = strlen (file_list[i]);
     2827          if (len > sizeof (buf) - 1)
     2828            len = sizeof (buf) - 1;
     2829          memcpy (buf, file_list[i], len);
     2830          buf[len] = 0;
     2831          convert_filename (buf);
     2832          if (started && !fits (1 + len))
     2833            {
     2834              write_rec ();
     2835              started = FALSE;
     2836            }
     2837          if (!started)
     2838            {
     2839              init_rec (LINNUM|REC32);
     2840              put_idx (0);          /* Base Group */
     2841              put_idx (text_index); /* Base Segment */
     2842              started = TRUE;
     2843            }
     2844          put_8 (len);
     2845          put_mem (buf, len);
     2846        }
     2847
     2848      if (started)
     2849        write_rec ();
     2850
     2851
     2852      /* Write the line number table. */
     2853      first_linnum = 1;
     2854      init_rec (LINNUM|REC32);
     2855      started = TRUE;
     2856      put_idx (0);                  /* Base Group */
     2857      put_idx (text_index);         /* Base Segment */
     2858
     2859      put_16 (0);                   /* Line number = 0 (special entry) */
     2860      put_8 (0);                    /* Entry type: source and offset */
     2861      put_8 (0);                    /* Reserved */
     2862      put_16 (valid_lines);         /* Count of line number entries */
     2863      put_16 (0);                   /* Segment number - Fixup required */
     2864      put_32 (0);                   /* Segment offset - Fixup required */
     2865
     2866      for (i = 0; i < line_grow.count; ++i)
     2867        if (line_list[i].line >= 0)
     2868          {
     2869            if (started && !fits (8))
     2870              {
     2871                write_rec ();
     2872                started = FALSE;
     2873                if (first_linnum)
     2874                  {
     2875                    first_linnum = 0;
     2876                    write_linenumfixup();
     2877                  }
     2878              }
     2879            if (!started)
     2880              {
     2881                init_rec (LINNUM|REC32);
     2882                put_idx (0);          /* Base Group */
     2883                put_idx (text_index); /* Base Segment */
     2884                started = TRUE;
     2885              }
     2886            put_16 (line_list[i].line);
     2887            put_16(line_list[i].file_index + 1);
     2888            put_32 (line_list[i].addr);
     2889          }
     2890
     2891      if (started)
     2892        {
     2893          write_rec ();
     2894          if (first_linnum)
     2895              write_linenumfixup();
     2896        }
     2897    }
     2898  else
     2899    { /* hll version 3 */
     2900      /* Write the line number table. */
     2901
     2902      init_rec (LINNUM|REC32);
     2903      started = TRUE;
     2904      put_idx (0);                  /* Base Group */
     2905      put_idx (text_index);         /* Base Segment */
     2906
     2907      put_16 (0);                   /* Line number = 0 (special entry) */
     2908      put_8 (0);                    /* Entry type: source and offset */
     2909      put_8 (0);                    /* Reserved */
     2910      put_16 (valid_lines);         /* Count of line number entries */
     2911      put_16 (0);                   /* Segment number */
     2912      put_32 (len);                 /* Size of file names table */
     2913
     2914      for (i = 0; i < line_grow.count; ++i)
     2915        if (line_list[i].line >= 0)
     2916          {
     2917            if (started && !fits (8))
     2918              {
     2919                write_rec ();
     2920                started = FALSE;
     2921              }
     2922            if (!started)
     2923              {
     2924                init_rec (LINNUM|REC32);
     2925                put_idx (0);          /* Base Group */
     2926                put_idx (text_index); /* Base Segment */
     2927                started = TRUE;
     2928              }
     2929            put_16 (line_list[i].line);
     2930            put_16(line_list[i].file_index + 1);
     2931            put_32 (line_list[i].addr);
     2932          }
     2933
     2934      /* Now write the file names table. */
     2935
     2936      if (started && !fits (12))
    27932937        {
    27942938          write_rec ();
     
    28022946          started = TRUE;
    28032947        }
    2804       put_8 (len);
    2805       put_mem (buf, len);
    2806     }
    2807 
    2808   if (started)
    2809     write_rec ();
    2810 
    2811 
    2812   /* Write the line number table. */
    2813 
    2814   init_rec (LINNUM|REC32);
    2815   started = TRUE;
    2816   put_idx (0);                  /* Base Group */
    2817   put_idx (text_index);         /* Base Segment */
    2818 
    2819   put_16 (0);                   /* Line number = 0 (special entry) */
    2820   put_8 (0);                    /* Entry type: source and offset */
    2821   put_8 (0);                    /* Reserved */
    2822   put_16 (valid_lines);         /* Count of line number entries */
    2823   put_16 (0);                   /* Segment number */
    2824   put_32 (0);                   /* Size of file names table */
    2825 
    2826   for (i = 0; i < line_grow.count; ++i)
    2827     if (line_list[i].line >= 0)
    2828       {
    2829         if (started && !fits (8))
    2830           {
    2831             write_rec ();
    2832             started = FALSE;
    2833           }
    2834         if (!started)
    2835           {
    2836             init_rec (LINNUM|REC32);
    2837             put_idx (0);          /* Base Group */
    2838             put_idx (text_index); /* Base Segment */
    2839             started = TRUE;
    2840           }
    2841         put_16 (line_list[i].line);
    2842         put_16(line_list[i].file_index + 1);
    2843         put_32 (line_list[i].addr);
    2844       }
    2845 
    2846   if (started)
    2847     write_rec ();
    2848 
    2849 
    2850 #else
    2851   /* Write the line number table. */
    2852 
    2853   init_rec (LINNUM|REC32);
    2854   started = TRUE;
    2855   put_idx (0);                  /* Base Group */
    2856   put_idx (text_index);         /* Base Segment */
    2857 
    2858   put_16 (0);                   /* Line number = 0 (special entry) */
    2859   put_8 (0);                    /* Entry type: source and offset */
    2860   put_8 (0);                    /* Reserved */
    2861   put_16 (valid_lines);         /* Count of line number entries */
    2862   put_16 (0);                   /* Segment number */
    2863   put_32 (len);                 /* Size of file names table */
    2864 
    2865   for (i = 0; i < line_grow.count; ++i)
    2866     if (line_list[i].line >= 0)
    2867       {
    2868         if (started && !fits (8))
    2869           {
    2870             write_rec ();
    2871             started = FALSE;
    2872           }
    2873         if (!started)
    2874           {
    2875             init_rec (LINNUM|REC32);
    2876             put_idx (0);          /* Base Group */
    2877             put_idx (text_index); /* Base Segment */
    2878             started = TRUE;
    2879           }
    2880         put_16 (line_list[i].line);
    2881         put_16(line_list[i].file_index + 1);
    2882         put_32 (line_list[i].addr);
    2883       }
    2884 
    2885   /* Now write the file names table. */
    2886 
    2887   if (started && !fits (12))
    2888     {
    2889       write_rec ();
    2890       started = FALSE;
    2891     }
    2892   if (!started)
    2893     {
    2894       init_rec (LINNUM|REC32);
    2895       put_idx (0);          /* Base Group */
    2896       put_idx (text_index); /* Base Segment */
    2897       started = TRUE;
    2898     }
    2899   put_32 (0);                   /* First column */
    2900   put_32 (0);                   /* Number of columns */
    2901   put_32 (file_grow.count);     /* Number of source and listing files */
    2902 
    2903   for (i = 0; i < file_grow.count; ++i)
    2904     {
    2905       len = strlen (file_list[i]);
    2906       if (len > sizeof (buf) - 1)
    2907         len = sizeof (buf) - 1;
    2908       memcpy (buf, file_list[i], len);
    2909       buf[len] = 0;
    2910       convert_filename (buf);
    2911       if (started && !fits (1 + len))
     2948      put_32 (0);                   /* First column */
     2949      put_32 (0);                   /* Number of columns */
     2950      put_32 (file_grow.count);     /* Number of source and listing files */
     2951
     2952      for (i = 0; i < file_grow.count; ++i)
    29122953        {
    2913           write_rec ();
    2914           started = FALSE;
     2954          len = strlen (file_list[i]);
     2955          if (len > sizeof (buf) - 1)
     2956            len = sizeof (buf) - 1;
     2957          memcpy (buf, file_list[i], len);
     2958          buf[len] = 0;
     2959          convert_filename (buf);
     2960          if (started && !fits (1 + len))
     2961            {
     2962              write_rec ();
     2963              started = FALSE;
     2964            }
     2965          if (!started)
     2966            {
     2967              init_rec (LINNUM|REC32);
     2968              put_idx (0);          /* Base Group */
     2969              put_idx (text_index); /* Base Segment */
     2970              started = TRUE;
     2971            }
     2972          put_8 (len);
     2973          put_mem (buf, len);
    29152974        }
    2916       if (!started)
    2917         {
    2918           init_rec (LINNUM|REC32);
    2919           put_idx (0);          /* Base Group */
    2920           put_idx (text_index); /* Base Segment */
    2921           started = TRUE;
    2922         }
    2923       put_8 (len);
    2924       put_mem (buf, len);
    2925     }
    2926 
    2927   if (started)
    2928     write_rec ();
    2929 #endif
     2975
     2976      if (started)
     2977        write_rec ();
     2978    }
    29302979
    29312980  grow_free (&line_grow);
     
    36613710  /* Parse the command line options. */
    36623711
    3663   while ((c = getopt (argc, argv, "bdD:gi:I:m:l::o:p:qO:r:R:suxwz")) != EOF)
     3712  while ((c = getopt (argc, argv, "bdD:gh:i:I:m:l::o:p:qO:r:R:suxwz")) != EOF)
    36643713    switch (c)
    36653714      {
     
    36753724      case 'g':
    36763725        do_set_groups = TRUE;
     3726        break;
     3727      case 'h':
     3728        hll_version = optarg ? atoi(optarg) : 4;
     3729        if (hll_version != 4 && hll_version != 3)
     3730          {
     3731            printf ("syntax error: Invalid HLL version specified (%d)\n", hll_version);
     3732            usage ();
     3733          }
    36773734        break;
    36783735      case 'i':
  • trunk/src/emx/src/emxomf/emxomf.h

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r303 r304  
    4646extern int *sst_boundary;
    4747extern int *tt_boundary;
     48extern int hll_version;
  • trunk/src/emx/src/emxomf/listomf.c

    • Property cvs2svn:cvs-rev changed from 1.5 to 1.6
    r303 r304  
    2323#include <stdlib.h>
    2424#include <string.h>
     25#include <ctype.h>
    2526#ifdef __EMX__
    2627#include <io.h>
     
    102103static char list_debug = TRUE;
    103104static char show_addr = FALSE;
     105/** If set we will do a hexdump after every record we process. */
     106static char hex_dump = FALSE;
    104107
    105108
     
    377380{
    378381  int x;
     382  char ascii[17];
    379383
    380384  x = 0;
    381385  while (rec_idx < rec_len && count > 0)
    382386    {
     387      unsigned int ui = rec_buf[rec_idx++];
    383388      --count;
    384389      if (x >= 16)
    385390        {
    386           printf ("\n");
     391          for (x = 0; x < 16; x++)
     392            if (!isprint (ascii[x]))
     393              ascii[x] = '.';
     394          printf ("  %.16s\n", ascii);
    387395          x = 0;
    388396        }
     397      ascii[x] = ui;
    389398      if (x == 0)
    390399        printf ("%*s", indent, "");
    391       printf (" %.2x", rec_buf[rec_idx++]);
     400      if (x != 8)
     401        printf (" %.2x", ui);
     402      else
     403        printf ("-%.2x", ui);
    392404      ++x;
    393405    }
    394406  if (x != 0)
    395     printf ("\n");
     407    {
     408      int cch = x;
     409      printf("%*s", (16 - cch)*3, "");
     410      for (x = 0; x < cch; x++)
     411        if (!isprint (ascii[x]))
     412          ascii[x] = '.';
     413      ascii[cch] = '\0';
     414       printf ("  %.*s\n", cch, ascii);
     415    }
    396416}
    397417
     
    876896          location = rec_idx - loc_base;
    877897          offset = get_dword ();
    878           length = get_dword ();
    879           printf ("offset: %#lx [@%#x], length: %#lx",
    880                   offset, location, length);
    881898          if (rec_idx < rec_len)
    882899            {
    883               get_string (name);
    884               printf (" ");
    885               show_string (name);
     900              length = get_dword ();
     901              printf ("offset: %#lx [@%#x], length: %#lx",
     902                      offset, location, length);
     903              if (rec_idx < rec_len)
     904                {
     905                  get_string (name);
     906                  printf (" ");
     907                  show_string (name);
     908                }
    886909            }
     910          else
     911            printf ("offset: %#lx [@%#x], no length",
     912                    offset, location);
    887913          break;
    888914        case 0x01:
     
    22402266  do
    22412267    {
     2268      int skip_hexdump = 0;
    22422269      if (show_addr)
    22432270        rec_pos = ftell (f);
     
    23162343        case LEDATA|REC32:
    23172344          list_ledata ();
     2345          skip_hexdump = 1;
    23182346          break;
    23192347        case LIDATA:
    23202348        case LIDATA|REC32:
    23212349          list_lidata ();
     2350          skip_hexdump = 1;
    23222351          break;
    23232352        case COMDEF:
     
    23292358          printf ("\n");
    23302359          dump_rest ();
     2360          skip_hexdump = 1;
    23312361          break;
    23322362        case ALIAS:
     
    23372367                  ftell (f) - (sizeof (rec) + rec_len + 1), rec.rec_type);
    23382368          dump_rest ();
    2339           break;
     2369          skip_hexdump = 1;
     2370          break;
     2371        }
     2372
     2373      /* hex dump? */
     2374      if (hex_dump && !skip_hexdump)
     2375        {
     2376          printf (" hexdump: type=0x%02x  len=0x%03x (%d) crc=%02x\n",
     2377                  rec.rec_type, rec.rec_len, rec.rec_len,
     2378                  rec_buf[rec.rec_len-1]);
     2379          rec_len = rec.rec_len - 1; /* skip crc */
     2380          rec_idx = 0;
     2381          dump_block (rec_len, 2);
    23402382        }
    23412383    } while (!done);
     
    23612403         "Options:\n"
    23622404         "  -a    Show addresses of records\n"
    2363          "  -d    Don't interpret $$TYPES and $$SYMBOLS segments\n", stderr);
     2405         "  -d    Don't interpret $$TYPES and $$SYMBOLS segments\n"
     2406         "  -x    Do hex dump of it after the intepretation.\n",
     2407         stderr);
    23642408  exit (1);
    23652409}
     
    23712415
    23722416  opterr = 0;
    2373   while ((c = getopt (argc, argv, "ad")) != EOF)
     2417  while ((c = getopt (argc, argv, "adx")) != EOF)
    23742418    switch (c)
    23752419      {
     
    23802424        list_debug = FALSE;
    23812425        break;
     2426      case 'x':
     2427        hex_dump = TRUE;
     2428        break;
    23822429      default:
    23832430        usage ();
  • trunk/src/emx/src/emxomf/stabshll.c

    • Property cvs2svn:cvs-rev changed from 1.5 to 1.6
    r303 r304  
    734734  /* Put the type into the table. */
    735735
     736#ifdef HLL_DEBUG
     737  printf ("  type: stabs %d => HLL 0x%x\n", number, hll->index);
     738  if (stype_list[number-1] != NULL && stype_list[number-1] != hll)
     739    warning ("Type stabs %d allready mapped to HLL 0x%x, new HLL 0x%x!!\n", number, stype_list[number-1]->index, hll->index);
     740#endif
     741
    736742  stype_list[number-1] = hll;
    737743}
     
    25552561  buffer_dword (&sst, addr);    /* Segment offset */
    25562562  buffer_dword (&sst, 0);       /* Length of block -- patched later */
    2557 #if 0
     2563#if 1
    25582564  buffer_nstr (&sst, "");       /* Name of block (optional) */
    25592565#endif
     
    26882694
    26892695
     2696/**
     2697 * Checks if the given name is likely to be a C++ method.
     2698 *
     2699 * @returns 1 if C++ method.
     2700 * @returns 0 if not method.
     2701 * @param   pszName     Pointer to the name.
     2702 * @remark  Can also, if need, look around for symbols, types and stuff, but
     2703 *          will no alter any parser state.
     2704 */
     2705static int isCxxMethod(const char* pszName)
     2706{
     2707    /* not perfect, but probably close enought */
     2708    return cplusplus_flag
     2709        && pszName[0] == '_'
     2710        && pszName[1] == 'Z'
     2711        && pszName[2] == 'N';
     2712}
     2713
     2714
    26902715/* Define a function.  SYMBOL points to the sym_ptr entry.  The
    26912716   function arguments are taken from the args_list array.  Several
     
    27292754  t2 = type_add (&last_fun_type);
    27302755  make_type (t2, &ti);
    2731   sst_start (cplusplus_flag ? SST_CPPproc : SST_proc);
    2732   r.r_address = sst.size;
    2733   buffer_dword (&sst, symbol->n_value); /* Segment offset */
    2734   buffer_word (&sst, ti);       /* Type index */
    2735   proc_patch_base = sst.size;
    2736   buffer_dword (&sst, 0);       /* Length of proc */
    2737   buffer_word (&sst, 0);        /* Length of prologue */
    2738   buffer_dword (&sst, 0);       /* Length of prologue and body */
    2739   buffer_word (&sst, 0);        /* Class type (for member functions) */
    2740   buffer_byte (&sst, 8);        /* 32-bit near */
    2741   if (cplusplus_flag)
    2742     buffer_enc (&sst, name);    /* Proc name */
     2756  if (isCxxMethod(name))
     2757    {
     2758      /* kso #456 2003-06-05: TODO - check for methods somehow */
     2759      sst_start (cplusplus_flag ? SST_CPPproc : SST_proc);
     2760      r.r_address = sst.size;
     2761      buffer_dword (&sst, symbol->n_value); /* Segment offset */
     2762      buffer_word (&sst, ti);       /* Type index */
     2763      proc_patch_base = sst.size;
     2764      buffer_dword (&sst, 0);       /* Length of proc */
     2765      buffer_word (&sst, 0);        /* Length of prologue */
     2766      buffer_dword (&sst, 0);       /* Length of prologue and body */
     2767      buffer_word (&sst, 0);        /* Class type (for member functions) */
     2768      buffer_byte (&sst, 8);        /* 32-bit near */
     2769      if (cplusplus_flag)
     2770        buffer_enc (&sst, name);    /* Proc name */
     2771      else
     2772        buffer_nstr (&sst, name);   /* Proc name */
     2773      sst_end ();
     2774    }
    27432775  else
    2744     buffer_nstr (&sst, name);   /* Proc name */
    2745   sst_end ();
     2776    {
     2777      sst_start (cplusplus_flag ? SST_CPPproc : SST_proc);
     2778      r.r_address = sst.size;
     2779      buffer_dword (&sst, symbol->n_value); /* Segment offset */
     2780      buffer_word (&sst, ti);       /* Type index */
     2781      proc_patch_base = sst.size;
     2782      buffer_dword (&sst, 0);       /* Length of proc */
     2783      buffer_word (&sst, 0);        /* Length of prologue */
     2784      buffer_dword (&sst, 0);       /* Length of prologue and body */
     2785      buffer_word (&sst, 0);        /* Class type (for member functions) */
     2786      buffer_byte (&sst, 8);        /* 32-bit near */
     2787      if (cplusplus_flag)
     2788        buffer_enc (&sst, name);    /* Proc name */
     2789      else
     2790        buffer_nstr (&sst, name);   /* Proc name */
     2791      sst_end ();
     2792    }
    27462793  r.r_extern = 0;
    27472794  r.r_length = 2;
     
    30133060                prologue_length = sym_ptr[lbrac_index].n_value - last_fun_addr;
    30143061            }
     3062          else
     3063            {/* kso #456 2003-06-05: We need a begin to catch the parameters. */
     3064              //block_begin (proc_start_addr);
     3065              sst_start (SST_begin);
     3066              buffer_dword (&sst, proc_start_addr); /* Segment offset */
     3067              buffer_dword (&sst, 10); /* Length */
     3068              sst_end ();
     3069            }
    30153070
    30163071          /* Parameters */
     
    30253080
    30263081          if (lbrac_index == -1)
    3027             fun_end (*index+1);
     3082            {/* kso #456 2003-06-05: We need a begin to catch the parameters. */
     3083              //block_end (proc_start_addr);
     3084              sst_start (SST_end);
     3085              sst_end ();
     3086              fun_end (*index+1);
     3087            }
    30283088          break;
    30293089        }
     
    32153275        }
    32163276
     3277#ifdef HLL_DEBUG
     3278  printf ("Stabs to HLL type mappings: %d/%d\n", stype_grow.count, stype_grow.alloc);
     3279  for (i = 0; i < stype_grow.alloc; i++)
     3280    if (stype_list[i])
     3281      {
     3282        printf ("  %3d => 0x%03x/%-3d  ", i + 1, stype_list[i]->index, stype_list[i]->index);
     3283        show_type (stype_list[i]);
     3284        printf("\n");
     3285      }
     3286#endif
     3287
     3288
    32173289  /* Deallocate memory. */
    32183290
Note: See TracChangeset for help on using the changeset viewer.