Commit Graph

113 Commits

Author SHA1 Message Date
Eli Zaretskii d5166ae11e * buildsym.c (start_subfile): Use FILENAME_CMP instead of STREQ.
(top-level): #include filenames.h.

	* dwarf2read.c (dwarf2_start_subfile): Use IS_ABSOLUTE_PATH and
	FILENAME_CMP, to DTRT on non-Posix platforms.
	(top-level): #include filenames.h.
2001-04-30 10:30:27 +00:00
Fernando Nasser 063fd66879 2001-04-06 Fernando Nasser <fnasser@redhat.com>
* buildsym.c (record_line): Turn off unused addr bits.
2001-04-06 13:14:55 +00:00
Kevin Buettner b6ba6518e9 Update/correct copyright notices. 2001-03-06 08:22:02 +00:00
Kevin Buettner e1e9e218c1 Replace calls to abort() with calls to internal_error(). 2001-02-25 04:45:12 +00:00
Kevin Buettner b8c9b27d1e Replace free() with xfree(). 2000-12-15 01:01:51 +00:00
Kevin Buettner fba45db2fa Protoization. 2000-07-30 01:48:28 +00:00
Daniel Berlin 357e46e7c9 C++ improvements 2000-06-05 20:49:53 +00:00
Andrew Cagney 91b9ff2179 Include "expression.h" which "language.h" depends on. 2000-02-21 03:04:19 +00:00
Andrew Cagney f7cb3ef862 Include "language.h" for longest_local_hex_string_custom(). 2000-02-21 02:51:07 +00:00
Jim Blandy 59527da01e * buildsym.h (add_free_pendings): Declare.
* buildsym.c (add_free_pendings): New function.
(make_blockvector): 32x64 fix using longest_local_hex_string().
(start_subfile): initialize variable 'subfile'.
2000-02-18 22:15:46 +00:00
Jason Molenda d9fcf2fb1c import gdb-2000-02-01 snapshot 2000-02-02 00:21:19 +00:00
Jason Molenda a0b3c4fd32 import gdb-1999-08-02 snapshot 1999-08-02 23:48:37 +00:00
Jason Molenda c5aa993b1f import gdb-1999-07-07 post reformat 1999-07-07 20:19:36 +00:00
Stan Shebs c906108c21 Initial creation of sourceware repository 1999-04-16 01:35:26 +00:00
Stan Shebs 071ea11e85 Initial creation of sourceware repository 1999-04-16 01:34:07 +00:00
Stan Shebs 552316ee17 * buildsym.h, buildsym.c: Convert to ANSI-only. 1999-02-01 00:38:25 +00:00
Stan Shebs 8523b5f36d * buildsym.h, buildsym.c: Reformat to standard. 1999-01-31 23:57:18 +00:00
Stan Shebs f3cc3e6e6d * buildsym.c (merge_symbol_lists): Remove unused variable.
(_initialize_buildsym): Remove, does nothing.
1999-01-31 23:29:13 +00:00
David Taylor 65b07ddca8 all remaining *.c *.h files from hp merge. 1998-12-31 21:58:30 +00:00
Andrew Cagney 60a98b30b4 CARP:
* buildsym.c (end_symtab): Cleanup PROCESS_LINENUMBER_HOOK.
1998-11-20 00:00:24 +00:00
Ron Unrau f85d9973b3 * partial-stab.h: 'F' and 'f' type N_FUN psymbols should pass
CUR_SYMBOL_VALUE as CORE_ADDR instead of long
        * buildsym.[ch]: export pending_blocks list
	* tm-txvu.h: define TARGET_READ_SP and TARGET_WRITE_SP
	* txvu-tdep.c: rewrite symtabs to support N_FUN symbols in overlays.
	  (Actually, the last version did this for N_SLINE symbols).
	  (txvu_read_sp,txvu_write_sp): new
