aboutsummaryrefslogtreecommitdiff
path: root/gdb/mipsread.c
AgeCommit message (Collapse)AuthorFilesLines
1992-04-15Add TYPE_FLAG_FUND_TYPE bit to the flags member of the type structure,Fred Fish1-9/+15
and use it to decide when to print the actual type name rather than trying to invent the name of a fundamental type. This clears up the confusion between int/long when they are the same sizes, removes one obstacle to multi-language support (previously valprint.c thought everything was a C type), and allows gdb to support distinctions between explicitly and implicitly signed types when the compiler supports such distinction in the debug output (as does every ANSI compiler I tested except for gcc).
1992-04-12 * mipsread.c (parse_partial_symbols): Complain when sh->index isJohn Gilmore1-605/+693
too high or when skipping `forwards' moves us backwards. (parse_type): Print mis-guessed tag name in complaint. (parse_external): Eliminate cur_stab and obscure top_stack clobbers. (parse_procedure): Do not attempt to create symbols; just fill in the SYMBOL_VALUE field of a .gdbinfo. symbol if we can find one. (psymtab_to_symtab_1): Split up `stabs' from `native ecoff' code for clarity. Set top_stack before calling parse_external. In stabs, sort symbols before calling parse_procedure. * mipsread.c: Lint. * symmisc.c (std_in, std_out, std_err): Add vars to access std FILE *'s when debugging GDB (e.g. as args to dump_symtab). * Makefile.in: Remove stage* targets. Avoid echo on recursive makes. Eliminate doc/Makefile from tar.Z file if doc/Makefile.in exists. * mipsread.c: Cleanup. Add more complaints for unhandled cases. Remove new symbol types and such to ../include/coff/symconst.h. (parse_symbol): Simplify code for parsing struct/enum/unions. (parse_type): Handle `long long' types. (upgrade_type): Handle `const' qualifier. (parse_partial_symbols): fix indentation, clean a bit.
1992-04-07* mipsread.c: Create a .gdbinfo pseudo-symbol for eachStu Grossman1-3/+5
function also when parsing embedded stabs.
1992-04-07 * mipsread.c: Create a .gdbinfo pseudo-symbol for eachPer Bothner1-18/+34
function also when parsing embedded stabs.
1992-04-07* mipsread.c: Fix many invocations of complain. Use enumStu Grossman1-6/+7
type_code where appropriate.
1992-04-06* mipsread.c: Fix many invocations of complain.Stu Grossman1-9/+9
1992-04-04* buildsym.h, dbxread.c, mipsread.c: Add objfile arg toStu Grossman1-1/+2
process_one_symbol.
1992-04-03* Makefile.in (OBS): Compile mipsread.c for all targets now.John Gilmore1-10/+15
(VERSION): Bump to 4.4.85. * mipsread.c: Update for new include files. Lint. * tm-irix3.h, tm-mips.h: Use new include files for ECOFF symtab. * config/{bigmips.mt, littlemips.mt, irix3.mt, decstation.mt}: Don't need to bring in mipsread.o specially any more.
1992-04-03* mipsread.c (fixup_sigtramp): Also look for _sigtramp as a realStu Grossman1-34/+38
routine (for Irix-4.x). Make many funcs static and void. * mips-tdep.c (mips-frame-chain): Clean up, simplify. * (init_extra_frame_info): Don't trash cached value of frame pointer register. This fixes backtracing through routines that use alloca(). Generally clean up declarations of functions, and use typedefs and macros to reference data structures as appropriate. * tm-irix3.h, tm-mips.h (EXTRA_FRAME_INFO): use proper type for proc_desc element.
1992-03-31* mipsread.c (parse_symbol, parse_procedure): Re-do the way thatStu Grossman1-83/+39
.gdbinfo. symbols are created. Move creation from parse_procedure to parse_symbol, where it is fairly easy to grow the symtab. This also fixes a symtab trashing bug on all mips-based systems. * (got_numargs, lookup_numargs, free_numargs): Delete. Not needed anymore. * tm-mips.h, tm-iris3.h, mips-tdep.c, mipsread.c: Re-do struct mips_extra_func_info, and all the PROC_xxx macros that look at it.
1992-03-29Create and use macros for iterating on symtabs, psymtabs, msymbols.John Gilmore1-140/+130
* minsyms.c (iterate_over_msymbols): Remove; clunky and slow. * symfile.h, symtab.h (iterate_over_msymbols): Remove prototype * coffread.c (coff_symfile_read): iterate_over_symtabs => ALL_SYMTABS. (patch_opaque_types): Avoid dummy args and result. * objfiles.c (have_partial_symbols, have_full_symbols, have_minimal_symbols): explicit iteration => ALL_OBJFILES; simplify. (iterate_over_objfiles, iterate_over_symtabs, iterate_over_psymtabs): Remove, clunky and slow. * objfiles.h: Replace iterate_over_* prototypes with ALL_SYMTABS, ALL_PSYMTABS, and ALL_MSYMBOLS macros. * symmisc.c (dump_symtab, dump_psymtab, dump_msymbols, dump_objfile): Remove dummy args and results. Move filename comparisons to callers. (printsyms_command, printpsyms_command, printmsyms_command, printobjfiles_command): iterate_over_* => ALL_*. Compare filenames. * symtab.c (lookup_symtab_1, lookup_symtab, lookup_partial_symtab, lookup_symbol, find_main_psymtab, find_pc_symtab, sources_info, list_symbols, make_symbol_completion_list): Replace explicit iteration with ALL_SYMTABS, ALL_PSYMTABS, or ALL_MSYMBOLS. Eliminate Dijkstra flag crap, break out of loops with gotos. (lookup_symtab_1): Protect '/' tests from short filenames. (cplus_mangled_symbol): Move inline into lookup_symbol. * xcoffexec.c (relocate_objfile_msymbols): Remove poor hack. (relocate_minimal_symbol): Move inline to vmap_symtab. (vmap_symtab): Replace iteration with ALL_OBJFILES, iterate_over_msymbols with ALL_MSYMBOLS. Misc cleanup prior to release. * dwarfread.c (dwarf_build_psymtabs): Remove mainline test. * mipsread.c (compare_symtabs, compare_psymtabs): Remove, unused. * mipsread.c: Add prototypes for all static functions. * symmisc.c (dump_symtab_lines, dump_symtabs, dump_last_symtab, dump_blockvector, dump_block, dump_addrchass, dump_namespace, dump_symbol, dump_type, dump_linetable, dump_strtbl): Remove, unused. * xcoffread.c (dump_symtab_lines, dump_symtabs, dump_last_symtab, dump_blockvector, dump_block, dump_addrchass, dump_namespace, dump_symbol, dump_type, dump_linetable, dump_strtbl): Remove 2nd unused copy! * buildsym.c (define_symbol): Handle global register variables (from Pierre Willard). Complain if register numbers are too large.
1992-03-21Many changes, most related to creating entry point information on a per-objfileFred Fish1-11/+8
basis. See comments in objfiles.h and details in ChangeLog. Also remove redundant definitions of FRAME_CHAIN_VALID from most of the tm-* files and use a default definition in frame.h.
1992-03-19 * coffread.c, mipsread.c, xcoffread.c, coffread.c, dbxread.c,Fred Fish1-16/+48
elfread.c (coff_symfile_finish): Add function, prototype, and add to the xxxx_sym_fns struct for each file type. Also reformat the xxxx_sym_fns vector to a standard format and add comments. * coffread.c, mipsread.c, xcoffread.c, coffread.c, dbxread.c, elfread.c (xxx_symfile_new_init, xxx_symfile_init, xxx_symfile_read): Pass pointer to struct objfile rather than pointer to sym_fns. Change references inside each function accordingly. Allocate any symbol file specific info in the per-objfile memory region. * dbxread.c (free_and_init_header_files): Break function into free_header_files(), called from dbx_symfile_finish(), and init_header_files(), called from dbx_new_init(). * dbxread.c (dbx_new_init): Move deallocation things to new dbx_symfile_finish function. * elfread.c (elf_new_init): Call buildsym_new_init(). * objfiles.c (free_objfile): Call the appropriate symfile_finish() routine for the objfile before deallocating other stuff. * sparc-tdep.c (get_longjmp_target): Cast target_read_memory arg. * symfile.h: Move struct sym_fns to before struct objfile def. Add sym_finish function pointer and change prototypes of other function pointers to reflect passing struct objfile pointer rather than struct sym_fns pointer. * symfile.c: Remove now obsolete symtab_fns pointer. * symfile.c (symfile_init): Renamed to find_sym_fns, and now only locates the correct sym_fns struct for the given objfile. * symfile.c (syms_from_objfile, symbol_file_add): Restructured for better support of mapped symbol tables. * symfile.c (symbol_file_command): Remove obsolete code using symfile_fns. * symfile.h: Remove duplicate declarations for symfile_objfile, entry_point, and object_files. * target.c (target_info): Compare symfile_objfile to NULL. * xcoffread.c (aixcoff_new_init): Move deallocation stuff to aixcoff_symfile_finish().
1992-03-14* mipsread.c (mipscoff_symfile_read): Eliminate a lot ofJohn Gilmore1-15/+13
useless code, including an lseek to an uninitialized variable. Reported by Jim Williams <jimbo@wrs.com>.
1992-03-05* config.sub configure.in config/.Sanitize config/mh-irix4Stu Grossman1-2/+3
gdb/.Sanitize gdb/configure.in gdb/mips-tdep.c gdb/mipsread.c gdb/procfs.c gdb/signame.h gdb/tm-irix3.h gdb/tm-mips.h gdb/xm-irix4.h gdb/config/.Sanitize gdb/config/mt-irix3 gdb/config/mh-irix4 texinfo/configure.in: Port to SGI Irix-4.x.
1992-03-03Tue Mar 3 15:11:52 1992 Michael Tiemann (tiemann@cygnus.com)Michael Tiemann1-140/+227
* All GDB files that #include defs.h: Removed stdio.h. (defs.h): #include stdio.h. This has been tested by building GDBs for all targets hosted on Sun4. None of the build problems were related to stdio.h inclusion. (n.b. many configurations don't build for other reasons.)
1992-02-22* xm-sun3os4.h, xm-sun4os4.h: Enable HAVE_MMAP.John Gilmore1-108/+121
* minsyms.c (install_minimal_symbols): Add bunches to any existing minsyms in the objfile. Avoid extra mallocation by working directly in the obstack. Remove ignored `mainline' parm. * coffread.c, dbxread.c, elfread.c, mipsread.c, solib.c, symtab.h, xcoffread.c: Change all callers. * FIXME: We should be able to eliminate MAINLINE from all the symbol readers now, with a small bit of work. * valops.c, value.h: Lint. * remote-vx.c: Add missing break; statement. Bugfix by Michael Sclafani, <sclafani@src.dec.com>.
1992-02-06* mipsread.c (parse_symbol): Avoid clobbering enum pointer whenJohn Gilmore1-10/+11
looking at its members. Improve guess between struct and union, only assuming union if multiple members have offsets of zero.
1992-02-05Mips-specific bug-fix (for stabs-in-ecoff), and style fix. See ChangeLog.Per Bothner1-9/+39
1992-01-30Various fixed triggered by trying to do the right thing wrtPer Bothner1-83/+147
to external symbols in mips ecoff binaries. See ChangeLog.
1992-01-28Handle debug symbols in dynamically loaded (relocated) code:John Gilmore1-122/+174
* dbxread.c (read_ofile_symtab): Fix up N_CATCH better. Pass offset to process_one_symbol. (process_one_symbol): Take new offset parameter. Add it into appropriate symbol types to relocate symbols to loaded addresses. Handle all possible symbol types, and complain() about types that we don't expect to see. * mipsread.c (psymtab_to_symtab_1): Pass offset of zero to process_one_symbol (FIXME, should pass real offset). Misc bugfixes: * breakpoint.c (resolve_sal_pc): Split out code to resolve a sal's PC value. (set_breakpoint, break_command_1, until_break_command, catch_command_1, breakpoint_re_set_one): Use it. (breakpoint_re_set_one): Disable bkpts that don't re-set cleanly. (breakpoint_re_set): Mention breakpoint number in error messages. * symtab.h (resolve_sal_pc): Declare. * infcmd.c (jump_command): Use resolve_sal_pc. * source.c (find_source_lines): Avoid "Source file is more recent than executable" when bfd_get_mtime gives 0. (list_command): Shorten "FILE, line N" to "FILE:N". * putenv.c (putenv): Avoid unportably casting pointers to unsigneds.
1991-12-23Oodles of changes. The most important is adding support for stabsPer Bothner1-658/+579
encapsulated in mips ecoff. See ChangeLog for the gory details.
1991-12-01 Changes due to include file renaming:Steve Chamberlain1-1/+1
* xcoffread.c: internalcoff.h ->coff/internal.c, coff-rs6000.h ->coff/rs6000.h * mipsread.c: coff-mips.h ->coff/mips.h * elfread.c: elf-common.h ->elf/common.h elf-external.h ->elf/external.h, elf-internal.h ->elf/internal.h * dwarfread.c dwarf.h ->elf/dwarf.h * dbxread.c: aout64.h ->aout/aout64.h stab.gnu.h ->aout/stab_gnu.h * coffread.c: internalcoff.h ->coff/internal.h * buildsym.c: stab.gnu.h ->aout/stab_gnu.h * depend Updated to take the above into account.
1991-11-28Make structs work on DECstation (sigh)John Gilmore1-3/+8
1991-11-27Fix syntax errors.John Gilmore1-2/+3
1991-11-27Improve G++ debugging support.John Gilmore1-35/+37
1991-11-21* defs.h: Incorporate param.h. All users changed.John Gilmore1-8/+8
* param-no-tm.h: Change users to define TM_FILE_OVERRIDE instead. * param.h, param-no-tm.h: Removed. * Update copyrights in all changed files. * dbxread.c, dwarfread.c, inflow.c, infrun.c, m2-exp.y, putenv.c, solib.c, symtab.h, tm-umax.h, valprint.c: Lint. * tm-convex.h, tm-hp300hpux.h, tm-merlin.h, tm-sparc.h, xm-merlin.h: Avoid host include files in target descriptions. * getpagesize.h: Removed, libiberty copes now.
1991-11-09Add tracking of object files (that contain symbols) to gdb.John Gilmore1-23/+30
This includes a "struct objfile" that owns symtabs and psymtabs that were read in from that binary file. See ChangeLog.
1991-11-01* mipsread.c (read_mips_symtab, read_the_mips_symtab): Use realJohn Gilmore1-3/+6
filename with error messages. * stack.c (frame_select_command): Rename to select_frame_command to avoid "fr" and "fra" having nonunique completions. * symfile.c (sort_symtab_syms): Ignore sort of zero symtab *. (symfile_init): Print file format name when unable to handle it. (free_named_symtabs): Use BLOCKVECTOR rather than obsolete BLOCKLIST. * symmisc.c (free_symtab): Only free linetable if nonzero. * symtab.h: Remove obsolete BLOCKLIST macros.
1991-10-26* symfile.c (syms_from_bfd): New routine.John Gilmore1-20/+0
(add_symbol_file): Call it to do the real work. (syms_from_bfd): Initialize entry_point before calling symfile_init. * symtab.h, symfile.c, coffread.c, mipsread.c, dwarfread.c: Avoid declaring or setting entry_point (symfile.h & symfile.c cope).
1991-10-24Remove the object file specific fields from the partial symbol tableFred Fish1-36/+51
structure and replace them with a pointer to private data for each different flavor of object file reader to initialize appropriately.
1991-09-19* mipsread.c (_initialize_mipsread): Avoid usingJohn Gilmore1-1/+7
builtin_type_void at initialize time. (mipscoff_symfile_read): use it now.
1991-09-19* symfile.c (allocate_symtab): New fn, consolidates the workJohn Gilmore1-9/+30
of allocating and initializing a new struct symtab. Set the language of the symtab based on its filename extension. * symfile.h: Declare it. * mipsread.c (new_symtab): Use it. Minor formatting changes. * dbxread.c (end_symtab): Use it. * mipsread.c (parse_symbol, case stParam and stProc): Add #if 0'd code for saving types of parameters with each function definition. * dbxread.c (define_symbol, function and parameter cases): Ditto. (read_dbx_symtab, case N_DEFD): Ignore. (read_enum_type): Recognize FALSE/TRUE enum as Modula-2 BOOLEAN type. (read_range_type): Rename MAX_OF_TYPE to MAX_OF_C_TYPE, etc. #if 0 out its uses, though, since they set a dead value. * coffread.c (end_symtab): Use allocate_symtab. (process_coff_symbol): #if 0'd for functions and params as above. (read_enum_type): Recognize Modula-2 BOOLEAN.
1991-09-17Fix signed vs. unsigned char bug in parse_lines().Stu Grossman1-215/+229
1991-07-19Make mipsread.c handle static symbols, both in psymtabs and symtabs.John Gilmore1-83/+169
1991-07-09 * core.c (memory_error): Reword error msg to mislead less.John Gilmore1-34/+52
* mips-pinsn.c (print_insn_arg 'd'): Print $ with reg name. * mipsread.c (read_mips_symtab, read_the_mips_symtab, parse_partial_symbols): Use newer BFD internals (external_filehdr and external_aouthdr), byte-swap the fields that we care about before using them, and make the file header data local to read_the_mips_symtab rather than global.
1991-05-13 * mipsread.c: Rather than keeping count of how many symtabsJohn Gilmore1-113/+113
and psymtabs we have, for sorting purposes, count them when we need to sort. This fixes bug in rereading of symbol tables.
1991-05-03 Mips bringup and general cleanupJohn Gilmore1-234/+0
* cplus-dem.c: Move CPLUS_MARKER define to after defs.h. * infptrace.c (PT_WRITE_D, PT_READ_D): Use correct values. (This still doesn't seem to make MIPS bkpts work.) * mipsread.c: Remove dup "Reading symbol data..." msg. (symbol_file_command, add_file_command): Remove, obsol. * printcmd.c (ptype_command): Say "an enum" rather than "a enum". Wrap output appropriately. * stack.c (locals_info, catch_info, args_info): Check selected_frame rather than target_has_stack or coredumping. * valprint.c (type_print_varspec_suffix): Wrap "ptype" output of enums appropriately.
1991-04-20 * mipsread.c (parse_symbol): Set startup_file_{start,end} ifJim Kingdon1-0/+5
entry_point is in current file.
1991-04-19*** empty log message ***Jim Kingdon1-1/+3
1991-04-13 * symtab.h (GLOBAL_BLOCK, STATIC_BLOCK, FIRST_LOCAL_BLOCK): NewJohn Gilmore1-20/+27
defines for the blocks of a blockvector that contain global and file-static symbols and the first of the smaller scope contours. * mipsread.c: Use them. * coffread.c (end_psymtab): Free named symtabs and psymtabs for a file, once a new symtab has been read for it. * mipsread.c: FIXME. We need to do the same for MIPS, but it looks harder to determine the top-level block before it's been queued to the psymtab list.
1991-03-28Initial revisionK. Richard Pixley1-0/+2879