summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-08-21 00:57:44 +0000
committerAndrew Cagney <cagney@redhat.com>2002-08-21 00:57:44 +0000
commit08ea06985b67c6f087718da92f4717b9da24fcae (patch)
tree74eadcbb4e96ece672d32de2d2d314e5ee77d6af
parent5af19f979e62b59cd07f41f453d359ae680e2608 (diff)
downloadgdb-08ea06985b67c6f087718da92f4717b9da24fcae.tar.gz
2002-08-20 Andrew Cagney <cagney@redhat.com>
* NEWS: Mention that the Apollo line was made obsolete. * configure.tgt: Make m68*-apollo*-bsd*, m68*-hp-bsd*, and m68*-hp-hpux* obsolete. * configure.host: Make m68*-apollo*-sysv*, m68*-apollo*-bsd*, m68*-hp-bsd* and m68*-hp-hpux* obsolete. * buildsym.c (make_blockvector): Make static. * buildsym.h (make_blockvector): Make extern declaration obsolete. * Makefile.in (HFILES_NO_SRCDIR): Remove dst.h (ALLDEPFILES): Remove dstread.c. (dstread.o): Obsolete make rule. * dstread.c: Makefile obsolete. * dst.h: Ditto. * config/m68k/hp300hpux.mt: Ditto. * config/m68k/hp300hpux.mh: Ditto. * config/m68k/hp300bsd.mt: Ditto. * config/m68k/hp300bsd.mh: Ditto. * config/m68k/apollo68b.mt: Ditto. * config/m68k/apollo68v.mh: Ditto. * config/m68k/apollo68b.mh: Ditto.
-rw-r--r--gdb/ChangeLog22
-rw-r--r--gdb/Makefile.in10
-rw-r--r--gdb/NEWS3
-rw-r--r--gdb/buildsym.c8
-rw-r--r--gdb/buildsym.h8
-rw-r--r--gdb/config/m68k/apollo68b.mh10
-rw-r--r--gdb/config/m68k/apollo68b.mt6
-rw-r--r--gdb/config/m68k/apollo68v.mh20
-rw-r--r--gdb/config/m68k/hp300bsd.mh12
-rw-r--r--gdb/config/m68k/hp300bsd.mt6
-rw-r--r--gdb/config/m68k/hp300hpux.mh16
-rw-r--r--gdb/config/m68k/hp300hpux.mt16
-rw-r--r--gdb/configure.host8
-rw-r--r--gdb/configure.tgt6
-rw-r--r--gdb/dst.h3342
-rw-r--r--gdb/dstread.c3196
16 files changed, 3357 insertions, 3332 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 7424ccf4c22..eb08df44d03 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,25 @@
+2002-08-20 Andrew Cagney <cagney@redhat.com>
+
+ * NEWS: Mention that the Apollo line was made obsolete.
+ * configure.tgt: Make m68*-apollo*-bsd*, m68*-hp-bsd*, and
+ m68*-hp-hpux* obsolete.
+ * configure.host: Make m68*-apollo*-sysv*, m68*-apollo*-bsd*,
+ m68*-hp-bsd* and m68*-hp-hpux* obsolete.
+ * buildsym.c (make_blockvector): Make static.
+ * buildsym.h (make_blockvector): Make extern declaration obsolete.
+ * Makefile.in (HFILES_NO_SRCDIR): Remove dst.h
+ (ALLDEPFILES): Remove dstread.c.
+ (dstread.o): Obsolete make rule.
+ * dstread.c: Makefile obsolete.
+ * dst.h: Ditto.
+ * config/m68k/hp300hpux.mt: Ditto.
+ * config/m68k/hp300hpux.mh: Ditto.
+ * config/m68k/hp300bsd.mt: Ditto.
+ * config/m68k/hp300bsd.mh: Ditto.
+ * config/m68k/apollo68b.mt: Ditto.
+ * config/m68k/apollo68v.mh: Ditto.
+ * config/m68k/apollo68b.mh: Ditto.
+
2002-08-20 Michael Snyder <msnyder@redhat.com>
* mips-tdep.c (mips_in_return_stub): Make static.
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index b039314e4f6..b7bea61619e 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -692,7 +692,7 @@ xcoffsolib_h = xcoffsolib.h
# right, it is probably easiest just to list .h files here directly.
HFILES_NO_SRCDIR = bcache.h buildsym.h call-cmds.h coff-solib.h defs.h \
- dst.h environ.h $(gdbcmd_h) gdb.h gdbcore.h \
+ environ.h $(gdbcmd_h) gdb.h gdbcore.h \
gdb-stabs.h $(inferior_h) language.h minimon.h monitor.h \
objfiles.h parser-defs.h serial.h solib.h \
symfile.h stabsread.h target.h terminal.h typeprint.h xcoffsolib.h \
@@ -1253,7 +1253,7 @@ ALLDEPFILES = a68v-nat.c \
avr-tdep.c \
coff-solib.c \
core-sol2.c core-regset.c core-aout.c corelow.c \
- dcache.c delta68-nat.c dpx2-nat.c dstread.c exec.c fork-child.c \
+ dcache.c delta68-nat.c dpx2-nat.c exec.c fork-child.c \
go32-nat.c h8300-tdep.c h8500-tdep.c \
hp300ux-nat.c hppa-tdep.c hppab-nat.c hppah-nat.c hpread.c \
i386-tdep.c i386b-nat.c i386v-nat.c i386-linux-nat.c \
@@ -1525,9 +1525,9 @@ dink32-rom.o: dink32-rom.c $(monitor_h) $(bfd_h) $(gdb_wait_h) $(defs_h) \
dpx2-nat.o: dpx2-nat.c $(defs_h) $(gdbcore_h) $(gdb_string_h)
-dstread.o: dstread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(breakpoint_h) \
- $(bfd_h) $(symfile_h) $(objfiles_h) $(buildsym_h) $(gdb_obstack_h) \
- $(gdb_string_h) $(dst_h)
+# OBSOLETE dstread.o: dstread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(breakpoint_h) \
+# OBSOLETE $(bfd_h) $(symfile_h) $(objfiles_h) $(buildsym_h) $(gdb_obstack_h) \
+# OBSOLETE $(gdb_string_h) $(dst_h)
dwarf2cfi.o: dwarf2cfi.c $(defs_h) $(symtab_h) $(symfile_h) $(objfiles_h) \
$(target_h) $(inferior_h) $(regcache_h) $(dwarf2cfi_h)
diff --git a/gdb/NEWS b/gdb/NEWS
index eb7124ea9a9..7901f24ddf0 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -64,6 +64,9 @@ Argonaut Risc Chip (ARC) arc-*-*
i386 running Mach 3.0 i[3456]86-*-mach3*
i386 running Mach i[3456]86-*-mach*
i386 running OSF/1 i[3456]86-*osf1mk*
+HP/Apollo 68k Family m68*-apollo*-sysv*,
+ m68*-apollo*-bsd*,
+ m68*-hp-bsd*, m68*-hp-hpux*
* OBSOLETE languages
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index 2316e966f67..b1962dffeae 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -486,11 +486,11 @@ record_pending_block (struct objfile *objfile, struct block *block,
}
}
-/* Note that this is only used in this file and in dstread.c, which
- should be fixed to not need direct access to this function. When
- that is done, it can be made static again. */
+/* OBSOLETE Note that this is only used in this file and in dstread.c, which */
+/* OBSOLETE should be fixed to not need direct access to this function. When */
+/* OBSOLETE that is done, it can be made static again. */
-struct blockvector *
+static struct blockvector *
make_blockvector (struct objfile *objfile)
{
register struct pending_block *next;
diff --git a/gdb/buildsym.h b/gdb/buildsym.h
index d023aa3e855..8a252cb2b4c 100644
--- a/gdb/buildsym.h
+++ b/gdb/buildsym.h
@@ -277,11 +277,11 @@ extern int hashname (char *name);
extern void free_pending_blocks (void);
-/* FIXME: Note that this is used only in buildsym.c and dstread.c,
- which should be fixed to not need direct access to
- make_blockvector. */
+/* OBSOLETE FIXME: Note that this is used only in buildsym.c and dstread.c, */
+/* OBSOLETE which should be fixed to not need direct access to */
+/* OBSOLETE make_blockvector. */
-extern struct blockvector *make_blockvector (struct objfile *objfile);
+/* OBSOLETE extern struct blockvector *make_blockvector (struct objfile *objfile); */
/* FIXME: Note that this is used only in buildsym.c and dstread.c,
which should be fixed to not need direct access to
diff --git a/gdb/config/m68k/apollo68b.mh b/gdb/config/m68k/apollo68b.mh
index cf2770b35ad..99d034b03ec 100644
--- a/gdb/config/m68k/apollo68b.mh
+++ b/gdb/config/m68k/apollo68b.mh
@@ -1,5 +1,5 @@
-# Host: Apollo m68k, BSD mode.
-
-XM_FILE= xm-apollo68b.h
-NAT_FILE= nm-apollo68b.h
-NATDEPFILES= infptrace.o inftarg.o fork-child.o a68v-nat.o
+# OBSOLETE # Host: Apollo m68k, BSD mode.
+# OBSOLETE
+# OBSOLETE XM_FILE= xm-apollo68b.h
+# OBSOLETE NAT_FILE= nm-apollo68b.h
+# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o a68v-nat.o
diff --git a/gdb/config/m68k/apollo68b.mt b/gdb/config/m68k/apollo68b.mt
index 2383d3b6156..11c0c02d178 100644
--- a/gdb/config/m68k/apollo68b.mt
+++ b/gdb/config/m68k/apollo68b.mt
@@ -1,3 +1,3 @@
-# Target: Apollo m68k in BSD mode
-TDEPFILES= m68k-tdep.o dstread.o
-TM_FILE= tm-apollo68b.h
+# OBSOLETE # Target: Apollo m68k in BSD mode
+# OBSOLETE TDEPFILES= m68k-tdep.o dstread.o
+# OBSOLETE TM_FILE= tm-apollo68b.h
diff --git a/gdb/config/m68k/apollo68v.mh b/gdb/config/m68k/apollo68v.mh
index 6610e665f48..4ab84f074b9 100644
--- a/gdb/config/m68k/apollo68v.mh
+++ b/gdb/config/m68k/apollo68v.mh
@@ -1,10 +1,10 @@
-# Host: Apollo, System V mode (?)
-
-XM_FILE= xm-apollo68v.h
-XM_CLIBS= -lPW
-
-NAT_FILE= nm-apollo68v.h
-NATDEPFILES= infptrace.o inftarg.o fork-child.o a68v-nat.o
-
-RANLIB=echo >/dev/null
-CC= cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DNO_SYS_FILE
+# OBSOLETE # Host: Apollo, System V mode (?)
+# OBSOLETE
+# OBSOLETE XM_FILE= xm-apollo68v.h
+# OBSOLETE XM_CLIBS= -lPW
+# OBSOLETE
+# OBSOLETE NAT_FILE= nm-apollo68v.h
+# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o a68v-nat.o
+# OBSOLETE
+# OBSOLETE RANLIB=echo >/dev/null
+# OBSOLETE CC= cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DNO_SYS_FILE
diff --git a/gdb/config/m68k/hp300bsd.mh b/gdb/config/m68k/hp300bsd.mh
index b0b186d671e..76aa9a562a7 100644
--- a/gdb/config/m68k/hp300bsd.mh
+++ b/gdb/config/m68k/hp300bsd.mh
@@ -1,6 +1,6 @@
-# Host: Hewlett-Packard 9000 series 300, running BSD
-
-XM_FILE= xm-hp300bsd.h
-
-NAT_FILE= nm-hp300bsd.h
-NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o
+# OBSOLETE # Host: Hewlett-Packard 9000 series 300, running BSD
+# OBSOLETE
+# OBSOLETE XM_FILE= xm-hp300bsd.h
+# OBSOLETE
+# OBSOLETE NAT_FILE= nm-hp300bsd.h
+# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o
diff --git a/gdb/config/m68k/hp300bsd.mt b/gdb/config/m68k/hp300bsd.mt
index cbcc5edb7db..c3225e9a9ae 100644
--- a/gdb/config/m68k/hp300bsd.mt
+++ b/gdb/config/m68k/hp300bsd.mt
@@ -1,3 +1,3 @@
-# Target: Hewlett-Packard 9000 series 300, running BSD
-TDEPFILES= m68k-tdep.o
-TM_FILE= tm-hp300bsd.h
+# OBSOLETE # Target: Hewlett-Packard 9000 series 300, running BSD
+# OBSOLETE TDEPFILES= m68k-tdep.o
+# OBSOLETE TM_FILE= tm-hp300bsd.h
diff --git a/gdb/config/m68k/hp300hpux.mh b/gdb/config/m68k/hp300hpux.mh
index 8ceb1872ca5..410c03cd753 100644
--- a/gdb/config/m68k/hp300hpux.mh
+++ b/gdb/config/m68k/hp300hpux.mh
@@ -1,8 +1,8 @@
-# Host: Hewlett-Packard 9000 series 300, running HPUX
-# The following is true because gcc uses a different .o file format
-# than the native HPUX compiler
-
-XM_FILE= xm-hp300hpux.h
-
-NAT_FILE= nm-hp300hpux.h
-NATDEPFILES= infptrace.o inftarg.o fork-child.o hp300ux-nat.o corelow.o core-aout.o
+# OBSOLETE # Host: Hewlett-Packard 9000 series 300, running HPUX
+# OBSOLETE # The following is true because gcc uses a different .o file format
+# OBSOLETE # than the native HPUX compiler
+# OBSOLETE
+# OBSOLETE XM_FILE= xm-hp300hpux.h
+# OBSOLETE
+# OBSOLETE NAT_FILE= nm-hp300hpux.h
+# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o hp300ux-nat.o corelow.o core-aout.o
diff --git a/gdb/config/m68k/hp300hpux.mt b/gdb/config/m68k/hp300hpux.mt
index 0fa801dee25..a1848af2d3d 100644
--- a/gdb/config/m68k/hp300hpux.mt
+++ b/gdb/config/m68k/hp300hpux.mt
@@ -1,8 +1,8 @@
-# Target: Hewlett-Packard 9000 series 300, running HPUX
-
-#msg Note that GDB can only read symbols from programs that were
-#msg compiled with GCC using GAS.
-#msg
-
-TDEPFILES= m68k-tdep.o
-TM_FILE= tm-hp300hpux.h
+# OBSOLETE # Target: Hewlett-Packard 9000 series 300, running HPUX
+# OBSOLETE
+# OBSOLETE #msg Note that GDB can only read symbols from programs that were
+# OBSOLETE #msg compiled with GCC using GAS.
+# OBSOLETE #msg
+# OBSOLETE
+# OBSOLETE TDEPFILES= m68k-tdep.o
+# OBSOLETE TM_FILE= tm-hp300hpux.h
diff --git a/gdb/configure.host b/gdb/configure.host
index bbf9c1ddec8..883538db3b2 100644
--- a/gdb/configure.host
+++ b/gdb/configure.host
@@ -91,12 +91,12 @@ ia64-*-linux*) gdb_host=linux ;;
m680[01]0-sun-sunos3*) gdb_host=sun2os3 ;;
m680[01]0-sun-sunos4*) gdb_host=sun2os4 ;;
-m68*-apollo*-sysv*) gdb_host=apollo68v ;;
-m68*-apollo*-bsd*) gdb_host=apollo68b ;;
+# OBSOLETE m68*-apollo*-sysv*) gdb_host=apollo68v ;;
+# OBSOLETE m68*-apollo*-bsd*) gdb_host=apollo68b ;;
m68*-att-*) gdb_host=3b1 ;;
m68*-bull*-sysv*) gdb_host=dpx2 ;;
-m68*-hp-bsd*) gdb_host=hp300bsd ;;
-m68*-hp-hpux*) gdb_host=hp300hpux ;;
+# OBSOLETE m68*-hp-bsd*) gdb_host=hp300bsd ;;
+# OBSOLETE m68*-hp-hpux*) gdb_host=hp300hpux ;;
m68*-*-linux*) gdb_host=linux ;;
m68*-*-lynxos*) gdb_host=m68klynx ;;
m68*-*-netbsd*) gdb_host=nbsdaout ;;
diff --git a/gdb/configure.tgt b/gdb/configure.tgt
index 957ed0bfa1f..524929497db 100644
--- a/gdb/configure.tgt
+++ b/gdb/configure.tgt
@@ -141,10 +141,10 @@ m68hc11*-*-*|m6811*-*-*) gdb_target=m68hc11 ;;
m68000-*-sunos3*) gdb_target=sun2os3 ;;
m68000-*-sunos4*) gdb_target=sun2os4 ;;
-m68*-apollo*-bsd*) gdb_target=apollo68b ;;
+# OBSOLETE m68*-apollo*-bsd*) gdb_target=apollo68b ;;
m68*-bull-sysv*) gdb_target=dpx2 ;;
-m68*-hp-bsd*) gdb_target=hp300bsd ;;
-m68*-hp-hpux*) gdb_target=hp300hpux ;;
+# OBSOLETE m68*-hp-bsd*) gdb_target=hp300bsd ;;
+# OBSOLETE m68*-hp-hpux*) gdb_target=hp300hpux ;;
m68*-att-*) gdb_target=3b1 ;;
m68*-cisco*-*) gdb_target=cisco ;;
m68*-ericsson-*) gdb_target=es1800 ;;
diff --git a/gdb/dst.h b/gdb/dst.h
index b72c58c9653..89ad9eca09f 100644
--- a/gdb/dst.h
+++ b/gdb/dst.h
@@ -1,1671 +1,1671 @@
-/* <apollo/dst.h> */
-/* Apollo object module DST (debug symbol table) description */
-
-#ifndef apollo_dst_h
-#define apollo_dst_h
-
-#if defined(apollo) && !defined(__GNUC__)
-#define ALIGNED1 __attribute( (aligned(1)) )
-#else
-/* Remove attribute directives from non-Apollo code: */
-#define ALIGNED1 /* nil */
-#endif
-
-
-
-/* Identification of this version of the debug symbol table. Producers of the
- debug symbol table must write these values into the version number field of
- the compilation unit record in .blocks .
- */
-#define dst_version_major 1
-#define dst_version_minor 3
-
-
-/*
- ** Enumeration of debug record types appearing in .blocks and .symbols ...
- */
-typedef enum
- {
- dst_typ_pad, /* 0 */
- dst_typ_comp_unit, /* 1 */
- dst_typ_section_tab, /* 2 */
- dst_typ_file_tab, /* 3 */
- dst_typ_block, /* 4 */
- dst_typ_5,
- dst_typ_var,
- dst_typ_pointer, /* 7 */
- dst_typ_array, /* 8 */
- dst_typ_subrange, /* 9 */
- dst_typ_set, /* 10 */
- dst_typ_implicit_enum, /* 11 */
- dst_typ_explicit_enum, /* 12 */
- dst_typ_short_rec, /* 13 */
- dst_typ_old_record,
- dst_typ_short_union, /* 15 */
- dst_typ_old_union,
- dst_typ_file, /* 17 */
- dst_typ_offset, /* 18 */
- dst_typ_alias, /* 19 */
- dst_typ_signature, /* 20 */
- dst_typ_21,
- dst_typ_old_label, /* 22 */
- dst_typ_scope, /* 23 */
- dst_typ_end_scope, /* 24 */
- dst_typ_25,
- dst_typ_26,
- dst_typ_string_tab, /* 27 */
- dst_typ_global_name_tab, /* 28 */
- dst_typ_forward, /* 29 */
- dst_typ_aux_size, /* 30 */
- dst_typ_aux_align, /* 31 */
- dst_typ_aux_field_size, /* 32 */
- dst_typ_aux_field_off, /* 33 */
- dst_typ_aux_field_align, /* 34 */
- dst_typ_aux_qual, /* 35 */
- dst_typ_aux_var_bound, /* 36 */
- dst_typ_extension, /* 37 */
- dst_typ_string, /* 38 */
- dst_typ_old_entry,
- dst_typ_const, /* 40 */
- dst_typ_reference, /* 41 */
- dst_typ_record, /* 42 */
- dst_typ_union, /* 43 */
- dst_typ_aux_type_deriv, /* 44 */
- dst_typ_locpool, /* 45 */
- dst_typ_variable, /* 46 */
- dst_typ_label, /* 47 */
- dst_typ_entry, /* 48 */
- dst_typ_aux_lifetime, /* 49 */
- dst_typ_aux_ptr_base, /* 50 */
- dst_typ_aux_src_range, /* 51 */
- dst_typ_aux_reg_val, /* 52 */
- dst_typ_aux_unit_names, /* 53 */
- dst_typ_aux_sect_info, /* 54 */
- dst_typ_END_OF_ENUM
- }
-dst_rec_type_t;
-
-
-/*
- ** Dummy bounds for variably dimensioned arrays:
- */
-#define dst_dummy_array_size 100
-
-
-/*
- ** Reference to another item in the symbol table.
- **
- ** The value of a dst_rel_offset_t is the relative offset from the start of the
- ** referencing record to the start of the referenced record, string, etc.
- **
- ** The value of a NIL dst_rel_offset_t is zero.
- */
-
-typedef long dst_rel_offset_t ALIGNED1;
-
-
-/* FIXME: Here and many places we make assumptions about sizes of host
- data types, structure layout, etc. Only needs to be fixed if we care
- about cross-debugging, though. */
-
-/*
- ** Section-relative reference.
- **
- ** The section index field is an index into the local compilation unit's
- ** section table (see dst_rec_section_tab_t)--NOT into the object module
- ** section table!
- **
- ** The sect_offset field is the offset in bytes into the section.
- **
- ** A NIL dst_sect_ref_t has a sect_index field of zero. Indexes originate
- ** at one.
- */
-
-typedef struct
- {
- unsigned short sect_index;
- unsigned long sect_offset ALIGNED1;
- }
-dst_sect_ref_t;
-
-#define dst_sect_index_nil 0
-#define dst_sect_index_origin 1
-
-
-/*
- ** Source location descriptor.
- **
- ** The file_index field is an index into the local compilation unit's
- ** file table (see dst_rec_file_tab_t).
- **
- ** A NIL dst_src_loc_t has a file_index field of zero. Indexes originate
- ** at one.
- */
-
-typedef struct
- {
- boolean reserved:1; /* reserved for future use */
- int file_index:11; /* index into .blocks source file list */
- int line_number:20; /* source line number */
- }
-dst_src_loc_t;
-
-#define dst_file_index_nil 0
-#define dst_file_index_origin 1
-
-
-/*
- ** Standard (primitive) type codes.
- */
-
-typedef enum
- {
- dst_non_std_type,
- dst_int8_type, /* 8 bit integer */
- dst_int16_type, /* 16 bit integer */
- dst_int32_type, /* 32 bit integer */
- dst_uint8_type, /* 8 bit unsigned integer */
- dst_uint16_type, /* 16 bit unsigned integer */
- dst_uint32_type, /* 32 bit unsigned integer */
- dst_real32_type, /* single precision ieee floatining point */
- dst_real64_type, /* double precision ieee floatining point */
- dst_complex_type, /* single precision complex */
- dst_dcomplex_type, /* double precision complex */
- dst_bool8_type, /* boolean =logical*1 */
- dst_bool16_type, /* boolean =logical*2 */
- dst_bool32_type, /* boolean =logical*4 */
- dst_char_type, /* 8 bit ascii character */
- dst_string_type, /* string of 8 bit ascii characters */
- dst_ptr_type, /* univ_pointer */
- dst_set_type, /* generic 256 bit set */
- dst_proc_type, /* generic procedure (signature not specified) */
- dst_func_type, /* generic function (signature not specified) */
- dst_void_type, /* c void type */
- dst_uchar_type, /* c unsigned char */
- dst_std_type_END_OF_ENUM
- }
-dst_std_type_t;
-
-
-/*
- ** General data type descriptor
- **
- ** If the user_defined_type bit is clear, then the type is a standard type, and
- ** the remaining bits contain the dst_std_type_t of the type. If the bit is
- ** set, then the type is defined in a separate dst record, which is referenced
- ** by the remaining bits as a dst_rel_offset_t.
- */
-
-typedef union
- {
- struct
- {
- boolean user_defined_type:1; /* tag field */
- int must_be_zero:23; /* 23 bits of pad */
- dst_std_type_t dtc:8; /* 8 bit primitive data */
- }
- std_type;
-
- struct
- {
- boolean user_defined_type:1; /* tag field */
- int doffset:31; /* offset to type record */
- }
- user_type;
- }
-dst_type_t ALIGNED1;
-
-/* The user_type.doffset field is a 31-bit signed value. Some versions of C
- do not support signed bit fields. The following macro will extract that
- field as a signed value:
- */
-#define dst_user_type_offset(type_rec) \
- ( ((int) ((type_rec).user_type.doffset << 1)) >> 1 )
-
-
-/*================================================*/
-/*========== RECORDS IN .blocks SECTION ==========*/
-/*================================================*/
-
-/*-----------------------
- COMPILATION UNIT record
- -----------------------
- This must be the first record in each .blocks section.
- Provides a set of information describing the output of a single compilation
- and pointers to additional information for the compilation unit.
-*/
-
-typedef enum
- {
- dst_pc_code_locs, /* ranges in loc strings are pc ranges */
- dst_comp_unit_END_OF_ENUM
- }
-dst_comp_unit_flag_t;
-
-typedef enum
- {
- dst_lang_unk, /* unknown language */
- dst_lang_pas, /* Pascal */
- dst_lang_ftn, /* FORTRAN */
- dst_lang_c, /* C */
- dst_lang_mod2, /* Modula-2 */
- dst_lang_asm_m68k, /* 68K assembly language */
- dst_lang_asm_a88k, /* AT assembly language */
- dst_lang_ada, /* Ada */
- dst_lang_cxx, /* C++ */
- dst_lang_END_OF_ENUM
- }
-dst_lang_type_t;
-
-typedef struct
- {
- struct
- {
- unsigned char major_part; /* = dst_version_major */
- unsigned char minor_part; /* = dst_version_minor */
- }
- version; /* version of dst */
- unsigned short flags; /* mask of dst_comp_unit_flag_t */
- unsigned short lang_type; /* source language */
- unsigned short number_of_blocks; /* number of blocks records */
- dst_rel_offset_t root_block_offset; /* offset to root block (module?) */
- dst_rel_offset_t section_table /* offset to section table record */ ;
- dst_rel_offset_t file_table; /* offset to file table record */
- unsigned long data_size; /* total size of .blocks data */
- }
-dst_rec_comp_unit_t ALIGNED1;
-
-
-/*--------------------
- SECTION TABLE record
- --------------------
- There must be one section table associated with each compilation unit.
- Other debug records refer to sections via their index in this table. The
- section base addresses in the table are virtual addresses of the sections,
- relocated by the linker.
-*/
-
-typedef struct
- {
- unsigned short number_of_sections; /* size of array: */
- unsigned long section_base[dst_dummy_array_size] ALIGNED1;
- }
-dst_rec_section_tab_t ALIGNED1;
-
-
-/*-----------------
- FILE TABLE record
- -----------------
- There must be one file table associated with each compilation unit describing
- the source (and include) files used by each compilation unit. Other debug
- records refer to files via their index in this table. The first entry is the
- primary source file.
-*/
-
-typedef struct
- {
- long dtm; /* time last modified (time_$clock_t) */
- dst_rel_offset_t noffset; /* offset to name string for source file */
- }
-dst_file_desc_t;
-
-typedef struct
- {
- unsigned short number_of_files; /* size of array: */
- dst_file_desc_t files[dst_dummy_array_size] ALIGNED1;
- }
-dst_rec_file_tab_t ALIGNED1;
-
-
-/*-----------------
- NAME TABLE record
- -----------------
- A name table record may appear as an auxiliary record to the file table,
- providing additional qualification of the file indexes for languages that
- need it (i.e. Ada). Name table entries parallel file table entries of the
- same file index.
-*/
-
-typedef struct
- {
- unsigned short number_of_names; /* size of array: */
- dst_rel_offset_t names[dst_dummy_array_size] ALIGNED1;
- }
-dst_rec_name_tab_t ALIGNED1;
-
-
-/*--------------
- BLOCK record
- --------------
- Describes a lexical program block--a procedure, function, module, etc.
-*/
-
-/* Block types. These may be used in any way desired by the compiler writers.
- The debugger uses them only to give a description to the user of the type of
- a block. The debugger makes no other assumptions about the meaning of any
- of these. For example, the fact that a block is executable (e.g., program)
- or not (e.g., module) is expressed in block attributes (see below), not
- guessed at from the block type.
- */
-typedef enum
- {
- dst_block_module, /* some pascal = modula = ada types */
- dst_block_program,
- dst_block_procedure,
- dst_block_function, /* C function */
- dst_block_subroutine, /* some fortran block types */
- dst_block_block_data,
- dst_block_stmt_function,
- dst_block_package, /* a few particular to Ada */
- dst_block_package_body,
- dst_block_subunit,
- dst_block_task,
- dst_block_file, /* a C outer scope? */
- dst_block_class, /* C++ or Simula */
- dst_block_END_OF_ENUM
- }
-dst_block_type_t;
-
-/* Block attributes. This is the information used by the debugger to represent
- the semantics of blocks.
- */
-typedef enum
- {
- dst_block_main_entry, /* the block's entry point is a main entry into
- the compilation unit */
- dst_block_executable, /* the block has an entry point */
- dst_block_attr_END_OF_ENUM
- }
-dst_block_attr_t;
-
-/* Code range. Each block has associated with it one or more code ranges. An
- individual code range is identified by a range of source (possibly nil) and
- a range of executable code. For example, a block which has its executable
- code spread over multiple sections will have one code range per section.
- */
-typedef struct
- {
- unsigned long code_size; /* size of executable code (in bytes ) */
- dst_sect_ref_t code_start; /* starting address of executable code */
- dst_sect_ref_t lines_start; /* start of line number tables */
- }
-dst_code_range_t;
-
-typedef struct
- {
- dst_block_type_t block_type:8;
- unsigned short flags:8; /* mask of dst_block_attr_t flags */
- dst_rel_offset_t sibling_block_off; /* offset to next sibling block */
- dst_rel_offset_t child_block_off; /* offset to first contained block */
- dst_rel_offset_t noffset; /* offset to block name string */
- dst_sect_ref_t symbols_start; /* start of debug symbols */
- unsigned short n_of_code_ranges; /* size of array... */
- dst_code_range_t code_ranges[dst_dummy_array_size] ALIGNED1;
- }
-dst_rec_block_t ALIGNED1;
-
-
-/*--------------------------
- AUX SECT INFO TABLE record
- --------------------------
- Appears as an auxiliary to a block record. Expands code range information
- by providing references into additional, language-dependent sections for
- information related to specific code ranges of the block. Sect info table
- entries parallel code range array entries of the same index.
-*/
-
-typedef struct
- {
- unsigned char tag; /* currently can only be zero */
- unsigned char number_of_refs; /* size of array: */
- dst_sect_ref_t refs[dst_dummy_array_size] ALIGNED1;
- }
-dst_rec_sect_info_tab_t ALIGNED1;
-
-/*=================================================*/
-/*========== RECORDS IN .symbols SECTION ==========*/
-/*=================================================*/
-
-/*-----------------
- CONSTANT record
- -----------------
- Describes a symbolic constant.
-*/
-
-typedef struct
- {
- float r; /* real part */
- float i; /* imaginary part */
- }
-dst_complex_t;
-
-typedef struct
- {
- double dr; /* real part */
- double di; /* imaginary part */
- }
-dst_double_complex_t;
-
-/* The following record provides a way of describing constant values with
- non-standard type and no limit on size.
- */
-typedef union
- {
- char char_data[dst_dummy_array_size];
- short int_data[dst_dummy_array_size];
- long long_data[dst_dummy_array_size];
- }
-dst_big_kon_t;
-
-/* Representation of the value of a general constant.
- */
-typedef struct
- {
- unsigned short length; /* size of constant value (bytes) */
-
- union
- {
- unsigned short kon_int8;
- short kon_int16;
- long kon_int32 ALIGNED1;
- float kon_real ALIGNED1;
- double kon_dbl ALIGNED1;
- dst_complex_t kon_cplx ALIGNED1;
- dst_double_complex_t kon_dcplx ALIGNED1;
- char kon_char;
- dst_big_kon_t kon ALIGNED1;
- }
- val; /* value data of constant */
- }
-dst_const_t ALIGNED1;
-
-typedef struct
- {
- dst_rel_offset_t noffset; /* offset to name string */
- dst_src_loc_t src_loc; /* file/line of const definition */
- dst_type_t type_desc; /* type of this (manifest) constant */
- dst_const_t value;
- }
-dst_rec_const_t ALIGNED1;
-
-/*----------------
- VARIABLE record
- ----------------
- Describes a program variable.
-*/
-
-/* Variable attributes. These define certain variable semantics to the
- debugger.
- */
-typedef enum
- {
- dst_var_attr_read_only, /* is read-only (a program literal) */
- dst_var_attr_volatile, /* same as compiler's VOLATILE attribute */
- dst_var_attr_global, /* is a global definition or reference */
- dst_var_attr_compiler_gen, /* is compiler-generated */
- dst_var_attr_static, /* has static location */
- dst_var_attr_END_OF_ENUM
- }
-dst_var_attr_t;
-
-typedef struct
- {
- dst_rel_offset_t noffset; /* offset to name string */
- dst_rel_offset_t loffset; /* offset to loc string */
- dst_src_loc_t src_loc; /* file/line of variable definition */
- dst_type_t type_desc; /* type descriptor */
- unsigned short attributes; /* mask of dst_var_attr_t flags */
- }
-dst_rec_variable_t ALIGNED1;
-
-
-/*----------------
- old VAR record
- -----------------
- Used by older compilers to describe a variable
-*/
-
-typedef enum
- {
- dst_var_loc_unknown, /* Actually defined as "unknown" */
- dst_var_loc_abs, /* Absolute address */
- dst_var_loc_sect_off, /* Absolute address as a section offset */
- dst_var_loc_ind_sect_off, /* An indexed section offset ???? */
- dst_var_loc_reg, /* register */
- dst_var_loc_reg_rel, /* register relative - usually fp */
- dst_var_loc_ind_reg_rel, /* Indexed register relative */
- dst_var_loc_ftn_ptr_based, /* Fortran pointer based */
- dst_var_loc_pc_rel, /* PC relative. Really. */
- dst_var_loc_external, /* External */
- dst_var_loc_END_OF_ENUM
- }
-dst_var_loc_t;
-
-/* Locations come in two versions. The short, and the long. The difference
- * between the short and the long is the addition of a statement number
- * field to the start andend of the range of the long, and and unkown
- * purpose field in the middle. Also, loc_type and loc_index aren't
- * bitfields in the long version.
- */
-
-typedef struct
- {
- unsigned short loc_type:4;
- unsigned short loc_index:12;
- long location;
- short start_line; /* start_line and end_line? */
- short end_line; /* I'm guessing here. */
- }
-dst_var_loc_short_t;
-
-typedef struct
- {
- unsigned short loc_type;
- unsigned short loc_index;
- long location;
- short unknown; /* Always 0003 or 3b3c. Why? */
- short start_statement;
- short start_line;
- short end_statement;
- short end_line;
- }
-dst_var_loc_long_t;
-
-
-typedef struct
- {
- dst_rel_offset_t noffset; /* offset to name string */
- dst_src_loc_t src_loc; /* file/line of description */
- dst_type_t type_desc; /* Type description */
- unsigned short attributes; /* mask of dst_var_attr_t flags */
- unsigned short no_of_locs:15; /* Number of locations */
- unsigned short short_locs:1; /* True if short locations. */
- union
- {
- dst_var_loc_short_t shorts[dst_dummy_array_size];
- dst_var_loc_long_t longs[dst_dummy_array_size];
- }
- locs;
- }
-dst_rec_var_t;
-
-/*----------------
- old LABEL record
- -----------------
- Used by older compilers to describe a label
-*/
-
-typedef struct
- {
- dst_rel_offset_t noffset; /* offset to name string */
- dst_src_loc_t src_loc; /* file/line of description */
- char location[12]; /* location string */
- }
-dst_rec_old_label_t ALIGNED1;
-
-/*----------------
- POINTER record
- ----------------
- Describes a pointer type.
-*/
-
-typedef struct
- {
- dst_rel_offset_t noffset; /* offset to the name string for this type */
- dst_src_loc_t src_loc; /* file/line of definition */
- dst_type_t type_desc; /* base type of this pointer */
- }
-dst_rec_pointer_t ALIGNED1;
-
-
-/*-------------
- ARRAY record
- -------------
- Describes an array type.
-
- Multidimensional arrays are described with a number of dst_rec_array_t
- records, one per array dimension, each linked to the next through the
- elem_type_desc.doffset field. Each record must have its multi_dim flag
- set.
-
- If column_major is true (as with FORTRAN arrays) then the last array bound in
- the declaration is the first array index in memory, which is the opposite of
- the usual case (as with Pascal and C arrays).
-
- Variable array bounds are described by auxiliary records; if aux_var_bound
- records are present, the lo_bound and hi_bound fields of this record are
- ignored by the debugger.
-
- span_comp identifies one of the language-dependent ways in which the distance
- between successive array elements (span) is calculated.
- dst_use_span_field -- the span is the value of span field.
- dst_compute_from_prev -- the span is the size of the previous dimension.
- dst_compute_from_next -- the span is the size of the next dimension.
- In the latter two cases, the span field contains an amount of padding to add
- to the size of the appropriate dimension to calculate the span.
-*/
-
-typedef enum
- {
- dst_use_span_field,
- dst_compute_from_prev,
- dst_compute_from_next,
- dst_span_comp_END_OF_ENUM
- }
-dst_span_comp_t;
-
-typedef struct
- {
- dst_rel_offset_t noffset; /* offset to name string */
- dst_src_loc_t src_loc; /* file/line of definition */
- dst_type_t elem_type_desc; /* array element type */
- dst_type_t indx_type_desc; /* array index type */
- long lo_bound; /* lower bound of index */
- long hi_bound; /* upper bound of index */
- unsigned long span; /* see above */
- unsigned long size; /* total array size (bytes) */
- boolean multi_dim:1;
- boolean is_packed:1; /* true if packed array */
- boolean is_signed:1; /* true if packed elements are signed */
- dst_span_comp_t span_comp:2; /* how to compute span */
- boolean column_major:1;
- unsigned short reserved:2; /* must be zero */
- unsigned short elem_size:8; /* element size if packed (bits) */
- }
-dst_rec_array_t ALIGNED1;
-
-
-/*-----------------
- SUBRANGE record
- -----------------
- Describes a subrange type.
-*/
-
-/* Variable subrange bounds are described by auxiliary records; if aux_var_bound
- records are present, the lo_bound and hi_bound fields of this record are
- ignored by the debugger.
- */
-
-typedef struct
- {
- dst_rel_offset_t noffset; /* offset to name string */
- dst_src_loc_t src_loc; /* file/line of subrange definition */
- dst_type_t type_desc; /* parent type */
- long lo_bound; /* lower bound of subrange */
- long hi_bound; /* upper bound of subrange */
- unsigned short size; /* storage size (bytes) */
- }
-dst_rec_subrange_t ALIGNED1;
-
-
-/*---------------
- STRING record
- ---------------
- Describes a string type.
-*/
-
-/* Variable subrange bounds are described by auxiliary records; if aux_var_bound
- records are present, the lo_bound and hi_bound fields of this record are
- ignored by the debugger.
- */
-
-typedef struct
- {
- dst_rel_offset_t noffset; /* offset to name string */
- dst_src_loc_t src_loc; /* file/line of string definition */
- dst_type_t elem_type_desc; /* element type */
- dst_type_t indx_type_desc; /* index type */
- long lo_bound; /* lower bound */
- long hi_bound; /* upper bound */
- unsigned long size; /* total string size (bytes) if fixed */
- }
-dst_rec_string_t ALIGNED1;
-
-
-/*---------------
- SET record
- ---------------
- Describes a set type.
-*/
-
-typedef struct
- {
- dst_rel_offset_t noffset; /* offset to name string */
- dst_src_loc_t src_loc; /* file/line of definition */
- dst_type_t type_desc; /* element type */
- unsigned short nbits; /* number of bits in set */
- unsigned short size; /* storage size (bytes) */
- }
-dst_rec_set_t ALIGNED1;
-
-
-/*-----------------------------
- IMPLICIT ENUMERATION record
- -----------------------------
- Describes an enumeration type with implicit element values = 0, 1, 2, ...
- (Pascal-style).
-*/
-
-typedef struct
- {
- dst_rel_offset_t noffset; /* offset to name string */
- dst_src_loc_t src_loc; /* file/line of definition */
- unsigned short nelems; /* number of elements in enumeration */
- unsigned short size; /* storage size (bytes) */
- /* offsets to name strings of elements 0, 1, 2, ... */
- dst_rel_offset_t elem_noffsets[dst_dummy_array_size];
- }
-dst_rec_implicit_enum_t ALIGNED1;
-
-
-/*-----------------------------
- EXPLICIT ENUMERATION record
- -----------------------------
- Describes an enumeration type with explicitly assigned element values
- (C-style).
-*/
-
-typedef struct
- {
- dst_rel_offset_t noffset; /* offset to element name string */
- long value; /* element value */
- }
-dst_enum_elem_t;
-
-typedef struct
- {
- dst_rel_offset_t noffset; /* offset to name string */
- dst_src_loc_t src_loc; /* file/line of definition */
- unsigned short nelems; /* number of elements in enumeration */
- unsigned short size; /* storage size (bytes) */
- /* name/value pairs, one describing each enumeration value: */
- dst_enum_elem_t elems[dst_dummy_array_size];
- }
-dst_rec_explicit_enum_t ALIGNED1;
-
-
-/*-----------------------
- RECORD / UNION record
- -----------------------
- Describes a record (struct) or union.
-
- If the record is larger than 2**16 bytes then an attached aux record
- specifies its size. Also, if the record is stored in short form then
- attached records specify field offsets larger than 2**16 bytes.
-
- Whether the fields[] array or sfields[] array is used is selected by
- the dst_rec_type_t of the overall dst record.
-*/
-
-/*
- Record field descriptor, short form. This form handles only fields which
- are an even number of bytes long, located some number of bytes from the
- start of the record.
- */
-typedef struct
- {
- dst_rel_offset_t noffset; /* offset to field name string */
- dst_type_t type_desc; /* field type */
- unsigned short foffset; /* field offset from start of record (bytes) */
- }
-dst_short_field_t ALIGNED1;
-
-typedef struct
- {
- dst_rel_offset_t noffset; /* offset to name string */
- dst_type_t type_desc; /* field type */
- unsigned short foffset; /* byte offset */
- unsigned short is_packed:1; /* True if field is packed */
- unsigned short bit_offset:6; /* Bit offset */
- unsigned short size:6; /* Size in bits */
- unsigned short sign:1; /* True if signed */
- unsigned short pad:2; /* Padding. Must be 0 */
- }
-dst_old_field_t ALIGNED1;
-
-/* Tag enumeration for long record field descriptor:
- */
-typedef enum
- {
- dst_field_byte,
- dst_field_bit,
- dst_field_loc,
- dst_field_END_OF_ENUM
- }
-dst_field_format_t;
-
-/*
- Record field descriptor, long form. The format of the field information
- is identified by the format_tag, which contains one of the above values.
- The field_byte variant is equivalent to the short form of field descriptor.
- The field_bit variant handles fields which are any number of bits long,
- located some number of bits from the start of the record. The field_loc
- variant allows the location of the field to be described by a general loc
- string.
- */
-typedef struct
- {
- dst_rel_offset_t noffset; /* offset to name of field */
- dst_type_t type_desc; /* type of field */
- union
- {
- struct
- {
- dst_field_format_t format_tag:2; /* dst_field_byte */
- unsigned long offset:30; /* offset of field in bytes */
- }
- field_byte ALIGNED1;
- struct
- {
- dst_field_format_t format_tag:2; /* dst_field_bit */
- unsigned long nbits:6; /* bit size of field */
- unsigned long is_signed:1; /* signed/unsigned attribute */
- unsigned long bit_offset:3; /* bit offset from byte boundary */
- int pad:4; /* must be zero */
- unsigned short byte_offset; /* offset of byte boundary */
- }
- field_bit ALIGNED1;
- struct
- {
- dst_field_format_t format_tag:2; /* dst_field_loc */
- int loffset:30; /* dst_rel_offset_t to loc string */
- }
- field_loc ALIGNED1;
- }
- f ALIGNED1;
- }
-dst_field_t;
-
-/* The field_loc.loffset field is a 30-bit signed value. Some versions of C do
- not support signed bit fields. The following macro will extract that field
- as a signed value:
- */
-#define dst_field_loffset(field_rec) \
- ( ((int) ((field_rec).f.field_loc.loffset << 2)) >> 2 )
-
-
-typedef struct
- {
- dst_rel_offset_t noffset; /* offset to record name string */
- dst_src_loc_t src_loc; /* file/line where this record is defined */
- unsigned short size; /* storage size (bytes) */
- unsigned short nfields; /* number of fields in this record */
- union
- {
- dst_field_t fields[dst_dummy_array_size];
- dst_short_field_t sfields[dst_dummy_array_size];
- dst_old_field_t ofields[dst_dummy_array_size];
- }
- f; /* array of fields */
- }
-dst_rec_record_t ALIGNED1;
-
-
-/*-------------
- FILE record
- -------------
- Describes a file type.
-*/
-
-typedef struct
- {
- dst_rel_offset_t noffset; /* offset to name string */
- dst_src_loc_t src_loc; /* file/line where type was defined */
- dst_type_t type_desc; /* file element type */
- }
-dst_rec_file_t ALIGNED1;
-
-
-/*---------------
- OFFSET record
- ---------------
- Describes a Pascal offset type.
- (This type, an undocumented Domain Pascal extension, is currently not
- supported by the debugger)
-*/
-
-typedef struct
- {
- dst_rel_offset_t noffset; /* offset to the name string */
- dst_src_loc_t src_loc; /* file/line of definition */
- dst_type_t area_type_desc; /* area type */
- dst_type_t base_type_desc; /* base type */
- long lo_bound; /* low bound of the offset range */
- long hi_bound; /* high bound of the offset range */
- long bias; /* bias */
- unsigned short scale; /* scale factor */
- unsigned short size; /* storage size (bytes) */
- }
-dst_rec_offset_t ALIGNED1;
-
-
-/*--------------
- ALIAS record
- --------------
- Describes a type alias (e.g., typedef).
-*/
-
-typedef struct
- {
- dst_rel_offset_t noffset; /* offset to name string */
- dst_src_loc_t src_loc; /* file/line of definition */
- dst_type_t type_desc; /* parent type */
- }
-dst_rec_alias_t ALIGNED1;
-
-
-/*------------------
- SIGNATURE record
- ------------------
- Describes a procedure/function type.
-*/
-
-/* Enumeration of argument semantics. Note that most are mutually
- exclusive.
- */
-typedef enum
- {
- dst_arg_attr_val, /* passed by value */
- dst_arg_attr_ref, /* passed by reference */
- dst_arg_attr_name, /* passed by name */
- dst_arg_attr_in, /* readable in the callee */
- dst_arg_attr_out, /* writable in the callee */
- dst_arg_attr_hidden, /* not visible in the caller */
- dst_arg_attr_END_OF_ENUM
- }
-dst_arg_attr_t;
-
-/* Argument descriptor. Actually points to a variable record for most of the
- information.
- */
-typedef struct
- {
- dst_rel_offset_t var_offset; /* offset to variable record */
- unsigned short attributes; /* a mask of dst_arg_attr_t flags */
- }
-dst_arg_t ALIGNED1;
-
-typedef struct
- {
- dst_rel_offset_t noffset; /* offset to name string */
- dst_src_loc_t src_loc; /* file/line of function definition */
- dst_rel_offset_t result; /* offset to function result variable record */
- unsigned short nargs; /* number of arguments */
- dst_arg_t args[dst_dummy_array_size];
- }
-dst_rec_signature_t ALIGNED1;
-
-/*--------------
- SCOPE record
- --------------
- Obsolete. Use the new ENTRY type instead.
- Old compilers may put this in as the first entry in a function,
- terminated by an end of scope entry.
-*/
-
-typedef struct
- {
- dst_rel_offset_t noffset; /* Name offset */
- dst_src_loc_t start_line; /* Starting line */
- dst_src_loc_t end_line; /* Ending line */
- }
-dst_rec_scope_t ALIGNED1;
-
-/*--------------
- ENTRY record
- --------------
- Describes a procedure/function entry point. An entry record is to a
- signature record roughly as a variable record is to a type descriptor record.
-
- The entry_number field is keyed to the entry numbers in .lines -- the
- debugger locates the code location of an entry by searching the line
- number table for an entry numbered with the value of entry_number. The
- main entry is numbered zero.
-*/
-
-typedef struct
- {
- dst_rel_offset_t noffset; /* offset to entry name string */
- dst_rel_offset_t loffset; /* where to jump to call this entry */
- dst_src_loc_t src_loc; /* file/line of definition */
- dst_rel_offset_t sig_desc; /* offset to signature descriptor */
- unsigned int entry_number:8;
- int pad:8; /* must be zero */
- }
-dst_rec_entry_t ALIGNED1;
-
-/*-----------------------
- Old format ENTRY record
- -----------------------
- Supposedly obsolete but still used by some compilers.
- */
-
-typedef struct
- {
- dst_rel_offset_t noffset; /* Offset to entry name string */
- dst_src_loc_t src_loc; /* Location in source */
- dst_rel_offset_t sig_desc; /* Signature description */
- char unknown[36];
- }
-dst_rec_old_entry_t ALIGNED1;
-
-/*--------------
- LABEL record
- --------------
- Describes a program label.
-*/
-
-typedef struct
- {
- dst_rel_offset_t noffset; /* offset to label string */
- dst_rel_offset_t loffset; /* offset to loc string */
- dst_src_loc_t src_loc; /* file/line of definition */
- }
-dst_rec_label_t ALIGNED1;
-
-
-/*-----------------------
- AUXILIARY SIZE record
- -----------------------
- May appear in the auxiliary record list of any type or variable record to
- modify the default size of the type or variable.
-*/
-
-typedef struct
- {
- unsigned long size; /* size (bytes) */
- }
-dst_rec_aux_size_t ALIGNED1;
-
-
-/*-----------------------
- AUXILIARY ALIGN record
- -----------------------
- May appear in the auxiliary record list of any type or variable record to
- modify the default alignment of the type or variable.
-*/
-
-typedef struct
- {
- unsigned short alignment; /* # of low order zero bits */
- }
-dst_rec_aux_align_t ALIGNED1;
-
-
-/*-----------------------------
- AUXILIARY FIELD SIZE record
- -----------------------------
- May appear in the auxiliary record list of any RECORD/UNION record to
- modify the default size of a field.
-*/
-
-typedef struct
- {
- unsigned short field_no; /* field number */
- unsigned long size; /* size (bits) */
- }
-dst_rec_aux_field_size_t ALIGNED1;
-
-
-
-/*-----------------------------
- AUXILIARY FIELD OFFSET record
- -----------------------------
- May appear in the auxiliary record list of any RECORD/UNION record to
- specify a field offset larger than 2**16.
-*/
-
-typedef struct
- {
- unsigned short field_no; /* field number */
- unsigned long foffset; /* offset */
- }
-dst_rec_aux_field_off_t ALIGNED1;
-
-
-/*-----------------------------
- AUXILIARY FIELD ALIGN record
- -----------------------------
- May appear in the auxiliary record list of any RECORD/UNION record to
- modify the default alignment of a field.
-*/
-
-typedef struct
- {
- unsigned short field_no; /* field number */
- unsigned short alignment; /* number of low order zero bits */
- }
-dst_rec_aux_field_align_t ALIGNED1;
-
-
-/*----------------------------
- AUXILIARY VAR BOUND record
- ----------------------------
- May appear in the auxiliary record list of any ARRAY, SUBRANGE or STRING
- record to describe a variable bound for the range of the type.
-*/
-
-typedef enum
- {
- dst_low_bound, /* the low bound is variable */
- dst_high_bound, /* the high bound is variable */
- dst_var_bound_END_OF_ENUM
- }
-dst_var_bound_t;
-
-typedef struct
- {
- unsigned short which; /* which bound */
- dst_rel_offset_t voffset ALIGNED1; /* variable that defines bound */
- }
-dst_rec_aux_var_bound_t ALIGNED1;
-
-
-/*----------------------------------
- AUXILIARY TYPE DERIVATION record
- ----------------------------------
- May appear in the auxiliary record list of any RECORD/UNION record to denote
- class inheritance of that type from a parent type.
-
- Inheritance implies that it is possible to convert the inheritor type to the
- inherited type, retaining those fields which were inherited. To allow this,
- orig_field_no, a field number into the record type, is provided. If
- orig_is_pointer is false, then the start of the inherited record is located
- at the location of the field indexed by orig_field_no. If orig_is_pointer
- is true, then it is located at the address contained in the field indexed
- by orig_field_no (assumed to be a pointer).
-*/
-
-typedef struct
- {
- dst_type_t parent_type; /* reference to inherited type */
- unsigned short orig_field_no;
- boolean orig_is_pointer:1;
- int unused:15; /* must be zero */
- }
-dst_rec_aux_type_deriv_t ALIGNED1;
-
-
-/*------------------------------------
- AUXILIARY VARIABLE LIFETIME record
- ------------------------------------
- May appear in the auxiliary record list of a VARIABLE record to add location
- information for an additional variable lifetime.
-*/
-
-typedef struct
- {
- dst_rel_offset_t loffset;
- }
-dst_rec_aux_lifetime_t ALIGNED1;
-
-
-/*-------------------------------
- AUXILIARY POINTER BASE record
- -------------------------------
- May appear in the auxiliary record list of a VARIABLE record to provide a
- pointer base to substitute for references to any such bases in the location
- string of the variable. A pointer base is another VARIABLE record. When
- the variable is evaluated by the debugger, it uses the current value of the
- pointer base variable in computing its location.
-
- This is useful for representing FORTRAN pointer-based variables.
-*/
-
-typedef struct
- {
- dst_rel_offset_t voffset;
- }
-dst_rec_aux_ptr_base_t ALIGNED1;
-
-
-/*---------------------------------
- AUXILIARY REGISTER VALUE record
- ---------------------------------
- May appear in the auxiliary record list of an ENTRY record to specify
- a register that must be set to a specific value before jumping to the entry
- point in a debugger "call". The debugger must set the debuggee register,
- specified by the register code, to the value of the *address* to which the
- location string resolves. If the address is register-relative, then the
- call cannot be made unless the current stack frame is the lexical parent
- of the entry. An example of this is when a (Pascal) nested procedure
- contains references to its parent's variables, which it accesses through
- a static link register. The static link register must be set to some
- address relative to the parent's stack base register.
-*/
-
-typedef struct
- {
- unsigned short reg; /* identifies register to set (isp enum) */
- dst_rel_offset_t loffset; /* references a location string */
- }
-dst_rec_aux_reg_val_t ALIGNED1;
-
-
-/*==========================================================*/
-/*========== RECORDS USED IN .blocks AND .symbols ==========*/
-/*==========================================================*/
-
-/*---------------------
- STRING TABLE record
- ---------------------
- A string table record contains any number of null-terminated, variable length
- strings. The length field gives the size in bytes of the text field, which
- can be any size.
-
- The global name table shares this format. This record appears in the
- .blocks section. Each string in the table identifies a global defined in
- the current compilation unit.
-
- The loc pool record shares this format as well. Loc strings are described
- elsewhere.
-*/
-
-typedef struct
- {
- unsigned long length;
- char text[dst_dummy_array_size];
- }
-dst_rec_string_tab_t ALIGNED1;
-
-
-/*-----------------------
- AUXILIARY QUAL record
- -----------------------
- May appear in the auxiliary record list of any BLOCK, VARIABLE, or type record
- to provide it with a fully-qualified, language-dependent name.
-*/
-
-typedef struct
- {
- dst_rel_offset_t lang_qual_name;
- }
-dst_rec_aux_qual_t ALIGNED1;
-
-
-/*----------------
- FORWARD record
- ----------------
- Reference to a record somewhere else. This allows identical definitions in
- different scopes to share data.
-*/
-
-typedef struct
- {
- dst_rel_offset_t rec_off;
- }
-dst_rec_forward_t ALIGNED1;
-
-
-/*-------------------------------
- AUXILIARY SOURCE RANGE record
- -------------------------------
- May appear in the auxiliary record list of any BLOCK record to specify a
- range of source lines over which the block is active.
-*/
-
-typedef struct
- {
- dst_src_loc_t first_line; /* first source line */
- dst_src_loc_t last_line; /* last source line */
- }
-dst_rec_aux_src_range_t ALIGNED1;
-
-
-/*------------------
- EXTENSION record
- ------------------
- Provision for "foreign" records, such as might be generated by a non-Apollo
- compiler. Apollo software will ignore these.
-*/
-
-typedef struct
- {
- unsigned short rec_size; /* record size (bytes) */
- unsigned short ext_type; /* defined by whoever generates it */
- unsigned short ext_data; /* place-holder for arbitrary amount of data */
- }
-dst_rec_extension_t ALIGNED1;
-
-
-/*
- ** DEBUG SYMBOL record -- The wrapper for all .blocks and .symbols records.
- **
- ** This record ties together all previous .blocks and .symbols records
- ** together in a union with a common header. The rec_type field of the
- ** header identifies the record type. The rec_flags field currently only
- ** defines auxiliary record lists.
- **
- ** If a record carries with it a non-null auxiliary record list, its
- ** dst_flag_has_aux_recs flag is set, and each of the records that follow
- ** it are treated as its auxiliary records, until the end of the compilation
- ** unit or scope is reached, or until an auxiliary record with its
- ** dst_flag_last_aux_rec flag set is reached.
- */
-
-typedef enum
- {
- dst_flag_has_aux_recs,
- dst_flag_last_aux_rec,
- dst_rec_flag_END_OF_ENUM
- }
-dst_rec_flags_t;
-
-typedef struct
- {
- dst_rec_type_t rec_type:8; /* record type */
- int rec_flags:8; /* mask of dst_rec_flags_t */
- union /* switched on rec_type field above */
- {
- /* dst_typ_pad requires no additional fields */
- dst_rec_comp_unit_t comp_unit_;
- dst_rec_section_tab_t section_tab_;
- dst_rec_file_tab_t file_tab_;
- dst_rec_block_t block_;
- dst_rec_var_t var_;
- dst_rec_pointer_t pointer_;
- dst_rec_array_t array_;
- dst_rec_subrange_t subrange_;
- dst_rec_set_t set_;
- dst_rec_implicit_enum_t implicit_enum_;
- dst_rec_explicit_enum_t explicit_enum_;
- /* dst_typ_short_{rec,union} are represented by 'rec' (below) */
- dst_rec_file_t file_;
- dst_rec_offset_t offset_;
- dst_rec_alias_t alias_;
- dst_rec_signature_t signature_;
- dst_rec_old_label_t old_label_;
- dst_rec_scope_t scope_;
- /* dst_typ_end_scope requires no additional fields */
- dst_rec_string_tab_t string_tab_;
- /* dst_typ_global_name_tab is represented by 'string_tab' (above) */
- dst_rec_forward_t forward_;
- dst_rec_aux_size_t aux_size_;
- dst_rec_aux_align_t aux_align_;
- dst_rec_aux_field_size_t aux_field_size_;
- dst_rec_aux_field_off_t aux_field_off_;
- dst_rec_aux_field_align_t aux_field_align_;
- dst_rec_aux_qual_t aux_qual_;
- dst_rec_aux_var_bound_t aux_var_bound_;
- dst_rec_extension_t extension_;
- dst_rec_string_t string_;
- dst_rec_const_t const_;
- /* dst_typ_reference is represented by 'pointer' (above) */
- dst_rec_record_t record_;
- /* dst_typ_union is represented by 'record' (above) */
- dst_rec_aux_type_deriv_t aux_type_deriv_;
- /* dst_typ_locpool is represented by 'string_tab' (above) */
- dst_rec_variable_t variable_;
- dst_rec_label_t label_;
- dst_rec_entry_t entry_;
- dst_rec_aux_lifetime_t aux_lifetime_;
- dst_rec_aux_ptr_base_t aux_ptr_base_;
- dst_rec_aux_src_range_t aux_src_range_;
- dst_rec_aux_reg_val_t aux_reg_val_;
- dst_rec_name_tab_t aux_unit_names_;
- dst_rec_sect_info_tab_t aux_sect_info_;
- }
- rec_data ALIGNED1;
- }
-dst_rec_t, *dst_rec_ptr_t;
-
-
-/*===============================================*/
-/*========== .lines SECTION DEFINITIONS =========*/
-/*===============================================*/
-/*
- The .lines section contains a sequence of line number tables. There is no
- record structure within the section. The start of the table for a routine
- is pointed to by the block record, and the end of the table is signaled by
- an escape code.
-
- A line number table is a sequence of bytes. The default entry contains a line
- number delta (-7..+7) in the high 4 bits and a pc delta (0..15) in the low 4
- bits. Special cases, including when one or both of the values is too large
- to fit in 4 bits and other special cases are handled through escape entries.
- Escape entries are identified by the value 0x8 in the high 4 bits. The low 4
- bits are occupied by a function code. Some escape entries are followed by
- additional arguments, which may be bytes, words, or longwords. This data is
- not aligned.
-
- The initial PC offset, file number and line number are zero. Normally, the
- table begins with a dst_ln_file escape which establishes the initial file
- and line number. All PC deltas are unsigned (thus the table is ordered by
- increasing PC); line number deltas are signed. The table ends with a
- dst_ln_end escape, which is followed by a final table entry whose PC delta
- gives the code size of the last statement.
-
- Escape Semantic
- --------- ------------------------------------------------------------
- file Changes file state. The current source file remains constant
- until another file escape. Though the line number state is
- also updated by a file escape, a file escape does NOT
- constitute a line table entry.
-
- statement Alters the statement number of the next table entry. By
- default, all table entries refer to the first statement on a
- line. Statement number one is the second statement, and so on.
-
- entry Identifies the next table entry as the position of an entry
- point for the current block. The PC position should follow
- any procedure prologue code. An argument specifies the entry
- number, which is keyed to the entry number of the corresponding
- .symbols ENTRY record.
-
- exit Identifies the next table entry as the last position within
- the current block before a procedure epiloge and subsequent
- procedure exit.
-
- gap By default, the executable code corresponding to a table entry
- is assumed to extend to the beginning of the next table entry.
- If this is not the case--there is a "hole" in the table--then
- a gap escape should follow the first table entry to specify
- where the code for that entry ends.
- */
-
-#define dst_ln_escape_flag -8
-
-/*
- Escape function codes:
- */
-typedef enum
- {
- dst_ln_pad, /* pad byte */
- dst_ln_file, /* file escape. Next 4 bytes are a dst_src_loc_t */
- dst_ln_dln1_dpc1, /* 1 byte line delta, 1 byte pc delta */
- dst_ln_dln2_dpc2, /* 2 bytes line delta, 2 bytes pc delta */
- dst_ln_ln4_pc4, /* 4 bytes ABSOLUTE line number, 4 bytes ABSOLUTE pc */
- dst_ln_dln1_dpc0, /* 1 byte line delta, pc delta = 0 */
- dst_ln_ln_off_1, /* statement escape, stmt # = 1 (2nd stmt on line) */
- dst_ln_ln_off, /* statement escape, stmt # = next byte */
- dst_ln_entry, /* entry escape, next byte is entry number */
- dst_ln_exit, /* exit escape */
- dst_ln_stmt_end, /* gap escape, 4 bytes pc delta */
- dst_ln_escape_11, /* reserved */
- dst_ln_escape_12, /* reserved */
- dst_ln_escape_13, /* reserved */
- dst_ln_nxt_byte, /* next byte contains the real escape code */
- dst_ln_end, /* end escape, final entry follows */
- dst_ln_escape_END_OF_ENUM
- }
-dst_ln_escape_t;
-
-/*
- Line number table entry
- */
-typedef union
- {
- struct
- {
- unsigned int ln_delta:4; /* 4 bit line number delta */
- unsigned int pc_delta:4; /* 4 bit pc delta */
- }
- delta;
-
- struct
- {
- unsigned int esc_flag:4; /* alias for ln_delta */
- dst_ln_escape_t esc_code:4; /* escape function code */
- }
- esc;
-
- char sdata; /* signed data byte */
- unsigned char udata; /* unsigned data byte */
- }
-dst_ln_entry_t,
- *dst_ln_entry_ptr_t,
- dst_ln_table_t[dst_dummy_array_size];
-
-/* The following macro will extract the ln_delta field as a signed value:
- */
-#define dst_ln_ln_delta(ln_rec) \
- ( ((short) ((ln_rec).delta.ln_delta << 12)) >> 12 )
-
-
-
-
-typedef struct dst_sec_struct
- {
- char *buffer;
- long position;
- long size;
- long base;
- }
-dst_sec;
-
-
-/* Macros for access to the data */
-
-#define DST_comp_unit(x) ((x)->rec_data.comp_unit_)
-#define DST_section_tab(x) ((x)->rec_data.section_tab_)
-#define DST_file_tab(x) ((x)->rec_data.file_tab_)
-#define DST_block(x) ((x)->rec_data.block_)
-#define DST_var(x) ((x)->rec_data.var_)
-#define DST_pointer(x) ((x)->rec_data.pointer_)
-#define DST_array(x) ((x)->rec_data.array_)
-#define DST_subrange(x) ((x)->rec_data.subrange_)
-#define DST_set(x) ((x)->rec_data.set_)
-#define DST_implicit_enum(x) ((x)->rec_data.implicit_enum_)
-#define DST_explicit_enum(x) ((x)->rec_data.explicit_enum_)
-#define DST_short_rec(x) ((x)->rec_data.record_)
-#define DST_short_union(x) ((x)->rec_data.record_)
-#define DST_file(x) ((x)->rec_data.file_)
-#define DST_offset(x) ((x)->rec_data.offset_)
-#define DST_alias(x) ((x)->rec_data.alias_)
-#define DST_signature(x) ((x)->rec_data.signature_)
-#define DST_old_label(x) ((x)->rec_data.old_label_)
-#define DST_scope(x) ((x)->rec_data.scope_)
-#define DST_string_tab(x) ((x)->rec_data.string_tab_)
-#define DST_global_name_tab(x) ((x)->rec_data.string_tab_)
-#define DST_forward(x) ((x)->rec_data.forward_)
-#define DST_aux_size(x) ((x)->rec_data.aux_size_)
-#define DST_aux_align(x) ((x)->rec_data.aux_align_)
-#define DST_aux_field_size(x) ((x)->rec_data.aux_field_size_)
-#define DST_aux_field_off(x) ((x)->rec_data.aux_field_off_)
-#define DST_aux_field_align(x) ((x)->rec_data.aux_field_align_)
-#define DST_aux_qual(x) ((x)->rec_data.aux_qual_)
-#define DST_aux_var_bound(x) ((x)->rec_data.aux_var_bound_)
-#define DST_extension(x) ((x)->rec_data.extension_)
-#define DST_string(x) ((x)->rec_data.string_)
-#define DST_const(x) ((x)->rec_data.const_)
-#define DST_reference(x) ((x)->rec_data.pointer_)
-#define DST_record(x) ((x)->rec_data.record_)
-#define DST_union(x) ((x)->rec_data.record_)
-#define DST_aux_type_deriv(x) ((x)->rec_data.aux_type_deriv_)
-#define DST_locpool(x) ((x)->rec_data.string_tab_)
-#define DST_variable(x) ((x)->rec_data.variable_)
-#define DST_label(x) ((x)->rec_data.label_)
-#define DST_entry(x) ((x)->rec_data.entry_)
-#define DST_aux_lifetime(x) ((x)->rec_data.aux_lifetime_)
-#define DST_aux_ptr_base(x) ((x)->rec_data.aux_ptr_base_)
-#define DST_aux_src_range(x) ((x)->rec_data.aux_src_range_)
-#define DST_aux_reg_val(x) ((x)->rec_data.aux_reg_val_)
-#define DST_aux_unit_names(x) ((x)->rec_data.aux_unit_names_)
-#define DST_aux_sect_info(x) ((x)->rec_data.aux_sect_info_)
-
-
-/*
- * Type codes for loc strings. I'm not entirely certain about all of
- * these, but they seem to work.
- * troy@cbme.unsw.EDU.AU
- * If you find a variable whose location can't be decoded, you should
- * find out it's code using "dstdump -s filename". It will record an
- * entry for the variable, and give a text representation of what
- * the locstring means. Before that explaination there will be a
- * number. In the LOCSTRING table, that number will appear before
- * the start of the location string. Location string codes are
- * five bit codes with a 3 bit argument. Check the high 5 bits of
- * the one byte code, and figure out where it goes in here.
- * Then figure out exactly what the meaning is and code it in
- * dstread.c
- *
- * Note that ranged locs mean that the variable is in different locations
- * depending on the current PC. We ignore these because (a) gcc can't handle
- * them, and (b), If you don't use high levels of optimisation they won't
- * occur.
- */
-typedef enum
- {
- dst_lsc_end, /* End of string */
- dst_lsc_indirect, /* Indirect through previous. Arg == 6 */
- /* Or register ax (x=arg) */
- dst_lsc_dreg, /* register dx (x=arg) */
- dst_lsc_03,
- dst_lsc_section, /* Section (arg+1) */
- dst_lsc_05,
- dst_lsc_06,
- dst_lsc_add, /* Add (arg+1)*2 */
- dst_lsc_sub, /* Subtract (arg+1)*2 */
- dst_lsc_09,
- dst_lsc_0a,
- dst_lsc_sec_byte, /* Section of next byte+1 */
- dst_lsc_add_byte, /* Add next byte (arg == 5) or next word
- * (arg == 6)
- */
- dst_lsc_sub_byte, /* Subtract next byte. (arg == 1) or next
- * word (arg == 6 ?)
- */
- dst_lsc_sbreg, /* Stack base register (frame pointer). Arg==0 */
- dst_lsc_0f,
- dst_lsc_ranged, /* location is pc dependent */
- dst_lsc_11,
- dst_lsc_12,
- dst_lsc_13,
- dst_lsc_14,
- dst_lsc_15,
- dst_lsc_16,
- dst_lsc_17,
- dst_lsc_18,
- dst_lsc_19,
- dst_lsc_1a,
- dst_lsc_1b,
- dst_lsc_1c,
- dst_lsc_1d,
- dst_lsc_1e,
- dst_lsc_1f
- }
-dst_loc_string_code_t;
-
-/* If the following occurs after an addition/subtraction, that addition
- * or subtraction should be multiplied by 256. It's a complete byte, not
- * a code.
- */
-
-#define dst_multiply_256 ((char) 0x73)
-
-typedef struct
- {
- char code:5;
- char arg:3;
- }
-dst_loc_header_t ALIGNED1;
-
-typedef union
- {
- dst_loc_header_t header;
- char data;
- }
-dst_loc_entry_t ALIGNED1;
-
-#undef ALIGNED1
-#endif /* apollo_dst_h */
+// OBSOLETE /* <apollo/dst.h> */
+// OBSOLETE /* Apollo object module DST (debug symbol table) description */
+// OBSOLETE
+// OBSOLETE #ifndef apollo_dst_h
+// OBSOLETE #define apollo_dst_h
+// OBSOLETE
+// OBSOLETE #if defined(apollo) && !defined(__GNUC__)
+// OBSOLETE #define ALIGNED1 __attribute( (aligned(1)) )
+// OBSOLETE #else
+// OBSOLETE /* Remove attribute directives from non-Apollo code: */
+// OBSOLETE #define ALIGNED1 /* nil */
+// OBSOLETE #endif
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /* Identification of this version of the debug symbol table. Producers of the
+// OBSOLETE debug symbol table must write these values into the version number field of
+// OBSOLETE the compilation unit record in .blocks .
+// OBSOLETE */
+// OBSOLETE #define dst_version_major 1
+// OBSOLETE #define dst_version_minor 3
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*
+// OBSOLETE ** Enumeration of debug record types appearing in .blocks and .symbols ...
+// OBSOLETE */
+// OBSOLETE typedef enum
+// OBSOLETE {
+// OBSOLETE dst_typ_pad, /* 0 */
+// OBSOLETE dst_typ_comp_unit, /* 1 */
+// OBSOLETE dst_typ_section_tab, /* 2 */
+// OBSOLETE dst_typ_file_tab, /* 3 */
+// OBSOLETE dst_typ_block, /* 4 */
+// OBSOLETE dst_typ_5,
+// OBSOLETE dst_typ_var,
+// OBSOLETE dst_typ_pointer, /* 7 */
+// OBSOLETE dst_typ_array, /* 8 */
+// OBSOLETE dst_typ_subrange, /* 9 */
+// OBSOLETE dst_typ_set, /* 10 */
+// OBSOLETE dst_typ_implicit_enum, /* 11 */
+// OBSOLETE dst_typ_explicit_enum, /* 12 */
+// OBSOLETE dst_typ_short_rec, /* 13 */
+// OBSOLETE dst_typ_old_record,
+// OBSOLETE dst_typ_short_union, /* 15 */
+// OBSOLETE dst_typ_old_union,
+// OBSOLETE dst_typ_file, /* 17 */
+// OBSOLETE dst_typ_offset, /* 18 */
+// OBSOLETE dst_typ_alias, /* 19 */
+// OBSOLETE dst_typ_signature, /* 20 */
+// OBSOLETE dst_typ_21,
+// OBSOLETE dst_typ_old_label, /* 22 */
+// OBSOLETE dst_typ_scope, /* 23 */
+// OBSOLETE dst_typ_end_scope, /* 24 */
+// OBSOLETE dst_typ_25,
+// OBSOLETE dst_typ_26,
+// OBSOLETE dst_typ_string_tab, /* 27 */
+// OBSOLETE dst_typ_global_name_tab, /* 28 */
+// OBSOLETE dst_typ_forward, /* 29 */
+// OBSOLETE dst_typ_aux_size, /* 30 */
+// OBSOLETE dst_typ_aux_align, /* 31 */
+// OBSOLETE dst_typ_aux_field_size, /* 32 */
+// OBSOLETE dst_typ_aux_field_off, /* 33 */
+// OBSOLETE dst_typ_aux_field_align, /* 34 */
+// OBSOLETE dst_typ_aux_qual, /* 35 */
+// OBSOLETE dst_typ_aux_var_bound, /* 36 */
+// OBSOLETE dst_typ_extension, /* 37 */
+// OBSOLETE dst_typ_string, /* 38 */
+// OBSOLETE dst_typ_old_entry,
+// OBSOLETE dst_typ_const, /* 40 */
+// OBSOLETE dst_typ_reference, /* 41 */
+// OBSOLETE dst_typ_record, /* 42 */
+// OBSOLETE dst_typ_union, /* 43 */
+// OBSOLETE dst_typ_aux_type_deriv, /* 44 */
+// OBSOLETE dst_typ_locpool, /* 45 */
+// OBSOLETE dst_typ_variable, /* 46 */
+// OBSOLETE dst_typ_label, /* 47 */
+// OBSOLETE dst_typ_entry, /* 48 */
+// OBSOLETE dst_typ_aux_lifetime, /* 49 */
+// OBSOLETE dst_typ_aux_ptr_base, /* 50 */
+// OBSOLETE dst_typ_aux_src_range, /* 51 */
+// OBSOLETE dst_typ_aux_reg_val, /* 52 */
+// OBSOLETE dst_typ_aux_unit_names, /* 53 */
+// OBSOLETE dst_typ_aux_sect_info, /* 54 */
+// OBSOLETE dst_typ_END_OF_ENUM
+// OBSOLETE }
+// OBSOLETE dst_rec_type_t;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*
+// OBSOLETE ** Dummy bounds for variably dimensioned arrays:
+// OBSOLETE */
+// OBSOLETE #define dst_dummy_array_size 100
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*
+// OBSOLETE ** Reference to another item in the symbol table.
+// OBSOLETE **
+// OBSOLETE ** The value of a dst_rel_offset_t is the relative offset from the start of the
+// OBSOLETE ** referencing record to the start of the referenced record, string, etc.
+// OBSOLETE **
+// OBSOLETE ** The value of a NIL dst_rel_offset_t is zero.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef long dst_rel_offset_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /* FIXME: Here and many places we make assumptions about sizes of host
+// OBSOLETE data types, structure layout, etc. Only needs to be fixed if we care
+// OBSOLETE about cross-debugging, though. */
+// OBSOLETE
+// OBSOLETE /*
+// OBSOLETE ** Section-relative reference.
+// OBSOLETE **
+// OBSOLETE ** The section index field is an index into the local compilation unit's
+// OBSOLETE ** section table (see dst_rec_section_tab_t)--NOT into the object module
+// OBSOLETE ** section table!
+// OBSOLETE **
+// OBSOLETE ** The sect_offset field is the offset in bytes into the section.
+// OBSOLETE **
+// OBSOLETE ** A NIL dst_sect_ref_t has a sect_index field of zero. Indexes originate
+// OBSOLETE ** at one.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE unsigned short sect_index;
+// OBSOLETE unsigned long sect_offset ALIGNED1;
+// OBSOLETE }
+// OBSOLETE dst_sect_ref_t;
+// OBSOLETE
+// OBSOLETE #define dst_sect_index_nil 0
+// OBSOLETE #define dst_sect_index_origin 1
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*
+// OBSOLETE ** Source location descriptor.
+// OBSOLETE **
+// OBSOLETE ** The file_index field is an index into the local compilation unit's
+// OBSOLETE ** file table (see dst_rec_file_tab_t).
+// OBSOLETE **
+// OBSOLETE ** A NIL dst_src_loc_t has a file_index field of zero. Indexes originate
+// OBSOLETE ** at one.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE boolean reserved:1; /* reserved for future use */
+// OBSOLETE int file_index:11; /* index into .blocks source file list */
+// OBSOLETE int line_number:20; /* source line number */
+// OBSOLETE }
+// OBSOLETE dst_src_loc_t;
+// OBSOLETE
+// OBSOLETE #define dst_file_index_nil 0
+// OBSOLETE #define dst_file_index_origin 1
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*
+// OBSOLETE ** Standard (primitive) type codes.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef enum
+// OBSOLETE {
+// OBSOLETE dst_non_std_type,
+// OBSOLETE dst_int8_type, /* 8 bit integer */
+// OBSOLETE dst_int16_type, /* 16 bit integer */
+// OBSOLETE dst_int32_type, /* 32 bit integer */
+// OBSOLETE dst_uint8_type, /* 8 bit unsigned integer */
+// OBSOLETE dst_uint16_type, /* 16 bit unsigned integer */
+// OBSOLETE dst_uint32_type, /* 32 bit unsigned integer */
+// OBSOLETE dst_real32_type, /* single precision ieee floatining point */
+// OBSOLETE dst_real64_type, /* double precision ieee floatining point */
+// OBSOLETE dst_complex_type, /* single precision complex */
+// OBSOLETE dst_dcomplex_type, /* double precision complex */
+// OBSOLETE dst_bool8_type, /* boolean =logical*1 */
+// OBSOLETE dst_bool16_type, /* boolean =logical*2 */
+// OBSOLETE dst_bool32_type, /* boolean =logical*4 */
+// OBSOLETE dst_char_type, /* 8 bit ascii character */
+// OBSOLETE dst_string_type, /* string of 8 bit ascii characters */
+// OBSOLETE dst_ptr_type, /* univ_pointer */
+// OBSOLETE dst_set_type, /* generic 256 bit set */
+// OBSOLETE dst_proc_type, /* generic procedure (signature not specified) */
+// OBSOLETE dst_func_type, /* generic function (signature not specified) */
+// OBSOLETE dst_void_type, /* c void type */
+// OBSOLETE dst_uchar_type, /* c unsigned char */
+// OBSOLETE dst_std_type_END_OF_ENUM
+// OBSOLETE }
+// OBSOLETE dst_std_type_t;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*
+// OBSOLETE ** General data type descriptor
+// OBSOLETE **
+// OBSOLETE ** If the user_defined_type bit is clear, then the type is a standard type, and
+// OBSOLETE ** the remaining bits contain the dst_std_type_t of the type. If the bit is
+// OBSOLETE ** set, then the type is defined in a separate dst record, which is referenced
+// OBSOLETE ** by the remaining bits as a dst_rel_offset_t.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef union
+// OBSOLETE {
+// OBSOLETE struct
+// OBSOLETE {
+// OBSOLETE boolean user_defined_type:1; /* tag field */
+// OBSOLETE int must_be_zero:23; /* 23 bits of pad */
+// OBSOLETE dst_std_type_t dtc:8; /* 8 bit primitive data */
+// OBSOLETE }
+// OBSOLETE std_type;
+// OBSOLETE
+// OBSOLETE struct
+// OBSOLETE {
+// OBSOLETE boolean user_defined_type:1; /* tag field */
+// OBSOLETE int doffset:31; /* offset to type record */
+// OBSOLETE }
+// OBSOLETE user_type;
+// OBSOLETE }
+// OBSOLETE dst_type_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE /* The user_type.doffset field is a 31-bit signed value. Some versions of C
+// OBSOLETE do not support signed bit fields. The following macro will extract that
+// OBSOLETE field as a signed value:
+// OBSOLETE */
+// OBSOLETE #define dst_user_type_offset(type_rec) \
+// OBSOLETE ( ((int) ((type_rec).user_type.doffset << 1)) >> 1 )
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*================================================*/
+// OBSOLETE /*========== RECORDS IN .blocks SECTION ==========*/
+// OBSOLETE /*================================================*/
+// OBSOLETE
+// OBSOLETE /*-----------------------
+// OBSOLETE COMPILATION UNIT record
+// OBSOLETE -----------------------
+// OBSOLETE This must be the first record in each .blocks section.
+// OBSOLETE Provides a set of information describing the output of a single compilation
+// OBSOLETE and pointers to additional information for the compilation unit.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef enum
+// OBSOLETE {
+// OBSOLETE dst_pc_code_locs, /* ranges in loc strings are pc ranges */
+// OBSOLETE dst_comp_unit_END_OF_ENUM
+// OBSOLETE }
+// OBSOLETE dst_comp_unit_flag_t;
+// OBSOLETE
+// OBSOLETE typedef enum
+// OBSOLETE {
+// OBSOLETE dst_lang_unk, /* unknown language */
+// OBSOLETE dst_lang_pas, /* Pascal */
+// OBSOLETE dst_lang_ftn, /* FORTRAN */
+// OBSOLETE dst_lang_c, /* C */
+// OBSOLETE dst_lang_mod2, /* Modula-2 */
+// OBSOLETE dst_lang_asm_m68k, /* 68K assembly language */
+// OBSOLETE dst_lang_asm_a88k, /* AT assembly language */
+// OBSOLETE dst_lang_ada, /* Ada */
+// OBSOLETE dst_lang_cxx, /* C++ */
+// OBSOLETE dst_lang_END_OF_ENUM
+// OBSOLETE }
+// OBSOLETE dst_lang_type_t;
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE struct
+// OBSOLETE {
+// OBSOLETE unsigned char major_part; /* = dst_version_major */
+// OBSOLETE unsigned char minor_part; /* = dst_version_minor */
+// OBSOLETE }
+// OBSOLETE version; /* version of dst */
+// OBSOLETE unsigned short flags; /* mask of dst_comp_unit_flag_t */
+// OBSOLETE unsigned short lang_type; /* source language */
+// OBSOLETE unsigned short number_of_blocks; /* number of blocks records */
+// OBSOLETE dst_rel_offset_t root_block_offset; /* offset to root block (module?) */
+// OBSOLETE dst_rel_offset_t section_table /* offset to section table record */ ;
+// OBSOLETE dst_rel_offset_t file_table; /* offset to file table record */
+// OBSOLETE unsigned long data_size; /* total size of .blocks data */
+// OBSOLETE }
+// OBSOLETE dst_rec_comp_unit_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*--------------------
+// OBSOLETE SECTION TABLE record
+// OBSOLETE --------------------
+// OBSOLETE There must be one section table associated with each compilation unit.
+// OBSOLETE Other debug records refer to sections via their index in this table. The
+// OBSOLETE section base addresses in the table are virtual addresses of the sections,
+// OBSOLETE relocated by the linker.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE unsigned short number_of_sections; /* size of array: */
+// OBSOLETE unsigned long section_base[dst_dummy_array_size] ALIGNED1;
+// OBSOLETE }
+// OBSOLETE dst_rec_section_tab_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*-----------------
+// OBSOLETE FILE TABLE record
+// OBSOLETE -----------------
+// OBSOLETE There must be one file table associated with each compilation unit describing
+// OBSOLETE the source (and include) files used by each compilation unit. Other debug
+// OBSOLETE records refer to files via their index in this table. The first entry is the
+// OBSOLETE primary source file.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE long dtm; /* time last modified (time_$clock_t) */
+// OBSOLETE dst_rel_offset_t noffset; /* offset to name string for source file */
+// OBSOLETE }
+// OBSOLETE dst_file_desc_t;
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE unsigned short number_of_files; /* size of array: */
+// OBSOLETE dst_file_desc_t files[dst_dummy_array_size] ALIGNED1;
+// OBSOLETE }
+// OBSOLETE dst_rec_file_tab_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*-----------------
+// OBSOLETE NAME TABLE record
+// OBSOLETE -----------------
+// OBSOLETE A name table record may appear as an auxiliary record to the file table,
+// OBSOLETE providing additional qualification of the file indexes for languages that
+// OBSOLETE need it (i.e. Ada). Name table entries parallel file table entries of the
+// OBSOLETE same file index.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE unsigned short number_of_names; /* size of array: */
+// OBSOLETE dst_rel_offset_t names[dst_dummy_array_size] ALIGNED1;
+// OBSOLETE }
+// OBSOLETE dst_rec_name_tab_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*--------------
+// OBSOLETE BLOCK record
+// OBSOLETE --------------
+// OBSOLETE Describes a lexical program block--a procedure, function, module, etc.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE /* Block types. These may be used in any way desired by the compiler writers.
+// OBSOLETE The debugger uses them only to give a description to the user of the type of
+// OBSOLETE a block. The debugger makes no other assumptions about the meaning of any
+// OBSOLETE of these. For example, the fact that a block is executable (e.g., program)
+// OBSOLETE or not (e.g., module) is expressed in block attributes (see below), not
+// OBSOLETE guessed at from the block type.
+// OBSOLETE */
+// OBSOLETE typedef enum
+// OBSOLETE {
+// OBSOLETE dst_block_module, /* some pascal = modula = ada types */
+// OBSOLETE dst_block_program,
+// OBSOLETE dst_block_procedure,
+// OBSOLETE dst_block_function, /* C function */
+// OBSOLETE dst_block_subroutine, /* some fortran block types */
+// OBSOLETE dst_block_block_data,
+// OBSOLETE dst_block_stmt_function,
+// OBSOLETE dst_block_package, /* a few particular to Ada */
+// OBSOLETE dst_block_package_body,
+// OBSOLETE dst_block_subunit,
+// OBSOLETE dst_block_task,
+// OBSOLETE dst_block_file, /* a C outer scope? */
+// OBSOLETE dst_block_class, /* C++ or Simula */
+// OBSOLETE dst_block_END_OF_ENUM
+// OBSOLETE }
+// OBSOLETE dst_block_type_t;
+// OBSOLETE
+// OBSOLETE /* Block attributes. This is the information used by the debugger to represent
+// OBSOLETE the semantics of blocks.
+// OBSOLETE */
+// OBSOLETE typedef enum
+// OBSOLETE {
+// OBSOLETE dst_block_main_entry, /* the block's entry point is a main entry into
+// OBSOLETE the compilation unit */
+// OBSOLETE dst_block_executable, /* the block has an entry point */
+// OBSOLETE dst_block_attr_END_OF_ENUM
+// OBSOLETE }
+// OBSOLETE dst_block_attr_t;
+// OBSOLETE
+// OBSOLETE /* Code range. Each block has associated with it one or more code ranges. An
+// OBSOLETE individual code range is identified by a range of source (possibly nil) and
+// OBSOLETE a range of executable code. For example, a block which has its executable
+// OBSOLETE code spread over multiple sections will have one code range per section.
+// OBSOLETE */
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE unsigned long code_size; /* size of executable code (in bytes ) */
+// OBSOLETE dst_sect_ref_t code_start; /* starting address of executable code */
+// OBSOLETE dst_sect_ref_t lines_start; /* start of line number tables */
+// OBSOLETE }
+// OBSOLETE dst_code_range_t;
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE dst_block_type_t block_type:8;
+// OBSOLETE unsigned short flags:8; /* mask of dst_block_attr_t flags */
+// OBSOLETE dst_rel_offset_t sibling_block_off; /* offset to next sibling block */
+// OBSOLETE dst_rel_offset_t child_block_off; /* offset to first contained block */
+// OBSOLETE dst_rel_offset_t noffset; /* offset to block name string */
+// OBSOLETE dst_sect_ref_t symbols_start; /* start of debug symbols */
+// OBSOLETE unsigned short n_of_code_ranges; /* size of array... */
+// OBSOLETE dst_code_range_t code_ranges[dst_dummy_array_size] ALIGNED1;
+// OBSOLETE }
+// OBSOLETE dst_rec_block_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*--------------------------
+// OBSOLETE AUX SECT INFO TABLE record
+// OBSOLETE --------------------------
+// OBSOLETE Appears as an auxiliary to a block record. Expands code range information
+// OBSOLETE by providing references into additional, language-dependent sections for
+// OBSOLETE information related to specific code ranges of the block. Sect info table
+// OBSOLETE entries parallel code range array entries of the same index.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE unsigned char tag; /* currently can only be zero */
+// OBSOLETE unsigned char number_of_refs; /* size of array: */
+// OBSOLETE dst_sect_ref_t refs[dst_dummy_array_size] ALIGNED1;
+// OBSOLETE }
+// OBSOLETE dst_rec_sect_info_tab_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE /*=================================================*/
+// OBSOLETE /*========== RECORDS IN .symbols SECTION ==========*/
+// OBSOLETE /*=================================================*/
+// OBSOLETE
+// OBSOLETE /*-----------------
+// OBSOLETE CONSTANT record
+// OBSOLETE -----------------
+// OBSOLETE Describes a symbolic constant.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE float r; /* real part */
+// OBSOLETE float i; /* imaginary part */
+// OBSOLETE }
+// OBSOLETE dst_complex_t;
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE double dr; /* real part */
+// OBSOLETE double di; /* imaginary part */
+// OBSOLETE }
+// OBSOLETE dst_double_complex_t;
+// OBSOLETE
+// OBSOLETE /* The following record provides a way of describing constant values with
+// OBSOLETE non-standard type and no limit on size.
+// OBSOLETE */
+// OBSOLETE typedef union
+// OBSOLETE {
+// OBSOLETE char char_data[dst_dummy_array_size];
+// OBSOLETE short int_data[dst_dummy_array_size];
+// OBSOLETE long long_data[dst_dummy_array_size];
+// OBSOLETE }
+// OBSOLETE dst_big_kon_t;
+// OBSOLETE
+// OBSOLETE /* Representation of the value of a general constant.
+// OBSOLETE */
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE unsigned short length; /* size of constant value (bytes) */
+// OBSOLETE
+// OBSOLETE union
+// OBSOLETE {
+// OBSOLETE unsigned short kon_int8;
+// OBSOLETE short kon_int16;
+// OBSOLETE long kon_int32 ALIGNED1;
+// OBSOLETE float kon_real ALIGNED1;
+// OBSOLETE double kon_dbl ALIGNED1;
+// OBSOLETE dst_complex_t kon_cplx ALIGNED1;
+// OBSOLETE dst_double_complex_t kon_dcplx ALIGNED1;
+// OBSOLETE char kon_char;
+// OBSOLETE dst_big_kon_t kon ALIGNED1;
+// OBSOLETE }
+// OBSOLETE val; /* value data of constant */
+// OBSOLETE }
+// OBSOLETE dst_const_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE dst_rel_offset_t noffset; /* offset to name string */
+// OBSOLETE dst_src_loc_t src_loc; /* file/line of const definition */
+// OBSOLETE dst_type_t type_desc; /* type of this (manifest) constant */
+// OBSOLETE dst_const_t value;
+// OBSOLETE }
+// OBSOLETE dst_rec_const_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE /*----------------
+// OBSOLETE VARIABLE record
+// OBSOLETE ----------------
+// OBSOLETE Describes a program variable.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE /* Variable attributes. These define certain variable semantics to the
+// OBSOLETE debugger.
+// OBSOLETE */
+// OBSOLETE typedef enum
+// OBSOLETE {
+// OBSOLETE dst_var_attr_read_only, /* is read-only (a program literal) */
+// OBSOLETE dst_var_attr_volatile, /* same as compiler's VOLATILE attribute */
+// OBSOLETE dst_var_attr_global, /* is a global definition or reference */
+// OBSOLETE dst_var_attr_compiler_gen, /* is compiler-generated */
+// OBSOLETE dst_var_attr_static, /* has static location */
+// OBSOLETE dst_var_attr_END_OF_ENUM
+// OBSOLETE }
+// OBSOLETE dst_var_attr_t;
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE dst_rel_offset_t noffset; /* offset to name string */
+// OBSOLETE dst_rel_offset_t loffset; /* offset to loc string */
+// OBSOLETE dst_src_loc_t src_loc; /* file/line of variable definition */
+// OBSOLETE dst_type_t type_desc; /* type descriptor */
+// OBSOLETE unsigned short attributes; /* mask of dst_var_attr_t flags */
+// OBSOLETE }
+// OBSOLETE dst_rec_variable_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*----------------
+// OBSOLETE old VAR record
+// OBSOLETE -----------------
+// OBSOLETE Used by older compilers to describe a variable
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef enum
+// OBSOLETE {
+// OBSOLETE dst_var_loc_unknown, /* Actually defined as "unknown" */
+// OBSOLETE dst_var_loc_abs, /* Absolute address */
+// OBSOLETE dst_var_loc_sect_off, /* Absolute address as a section offset */
+// OBSOLETE dst_var_loc_ind_sect_off, /* An indexed section offset ???? */
+// OBSOLETE dst_var_loc_reg, /* register */
+// OBSOLETE dst_var_loc_reg_rel, /* register relative - usually fp */
+// OBSOLETE dst_var_loc_ind_reg_rel, /* Indexed register relative */
+// OBSOLETE dst_var_loc_ftn_ptr_based, /* Fortran pointer based */
+// OBSOLETE dst_var_loc_pc_rel, /* PC relative. Really. */
+// OBSOLETE dst_var_loc_external, /* External */
+// OBSOLETE dst_var_loc_END_OF_ENUM
+// OBSOLETE }
+// OBSOLETE dst_var_loc_t;
+// OBSOLETE
+// OBSOLETE /* Locations come in two versions. The short, and the long. The difference
+// OBSOLETE * between the short and the long is the addition of a statement number
+// OBSOLETE * field to the start andend of the range of the long, and and unkown
+// OBSOLETE * purpose field in the middle. Also, loc_type and loc_index aren't
+// OBSOLETE * bitfields in the long version.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE unsigned short loc_type:4;
+// OBSOLETE unsigned short loc_index:12;
+// OBSOLETE long location;
+// OBSOLETE short start_line; /* start_line and end_line? */
+// OBSOLETE short end_line; /* I'm guessing here. */
+// OBSOLETE }
+// OBSOLETE dst_var_loc_short_t;
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE unsigned short loc_type;
+// OBSOLETE unsigned short loc_index;
+// OBSOLETE long location;
+// OBSOLETE short unknown; /* Always 0003 or 3b3c. Why? */
+// OBSOLETE short start_statement;
+// OBSOLETE short start_line;
+// OBSOLETE short end_statement;
+// OBSOLETE short end_line;
+// OBSOLETE }
+// OBSOLETE dst_var_loc_long_t;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE dst_rel_offset_t noffset; /* offset to name string */
+// OBSOLETE dst_src_loc_t src_loc; /* file/line of description */
+// OBSOLETE dst_type_t type_desc; /* Type description */
+// OBSOLETE unsigned short attributes; /* mask of dst_var_attr_t flags */
+// OBSOLETE unsigned short no_of_locs:15; /* Number of locations */
+// OBSOLETE unsigned short short_locs:1; /* True if short locations. */
+// OBSOLETE union
+// OBSOLETE {
+// OBSOLETE dst_var_loc_short_t shorts[dst_dummy_array_size];
+// OBSOLETE dst_var_loc_long_t longs[dst_dummy_array_size];
+// OBSOLETE }
+// OBSOLETE locs;
+// OBSOLETE }
+// OBSOLETE dst_rec_var_t;
+// OBSOLETE
+// OBSOLETE /*----------------
+// OBSOLETE old LABEL record
+// OBSOLETE -----------------
+// OBSOLETE Used by older compilers to describe a label
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE dst_rel_offset_t noffset; /* offset to name string */
+// OBSOLETE dst_src_loc_t src_loc; /* file/line of description */
+// OBSOLETE char location[12]; /* location string */
+// OBSOLETE }
+// OBSOLETE dst_rec_old_label_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE /*----------------
+// OBSOLETE POINTER record
+// OBSOLETE ----------------
+// OBSOLETE Describes a pointer type.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE dst_rel_offset_t noffset; /* offset to the name string for this type */
+// OBSOLETE dst_src_loc_t src_loc; /* file/line of definition */
+// OBSOLETE dst_type_t type_desc; /* base type of this pointer */
+// OBSOLETE }
+// OBSOLETE dst_rec_pointer_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*-------------
+// OBSOLETE ARRAY record
+// OBSOLETE -------------
+// OBSOLETE Describes an array type.
+// OBSOLETE
+// OBSOLETE Multidimensional arrays are described with a number of dst_rec_array_t
+// OBSOLETE records, one per array dimension, each linked to the next through the
+// OBSOLETE elem_type_desc.doffset field. Each record must have its multi_dim flag
+// OBSOLETE set.
+// OBSOLETE
+// OBSOLETE If column_major is true (as with FORTRAN arrays) then the last array bound in
+// OBSOLETE the declaration is the first array index in memory, which is the opposite of
+// OBSOLETE the usual case (as with Pascal and C arrays).
+// OBSOLETE
+// OBSOLETE Variable array bounds are described by auxiliary records; if aux_var_bound
+// OBSOLETE records are present, the lo_bound and hi_bound fields of this record are
+// OBSOLETE ignored by the debugger.
+// OBSOLETE
+// OBSOLETE span_comp identifies one of the language-dependent ways in which the distance
+// OBSOLETE between successive array elements (span) is calculated.
+// OBSOLETE dst_use_span_field -- the span is the value of span field.
+// OBSOLETE dst_compute_from_prev -- the span is the size of the previous dimension.
+// OBSOLETE dst_compute_from_next -- the span is the size of the next dimension.
+// OBSOLETE In the latter two cases, the span field contains an amount of padding to add
+// OBSOLETE to the size of the appropriate dimension to calculate the span.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef enum
+// OBSOLETE {
+// OBSOLETE dst_use_span_field,
+// OBSOLETE dst_compute_from_prev,
+// OBSOLETE dst_compute_from_next,
+// OBSOLETE dst_span_comp_END_OF_ENUM
+// OBSOLETE }
+// OBSOLETE dst_span_comp_t;
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE dst_rel_offset_t noffset; /* offset to name string */
+// OBSOLETE dst_src_loc_t src_loc; /* file/line of definition */
+// OBSOLETE dst_type_t elem_type_desc; /* array element type */
+// OBSOLETE dst_type_t indx_type_desc; /* array index type */
+// OBSOLETE long lo_bound; /* lower bound of index */
+// OBSOLETE long hi_bound; /* upper bound of index */
+// OBSOLETE unsigned long span; /* see above */
+// OBSOLETE unsigned long size; /* total array size (bytes) */
+// OBSOLETE boolean multi_dim:1;
+// OBSOLETE boolean is_packed:1; /* true if packed array */
+// OBSOLETE boolean is_signed:1; /* true if packed elements are signed */
+// OBSOLETE dst_span_comp_t span_comp:2; /* how to compute span */
+// OBSOLETE boolean column_major:1;
+// OBSOLETE unsigned short reserved:2; /* must be zero */
+// OBSOLETE unsigned short elem_size:8; /* element size if packed (bits) */
+// OBSOLETE }
+// OBSOLETE dst_rec_array_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*-----------------
+// OBSOLETE SUBRANGE record
+// OBSOLETE -----------------
+// OBSOLETE Describes a subrange type.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE /* Variable subrange bounds are described by auxiliary records; if aux_var_bound
+// OBSOLETE records are present, the lo_bound and hi_bound fields of this record are
+// OBSOLETE ignored by the debugger.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE dst_rel_offset_t noffset; /* offset to name string */
+// OBSOLETE dst_src_loc_t src_loc; /* file/line of subrange definition */
+// OBSOLETE dst_type_t type_desc; /* parent type */
+// OBSOLETE long lo_bound; /* lower bound of subrange */
+// OBSOLETE long hi_bound; /* upper bound of subrange */
+// OBSOLETE unsigned short size; /* storage size (bytes) */
+// OBSOLETE }
+// OBSOLETE dst_rec_subrange_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*---------------
+// OBSOLETE STRING record
+// OBSOLETE ---------------
+// OBSOLETE Describes a string type.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE /* Variable subrange bounds are described by auxiliary records; if aux_var_bound
+// OBSOLETE records are present, the lo_bound and hi_bound fields of this record are
+// OBSOLETE ignored by the debugger.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE dst_rel_offset_t noffset; /* offset to name string */
+// OBSOLETE dst_src_loc_t src_loc; /* file/line of string definition */
+// OBSOLETE dst_type_t elem_type_desc; /* element type */
+// OBSOLETE dst_type_t indx_type_desc; /* index type */
+// OBSOLETE long lo_bound; /* lower bound */
+// OBSOLETE long hi_bound; /* upper bound */
+// OBSOLETE unsigned long size; /* total string size (bytes) if fixed */
+// OBSOLETE }
+// OBSOLETE dst_rec_string_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*---------------
+// OBSOLETE SET record
+// OBSOLETE ---------------
+// OBSOLETE Describes a set type.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE dst_rel_offset_t noffset; /* offset to name string */
+// OBSOLETE dst_src_loc_t src_loc; /* file/line of definition */
+// OBSOLETE dst_type_t type_desc; /* element type */
+// OBSOLETE unsigned short nbits; /* number of bits in set */
+// OBSOLETE unsigned short size; /* storage size (bytes) */
+// OBSOLETE }
+// OBSOLETE dst_rec_set_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*-----------------------------
+// OBSOLETE IMPLICIT ENUMERATION record
+// OBSOLETE -----------------------------
+// OBSOLETE Describes an enumeration type with implicit element values = 0, 1, 2, ...
+// OBSOLETE (Pascal-style).
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE dst_rel_offset_t noffset; /* offset to name string */
+// OBSOLETE dst_src_loc_t src_loc; /* file/line of definition */
+// OBSOLETE unsigned short nelems; /* number of elements in enumeration */
+// OBSOLETE unsigned short size; /* storage size (bytes) */
+// OBSOLETE /* offsets to name strings of elements 0, 1, 2, ... */
+// OBSOLETE dst_rel_offset_t elem_noffsets[dst_dummy_array_size];
+// OBSOLETE }
+// OBSOLETE dst_rec_implicit_enum_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*-----------------------------
+// OBSOLETE EXPLICIT ENUMERATION record
+// OBSOLETE -----------------------------
+// OBSOLETE Describes an enumeration type with explicitly assigned element values
+// OBSOLETE (C-style).
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE dst_rel_offset_t noffset; /* offset to element name string */
+// OBSOLETE long value; /* element value */
+// OBSOLETE }
+// OBSOLETE dst_enum_elem_t;
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE dst_rel_offset_t noffset; /* offset to name string */
+// OBSOLETE dst_src_loc_t src_loc; /* file/line of definition */
+// OBSOLETE unsigned short nelems; /* number of elements in enumeration */
+// OBSOLETE unsigned short size; /* storage size (bytes) */
+// OBSOLETE /* name/value pairs, one describing each enumeration value: */
+// OBSOLETE dst_enum_elem_t elems[dst_dummy_array_size];
+// OBSOLETE }
+// OBSOLETE dst_rec_explicit_enum_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*-----------------------
+// OBSOLETE RECORD / UNION record
+// OBSOLETE -----------------------
+// OBSOLETE Describes a record (struct) or union.
+// OBSOLETE
+// OBSOLETE If the record is larger than 2**16 bytes then an attached aux record
+// OBSOLETE specifies its size. Also, if the record is stored in short form then
+// OBSOLETE attached records specify field offsets larger than 2**16 bytes.
+// OBSOLETE
+// OBSOLETE Whether the fields[] array or sfields[] array is used is selected by
+// OBSOLETE the dst_rec_type_t of the overall dst record.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE /*
+// OBSOLETE Record field descriptor, short form. This form handles only fields which
+// OBSOLETE are an even number of bytes long, located some number of bytes from the
+// OBSOLETE start of the record.
+// OBSOLETE */
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE dst_rel_offset_t noffset; /* offset to field name string */
+// OBSOLETE dst_type_t type_desc; /* field type */
+// OBSOLETE unsigned short foffset; /* field offset from start of record (bytes) */
+// OBSOLETE }
+// OBSOLETE dst_short_field_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE dst_rel_offset_t noffset; /* offset to name string */
+// OBSOLETE dst_type_t type_desc; /* field type */
+// OBSOLETE unsigned short foffset; /* byte offset */
+// OBSOLETE unsigned short is_packed:1; /* True if field is packed */
+// OBSOLETE unsigned short bit_offset:6; /* Bit offset */
+// OBSOLETE unsigned short size:6; /* Size in bits */
+// OBSOLETE unsigned short sign:1; /* True if signed */
+// OBSOLETE unsigned short pad:2; /* Padding. Must be 0 */
+// OBSOLETE }
+// OBSOLETE dst_old_field_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE /* Tag enumeration for long record field descriptor:
+// OBSOLETE */
+// OBSOLETE typedef enum
+// OBSOLETE {
+// OBSOLETE dst_field_byte,
+// OBSOLETE dst_field_bit,
+// OBSOLETE dst_field_loc,
+// OBSOLETE dst_field_END_OF_ENUM
+// OBSOLETE }
+// OBSOLETE dst_field_format_t;
+// OBSOLETE
+// OBSOLETE /*
+// OBSOLETE Record field descriptor, long form. The format of the field information
+// OBSOLETE is identified by the format_tag, which contains one of the above values.
+// OBSOLETE The field_byte variant is equivalent to the short form of field descriptor.
+// OBSOLETE The field_bit variant handles fields which are any number of bits long,
+// OBSOLETE located some number of bits from the start of the record. The field_loc
+// OBSOLETE variant allows the location of the field to be described by a general loc
+// OBSOLETE string.
+// OBSOLETE */
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE dst_rel_offset_t noffset; /* offset to name of field */
+// OBSOLETE dst_type_t type_desc; /* type of field */
+// OBSOLETE union
+// OBSOLETE {
+// OBSOLETE struct
+// OBSOLETE {
+// OBSOLETE dst_field_format_t format_tag:2; /* dst_field_byte */
+// OBSOLETE unsigned long offset:30; /* offset of field in bytes */
+// OBSOLETE }
+// OBSOLETE field_byte ALIGNED1;
+// OBSOLETE struct
+// OBSOLETE {
+// OBSOLETE dst_field_format_t format_tag:2; /* dst_field_bit */
+// OBSOLETE unsigned long nbits:6; /* bit size of field */
+// OBSOLETE unsigned long is_signed:1; /* signed/unsigned attribute */
+// OBSOLETE unsigned long bit_offset:3; /* bit offset from byte boundary */
+// OBSOLETE int pad:4; /* must be zero */
+// OBSOLETE unsigned short byte_offset; /* offset of byte boundary */
+// OBSOLETE }
+// OBSOLETE field_bit ALIGNED1;
+// OBSOLETE struct
+// OBSOLETE {
+// OBSOLETE dst_field_format_t format_tag:2; /* dst_field_loc */
+// OBSOLETE int loffset:30; /* dst_rel_offset_t to loc string */
+// OBSOLETE }
+// OBSOLETE field_loc ALIGNED1;
+// OBSOLETE }
+// OBSOLETE f ALIGNED1;
+// OBSOLETE }
+// OBSOLETE dst_field_t;
+// OBSOLETE
+// OBSOLETE /* The field_loc.loffset field is a 30-bit signed value. Some versions of C do
+// OBSOLETE not support signed bit fields. The following macro will extract that field
+// OBSOLETE as a signed value:
+// OBSOLETE */
+// OBSOLETE #define dst_field_loffset(field_rec) \
+// OBSOLETE ( ((int) ((field_rec).f.field_loc.loffset << 2)) >> 2 )
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE dst_rel_offset_t noffset; /* offset to record name string */
+// OBSOLETE dst_src_loc_t src_loc; /* file/line where this record is defined */
+// OBSOLETE unsigned short size; /* storage size (bytes) */
+// OBSOLETE unsigned short nfields; /* number of fields in this record */
+// OBSOLETE union
+// OBSOLETE {
+// OBSOLETE dst_field_t fields[dst_dummy_array_size];
+// OBSOLETE dst_short_field_t sfields[dst_dummy_array_size];
+// OBSOLETE dst_old_field_t ofields[dst_dummy_array_size];
+// OBSOLETE }
+// OBSOLETE f; /* array of fields */
+// OBSOLETE }
+// OBSOLETE dst_rec_record_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*-------------
+// OBSOLETE FILE record
+// OBSOLETE -------------
+// OBSOLETE Describes a file type.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE dst_rel_offset_t noffset; /* offset to name string */
+// OBSOLETE dst_src_loc_t src_loc; /* file/line where type was defined */
+// OBSOLETE dst_type_t type_desc; /* file element type */
+// OBSOLETE }
+// OBSOLETE dst_rec_file_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*---------------
+// OBSOLETE OFFSET record
+// OBSOLETE ---------------
+// OBSOLETE Describes a Pascal offset type.
+// OBSOLETE (This type, an undocumented Domain Pascal extension, is currently not
+// OBSOLETE supported by the debugger)
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE dst_rel_offset_t noffset; /* offset to the name string */
+// OBSOLETE dst_src_loc_t src_loc; /* file/line of definition */
+// OBSOLETE dst_type_t area_type_desc; /* area type */
+// OBSOLETE dst_type_t base_type_desc; /* base type */
+// OBSOLETE long lo_bound; /* low bound of the offset range */
+// OBSOLETE long hi_bound; /* high bound of the offset range */
+// OBSOLETE long bias; /* bias */
+// OBSOLETE unsigned short scale; /* scale factor */
+// OBSOLETE unsigned short size; /* storage size (bytes) */
+// OBSOLETE }
+// OBSOLETE dst_rec_offset_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*--------------
+// OBSOLETE ALIAS record
+// OBSOLETE --------------
+// OBSOLETE Describes a type alias (e.g., typedef).
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE dst_rel_offset_t noffset; /* offset to name string */
+// OBSOLETE dst_src_loc_t src_loc; /* file/line of definition */
+// OBSOLETE dst_type_t type_desc; /* parent type */
+// OBSOLETE }
+// OBSOLETE dst_rec_alias_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*------------------
+// OBSOLETE SIGNATURE record
+// OBSOLETE ------------------
+// OBSOLETE Describes a procedure/function type.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE /* Enumeration of argument semantics. Note that most are mutually
+// OBSOLETE exclusive.
+// OBSOLETE */
+// OBSOLETE typedef enum
+// OBSOLETE {
+// OBSOLETE dst_arg_attr_val, /* passed by value */
+// OBSOLETE dst_arg_attr_ref, /* passed by reference */
+// OBSOLETE dst_arg_attr_name, /* passed by name */
+// OBSOLETE dst_arg_attr_in, /* readable in the callee */
+// OBSOLETE dst_arg_attr_out, /* writable in the callee */
+// OBSOLETE dst_arg_attr_hidden, /* not visible in the caller */
+// OBSOLETE dst_arg_attr_END_OF_ENUM
+// OBSOLETE }
+// OBSOLETE dst_arg_attr_t;
+// OBSOLETE
+// OBSOLETE /* Argument descriptor. Actually points to a variable record for most of the
+// OBSOLETE information.
+// OBSOLETE */
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE dst_rel_offset_t var_offset; /* offset to variable record */
+// OBSOLETE unsigned short attributes; /* a mask of dst_arg_attr_t flags */
+// OBSOLETE }
+// OBSOLETE dst_arg_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE dst_rel_offset_t noffset; /* offset to name string */
+// OBSOLETE dst_src_loc_t src_loc; /* file/line of function definition */
+// OBSOLETE dst_rel_offset_t result; /* offset to function result variable record */
+// OBSOLETE unsigned short nargs; /* number of arguments */
+// OBSOLETE dst_arg_t args[dst_dummy_array_size];
+// OBSOLETE }
+// OBSOLETE dst_rec_signature_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE /*--------------
+// OBSOLETE SCOPE record
+// OBSOLETE --------------
+// OBSOLETE Obsolete. Use the new ENTRY type instead.
+// OBSOLETE Old compilers may put this in as the first entry in a function,
+// OBSOLETE terminated by an end of scope entry.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE dst_rel_offset_t noffset; /* Name offset */
+// OBSOLETE dst_src_loc_t start_line; /* Starting line */
+// OBSOLETE dst_src_loc_t end_line; /* Ending line */
+// OBSOLETE }
+// OBSOLETE dst_rec_scope_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE /*--------------
+// OBSOLETE ENTRY record
+// OBSOLETE --------------
+// OBSOLETE Describes a procedure/function entry point. An entry record is to a
+// OBSOLETE signature record roughly as a variable record is to a type descriptor record.
+// OBSOLETE
+// OBSOLETE The entry_number field is keyed to the entry numbers in .lines -- the
+// OBSOLETE debugger locates the code location of an entry by searching the line
+// OBSOLETE number table for an entry numbered with the value of entry_number. The
+// OBSOLETE main entry is numbered zero.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE dst_rel_offset_t noffset; /* offset to entry name string */
+// OBSOLETE dst_rel_offset_t loffset; /* where to jump to call this entry */
+// OBSOLETE dst_src_loc_t src_loc; /* file/line of definition */
+// OBSOLETE dst_rel_offset_t sig_desc; /* offset to signature descriptor */
+// OBSOLETE unsigned int entry_number:8;
+// OBSOLETE int pad:8; /* must be zero */
+// OBSOLETE }
+// OBSOLETE dst_rec_entry_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE /*-----------------------
+// OBSOLETE Old format ENTRY record
+// OBSOLETE -----------------------
+// OBSOLETE Supposedly obsolete but still used by some compilers.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE dst_rel_offset_t noffset; /* Offset to entry name string */
+// OBSOLETE dst_src_loc_t src_loc; /* Location in source */
+// OBSOLETE dst_rel_offset_t sig_desc; /* Signature description */
+// OBSOLETE char unknown[36];
+// OBSOLETE }
+// OBSOLETE dst_rec_old_entry_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE /*--------------
+// OBSOLETE LABEL record
+// OBSOLETE --------------
+// OBSOLETE Describes a program label.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE dst_rel_offset_t noffset; /* offset to label string */
+// OBSOLETE dst_rel_offset_t loffset; /* offset to loc string */
+// OBSOLETE dst_src_loc_t src_loc; /* file/line of definition */
+// OBSOLETE }
+// OBSOLETE dst_rec_label_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*-----------------------
+// OBSOLETE AUXILIARY SIZE record
+// OBSOLETE -----------------------
+// OBSOLETE May appear in the auxiliary record list of any type or variable record to
+// OBSOLETE modify the default size of the type or variable.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE unsigned long size; /* size (bytes) */
+// OBSOLETE }
+// OBSOLETE dst_rec_aux_size_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*-----------------------
+// OBSOLETE AUXILIARY ALIGN record
+// OBSOLETE -----------------------
+// OBSOLETE May appear in the auxiliary record list of any type or variable record to
+// OBSOLETE modify the default alignment of the type or variable.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE unsigned short alignment; /* # of low order zero bits */
+// OBSOLETE }
+// OBSOLETE dst_rec_aux_align_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*-----------------------------
+// OBSOLETE AUXILIARY FIELD SIZE record
+// OBSOLETE -----------------------------
+// OBSOLETE May appear in the auxiliary record list of any RECORD/UNION record to
+// OBSOLETE modify the default size of a field.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE unsigned short field_no; /* field number */
+// OBSOLETE unsigned long size; /* size (bits) */
+// OBSOLETE }
+// OBSOLETE dst_rec_aux_field_size_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*-----------------------------
+// OBSOLETE AUXILIARY FIELD OFFSET record
+// OBSOLETE -----------------------------
+// OBSOLETE May appear in the auxiliary record list of any RECORD/UNION record to
+// OBSOLETE specify a field offset larger than 2**16.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE unsigned short field_no; /* field number */
+// OBSOLETE unsigned long foffset; /* offset */
+// OBSOLETE }
+// OBSOLETE dst_rec_aux_field_off_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*-----------------------------
+// OBSOLETE AUXILIARY FIELD ALIGN record
+// OBSOLETE -----------------------------
+// OBSOLETE May appear in the auxiliary record list of any RECORD/UNION record to
+// OBSOLETE modify the default alignment of a field.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE unsigned short field_no; /* field number */
+// OBSOLETE unsigned short alignment; /* number of low order zero bits */
+// OBSOLETE }
+// OBSOLETE dst_rec_aux_field_align_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*----------------------------
+// OBSOLETE AUXILIARY VAR BOUND record
+// OBSOLETE ----------------------------
+// OBSOLETE May appear in the auxiliary record list of any ARRAY, SUBRANGE or STRING
+// OBSOLETE record to describe a variable bound for the range of the type.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef enum
+// OBSOLETE {
+// OBSOLETE dst_low_bound, /* the low bound is variable */
+// OBSOLETE dst_high_bound, /* the high bound is variable */
+// OBSOLETE dst_var_bound_END_OF_ENUM
+// OBSOLETE }
+// OBSOLETE dst_var_bound_t;
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE unsigned short which; /* which bound */
+// OBSOLETE dst_rel_offset_t voffset ALIGNED1; /* variable that defines bound */
+// OBSOLETE }
+// OBSOLETE dst_rec_aux_var_bound_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*----------------------------------
+// OBSOLETE AUXILIARY TYPE DERIVATION record
+// OBSOLETE ----------------------------------
+// OBSOLETE May appear in the auxiliary record list of any RECORD/UNION record to denote
+// OBSOLETE class inheritance of that type from a parent type.
+// OBSOLETE
+// OBSOLETE Inheritance implies that it is possible to convert the inheritor type to the
+// OBSOLETE inherited type, retaining those fields which were inherited. To allow this,
+// OBSOLETE orig_field_no, a field number into the record type, is provided. If
+// OBSOLETE orig_is_pointer is false, then the start of the inherited record is located
+// OBSOLETE at the location of the field indexed by orig_field_no. If orig_is_pointer
+// OBSOLETE is true, then it is located at the address contained in the field indexed
+// OBSOLETE by orig_field_no (assumed to be a pointer).
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE dst_type_t parent_type; /* reference to inherited type */
+// OBSOLETE unsigned short orig_field_no;
+// OBSOLETE boolean orig_is_pointer:1;
+// OBSOLETE int unused:15; /* must be zero */
+// OBSOLETE }
+// OBSOLETE dst_rec_aux_type_deriv_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*------------------------------------
+// OBSOLETE AUXILIARY VARIABLE LIFETIME record
+// OBSOLETE ------------------------------------
+// OBSOLETE May appear in the auxiliary record list of a VARIABLE record to add location
+// OBSOLETE information for an additional variable lifetime.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE dst_rel_offset_t loffset;
+// OBSOLETE }
+// OBSOLETE dst_rec_aux_lifetime_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*-------------------------------
+// OBSOLETE AUXILIARY POINTER BASE record
+// OBSOLETE -------------------------------
+// OBSOLETE May appear in the auxiliary record list of a VARIABLE record to provide a
+// OBSOLETE pointer base to substitute for references to any such bases in the location
+// OBSOLETE string of the variable. A pointer base is another VARIABLE record. When
+// OBSOLETE the variable is evaluated by the debugger, it uses the current value of the
+// OBSOLETE pointer base variable in computing its location.
+// OBSOLETE
+// OBSOLETE This is useful for representing FORTRAN pointer-based variables.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE dst_rel_offset_t voffset;
+// OBSOLETE }
+// OBSOLETE dst_rec_aux_ptr_base_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*---------------------------------
+// OBSOLETE AUXILIARY REGISTER VALUE record
+// OBSOLETE ---------------------------------
+// OBSOLETE May appear in the auxiliary record list of an ENTRY record to specify
+// OBSOLETE a register that must be set to a specific value before jumping to the entry
+// OBSOLETE point in a debugger "call". The debugger must set the debuggee register,
+// OBSOLETE specified by the register code, to the value of the *address* to which the
+// OBSOLETE location string resolves. If the address is register-relative, then the
+// OBSOLETE call cannot be made unless the current stack frame is the lexical parent
+// OBSOLETE of the entry. An example of this is when a (Pascal) nested procedure
+// OBSOLETE contains references to its parent's variables, which it accesses through
+// OBSOLETE a static link register. The static link register must be set to some
+// OBSOLETE address relative to the parent's stack base register.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE unsigned short reg; /* identifies register to set (isp enum) */
+// OBSOLETE dst_rel_offset_t loffset; /* references a location string */
+// OBSOLETE }
+// OBSOLETE dst_rec_aux_reg_val_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*==========================================================*/
+// OBSOLETE /*========== RECORDS USED IN .blocks AND .symbols ==========*/
+// OBSOLETE /*==========================================================*/
+// OBSOLETE
+// OBSOLETE /*---------------------
+// OBSOLETE STRING TABLE record
+// OBSOLETE ---------------------
+// OBSOLETE A string table record contains any number of null-terminated, variable length
+// OBSOLETE strings. The length field gives the size in bytes of the text field, which
+// OBSOLETE can be any size.
+// OBSOLETE
+// OBSOLETE The global name table shares this format. This record appears in the
+// OBSOLETE .blocks section. Each string in the table identifies a global defined in
+// OBSOLETE the current compilation unit.
+// OBSOLETE
+// OBSOLETE The loc pool record shares this format as well. Loc strings are described
+// OBSOLETE elsewhere.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE unsigned long length;
+// OBSOLETE char text[dst_dummy_array_size];
+// OBSOLETE }
+// OBSOLETE dst_rec_string_tab_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*-----------------------
+// OBSOLETE AUXILIARY QUAL record
+// OBSOLETE -----------------------
+// OBSOLETE May appear in the auxiliary record list of any BLOCK, VARIABLE, or type record
+// OBSOLETE to provide it with a fully-qualified, language-dependent name.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE dst_rel_offset_t lang_qual_name;
+// OBSOLETE }
+// OBSOLETE dst_rec_aux_qual_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*----------------
+// OBSOLETE FORWARD record
+// OBSOLETE ----------------
+// OBSOLETE Reference to a record somewhere else. This allows identical definitions in
+// OBSOLETE different scopes to share data.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE dst_rel_offset_t rec_off;
+// OBSOLETE }
+// OBSOLETE dst_rec_forward_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*-------------------------------
+// OBSOLETE AUXILIARY SOURCE RANGE record
+// OBSOLETE -------------------------------
+// OBSOLETE May appear in the auxiliary record list of any BLOCK record to specify a
+// OBSOLETE range of source lines over which the block is active.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE dst_src_loc_t first_line; /* first source line */
+// OBSOLETE dst_src_loc_t last_line; /* last source line */
+// OBSOLETE }
+// OBSOLETE dst_rec_aux_src_range_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*------------------
+// OBSOLETE EXTENSION record
+// OBSOLETE ------------------
+// OBSOLETE Provision for "foreign" records, such as might be generated by a non-Apollo
+// OBSOLETE compiler. Apollo software will ignore these.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE unsigned short rec_size; /* record size (bytes) */
+// OBSOLETE unsigned short ext_type; /* defined by whoever generates it */
+// OBSOLETE unsigned short ext_data; /* place-holder for arbitrary amount of data */
+// OBSOLETE }
+// OBSOLETE dst_rec_extension_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*
+// OBSOLETE ** DEBUG SYMBOL record -- The wrapper for all .blocks and .symbols records.
+// OBSOLETE **
+// OBSOLETE ** This record ties together all previous .blocks and .symbols records
+// OBSOLETE ** together in a union with a common header. The rec_type field of the
+// OBSOLETE ** header identifies the record type. The rec_flags field currently only
+// OBSOLETE ** defines auxiliary record lists.
+// OBSOLETE **
+// OBSOLETE ** If a record carries with it a non-null auxiliary record list, its
+// OBSOLETE ** dst_flag_has_aux_recs flag is set, and each of the records that follow
+// OBSOLETE ** it are treated as its auxiliary records, until the end of the compilation
+// OBSOLETE ** unit or scope is reached, or until an auxiliary record with its
+// OBSOLETE ** dst_flag_last_aux_rec flag set is reached.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE typedef enum
+// OBSOLETE {
+// OBSOLETE dst_flag_has_aux_recs,
+// OBSOLETE dst_flag_last_aux_rec,
+// OBSOLETE dst_rec_flag_END_OF_ENUM
+// OBSOLETE }
+// OBSOLETE dst_rec_flags_t;
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE dst_rec_type_t rec_type:8; /* record type */
+// OBSOLETE int rec_flags:8; /* mask of dst_rec_flags_t */
+// OBSOLETE union /* switched on rec_type field above */
+// OBSOLETE {
+// OBSOLETE /* dst_typ_pad requires no additional fields */
+// OBSOLETE dst_rec_comp_unit_t comp_unit_;
+// OBSOLETE dst_rec_section_tab_t section_tab_;
+// OBSOLETE dst_rec_file_tab_t file_tab_;
+// OBSOLETE dst_rec_block_t block_;
+// OBSOLETE dst_rec_var_t var_;
+// OBSOLETE dst_rec_pointer_t pointer_;
+// OBSOLETE dst_rec_array_t array_;
+// OBSOLETE dst_rec_subrange_t subrange_;
+// OBSOLETE dst_rec_set_t set_;
+// OBSOLETE dst_rec_implicit_enum_t implicit_enum_;
+// OBSOLETE dst_rec_explicit_enum_t explicit_enum_;
+// OBSOLETE /* dst_typ_short_{rec,union} are represented by 'rec' (below) */
+// OBSOLETE dst_rec_file_t file_;
+// OBSOLETE dst_rec_offset_t offset_;
+// OBSOLETE dst_rec_alias_t alias_;
+// OBSOLETE dst_rec_signature_t signature_;
+// OBSOLETE dst_rec_old_label_t old_label_;
+// OBSOLETE dst_rec_scope_t scope_;
+// OBSOLETE /* dst_typ_end_scope requires no additional fields */
+// OBSOLETE dst_rec_string_tab_t string_tab_;
+// OBSOLETE /* dst_typ_global_name_tab is represented by 'string_tab' (above) */
+// OBSOLETE dst_rec_forward_t forward_;
+// OBSOLETE dst_rec_aux_size_t aux_size_;
+// OBSOLETE dst_rec_aux_align_t aux_align_;
+// OBSOLETE dst_rec_aux_field_size_t aux_field_size_;
+// OBSOLETE dst_rec_aux_field_off_t aux_field_off_;
+// OBSOLETE dst_rec_aux_field_align_t aux_field_align_;
+// OBSOLETE dst_rec_aux_qual_t aux_qual_;
+// OBSOLETE dst_rec_aux_var_bound_t aux_var_bound_;
+// OBSOLETE dst_rec_extension_t extension_;
+// OBSOLETE dst_rec_string_t string_;
+// OBSOLETE dst_rec_const_t const_;
+// OBSOLETE /* dst_typ_reference is represented by 'pointer' (above) */
+// OBSOLETE dst_rec_record_t record_;
+// OBSOLETE /* dst_typ_union is represented by 'record' (above) */
+// OBSOLETE dst_rec_aux_type_deriv_t aux_type_deriv_;
+// OBSOLETE /* dst_typ_locpool is represented by 'string_tab' (above) */
+// OBSOLETE dst_rec_variable_t variable_;
+// OBSOLETE dst_rec_label_t label_;
+// OBSOLETE dst_rec_entry_t entry_;
+// OBSOLETE dst_rec_aux_lifetime_t aux_lifetime_;
+// OBSOLETE dst_rec_aux_ptr_base_t aux_ptr_base_;
+// OBSOLETE dst_rec_aux_src_range_t aux_src_range_;
+// OBSOLETE dst_rec_aux_reg_val_t aux_reg_val_;
+// OBSOLETE dst_rec_name_tab_t aux_unit_names_;
+// OBSOLETE dst_rec_sect_info_tab_t aux_sect_info_;
+// OBSOLETE }
+// OBSOLETE rec_data ALIGNED1;
+// OBSOLETE }
+// OBSOLETE dst_rec_t, *dst_rec_ptr_t;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*===============================================*/
+// OBSOLETE /*========== .lines SECTION DEFINITIONS =========*/
+// OBSOLETE /*===============================================*/
+// OBSOLETE /*
+// OBSOLETE The .lines section contains a sequence of line number tables. There is no
+// OBSOLETE record structure within the section. The start of the table for a routine
+// OBSOLETE is pointed to by the block record, and the end of the table is signaled by
+// OBSOLETE an escape code.
+// OBSOLETE
+// OBSOLETE A line number table is a sequence of bytes. The default entry contains a line
+// OBSOLETE number delta (-7..+7) in the high 4 bits and a pc delta (0..15) in the low 4
+// OBSOLETE bits. Special cases, including when one or both of the values is too large
+// OBSOLETE to fit in 4 bits and other special cases are handled through escape entries.
+// OBSOLETE Escape entries are identified by the value 0x8 in the high 4 bits. The low 4
+// OBSOLETE bits are occupied by a function code. Some escape entries are followed by
+// OBSOLETE additional arguments, which may be bytes, words, or longwords. This data is
+// OBSOLETE not aligned.
+// OBSOLETE
+// OBSOLETE The initial PC offset, file number and line number are zero. Normally, the
+// OBSOLETE table begins with a dst_ln_file escape which establishes the initial file
+// OBSOLETE and line number. All PC deltas are unsigned (thus the table is ordered by
+// OBSOLETE increasing PC); line number deltas are signed. The table ends with a
+// OBSOLETE dst_ln_end escape, which is followed by a final table entry whose PC delta
+// OBSOLETE gives the code size of the last statement.
+// OBSOLETE
+// OBSOLETE Escape Semantic
+// OBSOLETE --------- ------------------------------------------------------------
+// OBSOLETE file Changes file state. The current source file remains constant
+// OBSOLETE until another file escape. Though the line number state is
+// OBSOLETE also updated by a file escape, a file escape does NOT
+// OBSOLETE constitute a line table entry.
+// OBSOLETE
+// OBSOLETE statement Alters the statement number of the next table entry. By
+// OBSOLETE default, all table entries refer to the first statement on a
+// OBSOLETE line. Statement number one is the second statement, and so on.
+// OBSOLETE
+// OBSOLETE entry Identifies the next table entry as the position of an entry
+// OBSOLETE point for the current block. The PC position should follow
+// OBSOLETE any procedure prologue code. An argument specifies the entry
+// OBSOLETE number, which is keyed to the entry number of the corresponding
+// OBSOLETE .symbols ENTRY record.
+// OBSOLETE
+// OBSOLETE exit Identifies the next table entry as the last position within
+// OBSOLETE the current block before a procedure epiloge and subsequent
+// OBSOLETE procedure exit.
+// OBSOLETE
+// OBSOLETE gap By default, the executable code corresponding to a table entry
+// OBSOLETE is assumed to extend to the beginning of the next table entry.
+// OBSOLETE If this is not the case--there is a "hole" in the table--then
+// OBSOLETE a gap escape should follow the first table entry to specify
+// OBSOLETE where the code for that entry ends.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE #define dst_ln_escape_flag -8
+// OBSOLETE
+// OBSOLETE /*
+// OBSOLETE Escape function codes:
+// OBSOLETE */
+// OBSOLETE typedef enum
+// OBSOLETE {
+// OBSOLETE dst_ln_pad, /* pad byte */
+// OBSOLETE dst_ln_file, /* file escape. Next 4 bytes are a dst_src_loc_t */
+// OBSOLETE dst_ln_dln1_dpc1, /* 1 byte line delta, 1 byte pc delta */
+// OBSOLETE dst_ln_dln2_dpc2, /* 2 bytes line delta, 2 bytes pc delta */
+// OBSOLETE dst_ln_ln4_pc4, /* 4 bytes ABSOLUTE line number, 4 bytes ABSOLUTE pc */
+// OBSOLETE dst_ln_dln1_dpc0, /* 1 byte line delta, pc delta = 0 */
+// OBSOLETE dst_ln_ln_off_1, /* statement escape, stmt # = 1 (2nd stmt on line) */
+// OBSOLETE dst_ln_ln_off, /* statement escape, stmt # = next byte */
+// OBSOLETE dst_ln_entry, /* entry escape, next byte is entry number */
+// OBSOLETE dst_ln_exit, /* exit escape */
+// OBSOLETE dst_ln_stmt_end, /* gap escape, 4 bytes pc delta */
+// OBSOLETE dst_ln_escape_11, /* reserved */
+// OBSOLETE dst_ln_escape_12, /* reserved */
+// OBSOLETE dst_ln_escape_13, /* reserved */
+// OBSOLETE dst_ln_nxt_byte, /* next byte contains the real escape code */
+// OBSOLETE dst_ln_end, /* end escape, final entry follows */
+// OBSOLETE dst_ln_escape_END_OF_ENUM
+// OBSOLETE }
+// OBSOLETE dst_ln_escape_t;
+// OBSOLETE
+// OBSOLETE /*
+// OBSOLETE Line number table entry
+// OBSOLETE */
+// OBSOLETE typedef union
+// OBSOLETE {
+// OBSOLETE struct
+// OBSOLETE {
+// OBSOLETE unsigned int ln_delta:4; /* 4 bit line number delta */
+// OBSOLETE unsigned int pc_delta:4; /* 4 bit pc delta */
+// OBSOLETE }
+// OBSOLETE delta;
+// OBSOLETE
+// OBSOLETE struct
+// OBSOLETE {
+// OBSOLETE unsigned int esc_flag:4; /* alias for ln_delta */
+// OBSOLETE dst_ln_escape_t esc_code:4; /* escape function code */
+// OBSOLETE }
+// OBSOLETE esc;
+// OBSOLETE
+// OBSOLETE char sdata; /* signed data byte */
+// OBSOLETE unsigned char udata; /* unsigned data byte */
+// OBSOLETE }
+// OBSOLETE dst_ln_entry_t,
+// OBSOLETE *dst_ln_entry_ptr_t,
+// OBSOLETE dst_ln_table_t[dst_dummy_array_size];
+// OBSOLETE
+// OBSOLETE /* The following macro will extract the ln_delta field as a signed value:
+// OBSOLETE */
+// OBSOLETE #define dst_ln_ln_delta(ln_rec) \
+// OBSOLETE ( ((short) ((ln_rec).delta.ln_delta << 12)) >> 12 )
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE typedef struct dst_sec_struct
+// OBSOLETE {
+// OBSOLETE char *buffer;
+// OBSOLETE long position;
+// OBSOLETE long size;
+// OBSOLETE long base;
+// OBSOLETE }
+// OBSOLETE dst_sec;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /* Macros for access to the data */
+// OBSOLETE
+// OBSOLETE #define DST_comp_unit(x) ((x)->rec_data.comp_unit_)
+// OBSOLETE #define DST_section_tab(x) ((x)->rec_data.section_tab_)
+// OBSOLETE #define DST_file_tab(x) ((x)->rec_data.file_tab_)
+// OBSOLETE #define DST_block(x) ((x)->rec_data.block_)
+// OBSOLETE #define DST_var(x) ((x)->rec_data.var_)
+// OBSOLETE #define DST_pointer(x) ((x)->rec_data.pointer_)
+// OBSOLETE #define DST_array(x) ((x)->rec_data.array_)
+// OBSOLETE #define DST_subrange(x) ((x)->rec_data.subrange_)
+// OBSOLETE #define DST_set(x) ((x)->rec_data.set_)
+// OBSOLETE #define DST_implicit_enum(x) ((x)->rec_data.implicit_enum_)
+// OBSOLETE #define DST_explicit_enum(x) ((x)->rec_data.explicit_enum_)
+// OBSOLETE #define DST_short_rec(x) ((x)->rec_data.record_)
+// OBSOLETE #define DST_short_union(x) ((x)->rec_data.record_)
+// OBSOLETE #define DST_file(x) ((x)->rec_data.file_)
+// OBSOLETE #define DST_offset(x) ((x)->rec_data.offset_)
+// OBSOLETE #define DST_alias(x) ((x)->rec_data.alias_)
+// OBSOLETE #define DST_signature(x) ((x)->rec_data.signature_)
+// OBSOLETE #define DST_old_label(x) ((x)->rec_data.old_label_)
+// OBSOLETE #define DST_scope(x) ((x)->rec_data.scope_)
+// OBSOLETE #define DST_string_tab(x) ((x)->rec_data.string_tab_)
+// OBSOLETE #define DST_global_name_tab(x) ((x)->rec_data.string_tab_)
+// OBSOLETE #define DST_forward(x) ((x)->rec_data.forward_)
+// OBSOLETE #define DST_aux_size(x) ((x)->rec_data.aux_size_)
+// OBSOLETE #define DST_aux_align(x) ((x)->rec_data.aux_align_)
+// OBSOLETE #define DST_aux_field_size(x) ((x)->rec_data.aux_field_size_)
+// OBSOLETE #define DST_aux_field_off(x) ((x)->rec_data.aux_field_off_)
+// OBSOLETE #define DST_aux_field_align(x) ((x)->rec_data.aux_field_align_)
+// OBSOLETE #define DST_aux_qual(x) ((x)->rec_data.aux_qual_)
+// OBSOLETE #define DST_aux_var_bound(x) ((x)->rec_data.aux_var_bound_)
+// OBSOLETE #define DST_extension(x) ((x)->rec_data.extension_)
+// OBSOLETE #define DST_string(x) ((x)->rec_data.string_)
+// OBSOLETE #define DST_const(x) ((x)->rec_data.const_)
+// OBSOLETE #define DST_reference(x) ((x)->rec_data.pointer_)
+// OBSOLETE #define DST_record(x) ((x)->rec_data.record_)
+// OBSOLETE #define DST_union(x) ((x)->rec_data.record_)
+// OBSOLETE #define DST_aux_type_deriv(x) ((x)->rec_data.aux_type_deriv_)
+// OBSOLETE #define DST_locpool(x) ((x)->rec_data.string_tab_)
+// OBSOLETE #define DST_variable(x) ((x)->rec_data.variable_)
+// OBSOLETE #define DST_label(x) ((x)->rec_data.label_)
+// OBSOLETE #define DST_entry(x) ((x)->rec_data.entry_)
+// OBSOLETE #define DST_aux_lifetime(x) ((x)->rec_data.aux_lifetime_)
+// OBSOLETE #define DST_aux_ptr_base(x) ((x)->rec_data.aux_ptr_base_)
+// OBSOLETE #define DST_aux_src_range(x) ((x)->rec_data.aux_src_range_)
+// OBSOLETE #define DST_aux_reg_val(x) ((x)->rec_data.aux_reg_val_)
+// OBSOLETE #define DST_aux_unit_names(x) ((x)->rec_data.aux_unit_names_)
+// OBSOLETE #define DST_aux_sect_info(x) ((x)->rec_data.aux_sect_info_)
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*
+// OBSOLETE * Type codes for loc strings. I'm not entirely certain about all of
+// OBSOLETE * these, but they seem to work.
+// OBSOLETE * troy@cbme.unsw.EDU.AU
+// OBSOLETE * If you find a variable whose location can't be decoded, you should
+// OBSOLETE * find out it's code using "dstdump -s filename". It will record an
+// OBSOLETE * entry for the variable, and give a text representation of what
+// OBSOLETE * the locstring means. Before that explaination there will be a
+// OBSOLETE * number. In the LOCSTRING table, that number will appear before
+// OBSOLETE * the start of the location string. Location string codes are
+// OBSOLETE * five bit codes with a 3 bit argument. Check the high 5 bits of
+// OBSOLETE * the one byte code, and figure out where it goes in here.
+// OBSOLETE * Then figure out exactly what the meaning is and code it in
+// OBSOLETE * dstread.c
+// OBSOLETE *
+// OBSOLETE * Note that ranged locs mean that the variable is in different locations
+// OBSOLETE * depending on the current PC. We ignore these because (a) gcc can't handle
+// OBSOLETE * them, and (b), If you don't use high levels of optimisation they won't
+// OBSOLETE * occur.
+// OBSOLETE */
+// OBSOLETE typedef enum
+// OBSOLETE {
+// OBSOLETE dst_lsc_end, /* End of string */
+// OBSOLETE dst_lsc_indirect, /* Indirect through previous. Arg == 6 */
+// OBSOLETE /* Or register ax (x=arg) */
+// OBSOLETE dst_lsc_dreg, /* register dx (x=arg) */
+// OBSOLETE dst_lsc_03,
+// OBSOLETE dst_lsc_section, /* Section (arg+1) */
+// OBSOLETE dst_lsc_05,
+// OBSOLETE dst_lsc_06,
+// OBSOLETE dst_lsc_add, /* Add (arg+1)*2 */
+// OBSOLETE dst_lsc_sub, /* Subtract (arg+1)*2 */
+// OBSOLETE dst_lsc_09,
+// OBSOLETE dst_lsc_0a,
+// OBSOLETE dst_lsc_sec_byte, /* Section of next byte+1 */
+// OBSOLETE dst_lsc_add_byte, /* Add next byte (arg == 5) or next word
+// OBSOLETE * (arg == 6)
+// OBSOLETE */
+// OBSOLETE dst_lsc_sub_byte, /* Subtract next byte. (arg == 1) or next
+// OBSOLETE * word (arg == 6 ?)
+// OBSOLETE */
+// OBSOLETE dst_lsc_sbreg, /* Stack base register (frame pointer). Arg==0 */
+// OBSOLETE dst_lsc_0f,
+// OBSOLETE dst_lsc_ranged, /* location is pc dependent */
+// OBSOLETE dst_lsc_11,
+// OBSOLETE dst_lsc_12,
+// OBSOLETE dst_lsc_13,
+// OBSOLETE dst_lsc_14,
+// OBSOLETE dst_lsc_15,
+// OBSOLETE dst_lsc_16,
+// OBSOLETE dst_lsc_17,
+// OBSOLETE dst_lsc_18,
+// OBSOLETE dst_lsc_19,
+// OBSOLETE dst_lsc_1a,
+// OBSOLETE dst_lsc_1b,
+// OBSOLETE dst_lsc_1c,
+// OBSOLETE dst_lsc_1d,
+// OBSOLETE dst_lsc_1e,
+// OBSOLETE dst_lsc_1f
+// OBSOLETE }
+// OBSOLETE dst_loc_string_code_t;
+// OBSOLETE
+// OBSOLETE /* If the following occurs after an addition/subtraction, that addition
+// OBSOLETE * or subtraction should be multiplied by 256. It's a complete byte, not
+// OBSOLETE * a code.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE #define dst_multiply_256 ((char) 0x73)
+// OBSOLETE
+// OBSOLETE typedef struct
+// OBSOLETE {
+// OBSOLETE char code:5;
+// OBSOLETE char arg:3;
+// OBSOLETE }
+// OBSOLETE dst_loc_header_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE typedef union
+// OBSOLETE {
+// OBSOLETE dst_loc_header_t header;
+// OBSOLETE char data;
+// OBSOLETE }
+// OBSOLETE dst_loc_entry_t ALIGNED1;
+// OBSOLETE
+// OBSOLETE #undef ALIGNED1
+// OBSOLETE #endif /* apollo_dst_h */
diff --git a/gdb/dstread.c b/gdb/dstread.c
index 544d7ddf625..8692c986467 100644
--- a/gdb/dstread.c
+++ b/gdb/dstread.c
@@ -1,1598 +1,1598 @@
-/* Read apollo DST symbol tables and convert to internal format, for GDB.
- Contributed by Troy Rollo, University of NSW (troy@cbme.unsw.edu.au).
- Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
- Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "defs.h"
-#include "symtab.h"
-#include "gdbtypes.h"
-#include "breakpoint.h"
-#include "bfd.h"
-#include "symfile.h"
-#include "objfiles.h"
-#include "buildsym.h"
-#include "gdb_obstack.h"
-
-#include "gdb_string.h"
-
-#include "dst.h"
-
-CORE_ADDR cur_src_start_addr, cur_src_end_addr;
-dst_sec blocks_info, lines_info, symbols_info;
-
-/* Vector of line number information. */
-
-static struct linetable *line_vector;
-
-/* Index of next entry to go in line_vector_index. */
-
-static int line_vector_index;
-
-/* Last line number recorded in the line vector. */
-
-static int prev_line_number;
-
-/* Number of elements allocated for line_vector currently. */
-
-static int line_vector_length;
-
-static int init_dst_sections (int);
-
-static void read_dst_symtab (struct objfile *);
-
-static void find_dst_sections (bfd *, sec_ptr, PTR);
-
-static void dst_symfile_init (struct objfile *);
-
-static void dst_new_init (struct objfile *);
-
-static void dst_symfile_read (struct objfile *, int);
-
-static void dst_symfile_finish (struct objfile *);
-
-static void dst_end_symtab (struct objfile *);
-
-static void complete_symtab (char *, CORE_ADDR, unsigned int);
-
-static void dst_start_symtab (void);
-
-static void dst_record_line (int, CORE_ADDR);
-
-/* Manage the vector of line numbers. */
-/* FIXME: Use record_line instead. */
-
-static void
-dst_record_line (int line, CORE_ADDR pc)
-{
- struct linetable_entry *e;
- /* Make sure line vector is big enough. */
-
- if (line_vector_index + 2 >= line_vector_length)
- {
- line_vector_length *= 2;
- line_vector = (struct linetable *)
- xrealloc ((char *) line_vector, sizeof (struct linetable)
- + (line_vector_length
- * sizeof (struct linetable_entry)));
- }
-
- e = line_vector->item + line_vector_index++;
- e->line = line;
- e->pc = pc;
-}
-
-/* Start a new symtab for a new source file.
- It indicates the start of data for one original source file. */
-/* FIXME: use start_symtab, like coffread.c now does. */
-
-static void
-dst_start_symtab (void)
-{
- /* Initialize the source file line number information for this file. */
-
- if (line_vector) /* Unlikely, but maybe possible? */
- xfree (line_vector);
- line_vector_index = 0;
- line_vector_length = 1000;
- prev_line_number = -2; /* Force first line number to be explicit */
- line_vector = (struct linetable *)
- xmalloc (sizeof (struct linetable)
- + line_vector_length * sizeof (struct linetable_entry));
-}
-
-/* Save the vital information from when starting to read a file,
- for use when closing off the current file.
- NAME is the file name the symbols came from, START_ADDR is the first
- text address for the file, and SIZE is the number of bytes of text. */
-
-static void
-complete_symtab (char *name, CORE_ADDR start_addr, unsigned int size)
-{
- last_source_file = savestring (name, strlen (name));
- cur_src_start_addr = start_addr;
- cur_src_end_addr = start_addr + size;
-
- if (current_objfile->ei.entry_point >= cur_src_start_addr &&
- current_objfile->ei.entry_point < cur_src_end_addr)
- {
- current_objfile->ei.entry_file_lowpc = cur_src_start_addr;
- current_objfile->ei.entry_file_highpc = cur_src_end_addr;
- }
-}
-
-/* Finish the symbol definitions for one main source file,
- close off all the lexical contexts for that file
- (creating struct block's for them), then make the
- struct symtab for that file and put it in the list of all such. */
-/* FIXME: Use end_symtab, like coffread.c now does. */
-
-static void
-dst_end_symtab (struct objfile *objfile)
-{
- register struct symtab *symtab;
- register struct blockvector *blockvector;
- register struct linetable *lv;
-
- /* Create the blockvector that points to all the file's blocks. */
-
- blockvector = make_blockvector (objfile);
-
- /* Now create the symtab object for this source file. */
- symtab = allocate_symtab (last_source_file, objfile);
-
- /* Fill in its components. */
- symtab->blockvector = blockvector;
- symtab->free_code = free_linetable;
- symtab->free_ptr = 0;
- symtab->filename = last_source_file;
- symtab->dirname = NULL;
- symtab->debugformat = obsavestring ("Apollo DST", 10,
- &objfile->symbol_obstack);
- lv = line_vector;
- lv->nitems = line_vector_index;
- symtab->linetable = (struct linetable *)
- xrealloc ((char *) lv, (sizeof (struct linetable)
- + lv->nitems * sizeof (struct linetable_entry)));
-
- free_named_symtabs (symtab->filename);
-
- /* Reinitialize for beginning of new file. */
- line_vector = 0;
- line_vector_length = -1;
- last_source_file = NULL;
-}
-
-/* dst_symfile_init ()
- is the dst-specific initialization routine for reading symbols.
-
- We will only be called if this is a DST or DST-like file.
- BFD handles figuring out the format of the file, and code in symtab.c
- uses BFD's determination to vector to us.
-
- The ultimate result is a new symtab (or, FIXME, eventually a psymtab). */
-
-static void
-dst_symfile_init (struct objfile *objfile)
-{
- asection *section;
- bfd *abfd = objfile->obfd;
-
- init_entry_point_info (objfile);
-
-}
-
-/* This function is called for every section; it finds the outer limits
- of the line table (minimum and maximum file offset) so that the
- mainline code can read the whole thing for efficiency. */
-
-/* ARGSUSED */
-static void
-find_dst_sections (bfd *abfd, sec_ptr asect, PTR vpinfo)
-{
- int size, count;
- long base;
- file_ptr offset, maxoff;
- dst_sec *section;
-
-/* WARNING WILL ROBINSON! ACCESSING BFD-PRIVATE DATA HERE! FIXME! */
- size = asect->_raw_size;
- offset = asect->filepos;
- base = asect->vma;
-/* End of warning */
-
- section = NULL;
- if (!strcmp (asect->name, ".blocks"))
- section = &blocks_info;
- else if (!strcmp (asect->name, ".lines"))
- section = &lines_info;
- else if (!strcmp (asect->name, ".symbols"))
- section = &symbols_info;
- if (!section)
- return;
- section->size = size;
- section->position = offset;
- section->base = base;
-}
-
-
-/* The BFD for this file -- only good while we're actively reading
- symbols into a psymtab or a symtab. */
-
-static bfd *symfile_bfd;
-
-/* Read a symbol file, after initialization by dst_symfile_init. */
-/* FIXME! Addr and Mainline are not used yet -- this will not work for
- shared libraries or add_file! */
-
-/* ARGSUSED */
-static void
-dst_symfile_read (struct objfile *objfile, int mainline)
-{
- bfd *abfd = objfile->obfd;
- char *name = bfd_get_filename (abfd);
- int desc;
- register int val;
- int num_symbols;
- int symtab_offset;
- int stringtab_offset;
-
- symfile_bfd = abfd; /* Kludge for swap routines */
-
-/* WARNING WILL ROBINSON! ACCESSING BFD-PRIVATE DATA HERE! FIXME! */
- desc = fileno ((FILE *) (abfd->iostream)); /* File descriptor */
-
- /* Read the line number table, all at once. */
- bfd_map_over_sections (abfd, find_dst_sections, (PTR) NULL);
-
- val = init_dst_sections (desc);
- if (val < 0)
- error ("\"%s\": error reading debugging symbol tables\n", name);
-
- init_minimal_symbol_collection ();
- make_cleanup_discard_minimal_symbols ();
-
- /* Now that the executable file is positioned at symbol table,
- process it and define symbols accordingly. */
-
- read_dst_symtab (objfile);
-
- /* Sort symbols alphabetically within each block. */
-
- {
- struct symtab *s;
- for (s = objfile->symtabs; s != NULL; s = s->next)
- {
- sort_symtab_syms (s);
- }
- }
-
- /* Install any minimal symbols that have been collected as the current
- minimal symbols for this objfile. */
-
- install_minimal_symbols (objfile);
-}
-
-static void
-dst_new_init (struct objfile *ignore)
-{
- /* Nothin' to do */
-}
-
-/* Perform any local cleanups required when we are done with a particular
- objfile. I.E, we are in the process of discarding all symbol information
- for an objfile, freeing up all memory held for it, and unlinking the
- objfile struct from the global list of known objfiles. */
-
-static void
-dst_symfile_finish (struct objfile *objfile)
-{
- /* Nothing to do */
-}
-
-
-/* Get the next line number from the DST. Returns 0 when we hit an
- * end directive or cannot continue for any other reason.
- *
- * Note that ordinary pc deltas are multiplied by two. Apparently
- * this is what was really intended.
- */
-static int
-get_dst_line (signed char **buffer, long *pc)
-{
- static last_pc = 0;
- static long last_line = 0;
- static int last_file = 0;
- dst_ln_entry_ptr_t entry;
- int size;
- dst_src_loc_t *src_loc;
-
- if (*pc != -1)
- {
- last_pc = *pc;
- *pc = -1;
- }
- entry = (dst_ln_entry_ptr_t) * buffer;
-
- while (dst_ln_ln_delta (*entry) == dst_ln_escape_flag)
- {
- switch (entry->esc.esc_code)
- {
- case dst_ln_pad:
- size = 1; /* pad byte */
- break;
- case dst_ln_file:
- /* file escape. Next 4 bytes are a dst_src_loc_t */
- size = 5;
- src_loc = (dst_src_loc_t *) (*buffer + 1);
- last_line = src_loc->line_number;
- last_file = src_loc->file_index;
- break;
- case dst_ln_dln1_dpc1:
- /* 1 byte line delta, 1 byte pc delta */
- last_line += (*buffer)[1];
- last_pc += 2 * (unsigned char) (*buffer)[2];
- dst_record_line (last_line, last_pc);
- size = 3;
- break;
- case dst_ln_dln2_dpc2:
- /* 2 bytes line delta, 2 bytes pc delta */
- last_line += *(short *) (*buffer + 1);
- last_pc += 2 * (*(short *) (*buffer + 3));
- size = 5;
- dst_record_line (last_line, last_pc);
- break;
- case dst_ln_ln4_pc4:
- /* 4 bytes ABSOLUTE line number, 4 bytes ABSOLUTE pc */
- last_line = *(unsigned long *) (*buffer + 1);
- last_pc = *(unsigned long *) (*buffer + 5);
- size = 9;
- dst_record_line (last_line, last_pc);
- break;
- case dst_ln_dln1_dpc0:
- /* 1 byte line delta, pc delta = 0 */
- size = 2;
- last_line += (*buffer)[1];
- break;
- case dst_ln_ln_off_1:
- /* statement escape, stmt # = 1 (2nd stmt on line) */
- size = 1;
- break;
- case dst_ln_ln_off:
- /* statement escape, stmt # = next byte */
- size = 2;
- break;
- case dst_ln_entry:
- /* entry escape, next byte is entry number */
- size = 2;
- break;
- case dst_ln_exit:
- /* exit escape */
- size = 1;
- break;
- case dst_ln_stmt_end:
- /* gap escape, 4 bytes pc delta */
- size = 5;
- /* last_pc += 2 * (*(long *) (*buffer + 1)); */
- /* Apparently this isn't supposed to actually modify
- * the pc value. Totally weird.
- */
- break;
- case dst_ln_escape_11:
- case dst_ln_escape_12:
- case dst_ln_escape_13:
- size = 1;
- break;
- case dst_ln_nxt_byte:
- /* This shouldn't happen. If it does, we're SOL */
- return 0;
- break;
- case dst_ln_end:
- /* end escape, final entry follows */
- return 0;
- }
- *buffer += (size < 0) ? -size : size;
- entry = (dst_ln_entry_ptr_t) * buffer;
- }
- last_line += dst_ln_ln_delta (*entry);
- last_pc += entry->delta.pc_delta * 2;
- (*buffer)++;
- dst_record_line (last_line, last_pc);
- return 1;
-}
-
-static void
-enter_all_lines (char *buffer, long address)
-{
- if (buffer)
- while (get_dst_line (&buffer, &address));
-}
-
-static int
-get_dst_entry (char *buffer, dst_rec_ptr_t *ret_entry)
-{
- int size;
- dst_rec_ptr_t entry;
- static int last_type;
- int ar_size;
- static unsigned lu3;
-
- entry = (dst_rec_ptr_t) buffer;
- switch (entry->rec_type)
- {
- case dst_typ_pad:
- size = 0;
- break;
- case dst_typ_comp_unit:
- size = sizeof (DST_comp_unit (entry));
- break;
- case dst_typ_section_tab:
- size = sizeof (DST_section_tab (entry))
- + ((int) DST_section_tab (entry).number_of_sections
- - dst_dummy_array_size) * sizeof (long);
- break;
- case dst_typ_file_tab:
- size = sizeof (DST_file_tab (entry))
- + ((int) DST_file_tab (entry).number_of_files
- - dst_dummy_array_size) * sizeof (dst_file_desc_t);
- break;
- case dst_typ_block:
- size = sizeof (DST_block (entry))
- + ((int) DST_block (entry).n_of_code_ranges
- - dst_dummy_array_size) * sizeof (dst_code_range_t);
- break;
- case dst_typ_5:
- size = -1;
- break;
- case dst_typ_var:
- size = sizeof (DST_var (entry)) -
- sizeof (dst_var_loc_long_t) * dst_dummy_array_size +
- DST_var (entry).no_of_locs *
- (DST_var (entry).short_locs ?
- sizeof (dst_var_loc_short_t) :
- sizeof (dst_var_loc_long_t));
- break;
- case dst_typ_pointer:
- size = sizeof (DST_pointer (entry));
- break;
- case dst_typ_array:
- size = sizeof (DST_array (entry));
- break;
- case dst_typ_subrange:
- size = sizeof (DST_subrange (entry));
- break;
- case dst_typ_set:
- size = sizeof (DST_set (entry));
- break;
- case dst_typ_implicit_enum:
- size = sizeof (DST_implicit_enum (entry))
- + ((int) DST_implicit_enum (entry).nelems
- - dst_dummy_array_size) * sizeof (dst_rel_offset_t);
- break;
- case dst_typ_explicit_enum:
- size = sizeof (DST_explicit_enum (entry))
- + ((int) DST_explicit_enum (entry).nelems
- - dst_dummy_array_size) * sizeof (dst_enum_elem_t);
- break;
- case dst_typ_short_rec:
- size = sizeof (DST_short_rec (entry))
- + DST_short_rec (entry).nfields * sizeof (dst_short_field_t)
- - dst_dummy_array_size * sizeof (dst_field_t);
- break;
- case dst_typ_short_union:
- size = sizeof (DST_short_union (entry))
- + DST_short_union (entry).nfields * sizeof (dst_short_field_t)
- - dst_dummy_array_size * sizeof (dst_field_t);
- break;
- case dst_typ_file:
- size = sizeof (DST_file (entry));
- break;
- case dst_typ_offset:
- size = sizeof (DST_offset (entry));
- break;
- case dst_typ_alias:
- size = sizeof (DST_alias (entry));
- break;
- case dst_typ_signature:
- size = sizeof (DST_signature (entry)) +
- ((int) DST_signature (entry).nargs -
- dst_dummy_array_size) * sizeof (dst_arg_t);
- break;
- case dst_typ_21:
- size = -1;
- break;
- case dst_typ_old_label:
- size = sizeof (DST_old_label (entry));
- break;
- case dst_typ_scope:
- size = sizeof (DST_scope (entry));
- break;
- case dst_typ_end_scope:
- size = 0;
- break;
- case dst_typ_25:
- case dst_typ_26:
- size = -1;
- break;
- case dst_typ_string_tab:
- case dst_typ_global_name_tab:
- size = sizeof (DST_string_tab (entry))
- + DST_string_tab (entry).length
- - dst_dummy_array_size;
- break;
- case dst_typ_forward:
- size = sizeof (DST_forward (entry));
- get_dst_entry ((char *) entry + DST_forward (entry).rec_off, &entry);
- break;
- case dst_typ_aux_size:
- size = sizeof (DST_aux_size (entry));
- break;
- case dst_typ_aux_align:
- size = sizeof (DST_aux_align (entry));
- break;
- case dst_typ_aux_field_size:
- size = sizeof (DST_aux_field_size (entry));
- break;
- case dst_typ_aux_field_off:
- size = sizeof (DST_aux_field_off (entry));
- break;
- case dst_typ_aux_field_align:
- size = sizeof (DST_aux_field_align (entry));
- break;
- case dst_typ_aux_qual:
- size = sizeof (DST_aux_qual (entry));
- break;
- case dst_typ_aux_var_bound:
- size = sizeof (DST_aux_var_bound (entry));
- break;
- case dst_typ_extension:
- size = DST_extension (entry).rec_size;
- break;
- case dst_typ_string:
- size = sizeof (DST_string (entry));
- break;
- case dst_typ_old_entry:
- size = 48; /* Obsolete entry type */
- break;
- case dst_typ_const:
- size = sizeof (DST_const (entry))
- + DST_const (entry).value.length
- - sizeof (DST_const (entry).value.val);
- break;
- case dst_typ_reference:
- size = sizeof (DST_reference (entry));
- break;
- case dst_typ_old_record:
- case dst_typ_old_union:
- case dst_typ_record:
- case dst_typ_union:
- size = sizeof (DST_record (entry))
- + ((int) DST_record (entry).nfields
- - dst_dummy_array_size) * sizeof (dst_field_t);
- break;
- case dst_typ_aux_type_deriv:
- size = sizeof (DST_aux_type_deriv (entry));
- break;
- case dst_typ_locpool:
- size = sizeof (DST_locpool (entry))
- + ((int) DST_locpool (entry).length -
- dst_dummy_array_size);
- break;
- case dst_typ_variable:
- size = sizeof (DST_variable (entry));
- break;
- case dst_typ_label:
- size = sizeof (DST_label (entry));
- break;
- case dst_typ_entry:
- size = sizeof (DST_entry (entry));
- break;
- case dst_typ_aux_lifetime:
- size = sizeof (DST_aux_lifetime (entry));
- break;
- case dst_typ_aux_ptr_base:
- size = sizeof (DST_aux_ptr_base (entry));
- break;
- case dst_typ_aux_src_range:
- size = sizeof (DST_aux_src_range (entry));
- break;
- case dst_typ_aux_reg_val:
- size = sizeof (DST_aux_reg_val (entry));
- break;
- case dst_typ_aux_unit_names:
- size = sizeof (DST_aux_unit_names (entry))
- + ((int) DST_aux_unit_names (entry).number_of_names
- - dst_dummy_array_size) * sizeof (dst_rel_offset_t);
- break;
- case dst_typ_aux_sect_info:
- size = sizeof (DST_aux_sect_info (entry))
- + ((int) DST_aux_sect_info (entry).number_of_refs
- - dst_dummy_array_size) * sizeof (dst_sect_ref_t);
- break;
- default:
- size = -1;
- break;
- }
- if (size == -1)
- {
- fprintf_unfiltered (gdb_stderr, "Warning: unexpected DST entry type (%d) found\nLast valid entry was of type: %d\n",
- (int) entry->rec_type,
- last_type);
- fprintf_unfiltered (gdb_stderr, "Last unknown_3 value: %d\n", lu3);
- size = 0;
- }
- else
- last_type = entry->rec_type;
- if (size & 1) /* Align on a word boundary */
- size++;
- size += 2;
- *ret_entry = entry;
- return size;
-}
-
-static int
-next_dst_entry (char **buffer, dst_rec_ptr_t *entry, dst_sec *table)
-{
- if (*buffer - table->buffer >= table->size)
- {
- *entry = NULL;
- return 0;
- }
- *buffer += get_dst_entry (*buffer, entry);
- return 1;
-}
-
-#define NEXT_BLK(a, b) next_dst_entry(a, b, &blocks_info)
-#define NEXT_SYM(a, b) next_dst_entry(a, b, &symbols_info)
-#define DST_OFFSET(a, b) ((char *) (a) + (b))
-
-static dst_rec_ptr_t section_table = NULL;
-
-char *
-get_sec_ref (dst_sect_ref_t *ref)
-{
- dst_sec *section = NULL;
- long offset;
-
- if (!section_table || !ref->sect_index)
- return NULL;
- offset = DST_section_tab (section_table).section_base[ref->sect_index - 1]
- + ref->sect_offset;
- if (offset >= blocks_info.base &&
- offset < blocks_info.base + blocks_info.size)
- section = &blocks_info;
- else if (offset >= symbols_info.base &&
- offset < symbols_info.base + symbols_info.size)
- section = &symbols_info;
- else if (offset >= lines_info.base &&
- offset < lines_info.base + lines_info.size)
- section = &lines_info;
- if (!section)
- return NULL;
- return section->buffer + (offset - section->base);
-}
-
-CORE_ADDR
-dst_get_addr (int section, long offset)
-{
- if (!section_table || !section)
- return 0;
- return DST_section_tab (section_table).section_base[section - 1] + offset;
-}
-
-CORE_ADDR
-dst_sym_addr (dst_sect_ref_t *ref)
-{
- if (!section_table || !ref->sect_index)
- return 0;
- return DST_section_tab (section_table).section_base[ref->sect_index - 1]
- + ref->sect_offset;
-}
-
-static struct symbol *
-create_new_symbol (struct objfile *objfile, char *name)
-{
- struct symbol *sym = (struct symbol *)
- obstack_alloc (&objfile->symbol_obstack, sizeof (struct symbol));
- memset (sym, 0, sizeof (struct symbol));
- SYMBOL_NAME (sym) = obsavestring (name, strlen (name),
- &objfile->symbol_obstack);
- SYMBOL_VALUE (sym) = 0;
- SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
-
- SYMBOL_CLASS (sym) = LOC_BLOCK;
- return sym;
-};
-
-static struct type *decode_dst_type (struct objfile *, dst_rec_ptr_t);
-
-static struct type *
-decode_type_desc (struct objfile *objfile, dst_type_t *type_desc,
- dst_rec_ptr_t base)
-{
- struct type *type;
- dst_rec_ptr_t entry;
- if (type_desc->std_type.user_defined_type)
- {
- entry = (dst_rec_ptr_t) DST_OFFSET (base,
- dst_user_type_offset (*type_desc));
- type = decode_dst_type (objfile, entry);
- }
- else
- {
- switch (type_desc->std_type.dtc)
- {
- case dst_int8_type:
- type = builtin_type_signed_char;
- break;
- case dst_int16_type:
- type = builtin_type_short;
- break;
- case dst_int32_type:
- type = builtin_type_long;
- break;
- case dst_uint8_type:
- type = builtin_type_unsigned_char;
- break;
- case dst_uint16_type:
- type = builtin_type_unsigned_short;
- break;
- case dst_uint32_type:
- type = builtin_type_unsigned_long;
- break;
- case dst_real32_type:
- type = builtin_type_float;
- break;
- case dst_real64_type:
- type = builtin_type_double;
- break;
- case dst_complex_type:
- type = builtin_type_complex;
- break;
- case dst_dcomplex_type:
- type = builtin_type_double_complex;
- break;
- case dst_bool8_type:
- type = builtin_type_char;
- break;
- case dst_bool16_type:
- type = builtin_type_short;
- break;
- case dst_bool32_type:
- type = builtin_type_long;
- break;
- case dst_char_type:
- type = builtin_type_char;
- break;
- /* The next few are more complex. I will take care
- * of them properly at a later point.
- */
- case dst_string_type:
- type = builtin_type_void;
- break;
- case dst_ptr_type:
- type = builtin_type_void;
- break;
- case dst_set_type:
- type = builtin_type_void;
- break;
- case dst_proc_type:
- type = builtin_type_void;
- break;
- case dst_func_type:
- type = builtin_type_void;
- break;
- /* Back tto some ordinary ones */
- case dst_void_type:
- type = builtin_type_void;
- break;
- case dst_uchar_type:
- type = builtin_type_unsigned_char;
- break;
- default:
- type = builtin_type_void;
- break;
- }
- }
- return type;
-}
-
-struct structure_list
-{
- struct structure_list *next;
- struct type *type;
-};
-
-static struct structure_list *struct_list = NULL;
-
-static struct type *
-find_dst_structure (char *name)
-{
- struct structure_list *element;
-
- for (element = struct_list; element; element = element->next)
- if (!strcmp (name, TYPE_NAME (element->type)))
- return element->type;
- return NULL;
-}
-
-
-static struct type *
-decode_dst_structure (struct objfile *objfile, dst_rec_ptr_t entry, int code,
- int version)
-{
- struct type *type, *child_type;
- char *struct_name;
- char *name, *field_name;
- int i;
- int fieldoffset, fieldsize;
- dst_type_t type_desc;
- struct structure_list *element;
-
- struct_name = DST_OFFSET (entry, DST_record (entry).noffset);
- name = concat ((code == TYPE_CODE_UNION) ? "union " : "struct ",
- struct_name, NULL);
- type = find_dst_structure (name);
- if (type)
- {
- xfree (name);
- return type;
- }
- type = alloc_type (objfile);
- TYPE_NAME (type) = obstack_copy0 (&objfile->symbol_obstack,
- name, strlen (name));
- xfree (name);
- TYPE_CODE (type) = code;
- TYPE_LENGTH (type) = DST_record (entry).size;
- TYPE_NFIELDS (type) = DST_record (entry).nfields;
- TYPE_FIELDS (type) = (struct field *)
- obstack_alloc (&objfile->symbol_obstack, sizeof (struct field) *
- DST_record (entry).nfields);
- fieldoffset = fieldsize = 0;
- INIT_CPLUS_SPECIFIC (type);
- element = (struct structure_list *)
- xmalloc (sizeof (struct structure_list));
- element->type = type;
- element->next = struct_list;
- struct_list = element;
- for (i = 0; i < DST_record (entry).nfields; i++)
- {
- switch (version)
- {
- case 2:
- field_name = DST_OFFSET (entry,
- DST_record (entry).f.ofields[i].noffset);
- fieldoffset = DST_record (entry).f.ofields[i].foffset * 8 +
- DST_record (entry).f.ofields[i].bit_offset;
- fieldsize = DST_record (entry).f.ofields[i].size;
- type_desc = DST_record (entry).f.ofields[i].type_desc;
- break;
- case 1:
- field_name = DST_OFFSET (entry,
- DST_record (entry).f.fields[i].noffset);
- type_desc = DST_record (entry).f.fields[i].type_desc;
- switch (DST_record (entry).f.fields[i].f.field_loc.format_tag)
- {
- case dst_field_byte:
- fieldoffset = DST_record (entry).f.
- fields[i].f.field_byte.offset * 8;
- fieldsize = -1;
- break;
- case dst_field_bit:
- fieldoffset = DST_record (entry).f.
- fields[i].f.field_bit.byte_offset * 8 +
- DST_record (entry).f.
- fields[i].f.field_bit.bit_offset;
- fieldsize = DST_record (entry).f.
- fields[i].f.field_bit.nbits;
- break;
- case dst_field_loc:
- fieldoffset += fieldsize;
- fieldsize = -1;
- break;
- }
- break;
- case 0:
- field_name = DST_OFFSET (entry,
- DST_record (entry).f.sfields[i].noffset);
- fieldoffset = DST_record (entry).f.sfields[i].foffset;
- type_desc = DST_record (entry).f.sfields[i].type_desc;
- if (i < DST_record (entry).nfields - 1)
- fieldsize = DST_record (entry).f.sfields[i + 1].foffset;
- else
- fieldsize = DST_record (entry).size;
- fieldsize -= fieldoffset;
- fieldoffset *= 8;
- fieldsize *= 8;
- }
- TYPE_FIELDS (type)[i].name =
- obstack_copy0 (&objfile->symbol_obstack,
- field_name, strlen (field_name));
- TYPE_FIELDS (type)[i].type = decode_type_desc (objfile,
- &type_desc,
- entry);
- if (fieldsize == -1)
- fieldsize = TYPE_LENGTH (TYPE_FIELDS (type)[i].type) *
- 8;
- TYPE_FIELDS (type)[i].bitsize = fieldsize;
- TYPE_FIELDS (type)[i].bitpos = fieldoffset;
- }
- return type;
-}
-
-static struct type *
-decode_dst_type (struct objfile *objfile, dst_rec_ptr_t entry)
-{
- struct type *child_type, *type, *range_type, *index_type;
-
- switch (entry->rec_type)
- {
- case dst_typ_var:
- return decode_type_desc (objfile,
- &DST_var (entry).type_desc,
- entry);
- break;
- case dst_typ_variable:
- return decode_type_desc (objfile,
- &DST_variable (entry).type_desc,
- entry);
- break;
- case dst_typ_short_rec:
- return decode_dst_structure (objfile, entry, TYPE_CODE_STRUCT, 0);
- case dst_typ_short_union:
- return decode_dst_structure (objfile, entry, TYPE_CODE_UNION, 0);
- case dst_typ_union:
- return decode_dst_structure (objfile, entry, TYPE_CODE_UNION, 1);
- case dst_typ_record:
- return decode_dst_structure (objfile, entry, TYPE_CODE_STRUCT, 1);
- case dst_typ_old_union:
- return decode_dst_structure (objfile, entry, TYPE_CODE_UNION, 2);
- case dst_typ_old_record:
- return decode_dst_structure (objfile, entry, TYPE_CODE_STRUCT, 2);
- case dst_typ_pointer:
- return make_pointer_type (
- decode_type_desc (objfile,
- &DST_pointer (entry).type_desc,
- entry),
- NULL);
- case dst_typ_array:
- child_type = decode_type_desc (objfile,
- &DST_pointer (entry).type_desc,
- entry);
- index_type = lookup_fundamental_type (objfile,
- FT_INTEGER);
- range_type = create_range_type ((struct type *) NULL,
- index_type, DST_array (entry).lo_bound,
- DST_array (entry).hi_bound);
- return create_array_type ((struct type *) NULL, child_type,
- range_type);
- case dst_typ_alias:
- return decode_type_desc (objfile,
- &DST_alias (entry).type_desc,
- entry);
- default:
- return builtin_type_int;
- }
-}
-
-struct symbol_list
-{
- struct symbol_list *next;
- struct symbol *symbol;
-};
-
-static struct symbol_list *dst_global_symbols = NULL;
-static int total_globals = 0;
-
-static void
-decode_dst_locstring (char *locstr, struct symbol *sym)
-{
- dst_loc_entry_t *entry, *next_entry;
- CORE_ADDR temp;
- int count = 0;
-
- while (1)
- {
- if (count++ == 100)
- {
- fprintf_unfiltered (gdb_stderr, "Error reading locstring\n");
- break;
- }
- entry = (dst_loc_entry_t *) locstr;
- next_entry = (dst_loc_entry_t *) (locstr + 1);
- switch (entry->header.code)
- {
- case dst_lsc_end: /* End of string */
- return;
- case dst_lsc_indirect: /* Indirect through previous. Arg == 6 */
- /* Or register ax x == arg */
- if (entry->header.arg < 6)
- {
- SYMBOL_CLASS (sym) = LOC_REGISTER;
- SYMBOL_VALUE (sym) = entry->header.arg + 8;
- }
- /* We predict indirects */
- locstr++;
- break;
- case dst_lsc_dreg:
- SYMBOL_CLASS (sym) = LOC_REGISTER;
- SYMBOL_VALUE (sym) = entry->header.arg;
- locstr++;
- break;
- case dst_lsc_section: /* Section (arg+1) */
- SYMBOL_VALUE (sym) = dst_get_addr (entry->header.arg + 1, 0);
- locstr++;
- break;
- case dst_lsc_sec_byte: /* Section (next_byte+1) */
- SYMBOL_VALUE (sym) = dst_get_addr (locstr[1] + 1, 0);
- locstr += 2;
- break;
- case dst_lsc_add: /* Add (arg+1)*2 */
- case dst_lsc_sub: /* Subtract (arg+1)*2 */
- temp = (entry->header.arg + 1) * 2;
- locstr++;
- if (*locstr == dst_multiply_256)
- {
- temp <<= 8;
- locstr++;
- }
- switch (entry->header.code)
- {
- case dst_lsc_add:
- if (SYMBOL_CLASS (sym) == LOC_LOCAL)
- SYMBOL_CLASS (sym) = LOC_ARG;
- SYMBOL_VALUE (sym) += temp;
- break;
- case dst_lsc_sub:
- SYMBOL_VALUE (sym) -= temp;
- break;
- }
- break;
- case dst_lsc_add_byte:
- case dst_lsc_sub_byte:
- switch (entry->header.arg & 0x03)
- {
- case 1:
- temp = (unsigned char) locstr[1];
- locstr += 2;
- break;
- case 2:
- temp = *(unsigned short *) (locstr + 1);
- locstr += 3;
- break;
- case 3:
- temp = *(unsigned long *) (locstr + 1);
- locstr += 5;
- break;
- }
- if (*locstr == dst_multiply_256)
- {
- temp <<= 8;
- locstr++;
- }
- switch (entry->header.code)
- {
- case dst_lsc_add_byte:
- if (SYMBOL_CLASS (sym) == LOC_LOCAL)
- SYMBOL_CLASS (sym) = LOC_ARG;
- SYMBOL_VALUE (sym) += temp;
- break;
- case dst_lsc_sub_byte:
- SYMBOL_VALUE (sym) -= temp;
- break;
- }
- break;
- case dst_lsc_sbreg: /* Stack base register (frame pointer). Arg==0 */
- if (next_entry->header.code != dst_lsc_indirect)
- {
- SYMBOL_VALUE (sym) = 0;
- SYMBOL_CLASS (sym) = LOC_STATIC;
- return;
- }
- SYMBOL_VALUE (sym) = 0;
- SYMBOL_CLASS (sym) = LOC_LOCAL;
- locstr++;
- break;
- default:
- SYMBOL_VALUE (sym) = 0;
- SYMBOL_CLASS (sym) = LOC_STATIC;
- return;
- }
- }
-}
-
-static struct symbol_list *
-process_dst_symbols (struct objfile *objfile, dst_rec_ptr_t entry, char *name,
- int *nsyms_ret)
-{
- struct symbol_list *list = NULL, *element;
- struct symbol *sym;
- char *symname;
- int nsyms = 0;
- char *location;
- long line;
- dst_type_t symtype;
- struct type *type;
- dst_var_attr_t attr;
- dst_var_loc_t loc_type;
- unsigned loc_index;
- long loc_value;
-
- if (!entry)
- {
- *nsyms_ret = 0;
- return NULL;
- }
- location = (char *) entry;
- while (NEXT_SYM (&location, &entry) &&
- entry->rec_type != dst_typ_end_scope)
- {
- if (entry->rec_type == dst_typ_var)
- {
- if (DST_var (entry).short_locs)
- {
- loc_type = DST_var (entry).locs.shorts[0].loc_type;
- loc_index = DST_var (entry).locs.shorts[0].loc_index;
- loc_value = DST_var (entry).locs.shorts[0].location;
- }
- else
- {
- loc_type = DST_var (entry).locs.longs[0].loc_type;
- loc_index = DST_var (entry).locs.longs[0].loc_index;
- loc_value = DST_var (entry).locs.longs[0].location;
- }
- if (loc_type == dst_var_loc_external)
- continue;
- symname = DST_OFFSET (entry, DST_var (entry).noffset);
- line = DST_var (entry).src_loc.line_number;
- symtype = DST_var (entry).type_desc;
- attr = DST_var (entry).attributes;
- }
- else if (entry->rec_type == dst_typ_variable)
- {
- symname = DST_OFFSET (entry,
- DST_variable (entry).noffset);
- line = DST_variable (entry).src_loc.line_number;
- symtype = DST_variable (entry).type_desc;
- attr = DST_variable (entry).attributes;
- }
- else
- {
- continue;
- }
- if (symname && name && !strcmp (symname, name))
- /* It's the function return value */
- continue;
- sym = create_new_symbol (objfile, symname);
-
- if ((attr & (1 << dst_var_attr_global)) ||
- (attr & (1 << dst_var_attr_static)))
- SYMBOL_CLASS (sym) = LOC_STATIC;
- else
- SYMBOL_CLASS (sym) = LOC_LOCAL;
- SYMBOL_LINE (sym) = line;
- SYMBOL_TYPE (sym) = decode_type_desc (objfile, &symtype,
- entry);
- SYMBOL_VALUE (sym) = 0;
- switch (entry->rec_type)
- {
- case dst_typ_var:
- switch (loc_type)
- {
- case dst_var_loc_abs:
- SYMBOL_VALUE_ADDRESS (sym) = loc_value;
- break;
- case dst_var_loc_sect_off:
- case dst_var_loc_ind_sect_off: /* What is this? */
- SYMBOL_VALUE_ADDRESS (sym) = dst_get_addr (
- loc_index,
- loc_value);
- break;
- case dst_var_loc_ind_reg_rel: /* What is this? */
- case dst_var_loc_reg_rel:
- /* If it isn't fp relative, specify the
- * register it's relative to.
- */
- if (loc_index)
- {
- sym->aux_value.basereg = loc_index;
- }
- SYMBOL_VALUE (sym) = loc_value;
- if (loc_value > 0 &&
- SYMBOL_CLASS (sym) == LOC_BASEREG)
- SYMBOL_CLASS (sym) = LOC_BASEREG_ARG;
- break;
- case dst_var_loc_reg:
- SYMBOL_VALUE (sym) = loc_index;
- SYMBOL_CLASS (sym) = LOC_REGISTER;
- break;
- }
- break;
- case dst_typ_variable:
- /* External variable..... don't try to interpret
- * its nonexistant locstring.
- */
- if (DST_variable (entry).loffset == -1)
- continue;
- decode_dst_locstring (DST_OFFSET (entry,
- DST_variable (entry).loffset),
- sym);
- }
- element = (struct symbol_list *)
- xmalloc (sizeof (struct symbol_list));
-
- if (attr & (1 << dst_var_attr_global))
- {
- element->next = dst_global_symbols;
- dst_global_symbols = element;
- total_globals++;
- }
- else
- {
- element->next = list;
- list = element;
- nsyms++;
- }
- element->symbol = sym;
- }
- *nsyms_ret = nsyms;
- return list;
-}
-
-
-static struct symbol *
-process_dst_function (struct objfile *objfile, dst_rec_ptr_t entry, char *name,
- CORE_ADDR address)
-{
- struct symbol *sym;
- struct type *type, *ftype;
- dst_rec_ptr_t sym_entry, typ_entry;
- char *location;
- struct symbol_list *element;
-
- type = builtin_type_int;
- sym = create_new_symbol (objfile, name);
- SYMBOL_CLASS (sym) = LOC_BLOCK;
-
- if (entry)
- {
- location = (char *) entry;
- do
- {
- NEXT_SYM (&location, &sym_entry);
- }
- while (sym_entry && sym_entry->rec_type != dst_typ_signature);
-
- if (sym_entry)
- {
- SYMBOL_LINE (sym) =
- DST_signature (sym_entry).src_loc.line_number;
- if (DST_signature (sym_entry).result)
- {
- typ_entry = (dst_rec_ptr_t)
- DST_OFFSET (sym_entry,
- DST_signature (sym_entry).result);
- type = decode_dst_type (objfile, typ_entry);
- }
- }
- }
-
- if (!type->function_type)
- {
- ftype = alloc_type (objfile);
- type->function_type = ftype;
- TYPE_TARGET_TYPE (ftype) = type;
- TYPE_CODE (ftype) = TYPE_CODE_FUNC;
- }
- SYMBOL_TYPE (sym) = type->function_type;
-
- /* Now add ourselves to the global symbols list */
- element = (struct symbol_list *)
- xmalloc (sizeof (struct symbol_list));
-
- element->next = dst_global_symbols;
- dst_global_symbols = element;
- total_globals++;
- element->symbol = sym;
-
- return sym;
-}
-
-static struct block *
-process_dst_block (struct objfile *objfile, dst_rec_ptr_t entry)
-{
- struct block *block;
- struct symbol *function = NULL;
- CORE_ADDR address;
- long size;
- char *name;
- dst_rec_ptr_t child_entry, symbol_entry;
- struct block *child_block;
- int total_symbols = 0;
- char fake_name[20];
- static long fake_seq = 0;
- struct symbol_list *symlist, *nextsym;
- int symnum;
-
- if (DST_block (entry).noffset)
- name = DST_OFFSET (entry, DST_block (entry).noffset);
- else
- name = NULL;
- if (DST_block (entry).n_of_code_ranges)
- {
- address = dst_sym_addr (
- &DST_block (entry).code_ranges[0].code_start);
- size = DST_block (entry).code_ranges[0].code_size;
- }
- else
- {
- address = -1;
- size = 0;
- }
- symbol_entry = (dst_rec_ptr_t) get_sec_ref (&DST_block (entry).symbols_start);
- switch (DST_block (entry).block_type)
- {
- /* These are all really functions. Even the "program" type.
- * This is because the Apollo OS was written in Pascal, and
- * in Pascal, the main procedure is described as the Program.
- * Cute, huh?
- */
- case dst_block_procedure:
- case dst_block_function:
- case dst_block_subroutine:
- case dst_block_program:
- prim_record_minimal_symbol (name, address, mst_text, objfile);
- function = process_dst_function (
- objfile,
- symbol_entry,
- name,
- address);
- enter_all_lines (get_sec_ref (&DST_block (entry).code_ranges[0].lines_start), address);
- break;
- case dst_block_block_data:
- break;
-
- default:
- /* GDB has to call it something, and the module name
- * won't cut it
- */
- sprintf (fake_name, "block_%08lx", fake_seq++);
- function = process_dst_function (
- objfile, NULL, fake_name, address);
- break;
- }
- symlist = process_dst_symbols (objfile, symbol_entry,
- name, &total_symbols);
- block = (struct block *)
- obstack_alloc (&objfile->symbol_obstack,
- sizeof (struct block) +
- (total_symbols - 1) * sizeof (struct symbol *));
-
- symnum = 0;
- while (symlist)
- {
- nextsym = symlist->next;
-
- block->sym[symnum] = symlist->symbol;
-
- xfree (symlist);
- symlist = nextsym;
- symnum++;
- }
- BLOCK_NSYMS (block) = total_symbols;
- BLOCK_HASHTABLE (block) = 0;
- BLOCK_START (block) = address;
- BLOCK_END (block) = address + size;
- BLOCK_SUPERBLOCK (block) = 0;
- if (function)
- {
- SYMBOL_BLOCK_VALUE (function) = block;
- BLOCK_FUNCTION (block) = function;
- }
- else
- BLOCK_FUNCTION (block) = 0;
-
- if (DST_block (entry).child_block_off)
- {
- child_entry = (dst_rec_ptr_t) DST_OFFSET (entry,
- DST_block (entry).child_block_off);
- while (child_entry)
- {
- child_block = process_dst_block (objfile, child_entry);
- if (child_block)
- {
- if (BLOCK_START (child_block) <
- BLOCK_START (block) ||
- BLOCK_START (block) == -1)
- BLOCK_START (block) =
- BLOCK_START (child_block);
- if (BLOCK_END (child_block) >
- BLOCK_END (block) ||
- BLOCK_END (block) == -1)
- BLOCK_END (block) =
- BLOCK_END (child_block);
- BLOCK_SUPERBLOCK (child_block) = block;
- }
- if (DST_block (child_entry).sibling_block_off)
- child_entry = (dst_rec_ptr_t) DST_OFFSET (
- child_entry,
- DST_block (child_entry).sibling_block_off);
- else
- child_entry = NULL;
- }
- }
- record_pending_block (objfile, block, NULL);
- return block;
-}
-
-
-static void
-read_dst_symtab (struct objfile *objfile)
-{
- char *buffer;
- dst_rec_ptr_t entry, file_table, root_block;
- char *source_file;
- struct block *block, *global_block;
- int symnum;
- struct symbol_list *nextsym;
- int module_num = 0;
- struct structure_list *element;
-
- current_objfile = objfile;
- buffer = blocks_info.buffer;
- while (NEXT_BLK (&buffer, &entry))
- {
- if (entry->rec_type == dst_typ_comp_unit)
- {
- file_table = (dst_rec_ptr_t) DST_OFFSET (entry,
- DST_comp_unit (entry).file_table);
- section_table = (dst_rec_ptr_t) DST_OFFSET (entry,
- DST_comp_unit (entry).section_table);
- root_block = (dst_rec_ptr_t) DST_OFFSET (entry,
- DST_comp_unit (entry).root_block_offset);
- source_file = DST_OFFSET (file_table,
- DST_file_tab (file_table).files[0].noffset);
- /* Point buffer to the start of the next comp_unit */
- buffer = DST_OFFSET (entry,
- DST_comp_unit (entry).data_size);
- dst_start_symtab ();
-
- block = process_dst_block (objfile, root_block);
-
- global_block = (struct block *)
- obstack_alloc (&objfile->symbol_obstack,
- sizeof (struct block) +
- (total_globals - 1) *
- sizeof (struct symbol *));
- BLOCK_NSYMS (global_block) = total_globals;
- BLOCK_HASHTABLE (global_block) = 0;
- for (symnum = 0; symnum < total_globals; symnum++)
- {
- nextsym = dst_global_symbols->next;
-
- global_block->sym[symnum] =
- dst_global_symbols->symbol;
-
- xfree (dst_global_symbols);
- dst_global_symbols = nextsym;
- }
- dst_global_symbols = NULL;
- total_globals = 0;
- BLOCK_FUNCTION (global_block) = 0;
- BLOCK_START (global_block) = BLOCK_START (block);
- BLOCK_END (global_block) = BLOCK_END (block);
- BLOCK_SUPERBLOCK (global_block) = 0;
- BLOCK_SUPERBLOCK (block) = global_block;
- record_pending_block (objfile, global_block, NULL);
-
- complete_symtab (source_file,
- BLOCK_START (block),
- BLOCK_END (block) - BLOCK_START (block));
- module_num++;
- dst_end_symtab (objfile);
- }
- }
- if (module_num)
- prim_record_minimal_symbol ("<end_of_program>",
- BLOCK_END (block), mst_text, objfile);
- /* One more faked symbol to make sure nothing can ever run off the
- * end of the symbol table. This one represents the end of the
- * text space. It used to be (CORE_ADDR) -1 (effectively the highest
- * int possible), but some parts of gdb treated it as a signed
- * number and failed comparisons. We could equally use 7fffffff,
- * but no functions are ever mapped to an address higher than
- * 40000000
- */
- prim_record_minimal_symbol ("<end_of_text>",
- (CORE_ADDR) 0x40000000,
- mst_text, objfile);
- while (struct_list)
- {
- element = struct_list;
- struct_list = element->next;
- xfree (element);
- }
-}
-
-
-/* Support for line number handling */
-static char *linetab = NULL;
-static long linetab_offset;
-static unsigned long linetab_size;
-
-/* Read in all the line numbers for fast lookups later. Leave them in
- external (unswapped) format in memory; we'll swap them as we enter
- them into GDB's data structures. */
-static int
-init_one_section (int chan, dst_sec *secinfo)
-{
- if (secinfo->size == 0
- || lseek (chan, secinfo->position, 0) == -1
- || (secinfo->buffer = xmalloc (secinfo->size)) == NULL
- || myread (chan, secinfo->buffer, secinfo->size) == -1)
- return 0;
- else
- return 1;
-}
-
-static int
-init_dst_sections (int chan)
-{
-
- if (!init_one_section (chan, &blocks_info) ||
- !init_one_section (chan, &lines_info) ||
- !init_one_section (chan, &symbols_info))
- return -1;
- else
- return 0;
-}
-
-/* Fake up support for relocating symbol addresses. FIXME. */
-
-struct section_offsets dst_symfile_faker =
-{0};
-
-void
-dst_symfile_offsets (struct objfile *objfile, struct section_addr_info *addrs)
-{
- objfile->num_sections = 1;
- objfile->section_offsets = &dst_symfile_faker;
-}
-
-/* Register our ability to parse symbols for DST BFD files */
-
-static struct sym_fns dst_sym_fns =
-{
- /* FIXME: Can this be integrated with coffread.c? If not, should it be
- a separate flavour like ecoff? */
- (enum bfd_flavour) -2,
-
- dst_new_init, /* sym_new_init: init anything gbl to entire symtab */
- dst_symfile_init, /* sym_init: read initial info, setup for sym_read() */
- dst_symfile_read, /* sym_read: read a symbol file into symtab */
- dst_symfile_finish, /* sym_finish: finished with file, cleanup */
- dst_symfile_offsets, /* sym_offsets: xlate external to internal form */
- NULL /* next: pointer to next struct sym_fns */
-};
-
-void
-_initialize_dstread (void)
-{
- add_symtab_fns (&dst_sym_fns);
-}
+// OBSOLETE /* Read apollo DST symbol tables and convert to internal format, for GDB.
+// OBSOLETE Contributed by Troy Rollo, University of NSW (troy@cbme.unsw.edu.au).
+// OBSOLETE Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+// OBSOLETE Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #include "defs.h"
+// OBSOLETE #include "symtab.h"
+// OBSOLETE #include "gdbtypes.h"
+// OBSOLETE #include "breakpoint.h"
+// OBSOLETE #include "bfd.h"
+// OBSOLETE #include "symfile.h"
+// OBSOLETE #include "objfiles.h"
+// OBSOLETE #include "buildsym.h"
+// OBSOLETE #include "gdb_obstack.h"
+// OBSOLETE
+// OBSOLETE #include "gdb_string.h"
+// OBSOLETE
+// OBSOLETE #include "dst.h"
+// OBSOLETE
+// OBSOLETE CORE_ADDR cur_src_start_addr, cur_src_end_addr;
+// OBSOLETE dst_sec blocks_info, lines_info, symbols_info;
+// OBSOLETE
+// OBSOLETE /* Vector of line number information. */
+// OBSOLETE
+// OBSOLETE static struct linetable *line_vector;
+// OBSOLETE
+// OBSOLETE /* Index of next entry to go in line_vector_index. */
+// OBSOLETE
+// OBSOLETE static int line_vector_index;
+// OBSOLETE
+// OBSOLETE /* Last line number recorded in the line vector. */
+// OBSOLETE
+// OBSOLETE static int prev_line_number;
+// OBSOLETE
+// OBSOLETE /* Number of elements allocated for line_vector currently. */
+// OBSOLETE
+// OBSOLETE static int line_vector_length;
+// OBSOLETE
+// OBSOLETE static int init_dst_sections (int);
+// OBSOLETE
+// OBSOLETE static void read_dst_symtab (struct objfile *);
+// OBSOLETE
+// OBSOLETE static void find_dst_sections (bfd *, sec_ptr, PTR);
+// OBSOLETE
+// OBSOLETE static void dst_symfile_init (struct objfile *);
+// OBSOLETE
+// OBSOLETE static void dst_new_init (struct objfile *);
+// OBSOLETE
+// OBSOLETE static void dst_symfile_read (struct objfile *, int);
+// OBSOLETE
+// OBSOLETE static void dst_symfile_finish (struct objfile *);
+// OBSOLETE
+// OBSOLETE static void dst_end_symtab (struct objfile *);
+// OBSOLETE
+// OBSOLETE static void complete_symtab (char *, CORE_ADDR, unsigned int);
+// OBSOLETE
+// OBSOLETE static void dst_start_symtab (void);
+// OBSOLETE
+// OBSOLETE static void dst_record_line (int, CORE_ADDR);
+// OBSOLETE
+// OBSOLETE /* Manage the vector of line numbers. */
+// OBSOLETE /* FIXME: Use record_line instead. */
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE dst_record_line (int line, CORE_ADDR pc)
+// OBSOLETE {
+// OBSOLETE struct linetable_entry *e;
+// OBSOLETE /* Make sure line vector is big enough. */
+// OBSOLETE
+// OBSOLETE if (line_vector_index + 2 >= line_vector_length)
+// OBSOLETE {
+// OBSOLETE line_vector_length *= 2;
+// OBSOLETE line_vector = (struct linetable *)
+// OBSOLETE xrealloc ((char *) line_vector, sizeof (struct linetable)
+// OBSOLETE + (line_vector_length
+// OBSOLETE * sizeof (struct linetable_entry)));
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE e = line_vector->item + line_vector_index++;
+// OBSOLETE e->line = line;
+// OBSOLETE e->pc = pc;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Start a new symtab for a new source file.
+// OBSOLETE It indicates the start of data for one original source file. */
+// OBSOLETE /* FIXME: use start_symtab, like coffread.c now does. */
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE dst_start_symtab (void)
+// OBSOLETE {
+// OBSOLETE /* Initialize the source file line number information for this file. */
+// OBSOLETE
+// OBSOLETE if (line_vector) /* Unlikely, but maybe possible? */
+// OBSOLETE xfree (line_vector);
+// OBSOLETE line_vector_index = 0;
+// OBSOLETE line_vector_length = 1000;
+// OBSOLETE prev_line_number = -2; /* Force first line number to be explicit */
+// OBSOLETE line_vector = (struct linetable *)
+// OBSOLETE xmalloc (sizeof (struct linetable)
+// OBSOLETE + line_vector_length * sizeof (struct linetable_entry));
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Save the vital information from when starting to read a file,
+// OBSOLETE for use when closing off the current file.
+// OBSOLETE NAME is the file name the symbols came from, START_ADDR is the first
+// OBSOLETE text address for the file, and SIZE is the number of bytes of text. */
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE complete_symtab (char *name, CORE_ADDR start_addr, unsigned int size)
+// OBSOLETE {
+// OBSOLETE last_source_file = savestring (name, strlen (name));
+// OBSOLETE cur_src_start_addr = start_addr;
+// OBSOLETE cur_src_end_addr = start_addr + size;
+// OBSOLETE
+// OBSOLETE if (current_objfile->ei.entry_point >= cur_src_start_addr &&
+// OBSOLETE current_objfile->ei.entry_point < cur_src_end_addr)
+// OBSOLETE {
+// OBSOLETE current_objfile->ei.entry_file_lowpc = cur_src_start_addr;
+// OBSOLETE current_objfile->ei.entry_file_highpc = cur_src_end_addr;
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Finish the symbol definitions for one main source file,
+// OBSOLETE close off all the lexical contexts for that file
+// OBSOLETE (creating struct block's for them), then make the
+// OBSOLETE struct symtab for that file and put it in the list of all such. */
+// OBSOLETE /* FIXME: Use end_symtab, like coffread.c now does. */
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE dst_end_symtab (struct objfile *objfile)
+// OBSOLETE {
+// OBSOLETE register struct symtab *symtab;
+// OBSOLETE register struct blockvector *blockvector;
+// OBSOLETE register struct linetable *lv;
+// OBSOLETE
+// OBSOLETE /* Create the blockvector that points to all the file's blocks. */
+// OBSOLETE
+// OBSOLETE blockvector = make_blockvector (objfile);
+// OBSOLETE
+// OBSOLETE /* Now create the symtab object for this source file. */
+// OBSOLETE symtab = allocate_symtab (last_source_file, objfile);
+// OBSOLETE
+// OBSOLETE /* Fill in its components. */
+// OBSOLETE symtab->blockvector = blockvector;
+// OBSOLETE symtab->free_code = free_linetable;
+// OBSOLETE symtab->free_ptr = 0;
+// OBSOLETE symtab->filename = last_source_file;
+// OBSOLETE symtab->dirname = NULL;
+// OBSOLETE symtab->debugformat = obsavestring ("Apollo DST", 10,
+// OBSOLETE &objfile->symbol_obstack);
+// OBSOLETE lv = line_vector;
+// OBSOLETE lv->nitems = line_vector_index;
+// OBSOLETE symtab->linetable = (struct linetable *)
+// OBSOLETE xrealloc ((char *) lv, (sizeof (struct linetable)
+// OBSOLETE + lv->nitems * sizeof (struct linetable_entry)));
+// OBSOLETE
+// OBSOLETE free_named_symtabs (symtab->filename);
+// OBSOLETE
+// OBSOLETE /* Reinitialize for beginning of new file. */
+// OBSOLETE line_vector = 0;
+// OBSOLETE line_vector_length = -1;
+// OBSOLETE last_source_file = NULL;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* dst_symfile_init ()
+// OBSOLETE is the dst-specific initialization routine for reading symbols.
+// OBSOLETE
+// OBSOLETE We will only be called if this is a DST or DST-like file.
+// OBSOLETE BFD handles figuring out the format of the file, and code in symtab.c
+// OBSOLETE uses BFD's determination to vector to us.
+// OBSOLETE
+// OBSOLETE The ultimate result is a new symtab (or, FIXME, eventually a psymtab). */
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE dst_symfile_init (struct objfile *objfile)
+// OBSOLETE {
+// OBSOLETE asection *section;
+// OBSOLETE bfd *abfd = objfile->obfd;
+// OBSOLETE
+// OBSOLETE init_entry_point_info (objfile);
+// OBSOLETE
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* This function is called for every section; it finds the outer limits
+// OBSOLETE of the line table (minimum and maximum file offset) so that the
+// OBSOLETE mainline code can read the whole thing for efficiency. */
+// OBSOLETE
+// OBSOLETE /* ARGSUSED */
+// OBSOLETE static void
+// OBSOLETE find_dst_sections (bfd *abfd, sec_ptr asect, PTR vpinfo)
+// OBSOLETE {
+// OBSOLETE int size, count;
+// OBSOLETE long base;
+// OBSOLETE file_ptr offset, maxoff;
+// OBSOLETE dst_sec *section;
+// OBSOLETE
+// OBSOLETE /* WARNING WILL ROBINSON! ACCESSING BFD-PRIVATE DATA HERE! FIXME! */
+// OBSOLETE size = asect->_raw_size;
+// OBSOLETE offset = asect->filepos;
+// OBSOLETE base = asect->vma;
+// OBSOLETE /* End of warning */
+// OBSOLETE
+// OBSOLETE section = NULL;
+// OBSOLETE if (!strcmp (asect->name, ".blocks"))
+// OBSOLETE section = &blocks_info;
+// OBSOLETE else if (!strcmp (asect->name, ".lines"))
+// OBSOLETE section = &lines_info;
+// OBSOLETE else if (!strcmp (asect->name, ".symbols"))
+// OBSOLETE section = &symbols_info;
+// OBSOLETE if (!section)
+// OBSOLETE return;
+// OBSOLETE section->size = size;
+// OBSOLETE section->position = offset;
+// OBSOLETE section->base = base;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /* The BFD for this file -- only good while we're actively reading
+// OBSOLETE symbols into a psymtab or a symtab. */
+// OBSOLETE
+// OBSOLETE static bfd *symfile_bfd;
+// OBSOLETE
+// OBSOLETE /* Read a symbol file, after initialization by dst_symfile_init. */
+// OBSOLETE /* FIXME! Addr and Mainline are not used yet -- this will not work for
+// OBSOLETE shared libraries or add_file! */
+// OBSOLETE
+// OBSOLETE /* ARGSUSED */
+// OBSOLETE static void
+// OBSOLETE dst_symfile_read (struct objfile *objfile, int mainline)
+// OBSOLETE {
+// OBSOLETE bfd *abfd = objfile->obfd;
+// OBSOLETE char *name = bfd_get_filename (abfd);
+// OBSOLETE int desc;
+// OBSOLETE register int val;
+// OBSOLETE int num_symbols;
+// OBSOLETE int symtab_offset;
+// OBSOLETE int stringtab_offset;
+// OBSOLETE
+// OBSOLETE symfile_bfd = abfd; /* Kludge for swap routines */
+// OBSOLETE
+// OBSOLETE /* WARNING WILL ROBINSON! ACCESSING BFD-PRIVATE DATA HERE! FIXME! */
+// OBSOLETE desc = fileno ((FILE *) (abfd->iostream)); /* File descriptor */
+// OBSOLETE
+// OBSOLETE /* Read the line number table, all at once. */
+// OBSOLETE bfd_map_over_sections (abfd, find_dst_sections, (PTR) NULL);
+// OBSOLETE
+// OBSOLETE val = init_dst_sections (desc);
+// OBSOLETE if (val < 0)
+// OBSOLETE error ("\"%s\": error reading debugging symbol tables\n", name);
+// OBSOLETE
+// OBSOLETE init_minimal_symbol_collection ();
+// OBSOLETE make_cleanup_discard_minimal_symbols ();
+// OBSOLETE
+// OBSOLETE /* Now that the executable file is positioned at symbol table,
+// OBSOLETE process it and define symbols accordingly. */
+// OBSOLETE
+// OBSOLETE read_dst_symtab (objfile);
+// OBSOLETE
+// OBSOLETE /* Sort symbols alphabetically within each block. */
+// OBSOLETE
+// OBSOLETE {
+// OBSOLETE struct symtab *s;
+// OBSOLETE for (s = objfile->symtabs; s != NULL; s = s->next)
+// OBSOLETE {
+// OBSOLETE sort_symtab_syms (s);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Install any minimal symbols that have been collected as the current
+// OBSOLETE minimal symbols for this objfile. */
+// OBSOLETE
+// OBSOLETE install_minimal_symbols (objfile);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE dst_new_init (struct objfile *ignore)
+// OBSOLETE {
+// OBSOLETE /* Nothin' to do */
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Perform any local cleanups required when we are done with a particular
+// OBSOLETE objfile. I.E, we are in the process of discarding all symbol information
+// OBSOLETE for an objfile, freeing up all memory held for it, and unlinking the
+// OBSOLETE objfile struct from the global list of known objfiles. */
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE dst_symfile_finish (struct objfile *objfile)
+// OBSOLETE {
+// OBSOLETE /* Nothing to do */
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /* Get the next line number from the DST. Returns 0 when we hit an
+// OBSOLETE * end directive or cannot continue for any other reason.
+// OBSOLETE *
+// OBSOLETE * Note that ordinary pc deltas are multiplied by two. Apparently
+// OBSOLETE * this is what was really intended.
+// OBSOLETE */
+// OBSOLETE static int
+// OBSOLETE get_dst_line (signed char **buffer, long *pc)
+// OBSOLETE {
+// OBSOLETE static last_pc = 0;
+// OBSOLETE static long last_line = 0;
+// OBSOLETE static int last_file = 0;
+// OBSOLETE dst_ln_entry_ptr_t entry;
+// OBSOLETE int size;
+// OBSOLETE dst_src_loc_t *src_loc;
+// OBSOLETE
+// OBSOLETE if (*pc != -1)
+// OBSOLETE {
+// OBSOLETE last_pc = *pc;
+// OBSOLETE *pc = -1;
+// OBSOLETE }
+// OBSOLETE entry = (dst_ln_entry_ptr_t) * buffer;
+// OBSOLETE
+// OBSOLETE while (dst_ln_ln_delta (*entry) == dst_ln_escape_flag)
+// OBSOLETE {
+// OBSOLETE switch (entry->esc.esc_code)
+// OBSOLETE {
+// OBSOLETE case dst_ln_pad:
+// OBSOLETE size = 1; /* pad byte */
+// OBSOLETE break;
+// OBSOLETE case dst_ln_file:
+// OBSOLETE /* file escape. Next 4 bytes are a dst_src_loc_t */
+// OBSOLETE size = 5;
+// OBSOLETE src_loc = (dst_src_loc_t *) (*buffer + 1);
+// OBSOLETE last_line = src_loc->line_number;
+// OBSOLETE last_file = src_loc->file_index;
+// OBSOLETE break;
+// OBSOLETE case dst_ln_dln1_dpc1:
+// OBSOLETE /* 1 byte line delta, 1 byte pc delta */
+// OBSOLETE last_line += (*buffer)[1];
+// OBSOLETE last_pc += 2 * (unsigned char) (*buffer)[2];
+// OBSOLETE dst_record_line (last_line, last_pc);
+// OBSOLETE size = 3;
+// OBSOLETE break;
+// OBSOLETE case dst_ln_dln2_dpc2:
+// OBSOLETE /* 2 bytes line delta, 2 bytes pc delta */
+// OBSOLETE last_line += *(short *) (*buffer + 1);
+// OBSOLETE last_pc += 2 * (*(short *) (*buffer + 3));
+// OBSOLETE size = 5;
+// OBSOLETE dst_record_line (last_line, last_pc);
+// OBSOLETE break;
+// OBSOLETE case dst_ln_ln4_pc4:
+// OBSOLETE /* 4 bytes ABSOLUTE line number, 4 bytes ABSOLUTE pc */
+// OBSOLETE last_line = *(unsigned long *) (*buffer + 1);
+// OBSOLETE last_pc = *(unsigned long *) (*buffer + 5);
+// OBSOLETE size = 9;
+// OBSOLETE dst_record_line (last_line, last_pc);
+// OBSOLETE break;
+// OBSOLETE case dst_ln_dln1_dpc0:
+// OBSOLETE /* 1 byte line delta, pc delta = 0 */
+// OBSOLETE size = 2;
+// OBSOLETE last_line += (*buffer)[1];
+// OBSOLETE break;
+// OBSOLETE case dst_ln_ln_off_1:
+// OBSOLETE /* statement escape, stmt # = 1 (2nd stmt on line) */
+// OBSOLETE size = 1;
+// OBSOLETE break;
+// OBSOLETE case dst_ln_ln_off:
+// OBSOLETE /* statement escape, stmt # = next byte */
+// OBSOLETE size = 2;
+// OBSOLETE break;
+// OBSOLETE case dst_ln_entry:
+// OBSOLETE /* entry escape, next byte is entry number */
+// OBSOLETE size = 2;
+// OBSOLETE break;
+// OBSOLETE case dst_ln_exit:
+// OBSOLETE /* exit escape */
+// OBSOLETE size = 1;
+// OBSOLETE break;
+// OBSOLETE case dst_ln_stmt_end:
+// OBSOLETE /* gap escape, 4 bytes pc delta */
+// OBSOLETE size = 5;
+// OBSOLETE /* last_pc += 2 * (*(long *) (*buffer + 1)); */
+// OBSOLETE /* Apparently this isn't supposed to actually modify
+// OBSOLETE * the pc value. Totally weird.
+// OBSOLETE */
+// OBSOLETE break;
+// OBSOLETE case dst_ln_escape_11:
+// OBSOLETE case dst_ln_escape_12:
+// OBSOLETE case dst_ln_escape_13:
+// OBSOLETE size = 1;
+// OBSOLETE break;
+// OBSOLETE case dst_ln_nxt_byte:
+// OBSOLETE /* This shouldn't happen. If it does, we're SOL */
+// OBSOLETE return 0;
+// OBSOLETE break;
+// OBSOLETE case dst_ln_end:
+// OBSOLETE /* end escape, final entry follows */
+// OBSOLETE return 0;
+// OBSOLETE }
+// OBSOLETE *buffer += (size < 0) ? -size : size;
+// OBSOLETE entry = (dst_ln_entry_ptr_t) * buffer;
+// OBSOLETE }
+// OBSOLETE last_line += dst_ln_ln_delta (*entry);
+// OBSOLETE last_pc += entry->delta.pc_delta * 2;
+// OBSOLETE (*buffer)++;
+// OBSOLETE dst_record_line (last_line, last_pc);
+// OBSOLETE return 1;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE enter_all_lines (char *buffer, long address)
+// OBSOLETE {
+// OBSOLETE if (buffer)
+// OBSOLETE while (get_dst_line (&buffer, &address));
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static int
+// OBSOLETE get_dst_entry (char *buffer, dst_rec_ptr_t *ret_entry)
+// OBSOLETE {
+// OBSOLETE int size;
+// OBSOLETE dst_rec_ptr_t entry;
+// OBSOLETE static int last_type;
+// OBSOLETE int ar_size;
+// OBSOLETE static unsigned lu3;
+// OBSOLETE
+// OBSOLETE entry = (dst_rec_ptr_t) buffer;
+// OBSOLETE switch (entry->rec_type)
+// OBSOLETE {
+// OBSOLETE case dst_typ_pad:
+// OBSOLETE size = 0;
+// OBSOLETE break;
+// OBSOLETE case dst_typ_comp_unit:
+// OBSOLETE size = sizeof (DST_comp_unit (entry));
+// OBSOLETE break;
+// OBSOLETE case dst_typ_section_tab:
+// OBSOLETE size = sizeof (DST_section_tab (entry))
+// OBSOLETE + ((int) DST_section_tab (entry).number_of_sections
+// OBSOLETE - dst_dummy_array_size) * sizeof (long);
+// OBSOLETE break;
+// OBSOLETE case dst_typ_file_tab:
+// OBSOLETE size = sizeof (DST_file_tab (entry))
+// OBSOLETE + ((int) DST_file_tab (entry).number_of_files
+// OBSOLETE - dst_dummy_array_size) * sizeof (dst_file_desc_t);
+// OBSOLETE break;
+// OBSOLETE case dst_typ_block:
+// OBSOLETE size = sizeof (DST_block (entry))
+// OBSOLETE + ((int) DST_block (entry).n_of_code_ranges
+// OBSOLETE - dst_dummy_array_size) * sizeof (dst_code_range_t);
+// OBSOLETE break;
+// OBSOLETE case dst_typ_5:
+// OBSOLETE size = -1;
+// OBSOLETE break;
+// OBSOLETE case dst_typ_var:
+// OBSOLETE size = sizeof (DST_var (entry)) -
+// OBSOLETE sizeof (dst_var_loc_long_t) * dst_dummy_array_size +
+// OBSOLETE DST_var (entry).no_of_locs *
+// OBSOLETE (DST_var (entry).short_locs ?
+// OBSOLETE sizeof (dst_var_loc_short_t) :
+// OBSOLETE sizeof (dst_var_loc_long_t));
+// OBSOLETE break;
+// OBSOLETE case dst_typ_pointer:
+// OBSOLETE size = sizeof (DST_pointer (entry));
+// OBSOLETE break;
+// OBSOLETE case dst_typ_array:
+// OBSOLETE size = sizeof (DST_array (entry));
+// OBSOLETE break;
+// OBSOLETE case dst_typ_subrange:
+// OBSOLETE size = sizeof (DST_subrange (entry));
+// OBSOLETE break;
+// OBSOLETE case dst_typ_set:
+// OBSOLETE size = sizeof (DST_set (entry));
+// OBSOLETE break;
+// OBSOLETE case dst_typ_implicit_enum:
+// OBSOLETE size = sizeof (DST_implicit_enum (entry))
+// OBSOLETE + ((int) DST_implicit_enum (entry).nelems
+// OBSOLETE - dst_dummy_array_size) * sizeof (dst_rel_offset_t);
+// OBSOLETE break;
+// OBSOLETE case dst_typ_explicit_enum:
+// OBSOLETE size = sizeof (DST_explicit_enum (entry))
+// OBSOLETE + ((int) DST_explicit_enum (entry).nelems
+// OBSOLETE - dst_dummy_array_size) * sizeof (dst_enum_elem_t);
+// OBSOLETE break;
+// OBSOLETE case dst_typ_short_rec:
+// OBSOLETE size = sizeof (DST_short_rec (entry))
+// OBSOLETE + DST_short_rec (entry).nfields * sizeof (dst_short_field_t)
+// OBSOLETE - dst_dummy_array_size * sizeof (dst_field_t);
+// OBSOLETE break;
+// OBSOLETE case dst_typ_short_union:
+// OBSOLETE size = sizeof (DST_short_union (entry))
+// OBSOLETE + DST_short_union (entry).nfields * sizeof (dst_short_field_t)
+// OBSOLETE - dst_dummy_array_size * sizeof (dst_field_t);
+// OBSOLETE break;
+// OBSOLETE case dst_typ_file:
+// OBSOLETE size = sizeof (DST_file (entry));
+// OBSOLETE break;
+// OBSOLETE case dst_typ_offset:
+// OBSOLETE size = sizeof (DST_offset (entry));
+// OBSOLETE break;
+// OBSOLETE case dst_typ_alias:
+// OBSOLETE size = sizeof (DST_alias (entry));
+// OBSOLETE break;
+// OBSOLETE case dst_typ_signature:
+// OBSOLETE size = sizeof (DST_signature (entry)) +
+// OBSOLETE ((int) DST_signature (entry).nargs -
+// OBSOLETE dst_dummy_array_size) * sizeof (dst_arg_t);
+// OBSOLETE break;
+// OBSOLETE case dst_typ_21:
+// OBSOLETE size = -1;
+// OBSOLETE break;
+// OBSOLETE case dst_typ_old_label:
+// OBSOLETE size = sizeof (DST_old_label (entry));
+// OBSOLETE break;
+// OBSOLETE case dst_typ_scope:
+// OBSOLETE size = sizeof (DST_scope (entry));
+// OBSOLETE break;
+// OBSOLETE case dst_typ_end_scope:
+// OBSOLETE size = 0;
+// OBSOLETE break;
+// OBSOLETE case dst_typ_25:
+// OBSOLETE case dst_typ_26:
+// OBSOLETE size = -1;
+// OBSOLETE break;
+// OBSOLETE case dst_typ_string_tab:
+// OBSOLETE case dst_typ_global_name_tab:
+// OBSOLETE size = sizeof (DST_string_tab (entry))
+// OBSOLETE + DST_string_tab (entry).length
+// OBSOLETE - dst_dummy_array_size;
+// OBSOLETE break;
+// OBSOLETE case dst_typ_forward:
+// OBSOLETE size = sizeof (DST_forward (entry));
+// OBSOLETE get_dst_entry ((char *) entry + DST_forward (entry).rec_off, &entry);
+// OBSOLETE break;
+// OBSOLETE case dst_typ_aux_size:
+// OBSOLETE size = sizeof (DST_aux_size (entry));
+// OBSOLETE break;
+// OBSOLETE case dst_typ_aux_align:
+// OBSOLETE size = sizeof (DST_aux_align (entry));
+// OBSOLETE break;
+// OBSOLETE case dst_typ_aux_field_size:
+// OBSOLETE size = sizeof (DST_aux_field_size (entry));
+// OBSOLETE break;
+// OBSOLETE case dst_typ_aux_field_off:
+// OBSOLETE size = sizeof (DST_aux_field_off (entry));
+// OBSOLETE break;
+// OBSOLETE case dst_typ_aux_field_align:
+// OBSOLETE size = sizeof (DST_aux_field_align (entry));
+// OBSOLETE break;
+// OBSOLETE case dst_typ_aux_qual:
+// OBSOLETE size = sizeof (DST_aux_qual (entry));
+// OBSOLETE break;
+// OBSOLETE case dst_typ_aux_var_bound:
+// OBSOLETE size = sizeof (DST_aux_var_bound (entry));
+// OBSOLETE break;
+// OBSOLETE case dst_typ_extension:
+// OBSOLETE size = DST_extension (entry).rec_size;
+// OBSOLETE break;
+// OBSOLETE case dst_typ_string:
+// OBSOLETE size = sizeof (DST_string (entry));
+// OBSOLETE break;
+// OBSOLETE case dst_typ_old_entry:
+// OBSOLETE size = 48; /* Obsolete entry type */
+// OBSOLETE break;
+// OBSOLETE case dst_typ_const:
+// OBSOLETE size = sizeof (DST_const (entry))
+// OBSOLETE + DST_const (entry).value.length
+// OBSOLETE - sizeof (DST_const (entry).value.val);
+// OBSOLETE break;
+// OBSOLETE case dst_typ_reference:
+// OBSOLETE size = sizeof (DST_reference (entry));
+// OBSOLETE break;
+// OBSOLETE case dst_typ_old_record:
+// OBSOLETE case dst_typ_old_union:
+// OBSOLETE case dst_typ_record:
+// OBSOLETE case dst_typ_union:
+// OBSOLETE size = sizeof (DST_record (entry))
+// OBSOLETE + ((int) DST_record (entry).nfields
+// OBSOLETE - dst_dummy_array_size) * sizeof (dst_field_t);
+// OBSOLETE break;
+// OBSOLETE case dst_typ_aux_type_deriv:
+// OBSOLETE size = sizeof (DST_aux_type_deriv (entry));
+// OBSOLETE break;
+// OBSOLETE case dst_typ_locpool:
+// OBSOLETE size = sizeof (DST_locpool (entry))
+// OBSOLETE + ((int) DST_locpool (entry).length -
+// OBSOLETE dst_dummy_array_size);
+// OBSOLETE break;
+// OBSOLETE case dst_typ_variable:
+// OBSOLETE size = sizeof (DST_variable (entry));
+// OBSOLETE break;
+// OBSOLETE case dst_typ_label:
+// OBSOLETE size = sizeof (DST_label (entry));
+// OBSOLETE break;
+// OBSOLETE case dst_typ_entry:
+// OBSOLETE size = sizeof (DST_entry (entry));
+// OBSOLETE break;
+// OBSOLETE case dst_typ_aux_lifetime:
+// OBSOLETE size = sizeof (DST_aux_lifetime (entry));
+// OBSOLETE break;
+// OBSOLETE case dst_typ_aux_ptr_base:
+// OBSOLETE size = sizeof (DST_aux_ptr_base (entry));
+// OBSOLETE break;
+// OBSOLETE case dst_typ_aux_src_range:
+// OBSOLETE size = sizeof (DST_aux_src_range (entry));
+// OBSOLETE break;
+// OBSOLETE case dst_typ_aux_reg_val:
+// OBSOLETE size = sizeof (DST_aux_reg_val (entry));
+// OBSOLETE break;
+// OBSOLETE case dst_typ_aux_unit_names:
+// OBSOLETE size = sizeof (DST_aux_unit_names (entry))
+// OBSOLETE + ((int) DST_aux_unit_names (entry).number_of_names
+// OBSOLETE - dst_dummy_array_size) * sizeof (dst_rel_offset_t);
+// OBSOLETE break;
+// OBSOLETE case dst_typ_aux_sect_info:
+// OBSOLETE size = sizeof (DST_aux_sect_info (entry))
+// OBSOLETE + ((int) DST_aux_sect_info (entry).number_of_refs
+// OBSOLETE - dst_dummy_array_size) * sizeof (dst_sect_ref_t);
+// OBSOLETE break;
+// OBSOLETE default:
+// OBSOLETE size = -1;
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE if (size == -1)
+// OBSOLETE {
+// OBSOLETE fprintf_unfiltered (gdb_stderr, "Warning: unexpected DST entry type (%d) found\nLast valid entry was of type: %d\n",
+// OBSOLETE (int) entry->rec_type,
+// OBSOLETE last_type);
+// OBSOLETE fprintf_unfiltered (gdb_stderr, "Last unknown_3 value: %d\n", lu3);
+// OBSOLETE size = 0;
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE last_type = entry->rec_type;
+// OBSOLETE if (size & 1) /* Align on a word boundary */
+// OBSOLETE size++;
+// OBSOLETE size += 2;
+// OBSOLETE *ret_entry = entry;
+// OBSOLETE return size;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static int
+// OBSOLETE next_dst_entry (char **buffer, dst_rec_ptr_t *entry, dst_sec *table)
+// OBSOLETE {
+// OBSOLETE if (*buffer - table->buffer >= table->size)
+// OBSOLETE {
+// OBSOLETE *entry = NULL;
+// OBSOLETE return 0;
+// OBSOLETE }
+// OBSOLETE *buffer += get_dst_entry (*buffer, entry);
+// OBSOLETE return 1;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE #define NEXT_BLK(a, b) next_dst_entry(a, b, &blocks_info)
+// OBSOLETE #define NEXT_SYM(a, b) next_dst_entry(a, b, &symbols_info)
+// OBSOLETE #define DST_OFFSET(a, b) ((char *) (a) + (b))
+// OBSOLETE
+// OBSOLETE static dst_rec_ptr_t section_table = NULL;
+// OBSOLETE
+// OBSOLETE char *
+// OBSOLETE get_sec_ref (dst_sect_ref_t *ref)
+// OBSOLETE {
+// OBSOLETE dst_sec *section = NULL;
+// OBSOLETE long offset;
+// OBSOLETE
+// OBSOLETE if (!section_table || !ref->sect_index)
+// OBSOLETE return NULL;
+// OBSOLETE offset = DST_section_tab (section_table).section_base[ref->sect_index - 1]
+// OBSOLETE + ref->sect_offset;
+// OBSOLETE if (offset >= blocks_info.base &&
+// OBSOLETE offset < blocks_info.base + blocks_info.size)
+// OBSOLETE section = &blocks_info;
+// OBSOLETE else if (offset >= symbols_info.base &&
+// OBSOLETE offset < symbols_info.base + symbols_info.size)
+// OBSOLETE section = &symbols_info;
+// OBSOLETE else if (offset >= lines_info.base &&
+// OBSOLETE offset < lines_info.base + lines_info.size)
+// OBSOLETE section = &lines_info;
+// OBSOLETE if (!section)
+// OBSOLETE return NULL;
+// OBSOLETE return section->buffer + (offset - section->base);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE CORE_ADDR
+// OBSOLETE dst_get_addr (int section, long offset)
+// OBSOLETE {
+// OBSOLETE if (!section_table || !section)
+// OBSOLETE return 0;
+// OBSOLETE return DST_section_tab (section_table).section_base[section - 1] + offset;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE CORE_ADDR
+// OBSOLETE dst_sym_addr (dst_sect_ref_t *ref)
+// OBSOLETE {
+// OBSOLETE if (!section_table || !ref->sect_index)
+// OBSOLETE return 0;
+// OBSOLETE return DST_section_tab (section_table).section_base[ref->sect_index - 1]
+// OBSOLETE + ref->sect_offset;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static struct symbol *
+// OBSOLETE create_new_symbol (struct objfile *objfile, char *name)
+// OBSOLETE {
+// OBSOLETE struct symbol *sym = (struct symbol *)
+// OBSOLETE obstack_alloc (&objfile->symbol_obstack, sizeof (struct symbol));
+// OBSOLETE memset (sym, 0, sizeof (struct symbol));
+// OBSOLETE SYMBOL_NAME (sym) = obsavestring (name, strlen (name),
+// OBSOLETE &objfile->symbol_obstack);
+// OBSOLETE SYMBOL_VALUE (sym) = 0;
+// OBSOLETE SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
+// OBSOLETE
+// OBSOLETE SYMBOL_CLASS (sym) = LOC_BLOCK;
+// OBSOLETE return sym;
+// OBSOLETE };
+// OBSOLETE
+// OBSOLETE static struct type *decode_dst_type (struct objfile *, dst_rec_ptr_t);
+// OBSOLETE
+// OBSOLETE static struct type *
+// OBSOLETE decode_type_desc (struct objfile *objfile, dst_type_t *type_desc,
+// OBSOLETE dst_rec_ptr_t base)
+// OBSOLETE {
+// OBSOLETE struct type *type;
+// OBSOLETE dst_rec_ptr_t entry;
+// OBSOLETE if (type_desc->std_type.user_defined_type)
+// OBSOLETE {
+// OBSOLETE entry = (dst_rec_ptr_t) DST_OFFSET (base,
+// OBSOLETE dst_user_type_offset (*type_desc));
+// OBSOLETE type = decode_dst_type (objfile, entry);
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE switch (type_desc->std_type.dtc)
+// OBSOLETE {
+// OBSOLETE case dst_int8_type:
+// OBSOLETE type = builtin_type_signed_char;
+// OBSOLETE break;
+// OBSOLETE case dst_int16_type:
+// OBSOLETE type = builtin_type_short;
+// OBSOLETE break;
+// OBSOLETE case dst_int32_type:
+// OBSOLETE type = builtin_type_long;
+// OBSOLETE break;
+// OBSOLETE case dst_uint8_type:
+// OBSOLETE type = builtin_type_unsigned_char;
+// OBSOLETE break;
+// OBSOLETE case dst_uint16_type:
+// OBSOLETE type = builtin_type_unsigned_short;
+// OBSOLETE break;
+// OBSOLETE case dst_uint32_type:
+// OBSOLETE type = builtin_type_unsigned_long;
+// OBSOLETE break;
+// OBSOLETE case dst_real32_type:
+// OBSOLETE type = builtin_type_float;
+// OBSOLETE break;
+// OBSOLETE case dst_real64_type:
+// OBSOLETE type = builtin_type_double;
+// OBSOLETE break;
+// OBSOLETE case dst_complex_type:
+// OBSOLETE type = builtin_type_complex;
+// OBSOLETE break;
+// OBSOLETE case dst_dcomplex_type:
+// OBSOLETE type = builtin_type_double_complex;
+// OBSOLETE break;
+// OBSOLETE case dst_bool8_type:
+// OBSOLETE type = builtin_type_char;
+// OBSOLETE break;
+// OBSOLETE case dst_bool16_type:
+// OBSOLETE type = builtin_type_short;
+// OBSOLETE break;
+// OBSOLETE case dst_bool32_type:
+// OBSOLETE type = builtin_type_long;
+// OBSOLETE break;
+// OBSOLETE case dst_char_type:
+// OBSOLETE type = builtin_type_char;
+// OBSOLETE break;
+// OBSOLETE /* The next few are more complex. I will take care
+// OBSOLETE * of them properly at a later point.
+// OBSOLETE */
+// OBSOLETE case dst_string_type:
+// OBSOLETE type = builtin_type_void;
+// OBSOLETE break;
+// OBSOLETE case dst_ptr_type:
+// OBSOLETE type = builtin_type_void;
+// OBSOLETE break;
+// OBSOLETE case dst_set_type:
+// OBSOLETE type = builtin_type_void;
+// OBSOLETE break;
+// OBSOLETE case dst_proc_type:
+// OBSOLETE type = builtin_type_void;
+// OBSOLETE break;
+// OBSOLETE case dst_func_type:
+// OBSOLETE type = builtin_type_void;
+// OBSOLETE break;
+// OBSOLETE /* Back tto some ordinary ones */
+// OBSOLETE case dst_void_type:
+// OBSOLETE type = builtin_type_void;
+// OBSOLETE break;
+// OBSOLETE case dst_uchar_type:
+// OBSOLETE type = builtin_type_unsigned_char;
+// OBSOLETE break;
+// OBSOLETE default:
+// OBSOLETE type = builtin_type_void;
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE return type;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE struct structure_list
+// OBSOLETE {
+// OBSOLETE struct structure_list *next;
+// OBSOLETE struct type *type;
+// OBSOLETE };
+// OBSOLETE
+// OBSOLETE static struct structure_list *struct_list = NULL;
+// OBSOLETE
+// OBSOLETE static struct type *
+// OBSOLETE find_dst_structure (char *name)
+// OBSOLETE {
+// OBSOLETE struct structure_list *element;
+// OBSOLETE
+// OBSOLETE for (element = struct_list; element; element = element->next)
+// OBSOLETE if (!strcmp (name, TYPE_NAME (element->type)))
+// OBSOLETE return element->type;
+// OBSOLETE return NULL;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE static struct type *
+// OBSOLETE decode_dst_structure (struct objfile *objfile, dst_rec_ptr_t entry, int code,
+// OBSOLETE int version)
+// OBSOLETE {
+// OBSOLETE struct type *type, *child_type;
+// OBSOLETE char *struct_name;
+// OBSOLETE char *name, *field_name;
+// OBSOLETE int i;
+// OBSOLETE int fieldoffset, fieldsize;
+// OBSOLETE dst_type_t type_desc;
+// OBSOLETE struct structure_list *element;
+// OBSOLETE
+// OBSOLETE struct_name = DST_OFFSET (entry, DST_record (entry).noffset);
+// OBSOLETE name = concat ((code == TYPE_CODE_UNION) ? "union " : "struct ",
+// OBSOLETE struct_name, NULL);
+// OBSOLETE type = find_dst_structure (name);
+// OBSOLETE if (type)
+// OBSOLETE {
+// OBSOLETE xfree (name);
+// OBSOLETE return type;
+// OBSOLETE }
+// OBSOLETE type = alloc_type (objfile);
+// OBSOLETE TYPE_NAME (type) = obstack_copy0 (&objfile->symbol_obstack,
+// OBSOLETE name, strlen (name));
+// OBSOLETE xfree (name);
+// OBSOLETE TYPE_CODE (type) = code;
+// OBSOLETE TYPE_LENGTH (type) = DST_record (entry).size;
+// OBSOLETE TYPE_NFIELDS (type) = DST_record (entry).nfields;
+// OBSOLETE TYPE_FIELDS (type) = (struct field *)
+// OBSOLETE obstack_alloc (&objfile->symbol_obstack, sizeof (struct field) *
+// OBSOLETE DST_record (entry).nfields);
+// OBSOLETE fieldoffset = fieldsize = 0;
+// OBSOLETE INIT_CPLUS_SPECIFIC (type);
+// OBSOLETE element = (struct structure_list *)
+// OBSOLETE xmalloc (sizeof (struct structure_list));
+// OBSOLETE element->type = type;
+// OBSOLETE element->next = struct_list;
+// OBSOLETE struct_list = element;
+// OBSOLETE for (i = 0; i < DST_record (entry).nfields; i++)
+// OBSOLETE {
+// OBSOLETE switch (version)
+// OBSOLETE {
+// OBSOLETE case 2:
+// OBSOLETE field_name = DST_OFFSET (entry,
+// OBSOLETE DST_record (entry).f.ofields[i].noffset);
+// OBSOLETE fieldoffset = DST_record (entry).f.ofields[i].foffset * 8 +
+// OBSOLETE DST_record (entry).f.ofields[i].bit_offset;
+// OBSOLETE fieldsize = DST_record (entry).f.ofields[i].size;
+// OBSOLETE type_desc = DST_record (entry).f.ofields[i].type_desc;
+// OBSOLETE break;
+// OBSOLETE case 1:
+// OBSOLETE field_name = DST_OFFSET (entry,
+// OBSOLETE DST_record (entry).f.fields[i].noffset);
+// OBSOLETE type_desc = DST_record (entry).f.fields[i].type_desc;
+// OBSOLETE switch (DST_record (entry).f.fields[i].f.field_loc.format_tag)
+// OBSOLETE {
+// OBSOLETE case dst_field_byte:
+// OBSOLETE fieldoffset = DST_record (entry).f.
+// OBSOLETE fields[i].f.field_byte.offset * 8;
+// OBSOLETE fieldsize = -1;
+// OBSOLETE break;
+// OBSOLETE case dst_field_bit:
+// OBSOLETE fieldoffset = DST_record (entry).f.
+// OBSOLETE fields[i].f.field_bit.byte_offset * 8 +
+// OBSOLETE DST_record (entry).f.
+// OBSOLETE fields[i].f.field_bit.bit_offset;
+// OBSOLETE fieldsize = DST_record (entry).f.
+// OBSOLETE fields[i].f.field_bit.nbits;
+// OBSOLETE break;
+// OBSOLETE case dst_field_loc:
+// OBSOLETE fieldoffset += fieldsize;
+// OBSOLETE fieldsize = -1;
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE break;
+// OBSOLETE case 0:
+// OBSOLETE field_name = DST_OFFSET (entry,
+// OBSOLETE DST_record (entry).f.sfields[i].noffset);
+// OBSOLETE fieldoffset = DST_record (entry).f.sfields[i].foffset;
+// OBSOLETE type_desc = DST_record (entry).f.sfields[i].type_desc;
+// OBSOLETE if (i < DST_record (entry).nfields - 1)
+// OBSOLETE fieldsize = DST_record (entry).f.sfields[i + 1].foffset;
+// OBSOLETE else
+// OBSOLETE fieldsize = DST_record (entry).size;
+// OBSOLETE fieldsize -= fieldoffset;
+// OBSOLETE fieldoffset *= 8;
+// OBSOLETE fieldsize *= 8;
+// OBSOLETE }
+// OBSOLETE TYPE_FIELDS (type)[i].name =
+// OBSOLETE obstack_copy0 (&objfile->symbol_obstack,
+// OBSOLETE field_name, strlen (field_name));
+// OBSOLETE TYPE_FIELDS (type)[i].type = decode_type_desc (objfile,
+// OBSOLETE &type_desc,
+// OBSOLETE entry);
+// OBSOLETE if (fieldsize == -1)
+// OBSOLETE fieldsize = TYPE_LENGTH (TYPE_FIELDS (type)[i].type) *
+// OBSOLETE 8;
+// OBSOLETE TYPE_FIELDS (type)[i].bitsize = fieldsize;
+// OBSOLETE TYPE_FIELDS (type)[i].bitpos = fieldoffset;
+// OBSOLETE }
+// OBSOLETE return type;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static struct type *
+// OBSOLETE decode_dst_type (struct objfile *objfile, dst_rec_ptr_t entry)
+// OBSOLETE {
+// OBSOLETE struct type *child_type, *type, *range_type, *index_type;
+// OBSOLETE
+// OBSOLETE switch (entry->rec_type)
+// OBSOLETE {
+// OBSOLETE case dst_typ_var:
+// OBSOLETE return decode_type_desc (objfile,
+// OBSOLETE &DST_var (entry).type_desc,
+// OBSOLETE entry);
+// OBSOLETE break;
+// OBSOLETE case dst_typ_variable:
+// OBSOLETE return decode_type_desc (objfile,
+// OBSOLETE &DST_variable (entry).type_desc,
+// OBSOLETE entry);
+// OBSOLETE break;
+// OBSOLETE case dst_typ_short_rec:
+// OBSOLETE return decode_dst_structure (objfile, entry, TYPE_CODE_STRUCT, 0);
+// OBSOLETE case dst_typ_short_union:
+// OBSOLETE return decode_dst_structure (objfile, entry, TYPE_CODE_UNION, 0);
+// OBSOLETE case dst_typ_union:
+// OBSOLETE return decode_dst_structure (objfile, entry, TYPE_CODE_UNION, 1);
+// OBSOLETE case dst_typ_record:
+// OBSOLETE return decode_dst_structure (objfile, entry, TYPE_CODE_STRUCT, 1);
+// OBSOLETE case dst_typ_old_union:
+// OBSOLETE return decode_dst_structure (objfile, entry, TYPE_CODE_UNION, 2);
+// OBSOLETE case dst_typ_old_record:
+// OBSOLETE return decode_dst_structure (objfile, entry, TYPE_CODE_STRUCT, 2);
+// OBSOLETE case dst_typ_pointer:
+// OBSOLETE return make_pointer_type (
+// OBSOLETE decode_type_desc (objfile,
+// OBSOLETE &DST_pointer (entry).type_desc,
+// OBSOLETE entry),
+// OBSOLETE NULL);
+// OBSOLETE case dst_typ_array:
+// OBSOLETE child_type = decode_type_desc (objfile,
+// OBSOLETE &DST_pointer (entry).type_desc,
+// OBSOLETE entry);
+// OBSOLETE index_type = lookup_fundamental_type (objfile,
+// OBSOLETE FT_INTEGER);
+// OBSOLETE range_type = create_range_type ((struct type *) NULL,
+// OBSOLETE index_type, DST_array (entry).lo_bound,
+// OBSOLETE DST_array (entry).hi_bound);
+// OBSOLETE return create_array_type ((struct type *) NULL, child_type,
+// OBSOLETE range_type);
+// OBSOLETE case dst_typ_alias:
+// OBSOLETE return decode_type_desc (objfile,
+// OBSOLETE &DST_alias (entry).type_desc,
+// OBSOLETE entry);
+// OBSOLETE default:
+// OBSOLETE return builtin_type_int;
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE struct symbol_list
+// OBSOLETE {
+// OBSOLETE struct symbol_list *next;
+// OBSOLETE struct symbol *symbol;
+// OBSOLETE };
+// OBSOLETE
+// OBSOLETE static struct symbol_list *dst_global_symbols = NULL;
+// OBSOLETE static int total_globals = 0;
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE decode_dst_locstring (char *locstr, struct symbol *sym)
+// OBSOLETE {
+// OBSOLETE dst_loc_entry_t *entry, *next_entry;
+// OBSOLETE CORE_ADDR temp;
+// OBSOLETE int count = 0;
+// OBSOLETE
+// OBSOLETE while (1)
+// OBSOLETE {
+// OBSOLETE if (count++ == 100)
+// OBSOLETE {
+// OBSOLETE fprintf_unfiltered (gdb_stderr, "Error reading locstring\n");
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE entry = (dst_loc_entry_t *) locstr;
+// OBSOLETE next_entry = (dst_loc_entry_t *) (locstr + 1);
+// OBSOLETE switch (entry->header.code)
+// OBSOLETE {
+// OBSOLETE case dst_lsc_end: /* End of string */
+// OBSOLETE return;
+// OBSOLETE case dst_lsc_indirect: /* Indirect through previous. Arg == 6 */
+// OBSOLETE /* Or register ax x == arg */
+// OBSOLETE if (entry->header.arg < 6)
+// OBSOLETE {
+// OBSOLETE SYMBOL_CLASS (sym) = LOC_REGISTER;
+// OBSOLETE SYMBOL_VALUE (sym) = entry->header.arg + 8;
+// OBSOLETE }
+// OBSOLETE /* We predict indirects */
+// OBSOLETE locstr++;
+// OBSOLETE break;
+// OBSOLETE case dst_lsc_dreg:
+// OBSOLETE SYMBOL_CLASS (sym) = LOC_REGISTER;
+// OBSOLETE SYMBOL_VALUE (sym) = entry->header.arg;
+// OBSOLETE locstr++;
+// OBSOLETE break;
+// OBSOLETE case dst_lsc_section: /* Section (arg+1) */
+// OBSOLETE SYMBOL_VALUE (sym) = dst_get_addr (entry->header.arg + 1, 0);
+// OBSOLETE locstr++;
+// OBSOLETE break;
+// OBSOLETE case dst_lsc_sec_byte: /* Section (next_byte+1) */
+// OBSOLETE SYMBOL_VALUE (sym) = dst_get_addr (locstr[1] + 1, 0);
+// OBSOLETE locstr += 2;
+// OBSOLETE break;
+// OBSOLETE case dst_lsc_add: /* Add (arg+1)*2 */
+// OBSOLETE case dst_lsc_sub: /* Subtract (arg+1)*2 */
+// OBSOLETE temp = (entry->header.arg + 1) * 2;
+// OBSOLETE locstr++;
+// OBSOLETE if (*locstr == dst_multiply_256)
+// OBSOLETE {
+// OBSOLETE temp <<= 8;
+// OBSOLETE locstr++;
+// OBSOLETE }
+// OBSOLETE switch (entry->header.code)
+// OBSOLETE {
+// OBSOLETE case dst_lsc_add:
+// OBSOLETE if (SYMBOL_CLASS (sym) == LOC_LOCAL)
+// OBSOLETE SYMBOL_CLASS (sym) = LOC_ARG;
+// OBSOLETE SYMBOL_VALUE (sym) += temp;
+// OBSOLETE break;
+// OBSOLETE case dst_lsc_sub:
+// OBSOLETE SYMBOL_VALUE (sym) -= temp;
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE break;
+// OBSOLETE case dst_lsc_add_byte:
+// OBSOLETE case dst_lsc_sub_byte:
+// OBSOLETE switch (entry->header.arg & 0x03)
+// OBSOLETE {
+// OBSOLETE case 1:
+// OBSOLETE temp = (unsigned char) locstr[1];
+// OBSOLETE locstr += 2;
+// OBSOLETE break;
+// OBSOLETE case 2:
+// OBSOLETE temp = *(unsigned short *) (locstr + 1);
+// OBSOLETE locstr += 3;
+// OBSOLETE break;
+// OBSOLETE case 3:
+// OBSOLETE temp = *(unsigned long *) (locstr + 1);
+// OBSOLETE locstr += 5;
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE if (*locstr == dst_multiply_256)
+// OBSOLETE {
+// OBSOLETE temp <<= 8;
+// OBSOLETE locstr++;
+// OBSOLETE }
+// OBSOLETE switch (entry->header.code)
+// OBSOLETE {
+// OBSOLETE case dst_lsc_add_byte:
+// OBSOLETE if (SYMBOL_CLASS (sym) == LOC_LOCAL)
+// OBSOLETE SYMBOL_CLASS (sym) = LOC_ARG;
+// OBSOLETE SYMBOL_VALUE (sym) += temp;
+// OBSOLETE break;
+// OBSOLETE case dst_lsc_sub_byte:
+// OBSOLETE SYMBOL_VALUE (sym) -= temp;
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE break;
+// OBSOLETE case dst_lsc_sbreg: /* Stack base register (frame pointer). Arg==0 */
+// OBSOLETE if (next_entry->header.code != dst_lsc_indirect)
+// OBSOLETE {
+// OBSOLETE SYMBOL_VALUE (sym) = 0;
+// OBSOLETE SYMBOL_CLASS (sym) = LOC_STATIC;
+// OBSOLETE return;
+// OBSOLETE }
+// OBSOLETE SYMBOL_VALUE (sym) = 0;
+// OBSOLETE SYMBOL_CLASS (sym) = LOC_LOCAL;
+// OBSOLETE locstr++;
+// OBSOLETE break;
+// OBSOLETE default:
+// OBSOLETE SYMBOL_VALUE (sym) = 0;
+// OBSOLETE SYMBOL_CLASS (sym) = LOC_STATIC;
+// OBSOLETE return;
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static struct symbol_list *
+// OBSOLETE process_dst_symbols (struct objfile *objfile, dst_rec_ptr_t entry, char *name,
+// OBSOLETE int *nsyms_ret)
+// OBSOLETE {
+// OBSOLETE struct symbol_list *list = NULL, *element;
+// OBSOLETE struct symbol *sym;
+// OBSOLETE char *symname;
+// OBSOLETE int nsyms = 0;
+// OBSOLETE char *location;
+// OBSOLETE long line;
+// OBSOLETE dst_type_t symtype;
+// OBSOLETE struct type *type;
+// OBSOLETE dst_var_attr_t attr;
+// OBSOLETE dst_var_loc_t loc_type;
+// OBSOLETE unsigned loc_index;
+// OBSOLETE long loc_value;
+// OBSOLETE
+// OBSOLETE if (!entry)
+// OBSOLETE {
+// OBSOLETE *nsyms_ret = 0;
+// OBSOLETE return NULL;
+// OBSOLETE }
+// OBSOLETE location = (char *) entry;
+// OBSOLETE while (NEXT_SYM (&location, &entry) &&
+// OBSOLETE entry->rec_type != dst_typ_end_scope)
+// OBSOLETE {
+// OBSOLETE if (entry->rec_type == dst_typ_var)
+// OBSOLETE {
+// OBSOLETE if (DST_var (entry).short_locs)
+// OBSOLETE {
+// OBSOLETE loc_type = DST_var (entry).locs.shorts[0].loc_type;
+// OBSOLETE loc_index = DST_var (entry).locs.shorts[0].loc_index;
+// OBSOLETE loc_value = DST_var (entry).locs.shorts[0].location;
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE loc_type = DST_var (entry).locs.longs[0].loc_type;
+// OBSOLETE loc_index = DST_var (entry).locs.longs[0].loc_index;
+// OBSOLETE loc_value = DST_var (entry).locs.longs[0].location;
+// OBSOLETE }
+// OBSOLETE if (loc_type == dst_var_loc_external)
+// OBSOLETE continue;
+// OBSOLETE symname = DST_OFFSET (entry, DST_var (entry).noffset);
+// OBSOLETE line = DST_var (entry).src_loc.line_number;
+// OBSOLETE symtype = DST_var (entry).type_desc;
+// OBSOLETE attr = DST_var (entry).attributes;
+// OBSOLETE }
+// OBSOLETE else if (entry->rec_type == dst_typ_variable)
+// OBSOLETE {
+// OBSOLETE symname = DST_OFFSET (entry,
+// OBSOLETE DST_variable (entry).noffset);
+// OBSOLETE line = DST_variable (entry).src_loc.line_number;
+// OBSOLETE symtype = DST_variable (entry).type_desc;
+// OBSOLETE attr = DST_variable (entry).attributes;
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE continue;
+// OBSOLETE }
+// OBSOLETE if (symname && name && !strcmp (symname, name))
+// OBSOLETE /* It's the function return value */
+// OBSOLETE continue;
+// OBSOLETE sym = create_new_symbol (objfile, symname);
+// OBSOLETE
+// OBSOLETE if ((attr & (1 << dst_var_attr_global)) ||
+// OBSOLETE (attr & (1 << dst_var_attr_static)))
+// OBSOLETE SYMBOL_CLASS (sym) = LOC_STATIC;
+// OBSOLETE else
+// OBSOLETE SYMBOL_CLASS (sym) = LOC_LOCAL;
+// OBSOLETE SYMBOL_LINE (sym) = line;
+// OBSOLETE SYMBOL_TYPE (sym) = decode_type_desc (objfile, &symtype,
+// OBSOLETE entry);
+// OBSOLETE SYMBOL_VALUE (sym) = 0;
+// OBSOLETE switch (entry->rec_type)
+// OBSOLETE {
+// OBSOLETE case dst_typ_var:
+// OBSOLETE switch (loc_type)
+// OBSOLETE {
+// OBSOLETE case dst_var_loc_abs:
+// OBSOLETE SYMBOL_VALUE_ADDRESS (sym) = loc_value;
+// OBSOLETE break;
+// OBSOLETE case dst_var_loc_sect_off:
+// OBSOLETE case dst_var_loc_ind_sect_off: /* What is this? */
+// OBSOLETE SYMBOL_VALUE_ADDRESS (sym) = dst_get_addr (
+// OBSOLETE loc_index,
+// OBSOLETE loc_value);
+// OBSOLETE break;
+// OBSOLETE case dst_var_loc_ind_reg_rel: /* What is this? */
+// OBSOLETE case dst_var_loc_reg_rel:
+// OBSOLETE /* If it isn't fp relative, specify the
+// OBSOLETE * register it's relative to.
+// OBSOLETE */
+// OBSOLETE if (loc_index)
+// OBSOLETE {
+// OBSOLETE sym->aux_value.basereg = loc_index;
+// OBSOLETE }
+// OBSOLETE SYMBOL_VALUE (sym) = loc_value;
+// OBSOLETE if (loc_value > 0 &&
+// OBSOLETE SYMBOL_CLASS (sym) == LOC_BASEREG)
+// OBSOLETE SYMBOL_CLASS (sym) = LOC_BASEREG_ARG;
+// OBSOLETE break;
+// OBSOLETE case dst_var_loc_reg:
+// OBSOLETE SYMBOL_VALUE (sym) = loc_index;
+// OBSOLETE SYMBOL_CLASS (sym) = LOC_REGISTER;
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE break;
+// OBSOLETE case dst_typ_variable:
+// OBSOLETE /* External variable..... don't try to interpret
+// OBSOLETE * its nonexistant locstring.
+// OBSOLETE */
+// OBSOLETE if (DST_variable (entry).loffset == -1)
+// OBSOLETE continue;
+// OBSOLETE decode_dst_locstring (DST_OFFSET (entry,
+// OBSOLETE DST_variable (entry).loffset),
+// OBSOLETE sym);
+// OBSOLETE }
+// OBSOLETE element = (struct symbol_list *)
+// OBSOLETE xmalloc (sizeof (struct symbol_list));
+// OBSOLETE
+// OBSOLETE if (attr & (1 << dst_var_attr_global))
+// OBSOLETE {
+// OBSOLETE element->next = dst_global_symbols;
+// OBSOLETE dst_global_symbols = element;
+// OBSOLETE total_globals++;
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE element->next = list;
+// OBSOLETE list = element;
+// OBSOLETE nsyms++;
+// OBSOLETE }
+// OBSOLETE element->symbol = sym;
+// OBSOLETE }
+// OBSOLETE *nsyms_ret = nsyms;
+// OBSOLETE return list;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE static struct symbol *
+// OBSOLETE process_dst_function (struct objfile *objfile, dst_rec_ptr_t entry, char *name,
+// OBSOLETE CORE_ADDR address)
+// OBSOLETE {
+// OBSOLETE struct symbol *sym;
+// OBSOLETE struct type *type, *ftype;
+// OBSOLETE dst_rec_ptr_t sym_entry, typ_entry;
+// OBSOLETE char *location;
+// OBSOLETE struct symbol_list *element;
+// OBSOLETE
+// OBSOLETE type = builtin_type_int;
+// OBSOLETE sym = create_new_symbol (objfile, name);
+// OBSOLETE SYMBOL_CLASS (sym) = LOC_BLOCK;
+// OBSOLETE
+// OBSOLETE if (entry)
+// OBSOLETE {
+// OBSOLETE location = (char *) entry;
+// OBSOLETE do
+// OBSOLETE {
+// OBSOLETE NEXT_SYM (&location, &sym_entry);
+// OBSOLETE }
+// OBSOLETE while (sym_entry && sym_entry->rec_type != dst_typ_signature);
+// OBSOLETE
+// OBSOLETE if (sym_entry)
+// OBSOLETE {
+// OBSOLETE SYMBOL_LINE (sym) =
+// OBSOLETE DST_signature (sym_entry).src_loc.line_number;
+// OBSOLETE if (DST_signature (sym_entry).result)
+// OBSOLETE {
+// OBSOLETE typ_entry = (dst_rec_ptr_t)
+// OBSOLETE DST_OFFSET (sym_entry,
+// OBSOLETE DST_signature (sym_entry).result);
+// OBSOLETE type = decode_dst_type (objfile, typ_entry);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE if (!type->function_type)
+// OBSOLETE {
+// OBSOLETE ftype = alloc_type (objfile);
+// OBSOLETE type->function_type = ftype;
+// OBSOLETE TYPE_TARGET_TYPE (ftype) = type;
+// OBSOLETE TYPE_CODE (ftype) = TYPE_CODE_FUNC;
+// OBSOLETE }
+// OBSOLETE SYMBOL_TYPE (sym) = type->function_type;
+// OBSOLETE
+// OBSOLETE /* Now add ourselves to the global symbols list */
+// OBSOLETE element = (struct symbol_list *)
+// OBSOLETE xmalloc (sizeof (struct symbol_list));
+// OBSOLETE
+// OBSOLETE element->next = dst_global_symbols;
+// OBSOLETE dst_global_symbols = element;
+// OBSOLETE total_globals++;
+// OBSOLETE element->symbol = sym;
+// OBSOLETE
+// OBSOLETE return sym;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static struct block *
+// OBSOLETE process_dst_block (struct objfile *objfile, dst_rec_ptr_t entry)
+// OBSOLETE {
+// OBSOLETE struct block *block;
+// OBSOLETE struct symbol *function = NULL;
+// OBSOLETE CORE_ADDR address;
+// OBSOLETE long size;
+// OBSOLETE char *name;
+// OBSOLETE dst_rec_ptr_t child_entry, symbol_entry;
+// OBSOLETE struct block *child_block;
+// OBSOLETE int total_symbols = 0;
+// OBSOLETE char fake_name[20];
+// OBSOLETE static long fake_seq = 0;
+// OBSOLETE struct symbol_list *symlist, *nextsym;
+// OBSOLETE int symnum;
+// OBSOLETE
+// OBSOLETE if (DST_block (entry).noffset)
+// OBSOLETE name = DST_OFFSET (entry, DST_block (entry).noffset);
+// OBSOLETE else
+// OBSOLETE name = NULL;
+// OBSOLETE if (DST_block (entry).n_of_code_ranges)
+// OBSOLETE {
+// OBSOLETE address = dst_sym_addr (
+// OBSOLETE &DST_block (entry).code_ranges[0].code_start);
+// OBSOLETE size = DST_block (entry).code_ranges[0].code_size;
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE address = -1;
+// OBSOLETE size = 0;
+// OBSOLETE }
+// OBSOLETE symbol_entry = (dst_rec_ptr_t) get_sec_ref (&DST_block (entry).symbols_start);
+// OBSOLETE switch (DST_block (entry).block_type)
+// OBSOLETE {
+// OBSOLETE /* These are all really functions. Even the "program" type.
+// OBSOLETE * This is because the Apollo OS was written in Pascal, and
+// OBSOLETE * in Pascal, the main procedure is described as the Program.
+// OBSOLETE * Cute, huh?
+// OBSOLETE */
+// OBSOLETE case dst_block_procedure:
+// OBSOLETE case dst_block_function:
+// OBSOLETE case dst_block_subroutine:
+// OBSOLETE case dst_block_program:
+// OBSOLETE prim_record_minimal_symbol (name, address, mst_text, objfile);
+// OBSOLETE function = process_dst_function (
+// OBSOLETE objfile,
+// OBSOLETE symbol_entry,
+// OBSOLETE name,
+// OBSOLETE address);
+// OBSOLETE enter_all_lines (get_sec_ref (&DST_block (entry).code_ranges[0].lines_start), address);
+// OBSOLETE break;
+// OBSOLETE case dst_block_block_data:
+// OBSOLETE break;
+// OBSOLETE
+// OBSOLETE default:
+// OBSOLETE /* GDB has to call it something, and the module name
+// OBSOLETE * won't cut it
+// OBSOLETE */
+// OBSOLETE sprintf (fake_name, "block_%08lx", fake_seq++);
+// OBSOLETE function = process_dst_function (
+// OBSOLETE objfile, NULL, fake_name, address);
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE symlist = process_dst_symbols (objfile, symbol_entry,
+// OBSOLETE name, &total_symbols);
+// OBSOLETE block = (struct block *)
+// OBSOLETE obstack_alloc (&objfile->symbol_obstack,
+// OBSOLETE sizeof (struct block) +
+// OBSOLETE (total_symbols - 1) * sizeof (struct symbol *));
+// OBSOLETE
+// OBSOLETE symnum = 0;
+// OBSOLETE while (symlist)
+// OBSOLETE {
+// OBSOLETE nextsym = symlist->next;
+// OBSOLETE
+// OBSOLETE block->sym[symnum] = symlist->symbol;
+// OBSOLETE
+// OBSOLETE xfree (symlist);
+// OBSOLETE symlist = nextsym;
+// OBSOLETE symnum++;
+// OBSOLETE }
+// OBSOLETE BLOCK_NSYMS (block) = total_symbols;
+// OBSOLETE BLOCK_HASHTABLE (block) = 0;
+// OBSOLETE BLOCK_START (block) = address;
+// OBSOLETE BLOCK_END (block) = address + size;
+// OBSOLETE BLOCK_SUPERBLOCK (block) = 0;
+// OBSOLETE if (function)
+// OBSOLETE {
+// OBSOLETE SYMBOL_BLOCK_VALUE (function) = block;
+// OBSOLETE BLOCK_FUNCTION (block) = function;
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE BLOCK_FUNCTION (block) = 0;
+// OBSOLETE
+// OBSOLETE if (DST_block (entry).child_block_off)
+// OBSOLETE {
+// OBSOLETE child_entry = (dst_rec_ptr_t) DST_OFFSET (entry,
+// OBSOLETE DST_block (entry).child_block_off);
+// OBSOLETE while (child_entry)
+// OBSOLETE {
+// OBSOLETE child_block = process_dst_block (objfile, child_entry);
+// OBSOLETE if (child_block)
+// OBSOLETE {
+// OBSOLETE if (BLOCK_START (child_block) <
+// OBSOLETE BLOCK_START (block) ||
+// OBSOLETE BLOCK_START (block) == -1)
+// OBSOLETE BLOCK_START (block) =
+// OBSOLETE BLOCK_START (child_block);
+// OBSOLETE if (BLOCK_END (child_block) >
+// OBSOLETE BLOCK_END (block) ||
+// OBSOLETE BLOCK_END (block) == -1)
+// OBSOLETE BLOCK_END (block) =
+// OBSOLETE BLOCK_END (child_block);
+// OBSOLETE BLOCK_SUPERBLOCK (child_block) = block;
+// OBSOLETE }
+// OBSOLETE if (DST_block (child_entry).sibling_block_off)
+// OBSOLETE child_entry = (dst_rec_ptr_t) DST_OFFSET (
+// OBSOLETE child_entry,
+// OBSOLETE DST_block (child_entry).sibling_block_off);
+// OBSOLETE else
+// OBSOLETE child_entry = NULL;
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE record_pending_block (objfile, block, NULL);
+// OBSOLETE return block;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE read_dst_symtab (struct objfile *objfile)
+// OBSOLETE {
+// OBSOLETE char *buffer;
+// OBSOLETE dst_rec_ptr_t entry, file_table, root_block;
+// OBSOLETE char *source_file;
+// OBSOLETE struct block *block, *global_block;
+// OBSOLETE int symnum;
+// OBSOLETE struct symbol_list *nextsym;
+// OBSOLETE int module_num = 0;
+// OBSOLETE struct structure_list *element;
+// OBSOLETE
+// OBSOLETE current_objfile = objfile;
+// OBSOLETE buffer = blocks_info.buffer;
+// OBSOLETE while (NEXT_BLK (&buffer, &entry))
+// OBSOLETE {
+// OBSOLETE if (entry->rec_type == dst_typ_comp_unit)
+// OBSOLETE {
+// OBSOLETE file_table = (dst_rec_ptr_t) DST_OFFSET (entry,
+// OBSOLETE DST_comp_unit (entry).file_table);
+// OBSOLETE section_table = (dst_rec_ptr_t) DST_OFFSET (entry,
+// OBSOLETE DST_comp_unit (entry).section_table);
+// OBSOLETE root_block = (dst_rec_ptr_t) DST_OFFSET (entry,
+// OBSOLETE DST_comp_unit (entry).root_block_offset);
+// OBSOLETE source_file = DST_OFFSET (file_table,
+// OBSOLETE DST_file_tab (file_table).files[0].noffset);
+// OBSOLETE /* Point buffer to the start of the next comp_unit */
+// OBSOLETE buffer = DST_OFFSET (entry,
+// OBSOLETE DST_comp_unit (entry).data_size);
+// OBSOLETE dst_start_symtab ();
+// OBSOLETE
+// OBSOLETE block = process_dst_block (objfile, root_block);
+// OBSOLETE
+// OBSOLETE global_block = (struct block *)
+// OBSOLETE obstack_alloc (&objfile->symbol_obstack,
+// OBSOLETE sizeof (struct block) +
+// OBSOLETE (total_globals - 1) *
+// OBSOLETE sizeof (struct symbol *));
+// OBSOLETE BLOCK_NSYMS (global_block) = total_globals;
+// OBSOLETE BLOCK_HASHTABLE (global_block) = 0;
+// OBSOLETE for (symnum = 0; symnum < total_globals; symnum++)
+// OBSOLETE {
+// OBSOLETE nextsym = dst_global_symbols->next;
+// OBSOLETE
+// OBSOLETE global_block->sym[symnum] =
+// OBSOLETE dst_global_symbols->symbol;
+// OBSOLETE
+// OBSOLETE xfree (dst_global_symbols);
+// OBSOLETE dst_global_symbols = nextsym;
+// OBSOLETE }
+// OBSOLETE dst_global_symbols = NULL;
+// OBSOLETE total_globals = 0;
+// OBSOLETE BLOCK_FUNCTION (global_block) = 0;
+// OBSOLETE BLOCK_START (global_block) = BLOCK_START (block);
+// OBSOLETE BLOCK_END (global_block) = BLOCK_END (block);
+// OBSOLETE BLOCK_SUPERBLOCK (global_block) = 0;
+// OBSOLETE BLOCK_SUPERBLOCK (block) = global_block;
+// OBSOLETE record_pending_block (objfile, global_block, NULL);
+// OBSOLETE
+// OBSOLETE complete_symtab (source_file,
+// OBSOLETE BLOCK_START (block),
+// OBSOLETE BLOCK_END (block) - BLOCK_START (block));
+// OBSOLETE module_num++;
+// OBSOLETE dst_end_symtab (objfile);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (module_num)
+// OBSOLETE prim_record_minimal_symbol ("<end_of_program>",
+// OBSOLETE BLOCK_END (block), mst_text, objfile);
+// OBSOLETE /* One more faked symbol to make sure nothing can ever run off the
+// OBSOLETE * end of the symbol table. This one represents the end of the
+// OBSOLETE * text space. It used to be (CORE_ADDR) -1 (effectively the highest
+// OBSOLETE * int possible), but some parts of gdb treated it as a signed
+// OBSOLETE * number and failed comparisons. We could equally use 7fffffff,
+// OBSOLETE * but no functions are ever mapped to an address higher than
+// OBSOLETE * 40000000
+// OBSOLETE */
+// OBSOLETE prim_record_minimal_symbol ("<end_of_text>",
+// OBSOLETE (CORE_ADDR) 0x40000000,
+// OBSOLETE mst_text, objfile);
+// OBSOLETE while (struct_list)
+// OBSOLETE {
+// OBSOLETE element = struct_list;
+// OBSOLETE struct_list = element->next;
+// OBSOLETE xfree (element);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /* Support for line number handling */
+// OBSOLETE static char *linetab = NULL;
+// OBSOLETE static long linetab_offset;
+// OBSOLETE static unsigned long linetab_size;
+// OBSOLETE
+// OBSOLETE /* Read in all the line numbers for fast lookups later. Leave them in
+// OBSOLETE external (unswapped) format in memory; we'll swap them as we enter
+// OBSOLETE them into GDB's data structures. */
+// OBSOLETE static int
+// OBSOLETE init_one_section (int chan, dst_sec *secinfo)
+// OBSOLETE {
+// OBSOLETE if (secinfo->size == 0
+// OBSOLETE || lseek (chan, secinfo->position, 0) == -1
+// OBSOLETE || (secinfo->buffer = xmalloc (secinfo->size)) == NULL
+// OBSOLETE || myread (chan, secinfo->buffer, secinfo->size) == -1)
+// OBSOLETE return 0;
+// OBSOLETE else
+// OBSOLETE return 1;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static int
+// OBSOLETE init_dst_sections (int chan)
+// OBSOLETE {
+// OBSOLETE
+// OBSOLETE if (!init_one_section (chan, &blocks_info) ||
+// OBSOLETE !init_one_section (chan, &lines_info) ||
+// OBSOLETE !init_one_section (chan, &symbols_info))
+// OBSOLETE return -1;
+// OBSOLETE else
+// OBSOLETE return 0;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Fake up support for relocating symbol addresses. FIXME. */
+// OBSOLETE
+// OBSOLETE struct section_offsets dst_symfile_faker =
+// OBSOLETE {0};
+// OBSOLETE
+// OBSOLETE void
+// OBSOLETE dst_symfile_offsets (struct objfile *objfile, struct section_addr_info *addrs)
+// OBSOLETE {
+// OBSOLETE objfile->num_sections = 1;
+// OBSOLETE objfile->section_offsets = &dst_symfile_faker;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Register our ability to parse symbols for DST BFD files */
+// OBSOLETE
+// OBSOLETE static struct sym_fns dst_sym_fns =
+// OBSOLETE {
+// OBSOLETE /* FIXME: Can this be integrated with coffread.c? If not, should it be
+// OBSOLETE a separate flavour like ecoff? */
+// OBSOLETE (enum bfd_flavour) -2,
+// OBSOLETE
+// OBSOLETE dst_new_init, /* sym_new_init: init anything gbl to entire symtab */
+// OBSOLETE dst_symfile_init, /* sym_init: read initial info, setup for sym_read() */
+// OBSOLETE dst_symfile_read, /* sym_read: read a symbol file into symtab */
+// OBSOLETE dst_symfile_finish, /* sym_finish: finished with file, cleanup */
+// OBSOLETE dst_symfile_offsets, /* sym_offsets: xlate external to internal form */
+// OBSOLETE NULL /* next: pointer to next struct sym_fns */
+// OBSOLETE };
+// OBSOLETE
+// OBSOLETE void
+// OBSOLETE _initialize_dstread (void)
+// OBSOLETE {
+// OBSOLETE add_symtab_fns (&dst_sym_fns);
+// OBSOLETE }