aboutsummaryrefslogtreecommitdiff
path: root/gdb/hpread.c
AgeCommit message (Collapse)AuthorFilesLines
1999-09-09import gdb-1999-09-08 snapshotStan Shebs1-17/+13
1999-07-07import gdb-1999-07-07 post reformatJason Molenda1-94/+96
1999-04-16Initial creation of sourceware repositorygdb-4_18-branchpointStan Shebs1-0/+2050
1999-04-16Initial creation of sourceware repositoryStan Shebs1-2050/+0
1998-12-31all remaining *.c *.h files from hp merge.David Taylor1-4/+4
1997-12-17o Fix code deleting psymtab entry from objfile's list.Andrew Cagney1-14/+1
Only worked if the first element in the list was being deleted. o When MAINLINE (reading main objectfile and need to clear out old data), change elfread.c so that the psymbol table is emptied once (in elf_symfile_read) instead of multiple times in each *_read_psymtab function. o For elf_symfile_read, load dwarf2 symbols last (so that they are searched for first). o In mdebug_psymtab_read, delete check to see if symbols for current source file already loaded. Test doesn't work for .h files. Above change works better
1997-08-06 * hpread.c (hpread_read_struct_type): Use accessor macros ratherJeff Law1-4/+5
than directly mucking around with data structures.
1997-08-05 * gdbtypes.h: Re-interpret struct field. Suppport address of static.Per Bothner1-1/+0
Add a bunch of macros. * coffread.c, dwarf2read.c, dwarfread.c, mdebugread.c, stabsread.c: Update to use new macros. * coffread.c, hpread.c, stabsread.c: Remove bugus TYPE_FIELD_VALUE. * value.h, values.c (value_static_field): New function. * cp-valprint.c, valops.c: Modify to use value_static_field.
1997-06-28 * buildsym.h (struct subfile): Add debugformat member.Fred Fish1-1/+5
(record_debugformat): Declare global function. * buildsym.c (start_subfile): Initialize debugformat member to NULL. (record_debugformat): New function to record the format. (end_symtab): Copy format into symtab debugformat member. (end_symtab): Free subfile debugformat member. * symmisc.c (free_symtab): Free debugformat when freeing symtab. * symfile.c (allocate_symtab): Initialize the new debugformat member for new symtabs. * symtab.h (struct symtab): Add debugformat member. * source.c (source_info): Print the debug format. * os9kread.c (os9k_process_one_symbol): Call record_debugformat with "OS9". * hpread.c (hpread_expand_symtab): Call record_debugformat with "HP". (hpread_process_one_debug_symbol): Ditto. * dbxread.c (process_one_symbol): Call record_debugformat with "stabs". * coffread.c (coff_start_symtab): Call record_debugformat with "COFF". * xcoffread.c (read_xcoff_symtab): Call record_debugformat with "XCOFF". * dwarfread.c (read_file_scope): Call record_debugformat with "DWARF 1". * dwarf2read.c (read_file_scope): Call record_debugformat with "DWARF 2". * dstread.c (dst_end_symtab): Set debugformat to be "Apollo DST". * mdebugread.c (new_symtab): Set debugformat to be "ECOFF".
1996-10-08Just some cleanups noticed while working on PR 10760Fred Fish1-1/+1
* dbxread.c (dbx_symfile_read): Call free_pending_blocks rather than poking global variable (which is now static). * hpread.c (hpread_build_psymtabs): Ditto. * os9kread.c (os9k_symfile_read): Ditto. * xcoffread.c (xcoff_initial_scan): Ditto. * buildsym.h (free_pending_blocks): Declare here. (pending_blocks): Remove declaration of global symbol. (free_pendings): Remove declaration of global symbol. (make_blockvector): Declare here. (record_pending_block): Declare here. * dstread.c (make_blockvector): Remove static copy that was old clone of version in buildsym.c. (process_dst_block): Call record_pending_block rather than doing it by hand. (read_dst_symtab): Ditto. * buildsym.c (make_blockvector): Make global rather than static, (record_pending_block): New function, code moved from finish_block. (finish_block): Use record_pending_block. (free_pending_blocks): New function. (really_free_pendings): Call free_pending_blocks. (pending_blocks): Make static instead of global. (free_pendings): Make static instead of global.
1996-07-28 * configure.in: Add test for "long long" support.Fred Fish1-0/+3
* configure: Regenerate with autoconf. * acconfig.h: Add CC_HAS_LONG_LONG * config.in: Regenerate with autoheader. * config/mips/tm-mips64.h (FORCE_LONG_LONG): Remove * config/sparc/tm-sp64.h (CC_HAS_LONG_LONG): Remove. * config/mips/tm-vr4300el.h (CC_HAS_LONG_LONG): Remove. * config/mips/tm-vr4300.h (CC_HAS_LONG_LONG): Remove. * config/mips/xm-irix5.h (CC_HAS_LONG_LONG): Remove (PRINTF_HAS_LONG_LONG): Remove. (FORCE_LONG_LONG): Remove. * config/powerpc/xm-aix.h (UINT_MAX): Undef and use gdb's version. * config/convex/xm-convex.h (CC_HAS_LONG_LONG): Remove (PRINTF_HAS_LONG_LONG): Remove. * config/xm-nbsd.h (CC_HAS_LONG_LONG): Remove. (PRINTF_HAS_LONG_LONG): Remove. * config/pa/tm-hppa.h (GET_FIELD): Put parens around subtraction inside shift. Put parens around subtraction in operand of bitwise and. (struct frame_info): Forward declare if __STDC__ defined. (frame_saved_regs): Ditto. (struct value): Ditto. (struct type): Ditto. (struct inferior_status): Ditto. (init_extra_frame_info): Add prototype. (skip_prologue): Ditto. (frameless_function_invocation): Ditto. (frame_chain): Ditto. (frame_chain_valid): Ditto. (saved_pc_after_call): Ditto. (hppa_fix_call_dummy): Ditto. (hppa_push_arguments): Ditto. (pa_do_registers_info): Ditto. (in_solib_call_trampoline): Ditto. (in_solib_return_trampoline): Ditto. (push_dummy_frame): Ditto. * convex-tdep.c (decout): Use print_longest rather than fprintf_filtered. * defs.h: Remove use of FORCE_LONG_LONG and __GNUC__ to set CC_HAS_LONG_LONG. (INT_MIN): Fix so it works correctly when assigned to a long long. * valprint.c (longest_to_int): Rewrite to remove dependence on INT_MIN and INT_MAX. (print_longest): Rewrite the code that falls back to synthesized hex output when LONGEST value is not representable as in a long and printf doesn't support printing long longs. * ch-valprint.c (chill_val_print): Cast 2nd arg of chill_print_type_scalar to LONGEST. chill_print_type_scalar): Make static and add prototype. * hppa-tdep.c (get_field): Ifdef out unused function. (set_field): Ditto. (extract_3): Ditto. (extract_5_store): Ditto. (extract_11): Ditto. (extract_12): Ditto. (deposit_17): Ditto. (extract_14): Convert to static and add prototype. (deposit_14): Ditto. (extract_21): Ditto. (deposit_21): Ditto. (extract_17): Ditto. (extract_5r_store): Ditto. (extract_5R_store): Ditto. (extract_5_load): Ditto. (find_proc_framesize): Ditto. (find_dummy_frame_regs): Ditto. (sign_extend): Ditto. (find_unwind_entry): Add prototype. (find_return_regnum): Ditto. (unwind_command): Ditto. (find_dummy_frame_regs): Add parens around subtraction in operand of bitwise-and. (skip_prologue): Add parens around operands of logical-and inside operand of logical-or. (sign_extend): Add parens around operands of subtraction inside operand of shift. (low_sign_extend): Ditto. * top.c (filename_completer): Convert old style decl of filename_completion_function into prototype. * f-lang.c (patch_common_entries): Ifdef out unused function. * stabsread.c (read_cfront_baseclasses): Remove unused local variable "msg_noterm". (resolve_cfront_continuation): Remove unused local variable "fip". (read_type): Remove unused variable xtypenums. (read_cfront_static_fields): Remove unused variable "i". (read_cfront_static_fields): Remove unused variable "nfields". (read_cfront_member_functions): Add missing comment terminator. (read_cfront_static_fields): Return 1 rather than random value. (read_cfront_baseclasses): Ditto. (read_cfront_baseclasses): Ditto. (read_cfront_baseclasses): Ditto. * somsolib.c (som_solib_create_inferior_hook): Remove unused variable "u". (som_solib_create_inferior_hook): Remove unused variable shadow_contents. (language.h): Add for needed prototypes. (som_solib_sharedlibrary_command): Add prototype. * hpread.c: (hpread_read_array_type): Add prototype. * somread.c (hpread_build_pysmtabs): Add prototype. (hpread_symfile_finish): Ditto. (hpread_symfile_init): Ditto. * hppah-nat.c (fetch_register): Convert old style decl to prototype. (gdbcore.h): Include for needed prototypes. (fetch_register): Remove unused variable "mess". * remote-pa.c (get_offsets): Ifdef out unused function. (remote_start_remote): Remove unused variable "timeout". (boot_board): Add prototype. (reaad_frame): Add prototype. (getpkt): Remove unused variable "bp". (remote_kill): Add prototype. (remote_mourn): Add prototype. (remote_insert_breakpoint): Add prototype. (remote_remove_breakpoint): Add prototype. * valops.c (value_push): Only use if PUSH_ARGUMENTS is not defined. * infcmd.c (do_registers_info): Only need prototype if DO_REGISTERS_INFO is not defined. (breakpoint_auto_delete_contents): Only need if CALL_DUMMY_BREAKPOINT_OFFSET is defined.
1996-07-13 * hpread.c (hpread_lookup_type): Use xmmalloc/xmrealloc ratherFred Fish1-2/+4
than xmalloc/xrealloc.
1996-07-08(laying some groundwork for a fix for PR 8443)Fred Fish1-3/+5
* coffread.c (record_minimal_symbol): Don't presave name string on symbol_obstack before passing to prim_record_minimal_symbol. It now handles saving the string itself. * dbxread.c (read_dbx_dynamic_symtab): Ditto. * mipsread.c (read_alphacoff_dynamic_symtab): Ditto. * os9kread.c (record_minimal_symbol): Ditto. * solib.c (solib_add_common_symbols): Ditto. * coffread.c (coff_symtab_read): Don't presave name string on symbol_obstack before passing to prim_record_minimal_symbol_and_info. It now handles saving the string itself. * dbxread.c (record_minimal_symbol): Ditto. * elfread.c (record_minimal_symbol_and_info): Ditto. * dstread.c (record_minimal_symbol): Remove static function that just called prim_record_minimal_symbol with the same args (after change to prim_record_minimal_symbol to do it's own name string saves). * nlmread.c (record_minimal_symbol): Ditto. * somread.c (record_minimal_symbol): Ditto. * hpread.c (hpread_read_enum_type): Save symbol name on symbol obstack. (hpread_read_function_type): Ditto. (hpread_process_one_debug_symbol): Ditto. * mdebugread.c (parse_symbol): Ditto. (new_symbol): Ditto. * minsyms.c (prim_record_minimal_symbol_and_info): Ditto. * coffread.c (process_coff_symbol): Use obsavestring to save SYMBOL_NAME, rather than obstack_copy0. * dstread.c (create_new_symbol): Ditto * symfile.c (obconcat): Ditto. * stabsread.c (patch_block_stabs): Ditto. * xcoffread.c (SYMNAME_ALLOC): Ditto. * symfile.c (obsavestring): Update comments * solib.c (solib_add_common_symbols): Remove local var origname.
1996-04-06 * symfile.c (INLINE_ADD_PSYMBOL): Remove ifdef.Fred Fish1-12/+13
(add_psymbol_to_list): Add an arg for passing CORE_ADDR values and use it, rather than calling add_psymbol_addr_to_list. (add_psymbol_addr_to_list): Delete. (add_psymbol_to_list): Make psymbol static to avoid random data in gaps due to alignment of structure members. * symfile.h (INLINE_ADD_PSYMBOL, ADD_PSYMBOL_TO_LIST, ADD_PSYMBOL_ADDR_TO_LIST): Remove. Real world tests show no performance improvements by inlining via complicated macros and they just make gdb larger and harder to maintain. * dwarfread.c (add_enum_psymbol): Replace ADD_PSYMBOL_TO_LIST and/or ADD_PSYMBOL_ADDR_TO_LIST macro(s) with call to add_psymbol_to_list with appropriate long or CORE_ADDR args. (add_partial_symbol): Ditto. * partial-stab.h: Ditto. * os9kread.c (read_os9k_psymtab): Ditto * mdebugread.c (parse_partial_symbols): Ditto. (handle_psymbol_enumerators): Ditto. (demangle.h): Include. * hpread.c (hpread_build_psymtabs): Ditto. (hpread_build_psymtabs): Ditto. (demangle.h): Include
1996-02-16 * bcache.c, bcache.h: New files to implement a byte cache.Fred Fish1-3/+3
* Makefile.in (SFILES): Add bcache.c. (symtab_h): Add bcache.h. (HFILES_NO_SRCDIR): add bcache.h (COMMON_OBJS): Add bcache.o (bcache.o): New target. * dbxread.c (start_psymtab): Make global_syms & static_syms type "partial_symbol **". * hpread.c (hpread_start_symtab): Ditto. * os9kread.c (os9k_start_psymtab): Ditto. * stabsread.h (start_psymtab): Ditto. * {symfile.c, symfile.h} (start_psymtab_common): Ditto. * maint.c (maintenance_print_statistics): Call print_symbol_bcache_statistics. * objfiles.c (allocate_objfile): Initialize psymbol bcache malloc and free pointers. * solib.c (allocate_rt_common_objfile): Ditto. * symfile.c (reread_symbols): Ditto. (free_objfile): Free psymbol bcache when objfile is freed. (objfile_relocate): Use new indirect psymbol pointers. * objfiles.h (struct objfile): Add psymbol cache. * symfile.c (compare_psymbols): Now passed pointers to pointers to psymbols. (reread_symbols): Free psymbol bcache when freeing other objfile resources. (add_psymbol_to_list, add_psymbol_addr_to_list): Initialize new psymbol using the psymbol bcache. (init_psymbol_list): Psymbol lists now contain pointers rather than the actual psymbols. * symfile.h (psymbol_allocation_list): Psymbol lists now dynamically grown arrays of pointers. (ADD_PSYMBOL_VT_TO_LIST): Initialize new symbol using the psymbol bcache. * symmisc.c (print_partial_symbols): Now takes pointer to pointer to partial symbol. (print_symbol_bcache_statistics): New function to print per objfile bcache statistics. (print_partial_symbol, print_partial_symbols, maintenance_check_symtabs, extend_psymbol_list): Account for change to pointer to pointer to partial symbol. * symtab.c (find_pc_psymbol, lookup_partial_symbol, decode_line_2, make_symbol_completion_list): Account for change to pointer to pointer to partial symbol. * symtab.h (bcache.h): Include. * xcoffread.c (xcoff_start_psymtab): Make global_syms & static_syms type "partial_symbol **".
1996-02-12 * somsolib.c (som_solib_add): Use xmalloc rather than bareFred Fish1-1/+1
unchecked call to malloc. * remote-mips.c (pmon_load_fast): ditto. * remote-mm.c (mm_open): ditto. * hpread.c (hpread_lookup_type): ditto. * remote-adapt.c (adapt_open): ditto.
1996-01-09 * hpread.c (hpread_build_psymtabs): Finish Jan 4thJeff Law1-1/+1
enum namespace -> enum_namespace change.
1996-01-08 * buildsym.c (end_symtab): Remove sort_pending and sort_linevecJeff Law1-3/+3
arguments. Sorting is now dependent on OBJF_REORDERED. All callers/references changed. * dbxread.c (read_ofile_symtab): Correctly determine value for last_source_start_addr for reordered executables. (process_one_symbol): Handle N_FUN with no name as an end of function marker. * partial-stab.h (case N_FN, N_TEXT): Don't assume CUR_SYMBOL_VALUE is the high text address for a psymtab. (case N_SO): Likewise. (case N_FUN): Handle N_FUN with no name as an end of function marker. * minsyms.c (lookup_minimal_symbol_by_pc): Examine all symbols at the same address rather than a random subset of them. * coffread.c (coff_symfile_init): Set OBJF_REORDERED. * elfread.c (elf_symfile_init): Similarly. * somread.c (som_symfile_init): Similarly. * xcoffread.c (xcoff_symfile_init): Similarly. Support for debugging reordered executables. Remaining mentor vm changes.
1995-08-02Update FSF address.Fred Fish1-1/+1
1995-08-01* configure.in: Check for working mmap, ansi headers, string.h,J.T. Conklin1-1/+1
strings.h, and memory.h. * configure: Regenerated. * gdb_stat.h: New file, "portable" <sys/stat.h>. * gdb_string.h: New file, "portable" <string.h>. * altos-xdep.c, arm-tdep.c, arm-xdep.c, convex-tdep.c, convex-xdep.c, coredep.c, cxux-nat.c, dbxread.c, exec.c, gould-xdep.c, hppa-tdep.c, i386aix-nat.c, i386b-nat.c, i386mach-nat.c, i386v-nat.c, infptrace.c, m88k-nat.c, main.c, mdebugread.c, objfiles.c, os9kread.c, procfs.c, pyr-xdep.c, rs6000-nat.c, source.c, standalone.c, stuff.c, sun386-nat.c, symfile.c, symm-nat.c, symm-tdep.c, symtab.c, top.c, ultra3-nat.c, ultra3-xdep.c, umax-xdep.c, xcoffread.c: Include "gdb_stat.h" instead of <sys/stat.h>. * alpha-tdep.c, breakpoint.c, buildsym.c, c-typeprint.c, ch-typeprint.c, coffread.c, command.c, core-sol2.c, core-svr4.c, core.c, corelow.c, cp-valprint.c, dbxread.c, dcache.c, demangle.c, dpx2-nat.c, dstread.c, dwarfread.c, elfread.c, environ.c, eval.c, exec.c, f-lang.c, f-typeprint.c, f-valprint.c, findvar.c, fork-child.c, gdbtypes.c, hpread.c, i386-tdep.c, infcmd.c, inflow.c, infptrace.c, infrun.c, irix5-nat.c, language.c, m2-typeprint.c, main.c, mdebugread.c, minsyms.c, mipsread.c, monitor.c, nlmread.c, objfiles.c, os9kread.c, osfsolib.c, parse.c, printcmd.c, procfs.c, regex.c, remote-adapt.c, remote-arc.c, remote-array.c, remote-bug.c, remote-e7000.c, remote-eb.c, remote-es.c, remote-hms.c, remote-mm.c, remote-os9k.c, remote-pa.c, remote-sim.c, remote-st.c, remote-udi.c, remote-utils.c, remote-vx.c, remote-vx29k.c, remote-vx68.c, remote-vx960.c, remote-vxmips.c, remote-vxsparc.c, remote.c, solib.c, somread.c, source.c, stabsread.c, stack.c, symfile.c, symmisc.c, symtab.c, target.c, top.c, typeprint.c, utils.c, valarith.c, valops.c, valprint.c, values.c, xcoffread.c: Include "gdb_string.h" instead of <string.h>. * gdbtk.c: Likewise. * config/xm-sysv4.h, i386/xm-ptx.h, m68k/xm-sun3os4.h, sparc/xm-sun4os4.h (HAVE_MMAP): Removed. * config/xm-lynx.h, config/i386/xm-ptx.h, config/m68k/nm-apollo68b.h, config/m68k/xm-hp300hpux.h, config/mips/xm-irix3.h, config/mips/xm-mips.h, config/mips/xm-news-mips.h, config/mips/xm-riscos.h, config/pa/hppah.h, config/rs6000/xm-rs6000.h, config/sparc/xm-sun4os4.h, config/sparc/xm-sun4sol2.h, config/vax/xm-vaxbsd.h, config/vax/xm-vaxult.h, config/vax/xm-vaxult2.h (MEM_FNS_DECLARED): Removed. * config/mips/xm-irix3.h, config/mips/xm-mips.h, config/pa/xm-hppah.h (memcpy, memset): Removed declarations.
1995-05-13 * dwarfread.c (struct dwfinfo), dbxread.c (struct symloc),Jim Kingdon1-3/+2
mdebugread.c (struct symloc), hpread.c (struct symloc): Fix error in 20 Apr 1995 cleanup of comments.
1995-04-21 * dwarfread.c (struct dwfinfo), dbxread.c (struct symloc),Jim Kingdon1-15/+17
mdebugread.c (struct symloc), hpread.c (struct symloc): Clean up comments.
1995-03-04 * hpread.c (hpread_record_lines): New argument "offset". AllJeff Law1-20/+29
callers changed. Use it to handle dynamic address relocation. (hpread_build_psymtabs): Adjust texthigh as we read each function debug symbol. Fix computation of texthigh. (hpread_read_subrange_type): Work around macro bugs in HP's compilers. (hpread_process_one_debug_symbol): Correctly map source lines.
1995-02-09 * config/sparc/tm-sun4sol2.h, dbxread.c: RenameJim Kingdon1-1/+1
N_SO_ADDRESS_MAYBE_MISSING to SOFUN_ADDRESS_MAYBE_MISSING. * symtab.h (minimal_symbol) [SOFUN_ADDRESS_MAYBE_MISSING]: Add filename field. * elfread.c (record_minimal_symbol_and_info), minsyms.c, symtab.h (prim_record_minimal_symbol_and_info): Return newly created symbol. * elfread.c (elf_symtab_read) [SOFUN_ADDRESS_MAYBE_MISSING]: Set filename field of minimal symbol. * symmisc.c (dump_msymbols) [SOFUN_ADDRESS_MAYBE_MISSING]: Print filename field. * minsyms.c, symtab.h (lookup_minimal_symbol): New arg sfile. * symm-tdep.c, somsolib.c, hppa-tdep.c, c-exp.y, f-exp.y, m2-exp.y, nindy-tdep.c, m3-nat.c, irix5-nat.c, hpread.c, os9kread.c, breakpoint.c, alpha-tdep.c, valops.c, symtab.c, printcmd.c, dbxread.c: Change callers to pass NULL for sfile. * dbxread.c (process_one_symbol) [SOFUN_ADDRESS_MAYBE_MISSING]: Find address of function from minimal symbols. * partial-stab.h, case 'f', 'F': Call find_stab_function_addr instead of getting pst->textlow from the stab. * minsyms.c (find_stab_function_addr): New function.
1995-01-25 * hpread.c (hpread_process_one_debug_symbol): Fix lines garbledJeff Law1-2/+2
by an ill-advised global search and replace.
1994-11-25 * hpread.c: Include hp-symtab.h instead of hpux-symtab.h.Jeff Law1-211/+222
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.
1994-09-29 * hpread.c (hpread_read_array_type): Do not change the type codeJeff Law1-3/+2
to TYPE_CODE_PTR for "char foo[]". Just make it a zero length array type.
1994-09-29 * hpread.c (hpread_type_translate): Handle T_UNS_LONG types withJeff Law1-1/+7
lengths other than 32bits (HP C 9.69 represents an "unsigned char" as an T_UNS_LONG with length 8).
1994-09-28 * hpread.c (struct hpread_symfile_info): Delete have_module fieldJeff Law1-46/+27
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.
1994-08-19 * Makefile.in (ALLDEPFILES): Add hpread.c.Jeff Law1-0/+2044
(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.