1998-06-14 14:48:27 +00:00
Jeff Law f109cc3d9e Minor comment fix. 1997-10-22 18:28:25 +00:00
Stu Grossman 45a70ed653 * The following block of changes add support for debugging assembly
source files.
	* breakpoint.c (resolve_sal_pc):  Prevent crash when pc isn't
	associated with a function.
	* buildsym.c (record_line start_symtab end_symtab):  Don't delete
	symtabs which only have line numbers (but no other debug symbols).
	* dbxread.c (read_dbx_symtab end_psymtab):  Ditto.

	* remote-sim.c:  New functions gdbsim_insert/remove_breakpoint.  Use
	intrinsic simulator breakpoints if available, otherwise do it the
 	hard way.
	* configure.tgt:  Add d30v.
	* d30v-tdep.c:  New file.
	* config/d30v/d30v.mt, config/d30v/tm-d30v.h:  New files.
1997-09-25 01:26:36 +00:00
Dawn Perchik d719efc6d5 * dbxread.c, buildsym.c, symtab.c, stabsread.c: Add support for
reading stabs extensions for live range information.
	* stabsread.h, partial-stab.h: Add prototypes for new functions.
	* symtab.h: Add structure for storing live range information.
1997-09-08 00:38:19 +00:00
Fred Fish 609fd03384 * buildsym.h (struct subfile): Add debugformat member.
(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".
1997-06-28 06:10:06 +00:00
Per Bothner b57d4d17d6 Change FIXME comment - should replace bubble sort by merge sort, not qsort. 1997-04-17 21:32:25 +00:00
Mark Alexander 32dab60312 * remote-mips.c (common_breakpoint): Prevent 64-bit addresses
from being sent to 32-bit targets by masking off upper bits.
	* mips-tdep.c (heuristic_proc_start): Mask off upper 32 bits
	of PC on 32-bit targets.
	(mips16_heuristic_proc_desc): Recognize 'addiu s1,sp,n' as a
	frame setup instruction.
	(mips32_heuristic_proc_desc): Fix warning found by gcc -Wall.
	(mips16_skip_prologue): Recognize 'addiu s1,sp,n' as a valid
	prologue instruction.  Fix warnings and bugs found by gcc -Wall.
	* buildsym.c (finish_block): Improve handling of overlapping blocks;
	fixes problem on MIPS16 printing function arguments.
1997-02-09 17:36:49 +00:00
Mark Alexander d883102448 * mdebugread.c (parse_partial_symbols): Fix 64-bit
sign-extension problems in calculating psymtab addresses.
	* buildsym.c (end_symtab): Use macro to pop context.
1996-10-22 01:26:20 +00:00
Stu Grossman ac9548059b * buildsym.c (finish_block): Treat LOC_BASEREG_ARG and
LOC_LOCAL_ARG as arguments so that GDB will know about function
	args declared this way.  Mostly affects dwarf.
	* dwarfread.c (decode_die_type):  Change default type from int to
	void.  This allows GDB to recognize void functions.
	* (new_symbol):  If AT_PROTOTYPED is present, set a flag in the
	type structure.
	* findvar.c (extract_floating store_floating):  Clean up comments
	to reflect reality.
	* gdbtypes.h:  Add TYPE_FLAG_PROTOTYPED so that we can tell if a
	function has a prototype.  Currently, only dwarf supports this.
	* utils.c (floatformat_from_doublest):  Fix logic error with
	converting from double to float.  (It wasn't shifting mant_long if
	it had a hidden bit.)

	* v850-tdep.c:  Add support for function calling.  Fix some
	problems with debugging code w/o debug symbols.
	* config/v850/tm-v850.h:  Ditto.
1996-10-15 23:44:13 +00:00
Fred Fish a7f56d5aff Just some cleanups noticed while working on PR 10760
* 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-10-08 19:00:38 +00:00
Fred Fish 7336948874 * buildsym.c (finish_block): Change innerblock_anon_complaint to
print the addresses as part of the complaint.  Add a complaint for
	cases where the block end address is smaller than the block start
	address, in case any such conditions slip through our fixup mechanism.
	* symmisc.c (dump_symtab): Only print blockvector for primary
 	symtabs, to avoid massive duplication of output due to secondary
 	symtabs that point to same blockvector.  Also do some minor
	formatting tweaks.
1996-10-07 17:58:56 +00:00
Fred Fish c1d58bcded * remote-pa.c (boot_board): Add dummy params to make type compatible
for passing to add_com.
	* scm-exp.c (scm_lreadr): Ensure svalue is not used uninitialized.
	* buildsym.c (compare_line_numbers): Change function to match
	prototype and also what qsort expects.
1996-08-13 04:27:08 +00:00
Jeff Law 436d414327 * buildsym.c (end_symtab): Remove sort_pending and sort_linevec
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.
1996-01-08 17:55:25 +00:00
Peter Schauer b1027aa458 * symtab.h (enum address_class): Add LOC_UNRESOLVED for
a location whose address has to be resolved via the minimal
	symbol table.
	* buildsym.c (finish_block), findvar.c (symbol_read_needs_frame,
	read_var_value), printcmd.c (address_info),
	symmisc.c (print_symbol, print_partial_symbol):  Handle
	LOC_UNRESOLVED.
	* stabsread.c (scan_file_globals):  Change unresolved LOC_STATIC
	symbols to LOC_UNRESOLVED. Remove rt_common_objfile lookup
	kludge, global common symbols are now handled by LOC_UNRESOLVED.
	(scan_file_globals_1):  Move code back to scan_file_globals,
	delete.
1995-10-28 11:57:02 +00:00
Fred Fish 6c9638b444 Update FSF address. 1995-08-02 03:41:12 +00:00
J.T. Conklin 2b57629364 * configure.in: Check for working mmap, ansi headers, string.h,
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-08-01 20:14:27 +00:00
Fred Fish 6b14af2bc6 * dache.c (struct dcache_block): Change data member from unsigned char
to char, since everything passed in and out of dcache is char or casted
	to appropriate type anyway.
	(dcache_alloc):  Move assignment of db out of test and combine separate
	tests into if-else.
	(dcache_peek_byte):  Change ptr from unsigned char* to char*.
	(dcache_peek_byte):  Remove now unnecessary cast in read_memory call.
	(dcache_peek):  Change cast of incoming data arg.
	(dcache_poke):  Change cast of addr of incoming data arg.
	(dcache_info):  Mask data passed to printf_filtered to lsbyte only.
	(dcache_info):  Change printf_filtered arg from "% 2x" to " %2x".
	* target.c (debug_to_thread_alive): Change return type to int and
	return zero, for type compatibility with other *_thread_alive funcs.
	(cleanup_target): Change cast of ignore function to match type of the
	to_thread_alive member.
	* defs.h (error_hook): Add ATTR_NORETURN.
	* defs.h (NORETURN, ATTR_NORETURN):  Switch from volatile to
	__attribute__ method with gcc 2.7, to avoid gcc 2.6.3 bug.
	* remote.c (remote_wait):  Cast first arg to strtol, strchr, and strncmp
	to "const char *" from "unsigned char *".
	(remote_wait):  Cast arg to putpkt and strcpy from "unsigned char *" to
	"char *".
	(remote_wait):  Change printf format for long arg from "%d" to "%ld".
	(getpkt):  Remove unused variable "bp".
	(remote_fetch_word, remote_store_word):  Ifdef out apparently unused
	functions.
	* breakpoint.c (watchpoint_check):  Removed unused variables
	"saved_level" and "saved_frame".
	* valops.c (value_arg_coerce):  Add other enum TYPE_CODE_* and
	default cases to switch for completeness.
	* infrun.c (wait_for_inferior):  Enclose "have_waited" label
	in #ifdef that matches the one in which it is referenced.
	* ser-unix.c (hardwire_noflush_set_tty_state):  Enclose otherwise
	unused variable "state" in #ifdef that matches one in which it is
	referenced.
	* eval.c (evaluate_subexp_standard):  Remove unused variable "var".
	* eval.c (evaluate_subexp_standard):  Remove unused variable "tmp_symbol".
	* valarith.c (value_subscript):  Remove unused variable "lowerbound",
	which is redeclared in a nested scope prior to use.
	* printcmd.c (print_frame_nameless_args):  Use "%ld" to print long
	arg, not "%d".
	* {mem-break.c, remote-pa.c, remote.c, saber.suppress}:
	Remove unused static var "check_break_insn_size".
	* buildsym.c (finish_block):  Add other enum LOC_* and default
	cases to switch for completeness.
	ch-lang.c (type_lower_upper):  Removed unused label "retry".
	Add other enum TYPE_* and default cases to switch for completeness.
	* f-typeprint.c (f_type_print_args):  Ifdef out unused function
	that may be used someday when Fortran support is complete.
	* ch-valprint.c (chill_print_type_scalar):  Add other enum
	TYPE_* and default cases to switch for completeness.
	(chill_val_print):  Remove unused local var "high_bound" that
	is redeclared in a nested scope prior to use.
	(chill_var_print):  Use "%ld" to print long arg, not "%d".
	* regex.c (re_compile_fastmap, re_match_2):  Add remaining enum types
	and default to switches for completeness.
	* minsyms.c (lookup_minimal_symbol_text): Delete unused variable
	"trampoline_symbol".
	(prim_record_minimal_symbol_and_info):  Return NULL rather than trash.
	* elfread.c (elf_symtab_read):  Don't dereference NULL returns from
	record_minimal_symbol_and_info.
	* f-lang.c (saved_function_list_end):  Ifdef out unused variable
	that may be used someday.
	* f-valprint.c (f_val_print):  Remove unused local variable "straddr".
1995-07-18 04:38:06 +00:00
Peter Schauer b9e585030c * buildsym.c (patch_subfile_name): Update last_source_file
with the real source file name.
	* dbxread.c (end_psymtab):  Handle static functions in the
	SOFUN_ADDRESS_MAYBE_MISSING case by passing pst->filename
	to lookup_minimal_symbol.
	(process_one_symbol):  Ignore extra outermost context from
	SunPRO cc and acc.
	* stabsread.c (define_symbol):  Do not complain for SunPRO
	static variable encoding if STATIC_TRANSFORM_NAME is defined.
	* sparc-tdep.c, config/sparc/tm-sun4sol2.h
	(sunpro_static_transform_name):  Renamed from
	solaris_static_transform_name.
	* config/sparc/tm-sun4os4.h (STATIC_TRANSFORM_NAME):
	Define to sunpro_static_transform_name for acc 3.0 compiled
	executables.
	* procfs.c, config/alpha/nm-osf2.h (PROCFS_DONT_TRACE_FAULTS):
	Renamed from PROCFS_DONT_TRACE_IFAULT, don't trace any faults
	if defined.
	* procfs.c (info_proc_siginfo):  Cast sip->si_addr to
	`unsigned long' and use `lx' format for printing it.
1995-03-25 09:23:10 +00:00
Per Bothner 27202b6a47 * buildsym.c (finish_block): If finishing a function without known
parameter type info, set that from parameter symbols.
	* c-typeprint.c (c_type_print_varspec_suffix):  For TYPE_CODE_FUNC,
	print parameter types, if available.
	* ch-typeprint.c (chill_type_print_base):  Likewise.

	* gdbtypes.h (struct type):  Remove function type field.
	(TYPE_FUNCTION_TYPE):  Remove macro.  We can't as simply re-use
	function types now that we're also storing parameter types.
	And the payoff is much less.
	* gdbtypes.c (make_function_type):  Don't use/set TYPE_FUNCTION_TYPE.
	(recursive_dump_type):  Don't print TYPE_FUNCTION_TYPE.
	* dwarfread.c (read_subroutine_type):  Don't set TYPE_FUNCTION_TYPE.
1995-02-12 18:46:45 +00:00
Jim Kingdon 21af55c92d * buildsym.c (start_subfile): Set language for f2c like for cfront. 1995-02-12 17:53:34 +00:00
Jim Kingdon bb6247c6b2 * buildsym.c (start_subfile, patch_subfile_names), demangle.c
(set_demangling_style, set_demangling_command): Use savestring not
	strdup.  We were not dealing properly with a NULL return from
	strdup, and were not declaring strdup (the system header may or
	may not have it).
1994-03-26 04:26:26 +00:00
Jim Kingdon 833e0d94cc Fix many sins which will come up in 32 bit x 64 bit GDB, and
various miscellaneous things discovered in the process:
	* printcmd.c, defs.h (print_address_numeric): New function.
	* c-valprint.c (c_val_print), ch-valprint.c (chill_val_print)
	breakpoint.c (describe_other_breakpoints, breakpoint_1, mention),
	cp-valprint.c (cplus_print_value), infcmd.c (jump_command),
	printcmd.c, stack.c, symfile.c, symmisc.c, valprint.c:
	Use it.
	* utils.c, defs.h (gdb_print_address): New function.
	* expprint (dump_expression), gdbtypes.h: Use it.
	* breakpoint.c (describe_other_breakpoints),
	symmisc.c (dump_symtab, print_symbol):
	Use filtered not unfiltered I/O.
	(remove_breakpoints): Remove BREAKPOINT_DEBUG code.  Might as well
	just run gdb under a debugger for this (and it had problems with
	printing addresses, how to print b->shadow, etc.).
	* buildsym.c (make_blockvector), core.c (memory_error),
	exec.c (print_section_info), maint.c (print_section_table),
	mdebugread.c (parse_procedure), solib.c, source.c, symfile.c,
	symmisc.c, symtab.c, valops.c, valprint.c, xcoffexec.c:
	Add comments saying code is broken.  Marked with "FIXME-32x64".
	* dbxread.c (process_one_symbol), partial-stab.h (default),
	remote-vx.c (vx_run_files_info):
	Don't cast int being passed to local_hex_string.
	* symmisc.c (print_symbol): Don't cast long being passed to %lx.
	* symtab.h (general_symbol_info): Add comment about SYMBOL_VALUE
	only being a long.
	* symmisc.c (print_symbol): Print "offset" in message for LOC_ARG
	and LOC_LOCAL.
	* printcmd.c (print_address): Remove #if 0 code with ADDR_BITS_REMOVE.
	* source.c: Include <sys/types.h> regardless of USG.
1994-01-27 00:36:05 +00:00
Jim Kingdon 100f92e2de * Makefile.in (c-exp.tab.o): Remove notice about shift/reduce conflicts
which no longer occur.

	gcc -Wall lint:
	* findvar.c (symbol_read_needs_frame), corelow.c (ignore),
	inflow.c (gdb_has_a_terminal): Make sure to return a value.
	* regex.h: Declare re_set_syntax.
	* printcmd.c: Include valprint.h.
	* infcmd.c, exec.c, maint.c, core.c: Include language.h.
	* maint.c: Include expression.h.
	* infrun.c, fork-child.c, corelow.c, inflow.c: Include thread.h.
	* inftarg.c: Include command.h.
	* coredep.c: Include value.h.
	* c-exp.y, m2-exp.y, ch-exp.y: Include bfd.h, symfile.h and objfiles.h.
	* ch-typeprint.c: Include typeprint.h.
	* ch-valprint.c: Include c-lang.h.
	* nlmread.c: Include buildsym.h.
	* environ.c: Include gdbcore.h.  Only include defs.h once.
	(set_in_environ): Cast const char * to char * when passing to
	set_gnutarget.
	Remove unused variables:
	* printcmd.c (printf_command): args_to_vprintf.
	* coffread.c (coff_symfile_init): strsection.
	Move variables to within the #ifdefs where they are used:
	* symtab.c (gdb_mangle_name): opname.
	* inftarg.c (child_attach): pid and exec_file.
	* inftarg.c (child_detach): siggnal.
	* objfiles.c (allocate_objfile): mapto, md, and fd.
	* objfiles.c (free_objfile): mmfd.
	* infrun.c (wait_for_inferior): Include BPSTAT_WHAT_LAST in switch.
	* infrun.c (wait_for_inferior): Remove unused same_pid label.
	* inferior.h: Declare set_sigint_trap and clear_sigint_trap.
	* parser-defs.h: Declare write_exp_elt_block.
	* stabsread.h: Declare elfstab_offset_sections and
	coffstab_build_psymtabs.
1993-10-21 20:41:50 +00:00
Jim Kingdon f91b837dd0 * buildsym.c (finish_block): If we pop the context stack and it is
not empty, complain () instead of abort ().
1993-10-18 15:40:04 +00:00
Jim Kingdon 5573d7d4b1 Tue Sep 28 09:45:38 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
* symmisc.c (print_symbol): Use %02x not %2x for LOC_CONST_BYTES.

	Clean up problems with targets and hosts that have 64 bit longs
	and pointers and 32 bit ints.
	* breakpoint.c, buildsym.c, c-lang.c, c-valprint.c, ch-lang.c,
	ch-valprint.c, core.c, cp-valprint.c, dbxread.c, exec.c,
	expprint.c, gdbtypes.c, infcmd.c, language.c, language.h,
	m2-lang.c, maint.c, mips-tdep.c, mipsread.c, partial-stab.h,
	printcmd.c, remote-vx.c, solib.c, source.c, stack.c, symfile.c,
	symmisc.c, symtab.c, valops.c, valprint.c, xcoffexec.c:
	Change all printf formats from %x to %lx if outputting an address.
	Change la_*_format to use long format.
	local_hex_string, local_hex_string_custom now take an unsigned long
	argument, change all callers.
	* coffread.c (read_coff_symtab):  Remove superfluous cast for
	complaint output.
	* dbxread.c (end_psymtab):  Cast MSYMBOL_INFO to long, not int.
	* findvar.c, value.h (write_register):  Change register value to long.
	* gdbtypes.h (struct type):  Change `bitsize' to long as
	TYPE_FIELD_STATIC_PHYSNAME uses this field as a pointer.
	* inferior.h (struct inferior_status):  Change type of stop_pc to
	CORE_ADDR.
	* language.h (local_octal_string, local_octal_string_custom):
	Remove prototype, the functions are neither defined nor used.
	* mipsread.c (parse_symbol):  Use temporary variable for bitsize as
	f->bitsize is a long now.
	* objfiles.c (add_to_objfile_sections, build_objfile_section_table):
	Use unsigned long casts instead of int for abusing sections_end
	pointer as integer.
	* stack.c (parse_frame_specification):  Change type of `args' to
	CORE_ADDR for SETUP_ARBITRARY_FRAME.

	* printcmd.c (make_vasize):  Allow redefinition via MAKEVA_SIZE.
	* mipsread.c (parse_type):  Alpha cc now supports the t->continued
	bit, update algorithm to match the way the compiler uses it.
1993-09-28 17:43:25 +00:00
Jim Kingdon 8b05f64a70 * symfile.c (deduce_language_from_filename): Accept .cxx for C++.
* buildsym.c (start_subfile): Use deduce_language_from_filename
	rather than checking for .C or .cc ourself.
1993-09-21 17:41:45 +00:00
K. Richard Pixley fee933f19c gcc lint 1993-09-08 21:30:33 +00:00
Jim Kingdon 996ccb3043 * symtab.c, symfile.c, c-exp.y, ch-exp.y, m2-exp.y, buildsym.c,
symfile.h, stabsread.c, minsyms.c, solib.c, nlmread.c, dwarfread.c
	partial-stab.h, symmisc.c, gdbtypes.c: Lint.  Remove (or put
	inside #if) unused variables and labels.  Fix unclosed comment.
	Deal with enumeration values unhandled in switch statements.  Make
	sure non-void functions return values.  Include appropriate
	headers.
	* dbxread.c (elfstab_build_psymtabs): Don't check for unsigned
	value < 0.
1993-09-02 01:41:40 +00:00
Jim Kingdon be7d4f3f6d * symtab.c (find_pc_line, find_line_common),
symtab.h (struct linetable), xcoffread.c (arrange_linetable):
	Revise comments re linetable sorting.
	* buildsym.c (compare_line_numbers): Sort by pc, not by line.
	* coffread.c: Tell end_symtab to sort the line table.

	* coffread.c: Re-work a lot of the coff-specific stuff to use stuff
	in buildsym.c.  This includes coff_finish_block, coff_context_stack,
	coff_local_symbols, coff_file_symbols, coff_global_symbols,
	coff_end_symtab and coff_add_symbol_to_list.
	(read_enum_type): Deal with it now that we have a "struct pending"
	not a "struct coff_pending".

	* buildsym.c (end_symtab): Don't realloc subfile->linetable.
1993-09-02 00:24:46 +00:00
Jim Kingdon c438b3af2a * symtab.h (struct linetable), xcoffread.c (arrange_linetable):
Revise comments re linetable sorting.
	* buildsym.c (compare_line_numbers): Sort by pc, not by line.
	* coffread.c: Tell end_symtab to sort the line table.

	* coffread.c: Re-work a lot of the coff-specific stuff to use stuff
	in buildsym.c.  This includes coff_finish_block, coff_context_stack,
	coff_local_symbols, coff_file_symbols, coff_global_symbols,
	coff_end_symtab and coff_add_symbol_to_list.
	(read_enum_type): Deal with it now that we have a "struct pending"
	not a "struct coff_pending".

	* buildsym.c (end_symtab): Don't realloc subfile->linetable.
1993-09-01 21:15:27 +00:00