aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1994-11-25 08:06:49 +0000
committerJeff Law <law@redhat.com>1994-11-25 08:06:49 +0000
commit2848f793440a8e9988b1fc682b8f1546af1eaa28 (patch)
tree7c673e55a3ab09631a576463ebbd2fcae37bda6d /gdb
parent8ee0532ba8de5c9f4055959738cbeb7244a3e7f8 (diff)
downloadgdb-2848f793440a8e9988b1fc682b8f1546af1eaa28.zip
gdb-2848f793440a8e9988b1fc682b8f1546af1eaa28.tar.gz
gdb-2848f793440a8e9988b1fc682b8f1546af1eaa28.tar.bz2
* hpread.c: Include hp-symtab.h instead of hpux-symtab.h.
Various name changes to match those used by hp-symtab.h. No longer sanitize away hpread changes. Merge ChangeLog.hpread into ChangeLog and ChangeLog-93.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/.Sanitize15
-rw-r--r--gdb/ChangeLog112
-rw-r--r--gdb/ChangeLog-93119
-rw-r--r--gdb/ChangeLog.hpread225
-rw-r--r--gdb/NEWS3
-rw-r--r--gdb/config/pa/hppabsd.mh6
-rw-r--r--gdb/config/pa/hppahpux.mh6
-rw-r--r--gdb/config/pa/tm-hppa.h2
-rw-r--r--gdb/hppa-tdep.c2
-rw-r--r--gdb/hpread.c433
-rw-r--r--gdb/somread.c6
11 files changed, 459 insertions, 470 deletions
diff --git a/gdb/.Sanitize b/gdb/.Sanitize
index e5a24b1..31afb47 100644
--- a/gdb/.Sanitize
+++ b/gdb/.Sanitize
@@ -29,20 +29,6 @@ else
fi
fi
-hpread_files="hpread.c ChangeLog.hpread"
-
-if ( echo $* | grep keep\-hpread > /dev/null ) ; then
- keep_these_too="${hpread_files} ${keep_these_too}"
- if [ -n "${verbose}" ] ; then
- echo Keeping ${hpread_files}
- fi
-else
- lose_these_too="${hpread_files} ${lose_these_too}"
- if [ -n "${verbose}" ] ; then
- echo Deleting ${hpread_files}
- fi
-fi
-
# All files listed between the "Things-to-keep:" line and the
# "Files-to-sed:" line will be kept. All other files will be removed.
# Directories listed in this section will have their own Sanitize
@@ -159,6 +145,7 @@ hppa-pinsn.c
hppa-tdep.c
hppab-nat.c
hppah-nat.c
+hpread.c
i386-pinsn.c
i386-stub.c
i386-tdep.c
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 6e9dcd3..a67d386 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+Fri Nov 25 00:51:05 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * hpread.c: Include hp-symtab.h instead of hpux-symtab.h.
+ Various name changes to match those used by hp-symtab.h.
+
Thu Nov 24 00:39:27 1994 Jeff Law (law@snake.cs.utah.edu)
* blockframe.c (find_pc_partial_function): Inhibit mst_trampoline
@@ -917,6 +922,27 @@ Wed Sep 28 08:59:14 1994 Jim Kingdon (kingdon@cygnus.com)
* xcoffread.c (read_xcoff_symtab): Process XTY_LD symbols we were
ignoring before. But continue to ignore XMC_DS.
+Wed Sep 28 00:35:23 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * hpread.c (hpread_read_array_type): Do not change the type code
+ to TYPE_CODE_PTR for "char foo[]". Just make it a zero length
+ array type.
+
+ * hpread.c (hpread_type_translate): Handle T_UNS_LONG types with
+ lengths other than 32bits (HP C 9.69 represents an "unsigned char"
+ as an T_UNS_LONG with length 8).
+
+ * hpread.c (struct hpread_symfile_info): Delete have_module field
+ and accessor macro. Minor indentation fix.
+ (hpread_build_psymtabs, case K_MODULE): Only start a new psymtab
+ and reset state variables have_name & texthigh if pst is NULL.
+ (hpread_build_psymtabs, case K_SRCFILE): Only reset the name of a
+ partial symbol table if pst is non-NULL. If pst is NULL, then
+ start a new psymtab.
+ (hpread_process_one_debug_symbol, case K_MODULE): Now empty.
+ (hpread_process_one_debug_symbol, case K_SRCFILE): Simplify and
+ correct handling of subfiles.
+
Mon Sep 26 02:59:00 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
* defs.h (misc_command_type): Remove trailing comma from
@@ -1569,6 +1595,25 @@ Fri Aug 19 13:35:01 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
(generic_load): Remove check for NULL filename, it is done
in load_command now.
+Fri Aug 19 10:36:15 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * Makefile.in (ALLDEPFILES): Add hpread.c.
+ (hpread.o): Add dependencies.
+
+ * somread.c: Do not include "aout/aout64.h". SOM has nothing to
+ do with a.out.
+ (BYTES_IN_WORD): Delete.
+ (som_symfile_read): Call hpread_build_psymtabs to build any
+ minimal symbols based on the HP C native debug symbols.
+ (som_symfile_finish): Call hpread_symfile_finish.
+ (som_symfile_init): Call hpread_symfile_init.
+ * config/pa/tm-hppa.h (HPREAD_ADJUST_STACK_ADDRESS): Define.
+ * hppa-tdep.c (hpread_adjust_stack_address): New function.
+
+ * config/pa/hppabsd.mh (NATDEPFILES): Add hpread.o
+ * config/pa/hppahpux.mh (NATDEPFILES): Likewise.
+ * hpread.c: New file.
+
Fri Aug 19 00:40:55 1994 Jeff Law (law@snake.cs.utah.edu)
* hppa-tdep.c (skip_trampoline_code): Revert incorrect change
@@ -1665,6 +1710,17 @@ Sat Aug 13 08:22:50 1994 Fred Fish (fnf@cygnus.com)
* environ.c (init_environ): If no environment, do nothing.
+Fri Aug 12 19:30:53 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * hpread.c: Delete rest of TODO list. Do not include "libbfd.h",
+ <time.h>, <sys/types.h>, "demangle.h", <sys/file.h>,
+ "expression.h", "language.h", "gdbtypes.h", "demangleh".
+ Move all global variables into the private symbol table structure
+ and add accessor macros. Update some comments.
+ (hpread_build_psymtabs): Delete dbsubc_addr, we don't need it.
+ (hpread_end_psymtab): New function to end a partial symbol table,
+ all callers changed (no more bogus sharing with dbxread.c).
+
Fri Aug 12 15:52:37 1994 Stu Grossman (grossman@cygnus.com)
* remote.c (remote_wait): Return inferior_pid instead of 0 for
@@ -1721,6 +1777,12 @@ Tue Aug 9 09:44:42 1994 Stu Grossman (grossman@cygnus.com)
clutches.
* (procfs_set_sproc_trap): Enable trapping of fork and vfork.
+Mon Aug 08 15:34:13 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * hpread.c (hpread_process_one_debug_symbol): Fix block scoping
+ problem (losing localvars on the close-brace instead of after
+ the close brace).
+
Mon Aug 8 15:09:32 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
* i386-nlmstub.c (handle_exception): Wait until the thread has
@@ -2179,6 +2241,20 @@ Wed Jul 6 20:22:07 1994 Per Bothner (bothner@kalessin.cygnus.com)
* ch-exp.y (yylex): First try name lookup using exact name
typed by user; if that fails, try lower-cased name.
+Wed Jul 06 12:39:07 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * hpread.c: More cleanups. Delete lots of trailing whitespace.
+ Remove some items from the TODO list and notes throughout code
+ for things which need fixing. Add more comments.
+ Document bogus struct symloc sharing with dbxread.c. Delete more
+ useless variables. Add more PARAM prototypes. Fixup more
+ indention problems that have crept in.
+ (SET_NAMESTRING): Accept new namep and objfile arguments so that
+ it doesn't depend on the variable names on the procedures it's
+ used from.
+ (hpread_symfile_init): Delete incorrect checks for bogus sizes of
+ the debug sections.
+
Wed Jul 6 00:48:57 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
* dbxread.c, elfread.c, mipsread.c, nlmread.c, os9kread.c:
@@ -2193,6 +2269,12 @@ Wed Jul 6 00:48:57 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
* procfs.c (wait_fd): Handle ENOENT error return from PIOCWSTOP
ioctl, it indicates that the process has exited.
+Mon Jul 04 19:48:03 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * hpread.c (hpread_symfile_init): Make sure to initialize all the
+ private data to zero. Not having any HP C debug symbols is not an
+ error. Just return.
+
Mon Jul 4 19:28:56 1994 Jeff Law (law@snake.cs.utah.edu)
* hppa-tdep.c (read_unwind_info): ELF unwind information is in the
@@ -2214,6 +2296,17 @@ Sat Jul 2 01:51:33 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
Define to enable handling of shared libraries for a.out executables,
run under Solaris BCP.
+Fri Jul 01 19:50:21 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * hpread.c: Change contribution notice to the Cygnus/Utah agreed
+ upon notice. Delete some stuff from the TODO list. Rework
+ many comments to be clearer. Major cleanups. Consistently
+ use "hpread_" prefix. Delete unnecessary macros, structures
+ variables, fiels, functions and #if 0 code. Mark code which
+ still needs to be cleaned up. PARAMize and make most functions
+ static. Fix error checking when reading in the debug section
+ contents. No more minimal symbol table handling in this code!
+
Thu Jun 30 13:59:23 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
* infrun.c (wait_for_inferior): Print "Program exited normally"
@@ -3640,6 +3733,11 @@ Mon Mar 21 11:02:51 1994 Stu Grossman (grossman at cygnus.com)
VM_MIN_ADDRESS.
* config/alpha/tm-alphanw.h: DECR_PC_AFTER_BREAK=0, VM_MIN_ADDRESS=0.
+Mon Mar 21 10:09:06 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * hpread.c (_initialize_hpuxread): Don't call add_symtab_fns if
+ HPREAD is not defined.
+
Sun Mar 20 15:21:57 1994 Doug Evans (dje@cygnus.com)
* sparc-tdep.c (sparc_frame_find_save_regs): Use REGISTER_RAW_SIZE
@@ -3755,6 +3853,13 @@ Tue Mar 15 10:05:27 1994 Jim Kingdon (kingdon@cygnus.com)
* rs6000-tdep.c: Change value to value_ptr.
+Sun Mar 13 17:19:03 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * hpread.c (read_hpux_symtab: Correctly determine the namespace
+ and address class of SVAR, DVAR, TYPEDEF, TAGDEF, CONST, and
+ MEMENUM symbols. Do not include function-scoped variables in
+ the partial symbol table.
+
Sun Mar 13 09:45:51 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
* i386m3-nat.c: Include floatformat.h.
@@ -4285,6 +4390,13 @@ Mon Feb 7 08:22:42 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
* defs.h [BFD64]: Use BFD_HOST_64_BIT, not nonexistent
BFD_HOST_64_TYPE.
+Sun Feb 6 15:56:09 1994 Jeff Law (law@wild.cs.utah.edu)
+
+ * hpread.c (hpux_symfile_init): Use obj_som_* rather than obj_* to
+ access BFD private data. Search for the "$TEXT$" space rather
+ than ".text".
+ (hppa_sym_fns): Add bfd target flavour to initializer.
+
Sun Feb 6 06:55:15 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
* target.c (target_preopen): If target_kill doesn't remove the
diff --git a/gdb/ChangeLog-93 b/gdb/ChangeLog-93
index c11dc0d..463154d 100644
--- a/gdb/ChangeLog-93
+++ b/gdb/ChangeLog-93
@@ -248,6 +248,12 @@ Thu Dec 16 13:08:01 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
override.
(REMOTE_BREAKPOINT): Likewise.
+Thu Dec 16 09:14:58 1993 Jeff Law (law@snake.cs.utah.edu)
+
+ * hpread.c (read_hp_function_type): Correctly handle
+ pass-by-value structures > 64bits in size.
+ (process_one_debug_symbol): Likewise.
+
Mon Dec 13 20:17:39 1993 Per Bothner (bothner@kalessin.cygnus.com)
Implement support for Chill POWERSETs.
@@ -888,6 +894,13 @@ Tue Nov 2 12:45:23 1993 Stan Shebs (shebs@rtl.cygnus.com)
* gdbserver/Makefile.in (install, install_only): Add.
* gdbserver/gdbserver.1: New file, man page for gdbserver.
+Tue Nov 2 03:01:01 1993 Jeff Law (law@snake.cs.utah.edu)
+
+ * hpread.c: Include <time.h> and <sys/types.h>. Change include
+ of "libhppa.h" to "som.h".
+ (BYTES_IN_WORD): Define.
+ (hppa_sym_fns): "hppa" is 4 characters, not 5.
+
Mon Nov 1 09:40:21 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
* symtab.c, symtab.h, source.c: Change find_line_pc_range to take
@@ -1904,6 +1917,11 @@ Wed Sep 29 18:34:22 1993 Stu Grossman (grossman at cygnus.com)
* Makefile.in: Add deps for i386lynx-nat.o and i386lynx-tdep.o to
keep non-gnu makes happy.
+Wed Sep 29 17:20:54 1993 Jeff Law (law@snake.cs.utah.edu)
+
+ * hpread.c (read_hpux_symtab): When a K_END is found for a
+ K_MODULE, clear the have_module and have_name flags.
+
Wed Sep 29 10:52:19 1993 Kung Hsu (kung@cygnus.com)
* c-valprint.c: to fix virtual table print bug (pr2695).
@@ -2807,6 +2825,11 @@ Mon Aug 23 1993 Sean Fagan (sef@cygnus.com)
Add NetBSD support:
* configure.in: Recognize netbsd.
+Sun Aug 22 22:50:32 1993 Jeff Law (law@snake.cs.utah.edu)
+
+ * hpread.c (get_textlow): Don't go past a K_END when looking for a
+ K_FUNCTION. Avoids losing on source files with no functions.
+
Fri Aug 20 14:01:39 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
* remote-nindy.c: Remove unused include of sys/ioctl.h.
@@ -2856,6 +2879,11 @@ Thu Aug 19 17:58:39 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
nl with initializer, just assign to it. Check n_scnum field on
return.
+Wed Aug 18 21:42:52 1993 Jeff Law (law@snake.cs.utah.edu)
+
+ * hpread.c (read_hpux_symtab): Call SET_NAMESTRING for K_MODULE
+ debug symbols.
+
Wed Aug 18 12:03:00 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
* printcmd.c (print_address), values.c (value_as_pointer): Don't
@@ -2928,6 +2956,12 @@ Mon Aug 16 13:52:14 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
the starting source line number on a line boundary if backtracing
through sigtramp.
+Mon Aug 16 09:52:33 1993 Jeff Law (law@snake.cs.utah.edu)
+
+ * hpread.c: Add U Utah contribution notice. Add TODO list.
+ (hp_type_lookup): Use TYPE_NAME and TYPE_TAG_NAME.
+ (process_one_debug_symbol): Likewise.
+
Mon Aug 16 02:56:01 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
* blockframe.c (create_new_frame, get_prev_frame_info):
@@ -3553,6 +3587,10 @@ Wed Jul 21 00:11:05 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
* mipsread.c (fixup_sigtramp): Initialize pdr.adr, it is used by
mips_in_lenient_prologue.
+Tue Jul 20 14:14:59 1993 Jeff Law (law@snake.cs.utah.edu)
+
+ * hpread.c (read_hp_array_type): Handle "char foo[]".
+
Tue Jul 20 12:53:47 1993 Jim Kingdon (kingdon@deneb.cygnus.com)
* mips-tdep.c (heuristic_proc_start): First time we print the
@@ -3770,6 +3808,10 @@ Thu Jul 1 15:50:05 1993 Frederic Pierresteguy (F.Pierresteguy@frcl.bull.fr)
* config/m68k/{t,x,n}m-dpx2.h, dpx2-nat.c: New files.
* config/m68k/dpx2.m{h,t}: New files.
+Thu Jul 1 15:46:10 1993 Jeff Law (law@snake.cs.utah.edu)
+
+ * hpread.c: Run through gnu-indent.
+
Sun Jul 11 12:32:08 1993 Doug Evans (dje@canuck.cygnus.com)
* config/sparc/tm-sparc.h (PRINT_REGISTER_HOOK): Fix typo, add
@@ -4063,6 +4105,26 @@ Tue Jun 29 09:11:27 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
* symtab.h: Add comments about line numbers.
* source.c (identify_source_line): Fix off by one bug with line.
+Mon Jun 28 19:00:21 1993 Jeff Law (law@snake.cs.utah.edu)
+
+ * hpread.c: Do not include libhppax. Instead include libhppa.h
+ and hpux-symtab.h. Misc indention fixes.
+ (find_unwind_entry): Add PARAM prototype.
+ (read_hpux_symtab): More fixes for names and sizes of structs,
+ unions, enums, typedefs, and tagdefs.
+ (read_hp_enum_type, read_hp_struct_type): Likewise.
+ (read_hp_set_type, read_hp_subrange_type): Likewise.
+ (hp_type_lookup, process_one_debug_symbol): Likewise.
+ (process_one_debug_symbol): Search forward from the K_FUNCTION for
+ the first K_BEGIN when setting the line number associated with a
+ function. Avoid unnecessary calls to savestring.
+ (hp_alloc_type): Initialize TYPE_CPLUS_SPECIFIC here. Remove
+ most cases where we set it elsewhere.
+ (hppa_sym_fns): Use "hppa" instead of hppax since hpread.c and
+ paread.c use the same BFD backend now. All references changed.
+ (hpux_symfile_init): Allocate space to hold the debugging section
+ contents on the symbol obstack.
+
Mon Jun 28 10:09:08 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
* printcmd.c (makeva*): New interface, for making a va_list.
@@ -4204,6 +4266,30 @@ Wed Jun 23 00:25:58 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
* partial-stab.h: Consolidate case statements for N_LSYM and N_FUN.
* dbxread.c: Change comment regarding acc.
+Wed Jun 23 16:33:36 1993 Jeff Law (law@snake.cs.utah.edu)
+
+ * hpread.c: Document a few functions, misc cleanups. Update
+ copyright to reflect the first "release" of this file.
+ (struct hpux_symfile_info): Delete unneeded fields. Keep pointers
+ to the contents of the debug sections rather than offsets within
+ the file itself. Corresponding changes to the accessor macros.
+ (sl_symbol_size, slt_symbuf): Delete unneeded global variables.
+ (slt_symbuf_start, slt_symbuf_end, lntt_symbuf): Likewise.
+ (lntt_symbuf_start, lntt_symbuf_end, gntt_symbuf): Likewise.
+ (gntt_symbuf_start, gntt_symbuf_end): Likewise.
+ (fill_slt_symbuf, fill_lntt_symbuf): Delete unneeded functions.
+ (fill_gntt_symbuf): Likewise.
+ (get_lntt, get_gntt, get_slt): Simplify.
+ (hpux_symfile_init): Read and store the contents of the debugging
+ sections. Do error checking on memory allocation and BFD calls.
+ (read_hpux_symtab): Delete KERNELDEBUG crud. Ignore debug symbols
+ which are not needed for building partial symbol tables. Handle
+ K_CONST, K_TYPEDEF, and K_TAGDEF just like K_SVAR and K_DVAR.
+ (read_ofile_symtab): Delete useless processing_gcc_compilation stuff.
+ (read_hp_struct_type): Initialize TYPE_CPLUS_SPECIFIC.
+ (read_hp_set_type, read_hp_array_type): Likewise.
+ (read_hp_subrange_type, hp_type_lookup): Likewise.
+
Wed Jun 23 15:04:54 1993 K. Richard Pixley (rich@sendai.cygnus.com)
Makefile overhaul dropping autodepend features.
@@ -4285,6 +4371,17 @@ Wed Jun 23 00:25:58 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
Don't try to print help message or version until after we have
called initialize_all_files.
+Tue Jun 22 11:03:13 1993 Jeff Law (law@snake.cs.utah.edu)
+
+ * hpread.c: Delete useless #if 1 statements.
+ (hp_type_translate): Use T_LONG, T_UNS_LONG, and T_DOUBLE instead
+ of magic integers. Fix handling for T_UNS_INT. Abort if the type
+ passed in is not an "immediate" type.
+ (read_hp_enum_type): Properly compute the size of the type.
+ (read_hp_array_type): Likewise.
+ (hp_type_lookup): Prefix the names of structs, unions and enums
+ with "struct", "union", and "enum" as appropriate.
+
Tue Jun 22 03:15:38 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
* solib.c (solib_add_common_symbols): Don't call lookup_minimal_symbol.
@@ -4327,6 +4424,15 @@ Mon Jun 21 15:10:07 1993 Fred Fish (fnf@cygnus.com)
* Makefile.in (BFD_INCLUDES): Bfd.h is now back in bfd build dir.
* depend: Hand updated to match.
+Mon Jun 21 10:13:42 1993 Jeff Law (law@snake.cs.utah.edu)
+
+ * hpread.c: Include "demangle.h".
+ (process_one_debug_symbol): Set the SYMBOL_LANGUAGE and
+ SYMBOL_INIT_DEMANGLED_NAME for the current symbol. Adjust
+ SYMBOL_VALUE for local variables in the stack by the size of the
+ current function's stack (found in unwind descriptor). Keep
+ better track of the current unwind descriptor.
+
Sun Jun 20 13:11:11 1993 Jim Kingdon (kingdon@cygnus.com)
* stabsread.c (read_struct_fields): Don't call read_cpp_abbrev on $_.
@@ -4396,6 +4502,11 @@ Wed Jun 16 16:08:18 1993 K. Richard Pixley (rich@sendai.cygnus.com)
* remote-vx.c (_initialize_vx): rename user settable option from
rpcTimeout to vxworks-timeout.
+Wed Jun 16 14:34:10 1993 Jeff Law (law@snake.cs.utah.edu)
+
+ * hpread.c (hp_type_translate): Fix promotion bugs from
+ char to short and short to int.
+
Wed Jun 16 12:21:49 1993 Fred Fish (fnf@cygnus.com)
* Makefile.in (depend): More makefile diddling.
@@ -4543,6 +4654,14 @@ Thu Jun 10 13:26:41 1993 Fred Fish (fnf@cygnus.com)
symbols, now that they are section relative.
* solib.c (bfd_lookup_symbol): Ditto.
+Thu Jun 10 11:27:34 1993 Jeff Law (law@snake.cs.utah.edu)
+
+ * hpread.c (read_hp_function_type): Adjust SYMBOL_VALUE for
+ arguments in the stack by the size of the current function's stack
+ (found in the unwind descriptor).
+ (process_one_debug_symbol): Likewise. Keep track of the current
+ function's unwind descriptor.
+
Thu Jun 10 10:56:56 1993 Jim Kingdon (kingdon@cygnus.com)
* Makefile.in (depend): Add bfd -I's for paread.c and xcoffexec.c
diff --git a/gdb/ChangeLog.hpread b/gdb/ChangeLog.hpread
index cfe6d1b..e69de29 100644
--- a/gdb/ChangeLog.hpread
+++ b/gdb/ChangeLog.hpread
@@ -1,225 +0,0 @@
-Wed Sep 28 00:35:23 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c (hpread_read_array_type): Do not change the type code
- to TYPE_CODE_PTR for "char foo[]". Just make it a zero length
- array type.
-
- * hpread.c (hpread_type_translate): Handle T_UNS_LONG types with
- lengths other than 32bits (HP C 9.69 represents an "unsigned char"
- as an T_UNS_LONG with length 8).
-
- * hpread.c (struct hpread_symfile_info): Delete have_module field
- and accessor macro. Minor indentation fix.
- (hpread_build_psymtabs, case K_MODULE): Only start a new psymtab
- and reset state variables have_name & texthigh if pst is NULL.
- (hpread_build_psymtabs, case K_SRCFILE): Only reset the name of a
- partial symbol table if pst is non-NULL. If pst is NULL, then
- start a new psymtab.
- (hpread_process_one_debug_symbol, case K_MODULE): Now empty.
- (hpread_process_one_debug_symbol, case K_SRCFILE): Simplify and
- correct handling of subfiles.
-
-Fri Aug 19 10:36:15 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * Makefile.in (ALLDEPFILES): Add hpread.c.
- (hpread.o): Add dependencies.
-
- * somread.c: Do not include "aout/aout64.h". SOM has nothing to
- do with a.out.
- (BYTES_IN_WORD): Delete.
- (som_symfile_read): Call hpread_build_psymtabs to build any
- minimal symbols based on the HP C native debug symbols.
- (som_symfile_finish): Call hpread_symfile_finish.
- (som_symfile_init): Call hpread_symfile_init.
- * config/pa/tm-hppa.h (HPREAD_ADJUST_STACK_ADDRESS): Define.
- * hppa-tdep.c (hpread_adjust_stack_address): New function.
-
- * config/pa/hppabsd.mh (NATDEPFILES): Add hpread.o
- * config/pa/hppahpux.mh (NATDEPFILES): Likewise.
- * hpread.c: New file.
-
-Fri Aug 12 19:30:53 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c: Delete rest of TODO list. Do not include "libbfd.h",
- <time.h>, <sys/types.h>, "demangle.h", <sys/file.h>,
- "expression.h", "language.h", "gdbtypes.h", "demangleh".
- Move all global variables into the private symbol table structure
- and add accessor macros. Update some comments.
- (hpread_build_psymtabs): Delete dbsubc_addr, we don't need it.
- (hpread_end_psymtab): New function to end a partial symbol table,
- all callers changed (no more bogus sharing with dbxread.c).
-
-Mon Aug 08 15:34:13 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c (hpread_process_one_debug_symbol): Fix block scoping
- problem (losing localvars on the close-brace instead of after
- the close brace).
-
-Wed Jul 06 12:39:07 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c: More cleanups. Delete lots of trailing whitespace.
- Remove some items from the TODO list and notes throughout code
- for things which need fixing. Add more comments.
- Document bogus struct symloc sharing with dbxread.c. Delete more
- useless variables. Add more PARAM prototypes. Fixup more
- indention problems that have crept in.
- (SET_NAMESTRING): Accept new namep and objfile arguments so that
- it doesn't depend on the variable names on the procedures it's
- used from.
- (hpread_symfile_init): Delete incorrect checks for bogus sizes of
- the debug sections.
-
-Mon Jul 04 19:48:03 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c (hpread_symfile_init): Make sure to initialize all the
- private data to zero. Not having any HP C debug symbols is not an
- error. Just return.
-
-Fri Jul 01 19:50:21 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c: Change contribution notice to the Cygnus/Utah agreed
- upon notice. Delete some stuff from the TODO list. Rework
- many comments to be clearer. Major cleanups. Consistently
- use "hpread_" prefix. Delete unnecessary macros, structures
- variables, fiels, functions and #if 0 code. Mark code which
- still needs to be cleaned up. PARAMize and make most functions
- static. Fix error checking when reading in the debug section
- contents. No more minimal symbol table handling in this code!
-
-Mon Mar 21 10:09:06 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c (_initialize_hpuxread): Don't call add_symtab_fns if
- HPREAD is not defined.
-
-Sun Mar 13 17:19:03 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c (read_hpux_symtab: Correctly determine the namespace
- and address class of SVAR, DVAR, TYPEDEF, TAGDEF, CONST, and
- MEMENUM symbols. Do not include function-scoped variables in
- the partial symbol table.
-
-Sun Feb 6 15:56:09 1994 Jeff Law (law@wild.cs.utah.edu)
-
- * hpread.c (hpux_symfile_init): Use obj_som_* rather than obj_* to
- access BFD private data. Search for the "$TEXT$" space rather
- than ".text".
- (hppa_sym_fns): Add bfd target flavour to initializer.
-
-Thu Dec 16 09:14:58 1993 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c (read_hp_function_type): Correctly handle
- pass-by-value structures > 64bits in size.
- (process_one_debug_symbol): Likewise.
-
-Tue Nov 2 03:01:01 1993 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c: Include <time.h> and <sys/types.h>. Change include
- of "libhppa.h" to "som.h".
- (BYTES_IN_WORD): Define.
- (hppa_sym_fns): "hppa" is 4 characters, not 5.
-
-Wed Sep 29 17:20:54 1993 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c (read_hpux_symtab): When a K_END is found for a
- K_MODULE, clear the have_module and have_name flags.
-
-Sun Aug 22 22:50:32 1993 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c (get_textlow): Don't go past a K_END when looking for a
- K_FUNCTION. Avoids losing on source files with no functions.
-
-Wed Aug 18 21:42:52 1993 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c (read_hpux_symtab): Call SET_NAMESTRING for K_MODULE
- debug symbols.
-
-Mon Aug 16 09:52:33 1993 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c: Add U Utah contribution notice. Add TODO list.
- (hp_type_lookup): Use TYPE_NAME and TYPE_TAG_NAME.
- (process_one_debug_symbol): Likewise.
-
-Tue Jul 20 14:14:59 1993 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c (read_hp_array_type): Handle "char foo[]".
-
-Thu Jul 1 15:46:10 1993 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c: Run through gnu-indent.
-
-Mon Jun 28 19:00:21 1993 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c: Do not include libhppax. Instead include libhppa.h
- and hpux-symtab.h. Misc indention fixes.
- (find_unwind_entry): Add PARAM prototype.
- (read_hpux_symtab): More fixes for names and sizes of structs,
- unions, enums, typedefs, and tagdefs.
- (read_hp_enum_type, read_hp_struct_type): Likewise.
- (read_hp_set_type, read_hp_subrange_type): Likewise.
- (hp_type_lookup, process_one_debug_symbol): Likewise.
- (process_one_debug_symbol): Search forward from the K_FUNCTION for
- the first K_BEGIN when setting the line number associated with a
- function. Avoid unnecessary calls to savestring.
- (hp_alloc_type): Initialize TYPE_CPLUS_SPECIFIC here. Remove
- most cases where we set it elsewhere.
- (hppa_sym_fns): Use "hppa" instead of hppax since hpread.c and
- paread.c use the same BFD backend now. All references changed.
- (hpux_symfile_init): Allocate space to hold the debugging section
- contents on the symbol obstack.
-
-Wed Jun 23 16:33:36 1993 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c: Document a few functions, misc cleanups. Update
- copyright to reflect the first "release" of this file.
- (struct hpux_symfile_info): Delete unneeded fields. Keep pointers
- to the contents of the debug sections rather than offsets within
- the file itself. Corresponding changes to the accessor macros.
- (sl_symbol_size, slt_symbuf): Delete unneeded global variables.
- (slt_symbuf_start, slt_symbuf_end, lntt_symbuf): Likewise.
- (lntt_symbuf_start, lntt_symbuf_end, gntt_symbuf): Likewise.
- (gntt_symbuf_start, gntt_symbuf_end): Likewise.
- (fill_slt_symbuf, fill_lntt_symbuf): Delete unneeded functions.
- (fill_gntt_symbuf): Likewise.
- (get_lntt, get_gntt, get_slt): Simplify.
- (hpux_symfile_init): Read and store the contents of the debugging
- sections. Do error checking on memory allocation and BFD calls.
- (read_hpux_symtab): Delete KERNELDEBUG crud. Ignore debug symbols
- which are not needed for building partial symbol tables. Handle
- K_CONST, K_TYPEDEF, and K_TAGDEF just like K_SVAR and K_DVAR.
- (read_ofile_symtab): Delete useless processing_gcc_compilation stuff.
- (read_hp_struct_type): Initialize TYPE_CPLUS_SPECIFIC.
- (read_hp_set_type, read_hp_array_type): Likewise.
- (read_hp_subrange_type, hp_type_lookup): Likewise.
-
-Tue Jun 22 11:03:13 1993 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c: Delete useless #if 1 statements.
- (hp_type_translate): Use T_LONG, T_UNS_LONG, and T_DOUBLE instead
- of magic integers. Fix handling for T_UNS_INT. Abort if the type
- passed in is not an "immediate" type.
- (read_hp_enum_type): Properly compute the size of the type.
- (read_hp_array_type): Likewise.
- (hp_type_lookup): Prefix the names of structs, unions and enums
- with "struct", "union", and "enum" as appropriate.
-
-Mon Jun 21 10:13:42 1993 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c: Include "demangle.h".
- (process_one_debug_symbol): Set the SYMBOL_LANGUAGE and
- SYMBOL_INIT_DEMANGLED_NAME for the current symbol. Adjust
- SYMBOL_VALUE for local variables in the stack by the size of the
- current function's stack (found in unwind descriptor). Keep
- better track of the current unwind descriptor.
-
-Wed Jun 16 14:34:10 1993 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c (hp_type_translate): Fix promotion bugs from
- char to short and short to int.
-
-Thu Jun 10 11:27:34 1993 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c (read_hp_function_type): Adjust SYMBOL_VALUE for
- arguments in the stack by the size of the current function's stack
- (found in the unwind descriptor).
- (process_one_debug_symbol): Likewise. Keep track of the current
- function's unwind descriptor.
diff --git a/gdb/NEWS b/gdb/NEWS
index 664af69..0c44711 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -8,6 +8,9 @@ somewhat more sophisticated user-defined commands.
running hpux9 or later. See the GDB manual for the few minor problems
and potential workarounds.
+* GDB can now read debug symbols produced by the HP C compiler on HPPAs
+(sorry, no C++, Fortran or 68k support).
+
*** Changes in GDB-4.13:
* New "complete" command
diff --git a/gdb/config/pa/hppabsd.mh b/gdb/config/pa/hppabsd.mh
index 161292d..b4aa2c5 100644
--- a/gdb/config/pa/hppabsd.mh
+++ b/gdb/config/pa/hppabsd.mh
@@ -1,9 +1,5 @@
# Host: Hewlett-Packard PA-RISC machine, running BSD
-HPREAD=
-# start-sanitize-hpread
-HPREAD=hpread.o
-# end-sanitize-hpread
XDEPFILES=
XM_FILE= xm-hppab.h
NAT_FILE= nm-hppab.h
-NATDEPFILES= hppab-nat.o coredep.o corelow.o inftarg.o fork-child.o somread.o infptrace.o $(HPREAD) somsolib.o
+NATDEPFILES= hppab-nat.o coredep.o corelow.o inftarg.o fork-child.o somread.o infptrace.o hpread.o somsolib.o
diff --git a/gdb/config/pa/hppahpux.mh b/gdb/config/pa/hppahpux.mh
index dff59ab..683c1d7 100644
--- a/gdb/config/pa/hppahpux.mh
+++ b/gdb/config/pa/hppahpux.mh
@@ -1,15 +1,11 @@
# Host: Hewlett-Packard PA-RISC machine, running HPUX
-HPREAD=
-# start-sanitize-hpread
-HPREAD=hpread.o
-# end-sanitize-hpread
TERMCAP = -lcurses
XM_FILE= xm-hppah.h
XDEPFILES= ser-tcp.o
NAT_FILE= nm-hppah.h
-NATDEPFILES= hppah-nat.o coredep.o corelow.o inftarg.o fork-child.o somread.o infptrace.o $(HPREAD) somsolib.o
+NATDEPFILES= hppah-nat.o coredep.o corelow.o inftarg.o fork-child.o somread.o infptrace.o hpread.o somsolib.o
HOST_IPC=-DBSD_IPC -DPOSIX_WAIT
diff --git a/gdb/config/pa/tm-hppa.h b/gdb/config/pa/tm-hppa.h
index f88462b..3dc838d 100644
--- a/gdb/config/pa/tm-hppa.h
+++ b/gdb/config/pa/tm-hppa.h
@@ -522,10 +522,8 @@ extern void target_write_pc PARAMS ((CORE_ADDR, int));
#define TARGET_READ_PC(pid) target_read_pc (pid)
#define TARGET_WRITE_PC(v,pid) target_write_pc (v,pid)
-/* start-sanitize-hpread */
/* For a number of horrible reasons we may have to adjust the location
of variables on the stack. Ugh. */
#define HPREAD_ADJUST_STACK_ADDRESS(ADDR) hpread_adjust_stack_address(ADDR)
-/* end-sanitize-hpread */
extern int hpread_adjust_stack_address PARAMS ((CORE_ADDR));
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index a3f6994..3ff364c 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -521,7 +521,6 @@ find_unwind_entry(pc)
return NULL;
}
-/* start-sanitize-hpread */
/* Return the adjustment necessary to make for addresses on the stack
as presented by hpread.c.
@@ -540,7 +539,6 @@ hpread_adjust_stack_address (func_addr)
else
return u->Total_frame_size << 3;
}
-/* end-sanitize-hpread */
/* Called to determine if PC is in an interrupt handler of some
kind. */
diff --git a/gdb/hpread.c b/gdb/hpread.c
index ad142a8..3efd2ec 100644
--- a/gdb/hpread.c
+++ b/gdb/hpread.c
@@ -23,7 +23,7 @@
#include "defs.h"
#include "bfd.h"
#include <string.h>
-#include "hpux-symtab.h"
+#include "hp-symtab.h"
#include "syms.h"
#include "symtab.h"
#include "symfile.h"
@@ -57,7 +57,7 @@ struct hpread_symfile_info
int type_vector_length;
/* Keeps track of the beginning of a range of source lines. */
- SLTPOINTER sl_index;
+ sltpointer sl_index;
/* Some state variables we'll need. */
int within_function;
@@ -65,7 +65,6 @@ struct hpread_symfile_info
/* Keep track of the current function's address. We may need to look
up something based on this address. */
unsigned int current_function_value;
-
};
/* Accessor macros to get at the fields. */
@@ -136,22 +135,22 @@ extern struct complaint lbrac_mismatch_complaint;
void hpread_symfile_init PARAMS ((struct objfile *));
static struct type *hpread_alloc_type
- PARAMS ((DNTTPOINTER, struct objfile *));
+ PARAMS ((dnttpointer, struct objfile *));
static struct type **hpread_lookup_type
- PARAMS ((DNTTPOINTER, struct objfile *));
+ PARAMS ((dnttpointer, struct objfile *));
static struct type *hpread_read_enum_type
- PARAMS ((DNTTPOINTER, union dnttentry *, struct objfile *));
+ PARAMS ((dnttpointer, union dnttentry *, struct objfile *));
static struct type *hpread_read_set_type
- PARAMS ((DNTTPOINTER, union dnttentry *, struct objfile *));
+ PARAMS ((dnttpointer, union dnttentry *, struct objfile *));
static struct type *hpread_read_subrange_type
- PARAMS ((DNTTPOINTER, union dnttentry *, struct objfile *));
+ PARAMS ((dnttpointer, union dnttentry *, struct objfile *));
static struct type *hpread_read_struct_type
- PARAMS ((DNTTPOINTER, union dnttentry *, struct objfile *));
+ PARAMS ((dnttpointer, union dnttentry *, struct objfile *));
void hpread_build_psymtabs
PARAMS ((struct objfile *, struct section_offsets *, int));
@@ -174,32 +173,32 @@ static void hpread_process_one_debug_symbol
PARAMS ((union dnttentry *, char *, struct section_offsets *,
struct objfile *, CORE_ADDR, int, char *, int));
-static SLTPOINTER hpread_record_lines
- PARAMS ((struct subfile *, SLTPOINTER, SLTPOINTER, struct objfile *));
+static sltpointer hpread_record_lines
+ PARAMS ((struct subfile *, sltpointer, sltpointer, struct objfile *));
static struct type *hpread_read_function_type
- PARAMS ((DNTTPOINTER, union dnttentry *, struct objfile *));
+ PARAMS ((dnttpointer, union dnttentry *, struct objfile *));
static struct type * hpread_type_lookup
- PARAMS ((DNTTPOINTER, struct objfile *));
+ PARAMS ((dnttpointer, struct objfile *));
static unsigned long hpread_get_depth
- PARAMS ((SLTPOINTER, struct objfile *));
+ PARAMS ((sltpointer, struct objfile *));
static unsigned long hpread_get_line
- PARAMS ((SLTPOINTER, struct objfile *));
+ PARAMS ((sltpointer, struct objfile *));
-static ADDRESS hpread_get_location
- PARAMS ((SLTPOINTER, struct objfile *));
+static CORE_ADDR hpread_get_location
+ PARAMS ((sltpointer, struct objfile *));
-static int hpread_type_translate PARAMS ((DNTTPOINTER));
+static int hpread_type_translate PARAMS ((dnttpointer));
static unsigned long hpread_get_textlow PARAMS ((int, int, struct objfile *));
static union dnttentry *hpread_get_gntt PARAMS ((int, struct objfile *));
static union dnttentry *hpread_get_lntt PARAMS ((int, struct objfile *));
static union sltentry *hpread_get_slt PARAMS ((int, struct objfile *));
static void hpread_psymtab_to_symtab PARAMS ((struct partial_symtab *));
static void hpread_psymtab_to_symtab_1 PARAMS ((struct partial_symtab *));
-static int hpread_has_name PARAMS ((KINDTYPE));
+static int hpread_has_name PARAMS ((enum dntt_entry_type));
/* Initialization for reading native HP C debug symbols from OBJFILE.
@@ -207,7 +206,7 @@ static int hpread_has_name PARAMS ((KINDTYPE));
It's only purpose in life is to set up the symbol reader's private
per-objfile data structures, and read in the raw contents of the debug
sections (attaching pointers to the debug info into the private data
- structures.
+ structures).
Since BFD doesn't know how to read debug symbols in a format-independent
way (and may never do so...), we have to do it ourselves. Note we may
@@ -241,7 +240,8 @@ hpread_symfile_init (objfile)
0, bfd_section_size (objfile->obfd, gntt_section));
GNTT_SYMCOUNT (objfile)
- = bfd_section_size (objfile->obfd, gntt_section) / DNTTBLOCKSIZE;
+ = bfd_section_size (objfile->obfd, gntt_section)
+ / sizeof (struct dntt_type_block);
/* Read in data from the $LNTT$ subspace. Also keep track of the number
of LNTT symbols. */
@@ -257,7 +257,8 @@ hpread_symfile_init (objfile)
0, bfd_section_size (objfile->obfd, lntt_section));
LNTT_SYMCOUNT (objfile)
- = bfd_section_size (objfile->obfd, lntt_section) / DNTTBLOCKSIZE;
+ = bfd_section_size (objfile->obfd, lntt_section)
+ / sizeof (struct dntt_type_block);
/* Read in data from the $SLT$ subspace. $SLT$ contains information
on source line numbers. */
@@ -383,7 +384,7 @@ hpread_build_psymtabs (objfile, section_offsets, mainline)
everything else is ignored. */
switch (dn_bufp->dblock.kind)
{
- case K_SRCFILE:
+ case DNTT_TYPE_SRCFILE:
{
/* A source file of some kind. Note this may simply
be an included file. */
@@ -450,7 +451,9 @@ hpread_build_psymtabs (objfile, section_offsets, mainline)
texthigh += ANOFFSET (section_offsets, SECT_OFF_TEXT);
hpread_end_psymtab (pst, psymtab_include_list,
includes_used,
- hp_symnum * DNTTBLOCKSIZE, texthigh,
+ (hp_symnum
+ * sizeof (struct dntt_type_block)),
+ texthigh,
dependency_list, dependencies_used);
pst = (struct partial_symtab *) 0;
includes_used = 0;
@@ -463,7 +466,8 @@ hpread_build_psymtabs (objfile, section_offsets, mainline)
valu += ANOFFSET (section_offsets, SECT_OFF_TEXT);
pst = hpread_start_psymtab (objfile, section_offsets,
namestring, valu,
- hp_symnum * DNTTBLOCKSIZE,
+ (hp_symnum
+ * sizeof (struct dntt_type_block)),
objfile->global_psymbols.next,
objfile->static_psymbols.next);
texthigh = valu;
@@ -471,9 +475,9 @@ hpread_build_psymtabs (objfile, section_offsets, mainline)
continue;
}
- case K_MODULE:
+ case DNTT_TYPE_MODULE:
/* A source file. It's still unclear to me what the
- real difference between a K_SRCFILE and K_MODULE
+ real difference between a DNTT_TYPE_SRCFILE and DNTT_TYPE_MODULE
is supposed to be. */
SET_NAMESTRING (dn_bufp, &namestring, objfile);
valu = hpread_get_textlow (i, hp_symnum, objfile);
@@ -482,16 +486,17 @@ hpread_build_psymtabs (objfile, section_offsets, mainline)
{
pst = hpread_start_psymtab (objfile, section_offsets,
namestring, valu,
- hp_symnum * DNTTBLOCKSIZE,
+ (hp_symnum
+ * sizeof (struct dntt_type_block)),
objfile->global_psymbols.next,
objfile->static_psymbols.next);
texthigh = valu;
have_name = 0;
}
continue;
- case K_FUNCTION:
- case K_ENTRY:
- /* The beginning of a function. K_ENTRY may also denote
+ case DNTT_TYPE_FUNCTION:
+ case DNTT_TYPE_ENTRY:
+ /* The beginning of a function. DNTT_TYPE_ENTRY may also denote
a secondary entry point. */
valu = dn_bufp->dfunc.lowaddr +
ANOFFSET (section_offsets, SECT_OFF_TEXT);
@@ -504,28 +509,30 @@ hpread_build_psymtabs (objfile, section_offsets, mainline)
language_unknown, objfile);
within_function = 1;
continue;
- case K_BEGIN:
- case K_END:
+ case DNTT_TYPE_BEGIN:
+ case DNTT_TYPE_END:
/* Scope block begin/end. We only care about function
and file blocks right now. */
- if (dn_bufp->dend.endkind == K_MODULE)
+ if (dn_bufp->dend.endkind == DNTT_TYPE_MODULE)
{
texthigh += ANOFFSET (section_offsets, SECT_OFF_TEXT);
hpread_end_psymtab (pst, psymtab_include_list, includes_used,
- hp_symnum * DNTTBLOCKSIZE, texthigh,
+ (hp_symnum
+ * sizeof (struct dntt_type_block)),
+ texthigh,
dependency_list, dependencies_used);
pst = (struct partial_symtab *) 0;
includes_used = 0;
dependencies_used = 0;
have_name = 0;
}
- if (dn_bufp->dend.endkind == K_FUNCTION)
+ if (dn_bufp->dend.endkind == DNTT_TYPE_FUNCTION)
within_function = 0;
continue;
- case K_SVAR:
- case K_DVAR:
- case K_TYPEDEF:
- case K_TAGDEF:
+ case DNTT_TYPE_SVAR:
+ case DNTT_TYPE_DVAR:
+ case DNTT_TYPE_TYPEDEF:
+ case DNTT_TYPE_TAGDEF:
{
/* Variables, typedefs an the like. */
enum address_class storage;
@@ -533,23 +540,23 @@ hpread_build_psymtabs (objfile, section_offsets, mainline)
/* Don't add locals to the partial symbol table. */
if (within_function
- && (dn_bufp->dblock.kind == K_SVAR
- || dn_bufp->dblock.kind == K_DVAR))
+ && (dn_bufp->dblock.kind == DNTT_TYPE_SVAR
+ || dn_bufp->dblock.kind == DNTT_TYPE_DVAR))
continue;
/* TAGDEFs go into the structure namespace. */
- if (dn_bufp->dblock.kind == K_TAGDEF)
+ if (dn_bufp->dblock.kind == DNTT_TYPE_TAGDEF)
namespace = STRUCT_NAMESPACE;
else
namespace = VAR_NAMESPACE;
/* What kind of "storage" does this use? */
- if (dn_bufp->dblock.kind == K_SVAR)
+ if (dn_bufp->dblock.kind == DNTT_TYPE_SVAR)
storage = LOC_STATIC;
- else if (dn_bufp->dblock.kind == K_DVAR
+ else if (dn_bufp->dblock.kind == DNTT_TYPE_DVAR
&& dn_bufp->ddvar.regvar)
storage = LOC_REGISTER;
- else if (dn_bufp->dblock.kind == K_DVAR)
+ else if (dn_bufp->dblock.kind == DNTT_TYPE_DVAR)
storage = LOC_LOCAL;
else
storage = LOC_UNDEF;
@@ -559,11 +566,12 @@ hpread_build_psymtabs (objfile, section_offsets, mainline)
{
pst = hpread_start_psymtab (objfile, section_offsets,
"globals", 0,
- hp_symnum * DNTTBLOCKSIZE,
+ (hp_symnum
+ * sizeof (struct dntt_type_block)),
objfile->global_psymbols.next,
objfile->static_psymbols.next);
}
- if (dn_bufp->dsvar.public)
+ if (dn_bufp->dsvar.global)
{
ADD_PSYMBOL_TO_LIST (namestring, strlen (namestring),
namespace, storage,
@@ -581,15 +589,16 @@ hpread_build_psymtabs (objfile, section_offsets, mainline)
}
continue;
}
- case K_MEMENUM:
- case K_CONST:
+ case DNTT_TYPE_MEMENUM:
+ case DNTT_TYPE_CONST:
/* Constants and members of enumerated types. */
SET_NAMESTRING (dn_bufp, &namestring, objfile);
if (!pst)
{
pst = hpread_start_psymtab (objfile, section_offsets,
"globals", 0,
- hp_symnum * DNTTBLOCKSIZE,
+ (hp_symnum
+ * sizeof (struct dntt_type_block)),
objfile->global_psymbols.next,
objfile->static_psymbols.next);
}
@@ -608,8 +617,8 @@ hpread_build_psymtabs (objfile, section_offsets, mainline)
if (pst)
{
hpread_end_psymtab (pst, psymtab_include_list, includes_used,
- hp_symnum * DNTTBLOCKSIZE, 0,
- dependency_list, dependencies_used);
+ hp_symnum * sizeof (struct dntt_type_block),
+ 0, dependency_list, dependencies_used);
}
discard_cleanups (old_chain);
@@ -640,7 +649,8 @@ hpread_get_lntt (index, objfile)
int index;
struct objfile *objfile;
{
- return (union dnttentry *)&(LNTT (objfile)[index * DNTTBLOCKSIZE]);
+ return (union dnttentry *)
+ &(LNTT (objfile)[(index * sizeof (struct dntt_type_block))]);
}
static union dnttentry *
@@ -648,7 +658,8 @@ hpread_get_gntt (index, objfile)
int index;
struct objfile *objfile;
{
- return (union dnttentry *)&(GNTT (objfile)[index * DNTTBLOCKSIZE]);
+ return (union dnttentry *)
+ &(GNTT (objfile)[(index * sizeof (struct dntt_type_block))]);
}
static union sltentry *
@@ -656,13 +667,13 @@ hpread_get_slt (index, objfile)
int index;
struct objfile *objfile;
{
- return (union sltentry *)&(SLT (objfile)[index * SLTBLOCKSIZE]);
+ return (union sltentry *)&(SLT (objfile)[index * sizeof (union sltentry)]);
}
/* Get the low address associated with some symbol (typically the start
of a particular source file or module). Since that information is not
- stored as part of the K_MODULE or K_SRCFILE symbol we must infer it from
- the existance of K_FUNCTION symbols. */
+ stored as part of the DNTT_TYPE_MODULE or DNTT_TYPE_SRCFILE symbol we must infer it from
+ the existance of DNTT_TYPE_FUNCTION symbols. */
static unsigned long
hpread_get_textlow (global, index, objfile)
@@ -673,19 +684,19 @@ hpread_get_textlow (global, index, objfile)
union dnttentry *dn_bufp;
struct minimal_symbol *msymbol;
- /* Look for a K_FUNCTION symbol. */
+ /* Look for a DNTT_TYPE_FUNCTION symbol. */
do
{
if (global)
dn_bufp = hpread_get_gntt (index++, objfile);
else
dn_bufp = hpread_get_lntt (index++, objfile);
- } while (dn_bufp->dblock.kind != K_FUNCTION
- && dn_bufp->dblock.kind != K_END);
+ } while (dn_bufp->dblock.kind != DNTT_TYPE_FUNCTION
+ && dn_bufp->dblock.kind != DNTT_TYPE_END);
- /* Avoid going past a K_END when looking for a K_FUNCTION. This
+ /* Avoid going past a DNTT_TYPE_END when looking for a DNTT_TYPE_FUNCTION. This
might happen when a sourcefile has no functions. */
- if (dn_bufp->dblock.kind == K_END)
+ if (dn_bufp->dblock.kind == DNTT_TYPE_END)
return 0;
/* The minimal symbols are typically more accurate for some reason. */
@@ -701,7 +712,7 @@ hpread_get_textlow (global, index, objfile)
static unsigned long
hpread_get_depth (index, objfile)
- SLTPOINTER index;
+ sltpointer index;
struct objfile *objfile;
{
union sltentry *sl_bufp;
@@ -714,7 +725,7 @@ hpread_get_depth (index, objfile)
static unsigned long
hpread_get_line (index, objfile)
- SLTPOINTER index;
+ sltpointer index;
struct objfile *objfile;
{
union sltentry *sl_bufp;
@@ -723,9 +734,9 @@ hpread_get_line (index, objfile)
return sl_bufp->snorm.line;
}
-static ADDRESS
+static CORE_ADDR
hpread_get_location (index, objfile)
- SLTPOINTER index;
+ sltpointer index;
struct objfile *objfile;
{
union sltentry *sl_bufp;
@@ -756,44 +767,44 @@ hpread_get_location (index, objfile)
static int
hpread_has_name (kind)
- KINDTYPE kind;
+ enum dntt_entry_type kind;
{
switch (kind)
{
- case K_SRCFILE:
- case K_MODULE:
- case K_FUNCTION:
- case K_ENTRY:
- case K_IMPORT:
- case K_LABEL:
- case K_FPARAM:
- case K_SVAR:
- case K_DVAR:
- case K_CONST:
- case K_TYPEDEF:
- case K_TAGDEF:
- case K_MEMENUM:
- case K_FIELD:
- case K_SA:
+ case DNTT_TYPE_SRCFILE:
+ case DNTT_TYPE_MODULE:
+ case DNTT_TYPE_FUNCTION:
+ case DNTT_TYPE_ENTRY:
+ case DNTT_TYPE_IMPORT:
+ case DNTT_TYPE_LABEL:
+ case DNTT_TYPE_FPARAM:
+ case DNTT_TYPE_SVAR:
+ case DNTT_TYPE_DVAR:
+ case DNTT_TYPE_CONST:
+ case DNTT_TYPE_TYPEDEF:
+ case DNTT_TYPE_TAGDEF:
+ case DNTT_TYPE_MEMENUM:
+ case DNTT_TYPE_FIELD:
+ case DNTT_TYPE_SA:
return 1;
- case K_BEGIN:
- case K_END:
- case K_WITH:
- case K_COMMON:
- case K_POINTER:
- case K_ENUM:
- case K_SET:
- case K_SUBRANGE:
- case K_ARRAY:
- case K_STRUCT:
- case K_UNION:
- case K_VARIANT:
- case K_FILE:
- case K_FUNCTYPE:
- case K_COBSTRUCT:
- case K_XREF:
- case K_MACRO:
+ case DNTT_TYPE_BEGIN:
+ case DNTT_TYPE_END:
+ case DNTT_TYPE_WITH:
+ case DNTT_TYPE_COMMON:
+ case DNTT_TYPE_POINTER:
+ case DNTT_TYPE_ENUM:
+ case DNTT_TYPE_SET:
+ case DNTT_TYPE_SUBRANGE:
+ case DNTT_TYPE_ARRAY:
+ case DNTT_TYPE_STRUCT:
+ case DNTT_TYPE_UNION:
+ case DNTT_TYPE_VARIANT:
+ case DNTT_TYPE_FILE:
+ case DNTT_TYPE_FUNCTYPE:
+ case DNTT_TYPE_COBSTRUCT:
+ case DNTT_TYPE_XREF:
+ case DNTT_TYPE_MACRO:
default:
return 0;
}
@@ -1068,7 +1079,7 @@ hpread_expand_symtab (objfile, sym_offset, sym_size, text_offset, text_size,
union dnttentry *dn_bufp;
unsigned max_symnum;
- int sym_index = sym_offset / DNTTBLOCKSIZE;
+ int sym_index = sym_offset / sizeof (struct dntt_type_block);
current_objfile = objfile;
subfile_stack = 0;
@@ -1076,11 +1087,11 @@ hpread_expand_symtab (objfile, sym_offset, sym_size, text_offset, text_size,
last_source_file = 0;
dn_bufp = hpread_get_lntt (sym_index, objfile);
- if (!((dn_bufp->dblock.kind == (unsigned char) K_SRCFILE) ||
- (dn_bufp->dblock.kind == (unsigned char) K_MODULE)))
+ if (!((dn_bufp->dblock.kind == (unsigned char) DNTT_TYPE_SRCFILE) ||
+ (dn_bufp->dblock.kind == (unsigned char) DNTT_TYPE_MODULE)))
start_symtab ("globals", NULL, 0);
- max_symnum = sym_size / DNTTBLOCKSIZE;
+ max_symnum = sym_size / sizeof (struct dntt_type_block);
/* Read in and process each debug symbol within the specified range. */
for (symnum = 0;
@@ -1111,22 +1122,22 @@ hpread_expand_symtab (objfile, sym_offset, sym_size, text_offset, text_size,
static int
hpread_type_translate (typep)
- DNTTPOINTER typep;
+ dnttpointer typep;
{
if (!typep.dntti.immediate)
abort ();
switch (typep.dntti.type)
{
- case T_BOOLEAN:
- case T_BOOLEAN_S300_COMPAT:
- case T_BOOLEAN_VAX_COMPAT:
+ case HP_TYPE_BOOLEAN:
+ case HP_TYPE_BOOLEAN_S300_COMPAT:
+ case HP_TYPE_BOOLEAN_VAX_COMPAT:
return FT_BOOLEAN;
/* Ugh. No way to distinguish between signed and unsigned chars. */
- case T_CHAR:
- case T_WIDE_CHAR:
+ case HP_TYPE_CHAR:
+ case HP_TYPE_WIDE_CHAR:
return FT_CHAR;
- case T_INT:
+ case HP_TYPE_INT:
if (typep.dntti.bitlength <= 8)
return FT_CHAR;
if (typep.dntti.bitlength <= 16)
@@ -1134,9 +1145,9 @@ hpread_type_translate (typep)
if (typep.dntti.bitlength <= 32)
return FT_INTEGER;
return FT_LONG_LONG;
- case T_LONG:
+ case HP_TYPE_LONG:
return FT_LONG;
- case T_UNS_LONG:
+ case HP_TYPE_UNSIGNED_LONG:
if (typep.dntti.bitlength <= 8)
return FT_UNSIGNED_CHAR;
if (typep.dntti.bitlength <= 16)
@@ -1144,7 +1155,7 @@ hpread_type_translate (typep)
if (typep.dntti.bitlength <= 32)
return FT_UNSIGNED_LONG;
return FT_UNSIGNED_LONG_LONG;
- case T_UNS_INT:
+ case HP_TYPE_UNSIGNED_INT:
if (typep.dntti.bitlength <= 8)
return FT_UNSIGNED_CHAR;
if (typep.dntti.bitlength <= 16)
@@ -1152,28 +1163,28 @@ hpread_type_translate (typep)
if (typep.dntti.bitlength <= 32)
return FT_UNSIGNED_INTEGER;
return FT_UNSIGNED_LONG_LONG;
- case T_REAL:
- case T_REAL_3000:
- case T_DOUBLE:
+ case HP_TYPE_REAL:
+ case HP_TYPE_REAL_3000:
+ case HP_TYPE_DOUBLE:
if (typep.dntti.bitlength == 64)
return FT_DBL_PREC_FLOAT;
if (typep.dntti.bitlength == 128)
return FT_EXT_PREC_FLOAT;
return FT_FLOAT;
- case T_COMPLEX:
- case T_COMPLEXS3000:
+ case HP_TYPE_COMPLEX:
+ case HP_TYPE_COMPLEXS3000:
if (typep.dntti.bitlength == 128)
return FT_DBL_PREC_COMPLEX;
if (typep.dntti.bitlength == 192)
return FT_EXT_PREC_COMPLEX;
return FT_COMPLEX;
- case T_STRING200:
- case T_LONGSTRING200:
- case T_FTN_STRING_SPEC:
- case T_MOD_STRING_SPEC:
- case T_MOD_STRING_3000:
- case T_FTN_STRING_S300_COMPAT:
- case T_FTN_STRING_VAX_COMPAT:
+ case HP_TYPE_STRING200:
+ case HP_TYPE_LONGSTRING200:
+ case HP_TYPE_FTN_STRING_SPEC:
+ case HP_TYPE_MOD_STRING_SPEC:
+ case HP_TYPE_MOD_STRING_3000:
+ case HP_TYPE_FTN_STRING_S300_COMPAT:
+ case HP_TYPE_FTN_STRING_VAX_COMPAT:
return FT_STRING;
default:
abort ();
@@ -1184,7 +1195,7 @@ hpread_type_translate (typep)
static struct type **
hpread_lookup_type (hp_type, objfile)
- DNTTPOINTER hp_type;
+ dnttpointer hp_type;
struct objfile *objfile;
{
unsigned old_len;
@@ -1225,7 +1236,7 @@ hpread_lookup_type (hp_type, objfile)
static struct type *
hpread_alloc_type (hp_type, objfile)
- DNTTPOINTER hp_type;
+ dnttpointer hp_type;
struct objfile *objfile;
{
struct type **type_addr;
@@ -1243,14 +1254,14 @@ hpread_alloc_type (hp_type, objfile)
static struct type *
hpread_read_enum_type (hp_type, dn_bufp, objfile)
- DNTTPOINTER hp_type;
+ dnttpointer hp_type;
union dnttentry *dn_bufp;
struct objfile *objfile;
{
struct type *type;
struct pending **symlist, *osyms, *syms;
int o_nsyms, nsyms = 0;
- DNTTPOINTER mem;
+ dnttpointer mem;
union dnttentry *memp;
char *name;
long n;
@@ -1322,14 +1333,14 @@ hpread_read_enum_type (hp_type, dn_bufp, objfile)
static struct type *
hpread_read_function_type (hp_type, dn_bufp, objfile)
- DNTTPOINTER hp_type;
+ dnttpointer hp_type;
union dnttentry *dn_bufp;
struct objfile *objfile;
{
struct type *type, *type1;
struct pending **symlist, *osyms, *syms;
int o_nsyms, nsyms = 0;
- DNTTPOINTER param;
+ dnttpointer param;
union dnttentry *paramp;
char *name;
long n;
@@ -1431,7 +1442,7 @@ hpread_read_function_type (hp_type, dn_bufp, objfile)
static struct type *
hpread_read_struct_type (hp_type, dn_bufp, objfile)
- DNTTPOINTER hp_type;
+ dnttpointer hp_type;
union dnttentry *dn_bufp;
struct objfile *objfile;
{
@@ -1445,7 +1456,7 @@ hpread_read_struct_type (hp_type, dn_bufp, objfile)
struct nextfield *list = 0;
struct nextfield *new;
int n, nfields = 0;
- DNTTPOINTER field;
+ dnttpointer field;
union dnttentry *fieldp;
/* Is it something we've already dealt with? */
@@ -1455,12 +1466,12 @@ hpread_read_struct_type (hp_type, dn_bufp, objfile)
return type;
/* Get the basic type correct. */
- if (dn_bufp->dblock.kind == K_STRUCT)
+ if (dn_bufp->dblock.kind == DNTT_TYPE_STRUCT)
{
TYPE_CODE (type) = TYPE_CODE_STRUCT;
TYPE_LENGTH (type) = dn_bufp->dstruct.bitlength / 8;
}
- else if (dn_bufp->dblock.kind == K_UNION)
+ else if (dn_bufp->dblock.kind == DNTT_TYPE_UNION)
{
TYPE_CODE (type) = TYPE_CODE_UNION;
TYPE_LENGTH (type) = dn_bufp->dunion.bitlength / 8;
@@ -1510,7 +1521,7 @@ hpread_read_struct_type (hp_type, dn_bufp, objfile)
static struct type *
hpread_read_set_type (hp_type, dn_bufp, objfile)
- DNTTPOINTER hp_type;
+ dnttpointer hp_type;
union dnttentry *dn_bufp;
struct objfile *objfile;
{
@@ -1534,7 +1545,7 @@ hpread_read_set_type (hp_type, dn_bufp, objfile)
static struct type *
hpread_read_array_type (hp_type, dn_bufp, objfile)
- DNTTPOINTER hp_type;
+ dnttpointer hp_type;
union dnttentry *dn_bufp;
struct objfile *objfile;
{
@@ -1576,7 +1587,7 @@ hpread_read_array_type (hp_type, dn_bufp, objfile)
/* Read in and internalize a subrange debug symbol. */
static struct type *
hpread_read_subrange_type (hp_type, dn_bufp, objfile)
- DNTTPOINTER hp_type;
+ dnttpointer hp_type;
union dnttentry *dn_bufp;
struct objfile *objfile;
{
@@ -1610,7 +1621,7 @@ hpread_read_subrange_type (hp_type, dn_bufp, objfile)
static struct type *
hpread_type_lookup (hp_type, objfile)
- DNTTPOINTER hp_type;
+ dnttpointer hp_type;
struct objfile *objfile;
{
union dnttentry *dn_bufp;
@@ -1627,24 +1638,24 @@ hpread_type_lookup (hp_type, objfile)
switch (dn_bufp->dblock.kind)
{
- case K_SRCFILE:
- case K_MODULE:
- case K_FUNCTION:
- case K_ENTRY:
- case K_BEGIN:
- case K_END:
- case K_IMPORT:
- case K_LABEL:
- case K_WITH:
- case K_COMMON:
- case K_FPARAM:
- case K_SVAR:
- case K_DVAR:
- case K_CONST:
+ case DNTT_TYPE_SRCFILE:
+ case DNTT_TYPE_MODULE:
+ case DNTT_TYPE_FUNCTION:
+ case DNTT_TYPE_ENTRY:
+ case DNTT_TYPE_BEGIN:
+ case DNTT_TYPE_END:
+ case DNTT_TYPE_IMPORT:
+ case DNTT_TYPE_LABEL:
+ case DNTT_TYPE_WITH:
+ case DNTT_TYPE_COMMON:
+ case DNTT_TYPE_FPARAM:
+ case DNTT_TYPE_SVAR:
+ case DNTT_TYPE_DVAR:
+ case DNTT_TYPE_CONST:
/* Opps. Something went very wrong. */
return lookup_fundamental_type (objfile, FT_VOID);
- case K_TYPEDEF:
+ case DNTT_TYPE_TYPEDEF:
{
struct type *structtype = hpread_type_lookup (dn_bufp->dtype.type,
objfile);
@@ -1657,7 +1668,7 @@ hpread_type_lookup (hp_type, objfile)
return structtype;
}
- case K_TAGDEF:
+ case DNTT_TYPE_TAGDEF:
{
/* Just a little different from above. We have to tack on
an identifier of some kind (struct, union, enum, etc). */
@@ -1673,9 +1684,9 @@ hpread_type_lookup (hp_type, objfile)
else
abort ();
- if (dn_bufp->dblock.kind == K_STRUCT)
+ if (dn_bufp->dblock.kind == DNTT_TYPE_STRUCT)
prefix = "struct ";
- else if (dn_bufp->dblock.kind == K_UNION)
+ else if (dn_bufp->dblock.kind == DNTT_TYPE_UNION)
prefix = "union ";
else
prefix = "enum ";
@@ -1693,43 +1704,43 @@ hpread_type_lookup (hp_type, objfile)
return structtype;
}
- case K_POINTER:
+ case DNTT_TYPE_POINTER:
return lookup_pointer_type (hpread_type_lookup (dn_bufp->dptr.pointsto,
objfile));
- case K_ENUM:
+ case DNTT_TYPE_ENUM:
return hpread_read_enum_type (hp_type, dn_bufp, objfile);
- case K_MEMENUM:
+ case DNTT_TYPE_MEMENUM:
return lookup_fundamental_type (objfile, FT_VOID);
- case K_SET:
+ case DNTT_TYPE_SET:
return hpread_read_set_type (hp_type, dn_bufp, objfile);
- case K_SUBRANGE:
+ case DNTT_TYPE_SUBRANGE:
return hpread_read_subrange_type (hp_type, dn_bufp, objfile);
- case K_ARRAY:
+ case DNTT_TYPE_ARRAY:
return hpread_read_array_type (hp_type, dn_bufp, objfile);
- case K_STRUCT:
- case K_UNION:
+ case DNTT_TYPE_STRUCT:
+ case DNTT_TYPE_UNION:
return hpread_read_struct_type (hp_type, dn_bufp, objfile);
- case K_FIELD:
+ case DNTT_TYPE_FIELD:
return hpread_type_lookup (dn_bufp->dfield.type, objfile);
- case K_VARIANT:
- case K_FILE:
+ case DNTT_TYPE_VARIANT:
+ case DNTT_TYPE_FILE:
return lookup_fundamental_type (objfile, FT_VOID);
- case K_FUNCTYPE:
+ case DNTT_TYPE_FUNCTYPE:
return lookup_function_type (hpread_type_lookup (dn_bufp->dfunctype.retval,
objfile));
- case K_COBSTRUCT:
- case K_XREF:
- case K_SA:
- case K_MACRO:
+ case DNTT_TYPE_COBSTRUCT:
+ case DNTT_TYPE_XREF:
+ case DNTT_TYPE_SA:
+ case DNTT_TYPE_MACRO:
default:
return lookup_fundamental_type (objfile, FT_VOID);
}
}
-static SLTPOINTER
+static sltpointer
hpread_record_lines (subfile, s_idx, e_idx, objfile)
struct subfile *subfile;
- SLTPOINTER s_idx, e_idx;
+ sltpointer s_idx, e_idx;
struct objfile *objfile;
{
union sltentry *sl_bufp;
@@ -1765,7 +1776,7 @@ hpread_process_one_debug_symbol (dn_bufp, name, section_offsets, objfile,
CORE_ADDR valu;
int offset = ANOFFSET (section_offsets, SECT_OFF_TEXT);
union dnttentry *dn_temp;
- DNTTPOINTER hp_type;
+ dnttpointer hp_type;
struct symbol *sym;
struct context_stack *new;
@@ -1790,7 +1801,7 @@ hpread_process_one_debug_symbol (dn_bufp, name, section_offsets, objfile,
switch (type)
{
- case K_SRCFILE:
+ case DNTT_TYPE_SRCFILE:
/* This type of symbol indicates from which source file or include file
the following data comes. If there are no modules it also may
indicate the start of a new source file, in which case we must
@@ -1808,12 +1819,12 @@ hpread_process_one_debug_symbol (dn_bufp, name, section_offsets, objfile,
start_subfile (name, NULL);
break;
- case K_MODULE:
- /* No need to do anything with these K_MODULE symbols anymore. */
+ case DNTT_TYPE_MODULE:
+ /* No need to do anything with these DNTT_TYPE_MODULE symbols anymore. */
break;
- case K_FUNCTION:
- case K_ENTRY:
+ case DNTT_TYPE_FUNCTION:
+ case DNTT_TYPE_ENTRY:
/* A function or secondary entry point. */
valu = dn_bufp->dfunc.lowaddr + offset;
SL_INDEX (objfile) = hpread_record_lines (current_subfile,
@@ -1831,14 +1842,14 @@ hpread_process_one_debug_symbol (dn_bufp, name, section_offsets, objfile,
SYMBOL_CLASS (sym) = LOC_BLOCK;
SYMBOL_TYPE (sym) = hpread_read_function_type (hp_type, dn_bufp, objfile);
- if (dn_bufp->dfunc.public)
+ if (dn_bufp->dfunc.global)
add_symbol_to_list (sym, &global_symbols);
else
add_symbol_to_list (sym, &file_symbols);
new->name = sym;
/* Search forward to the next scope beginning. */
- while (dn_bufp->dblock.kind != K_BEGIN)
+ while (dn_bufp->dblock.kind != DNTT_TYPE_BEGIN)
{
dn_bufp = hpread_get_lntt (++index, objfile);
if (dn_bufp->dblock.extension)
@@ -1852,7 +1863,7 @@ hpread_process_one_debug_symbol (dn_bufp, name, section_offsets, objfile,
record_line (current_subfile, SYMBOL_LINE (sym), valu);
break;
- case K_BEGIN:
+ case DNTT_TYPE_BEGIN:
/* Begin a new scope. */
SL_INDEX (objfile) = hpread_record_lines (current_subfile,
SL_INDEX (objfile),
@@ -1864,7 +1875,7 @@ hpread_process_one_debug_symbol (dn_bufp, name, section_offsets, objfile,
new = push_context (desc, valu);
break;
- case K_END:
+ case DNTT_TYPE_END:
/* End a scope. */
SL_INDEX (objfile) = hpread_record_lines (current_subfile,
SL_INDEX (objfile),
@@ -1872,13 +1883,13 @@ hpread_process_one_debug_symbol (dn_bufp, name, section_offsets, objfile,
objfile);
switch (dn_bufp->dend.endkind)
{
- case K_MODULE:
+ case DNTT_TYPE_MODULE:
/* Ending a module ends the symbol table for that module. */
valu = text_offset + text_size + offset;
(void) end_symtab (valu, 0, 0, objfile, 0);
break;
- case K_FUNCTION:
+ case DNTT_TYPE_FUNCTION:
/* Ending a function, well, ends the function's scope. */
dn_temp = hpread_get_lntt (dn_bufp->dend.beginscope.dnttp.index,
objfile);
@@ -1889,7 +1900,7 @@ hpread_process_one_debug_symbol (dn_bufp, name, section_offsets, objfile,
new->start_addr, valu, objfile);
WITHIN_FUNCTION (objfile) = 0;
break;
- case K_BEGIN:
+ case DNTT_TYPE_BEGIN:
/* Just ending a local scope. */
valu = hpread_get_location (dn_bufp->dend.address, objfile);
/* Why in the hell is this needed? */
@@ -1905,10 +1916,10 @@ hpread_process_one_debug_symbol (dn_bufp, name, section_offsets, objfile,
break;
}
break;
- case K_LABEL:
+ case DNTT_TYPE_LABEL:
SYMBOL_NAMESPACE (sym) = LABEL_NAMESPACE;
break;
- case K_FPARAM:
+ case DNTT_TYPE_FPARAM:
/* Function parameters. */
if (dn_bufp->dfparam.regparam)
SYMBOL_CLASS (sym) = LOC_REGISTER;
@@ -1927,99 +1938,99 @@ hpread_process_one_debug_symbol (dn_bufp, name, section_offsets, objfile,
SYMBOL_TYPE (sym) = hpread_type_lookup (dn_bufp->dfparam.type, objfile);
add_symbol_to_list (sym, &local_symbols);
break;
- case K_SVAR:
+ case DNTT_TYPE_SVAR:
/* Static variables. */
SYMBOL_CLASS (sym) = LOC_STATIC;
SYMBOL_VALUE_ADDRESS (sym) = dn_bufp->dsvar.location;
SYMBOL_TYPE (sym) = hpread_type_lookup (dn_bufp->dsvar.type, objfile);
- if (dn_bufp->dsvar.public)
+ if (dn_bufp->dsvar.global)
add_symbol_to_list (sym, &global_symbols);
else if (WITHIN_FUNCTION (objfile))
add_symbol_to_list (sym, &local_symbols);
else
add_symbol_to_list (sym, &file_symbols);
break;
- case K_DVAR:
+ case DNTT_TYPE_DVAR:
/* Dynamic variables. */
if (dn_bufp->ddvar.regvar)
SYMBOL_CLASS (sym) = LOC_REGISTER;
else
SYMBOL_CLASS (sym) = LOC_LOCAL;
SYMBOL_VALUE (sym) = dn_bufp->ddvar.location;
-#ifdef HPREAD_ADJUST_STACK_ADDRESS
+#ifdef HPREAD_ADJUST_STACDNTT_TYPE_ADDRESS
SYMBOL_VALUE (sym)
- += HPREAD_ADJUST_STACK_ADDRESS (CURRENT_FUNCTION_VALUE (objfile));
+ += HPREAD_ADJUST_STACDNTT_TYPE_ADDRESS (CURRENT_FUNCTION_VALUE (objfile));
#endif
SYMBOL_TYPE (sym) = hpread_type_lookup (dn_bufp->ddvar.type, objfile);
- if (dn_bufp->ddvar.public)
+ if (dn_bufp->ddvar.global)
add_symbol_to_list (sym, &global_symbols);
else if (WITHIN_FUNCTION (objfile))
add_symbol_to_list (sym, &local_symbols);
else
add_symbol_to_list (sym, &file_symbols);
break;
- case K_CONST:
+ case DNTT_TYPE_CONST:
/* A constant (pascal?). */
SYMBOL_CLASS (sym) = LOC_CONST;
SYMBOL_VALUE (sym) = dn_bufp->dconst.location;
SYMBOL_TYPE (sym) = hpread_type_lookup (dn_bufp->dconst.type, objfile);
- if (dn_bufp->dconst.public)
+ if (dn_bufp->dconst.global)
add_symbol_to_list (sym, &global_symbols);
else if (WITHIN_FUNCTION (objfile))
add_symbol_to_list (sym, &local_symbols);
else
add_symbol_to_list (sym, &file_symbols);
break;
- case K_TYPEDEF:
+ case DNTT_TYPE_TYPEDEF:
SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
SYMBOL_TYPE (sym) = hpread_type_lookup (dn_bufp->dtype.type, objfile);
- if (dn_bufp->dtype.public)
+ if (dn_bufp->dtype.global)
add_symbol_to_list (sym, &global_symbols);
else if (WITHIN_FUNCTION (objfile))
add_symbol_to_list (sym, &local_symbols);
else
add_symbol_to_list (sym, &file_symbols);
break;
- case K_TAGDEF:
+ case DNTT_TYPE_TAGDEF:
SYMBOL_NAMESPACE (sym) = STRUCT_NAMESPACE;
SYMBOL_TYPE (sym) = hpread_type_lookup (dn_bufp->dtype.type, objfile);
TYPE_NAME (sym->type) = SYMBOL_NAME (sym);
TYPE_TAG_NAME (sym->type) = SYMBOL_NAME (sym);
- if (dn_bufp->dtype.public)
+ if (dn_bufp->dtype.global)
add_symbol_to_list (sym, &global_symbols);
else if (WITHIN_FUNCTION (objfile))
add_symbol_to_list (sym, &local_symbols);
else
add_symbol_to_list (sym, &file_symbols);
break;
- case K_POINTER:
+ case DNTT_TYPE_POINTER:
SYMBOL_TYPE (sym) = lookup_pointer_type (hpread_type_lookup
(dn_bufp->dptr.pointsto,
objfile));
add_symbol_to_list (sym, &file_symbols);
break;
- case K_ENUM:
+ case DNTT_TYPE_ENUM:
SYMBOL_NAMESPACE (sym) = STRUCT_NAMESPACE;
SYMBOL_TYPE (sym) = hpread_read_enum_type (hp_type, dn_bufp, objfile);
add_symbol_to_list (sym, &file_symbols);
break;
- case K_MEMENUM:
+ case DNTT_TYPE_MEMENUM:
break;
- case K_SET:
+ case DNTT_TYPE_SET:
SYMBOL_TYPE (sym) = hpread_read_set_type (hp_type, dn_bufp, objfile);
add_symbol_to_list (sym, &file_symbols);
break;
- case K_SUBRANGE:
+ case DNTT_TYPE_SUBRANGE:
SYMBOL_TYPE (sym) = hpread_read_subrange_type (hp_type, dn_bufp,
objfile);
add_symbol_to_list (sym, &file_symbols);
break;
- case K_ARRAY:
+ case DNTT_TYPE_ARRAY:
SYMBOL_TYPE (sym) = hpread_read_array_type (hp_type, dn_bufp, objfile);
add_symbol_to_list (sym, &file_symbols);
break;
- case K_STRUCT:
- case K_UNION:
+ case DNTT_TYPE_STRUCT:
+ case DNTT_TYPE_UNION:
SYMBOL_NAMESPACE (sym) = STRUCT_NAMESPACE;
SYMBOL_TYPE (sym) = hpread_read_struct_type (hp_type, dn_bufp, objfile);
add_symbol_to_list (sym, &file_symbols);
diff --git a/gdb/somread.c b/gdb/somread.c
index 35def22..d6d877f 100644
--- a/gdb/somread.c
+++ b/gdb/somread.c
@@ -341,10 +341,8 @@ som_symfile_read (objfile, section_offsets, mainline)
stabsect_build_psymtabs (objfile, section_offsets, mainline,
"$GDB_SYMBOLS$", "$GDB_STRINGS$", "$TEXT$");
-/* start-sanitize-hpread */
/* Now read the native debug information. */
hpread_build_psymtabs (objfile, section_offsets, mainline);
-/* end-sanitize-hpread */
/* Install any minimal symbols that have been collected as the current
minimal symbols for this objfile. */
@@ -382,9 +380,7 @@ som_symfile_finish (objfile)
{
mfree (objfile -> md, objfile -> sym_stab_info);
}
-/* start-sanitize-hpread */
hpread_symfile_finish (objfile);
-/* end-sanitize-hpread */
}
/* SOM specific initialization routine for reading symbols.
@@ -394,9 +390,7 @@ static void
som_symfile_init (objfile)
struct objfile *objfile;
{
-/* start-sanitize-hpread */
hpread_symfile_init (objfile);
-/* end-sanitize-hpread */
}
/* SOM specific parsing routine for section offsets.