Commit Graph

849 Commits

Author SHA1 Message Date
Daniel Jacobowitz ed363b1b5e * Makefile.in (FLAGS_TO_PASS): Add LDFLAGS. 2003-03-05 18:07:15 +00:00
Daniel Jacobowitz fe1f4a5eb6 * cp-abi.c: Include "command.h", "gdbcmd.h", and "ui-out.h".
(auto_cp_abi): New variable.
	(current_cp_abi, num_cp_abis): Make static.
	(CP_ABI_MAX): Define.
	(cp_abis): Turn into an array.
	(value_virtual_fn_field): Fix formatting.
	(switch_to_cp_abi, register_cp_abi): Update.  register_cp_abi now
	takes a pointer.
	(set_cp_abi_as_auto_default, set_cp_abi_cmd, show_cp_abi_cmd)
	(list_cp_abis, _initialize_cp_abi): New functions.
	* cp-abi.h: Add prototype for set_cp_abi_as_auto_default.  Remove
	declarations for cp_abis, num_cp_abis, current_cp_abi, and
	switch_to_cp_abi.  Update prototype for register_cp_abi.
	* Makefile.in (cp-abi.o): Update dependencies.
	* minsyms.c (install_minimal_symbols): Call set_cp_abi_as_auto_default
	instead of switch_to_cp_abi.
	* gnu-v2-abi.c (_initialize_gnu_v2_abi): Likewise.  Update call to
	register_cp_abi.
	* gnu-v3-abi.c (_initialize_gnu_v3_abi): Update call to
	register_cp_abi.
	* hpacc-abi.c (_initialize_hpacc_abi): Likewise.
2003-03-05 18:01:46 +00:00
Daniel Jacobowitz e4adbba915 * dwarf2expr.c (new_dwarf_expr_context): Add (void) to definition.
* dwarf2loc.c: Include "regcache.h".
	(dwarf_expr_read_reg): Rename regnum argument to dwarf_regnum.  Use
	register_size.
	* Makefile.in (dwarf2loc.o): Update dependencies.
2003-03-05 18:00:02 +00:00
Andrew Cagney 7b83296f22 2003-03-01 Andrew Cagney <cagney@redhat.com>
* Makefile.in (ax-gdb.o): Update dependencies.
	* ax-gdb.c: Include "regcache.h".
	(gen_expr): Use register_type instead of REGISTER_VIRTUAL_TYPE.
	* findvar.c (value_of_register): Ditto.
	* infcmd.c (default_print_registers_info): Ditto.

Index: mi/ChangeLog
2003-03-01  Andrew Cagney  <cagney@redhat.com>

	* mi-main.c (get_register): Use register_type instead of
	REGISTER_VIRTUAL_TYPE.
2003-03-01 17:03:19 +00:00
Daniel Jacobowitz a55cc764ae * Makefile.in (dwarf2loc.o): Update dependencies.
* ax-gdb.c (gen_var_ref): Handle LOC_COMPUTED and LOC_COMPUTED_ARG.
	* dwarf2expr.c (read_uleb128, read_sleb128): Make non-static.
	* dwarf2expr.h (read_uleb128, read_sleb128): Add prototypes.
	* dwarf2loc.c: Include "ax.h" and "ax-gdb.h".
	(locexpr_tracepoint_var_ref): New function.
	(dwarf2_locexpr_funcs): Add locexpr_tracepoint_var_ref.
2003-02-28 20:03:18 +00:00
Joel Brobecker ccdc5d7f94 * Makefile.in: Add rules to build and link in observer.o. 2003-02-28 17:14:16 +00:00
Daniel Jacobowitz 4c2df51b5a Based on a patch from Daniel Berlin (dberlin@dberlin.org).
* symtab.h: Add opaque declarations of struct axs_value and
	struct agent_expr.
	(enum address_class): Add LOC_COMPUTED and LOC_COMPUTED_ARG.
	(struct location_funcs): New type.
	(struct symbol): Add "loc" to aux_value.
	(SYMBOL_LOCATION_BATON, SYMBOL_LOCATION_FUNCS): New macros.
	* dwarf2read.c: Include "dwarf2expr.h".
	(dwarf2_symbol_mark_computed): New function.
	(read_func_scope): Use it.
	(var_decode_location): New function.
	(new_symbol): Use it.
	* dwarf2expr.c, dwarf2expr.h, dwarf2loc.c, dwarf2loc.h: New files.

	* Makefile.in (SFILES): Add dwarf2loc.c and dwarf2expr.c.
	(dwarf2expr_h, dwarf2loc_h): New variables.
	(COMMON_OBS): Add dwarf2expr.o and dwarf2loc.o.
	(dwarf2expr.o, dwarf2loc.o): New rules.
	(dwarf2read.o): Add $(dwarf2expr_h) and $(dwarf2loc_h).
	* buildsym.c (finish_block): Handle LOC_COMPUTED and
	LOC_COMPUTED_ARG.
	* findvar.c (symbol_read_needs_frame, read_var_value): Likewise.
	* m2-exp.y (yylex): Likewise.
	* printcmd.c (address_info, print_frame_args): Likewise.
	* stack.c (print_block_frame_locals, print_frame_arg_vars): Likewise.
	* symmisc.c (print_symbol, print_partial_symbols): Likewise.
	* ada-lang.c (ada_resolve_subexp, symtab_for_sym)
	(ada_add_block_symbols, fill_in_ada_prototype): Likewise.
	* symtab.c (lookup_block_symbol): Likewise.
2003-02-21 15:24:18 +00:00
Christopher Faylor 1b6bc7e06f * coff-pe-read.c: New file - support reading of minimal symbols from a portable
executable using the export table.
* coff-pe-read.h: New file.
* coffread.c: Include coff-pe-read.h.
(coff_symtab_read): Call read_pe_exported_syms iff no recognized debugging
symbols found.
* Makefile.in (SFILES): Add coff-pe-read.o.
(coff_pe_read_h): Define.
(COMMON_OBS): Add coff-pe-read.o.
(coffread.o): Add coff_pe_read_h dependency.
(coff-pe-read.o): New target.
2003-02-20 03:12:46 +00:00
David Carlton fe898f56a1 2003-02-19 David Carlton <carlton@math.stanford.edu>
* Makefile.in (SFILES): Add block.c.
	(block_h): New.
	(COMMON_OBS): Add block.o.
	(block.o): New.
	(x86-64-tdep.o): Add $(block_h).
	(values.o, valops.o, tracepoint.o, symtab.o, symmisc.o, symfile.o)
	(stack.o, printcmd.o, p-exp.tab.o, parse.o, objfiles.o)
	(objc-exp.tab.o, objc-lang.o, nlmread.o, mips-tdep.o, mdebugread.o)
	(m2-exp.tab.o, linespec.o, jv-lang.o, jv-exp.tab.o, infcmd.o)
	(f-valprint.o, findvar.o, f-exp.tab.o, expprint.o, coffread.o)
	(c-exp.tab.o, buildsym.o, breakpoint.o, blockframe.o, ax-gdb.o)
	(alpha-tdep.o, ada-lang.o, ada-exp.tab.o, mi-cmd-stack.o): Ditto.
	* value.h: Add opaque declaration for struct block.
	* parser-defs.h, objc-lang.h, buildsym.h, breakpoint.h: Ditto.
	* ada-lang.h: Ditto.
	* x86-64-tdep.c: #include "block.h"
	* values.c, valops.c, tracepoint.c, symtab.c, symmisc.c: Ditto.
	* symfile.c, stack.c, printcmd.c, p-exp.y, parse.c: Ditto.
	* objfiles.c, objc-exp.y, objc-lang.c, nlmread.c: Ditto.
	* mips-tdep.c, mdebugread.c, m2-exp.y, linespec.c: Ditto.
	* jv-lang.c, jv-exp.y, infcmd.c, f-valprint.c: Ditto.
	* findvar.c, f-exp.y, expprint.c, coffread.c, c-exp.y: Ditto.
	* buildsym.c, breakpoint.c, blockframe.c, ax-gdb.c: Ditto.
	* alpha-tdep.c, ada-lang.c, ada-exp.y: Ditto.
	* blockframe.c (blockvector_for_pc_sect): Move to "block.c".
	(blockvector_for_pc, block_for_pc_sect, block_for_pc): Ditto.
	* symtab.c (block_function): Ditto.
	(contained_in): Ditto.
	* frame.h: Move block_for_pc and block_for_pc_sect declarations to
	block.h.  Add opaque declaration for struct block.
	* symtab.h: Move block_function and contained_in declarations to
	block.h.  Add opaque declarations for struct block, struct
	blockvector.
	(struct block): Move to block.h.
	(struct blockvector): Ditto.
	(BLOCK_START, BLOCK_END, BLOCK_FUNCTION, BLOCK_SUPERBLOCK)
	(BLOCK_GCC_COMPILED, BLOCK_HASHTABLE, BLOCK_NSYMS, BLOCK_SYM)
	(BLOCK_BUCKETS, BLOCK_BUCKET, BLOCK_HASHTABLE_SIZE)
	(ALL_BLOCK_SYMBOLS, BLOCK_SHOULD_SORT, BLOCKVECTOR_NBLOCKS)
	(BLOCKVECTOR_BLOCK, GLOBAL_BLOCK, STATIC_BLOCK, FIRST_LOCAL_BLOCK):
	Ditto.
	* block.c: New file.
	* block.h: New file.

2003-02-19  David Carlton  <carlton@math.stanford.edu>

	* mi-cmd-stack.c: #include "block.h"
2003-02-20 00:01:07 +00:00
Keith Seitz 5412f5f35f * Makefile.in: Add gdbtk-interps.c. 2003-02-18 23:27:42 +00:00
Andrew Cagney 021e760905 2003-02-14 Andrew Cagney <ac131313@redhat.com>
* main.c (tui_version): Delete variable.
	(captured_main): When --tui, set interpreter_p to "tui" instead of
	enabling tui_version.
	* printcmd.c (display_command) [TUI]: Test tui_active instead of
	tui_version.
	* cli/cli-decode.c (lookup_cmd_composition): Ditto.
	* cli/cli-cmds.c (disassemble_command): Ditto.
	* defs.h (tui_version): Delete declaration.
	* Makefile.in (SUBDIR_TUI_SRCS): Add "tui/tui-interp.c".
	(tui-interp.o): Add rules.
	(SUBDIR_TUI_OBS): Add "tui-interp.o".

Index: tui/ChangeLog
2003-02-14  Andrew Cagney  <ac131313@redhat.com>

	* tui.c (tui_enable, tui_disable): Don't modify tui_version.
	(tui_is_window_visible, tui_get_command_dimension): Test
	tui_active instead of tui_version.
	* tuiData.h (tui_version): Delete declaration.
	* tui-hooks.c (tui_init_hook, tui_event_loop): Delete function,
	moved to "tui-interp.c".
	(tui_exit, tui_command_loop): Ditto.
	(_initialize_tui): Don't initialize init_ui_hook.  Initialize
	target_new_objfile_hook.
	* tui-interp.c: New file.
2003-02-14 13:58:06 +00:00
Keith Seitz e46e5ccdd0 * main.h (struct captured_main_args): Add interpreter_p.
* main.c (captured_main): Initialize interpreter_p from context.
        * gdb.c (main): Set interpreter_p argument.
        * Makefile.in (gdb.o): Add dependency for interps.h.
2003-02-13 18:07:24 +00:00
Andrew Cagney 033afc6377 2003-02-11 Andrew Cagney <ac131313@redhat.com>
* acinclude.m4 (no_tcl): SUBST TCL_CC_SEARCH_FLAGS.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* Makefile.in (TCL): Use TCL_CC_SEARCH_FLAGS instead of
	TCL_LD_SEARCH_FLAGS.
2003-02-11 16:11:16 +00:00
Andrew Cagney b8a92b826d 2003-02-07 Andrew Cagney <ac131313@redhat.com>
* sol-thread.c, hpux-thread.c: Include "gdb_stat.h" instead of
	<sys/stat.h>.
	* Makefile.in (sol-thread.o, hpux-thread.o): Update dependencies.
2003-02-07 05:33:45 +00:00
Andrew Cagney 2555fe1a4f 2003-02-06 Andrew Cagney <ac131313@redhat.com>
* Makefile.in (symm-nat.o): Update dependencies.
	(sparc-nat.o, procfs.o, proc-api.o, ppc-linux-nat.o): Ditto.
	(lynx-nat.o, ia64-linux-nat.): Ditto.
	* symm-nat.c, sparc-nat.c, procfs.c, proc-api.c: Include
	"gdb_wait.h" instead of <wait.h> or <sys/wait.h>.
	* ppc-linux-nat.c, lynx-nat.c, ia64-linux-nat.c: Ditto.
2003-02-07 04:49:34 +00:00
Andrew Cagney 44270758cd 2003-02-06 Andrew Cagney <ac131313@redhat.com>
* Makefile.in (inflow_h): Define.
	(procfs.o, inflow.o, procfs.o): Update dependencies.
	* inftarg.c (child_stop): Delete extern declaration of
	inferior_process_group.  Include "inflow.h".
	* procfs.c (procfs_stop): Ditto.  Include "inflow.h".
	* inflow.c (PROCESS_GROUP_TYPE): Move definitions from here ...
	* inflow.h (PROCESS_GROUP_TYPE): ... to here.  New file.
	(our_process_group, inferior_process_group): Extern declarations.
2003-02-07 04:21:34 +00:00
Andrew Cagney 4a8f6654af Add missing files from last commit :-( 2003-02-06 05:30:17 +00:00
Andrew Cagney 4389a95abb 2003-02-05 Jim Ingham <jingham@apple.com>
Keith Seitz  <keiths@redhat.com>
            Elena Zannoni  <ezannoni@redhat.com>
            Andrew Cagney  <ac131313@redhat.com>

	* Makefile.in (SUBDIR_CLI_OBS): Add "cli-interp.o".
	(SUBDIR_CLI_SRCS): Add "cli/cli-interp.c".
	(SUBDIR_MI_OBS): Add "mi-interp.o".
	(SUBDIR_MI_SRCS): Add "mi/mi-interp.c".
	(SFILES): Add "interps.c".
	(COMMON_OBS): Add "interps.o".
	(interps_h, mi_main_h): Define.
	(interps.o, cli-interp.o, mi-interp.o): Add dependencies.
	(mi-main.o, main.o, event-top.o): Update dependencies.
	* cli/cli-interp.c: New file.
	* interps.h, interps.c: New files.
	* top.c: (gdb_init): Don't install the default interpreter, handed
	by captured_main.
	* main.c: Include "interps.h".
	(interpreter_p): Note that it should malloc'ed.
	(captured_command_loop): Call current_interp_command_loop.
	(captured_main): Initialize interpreter_p to INTERP_CONSOLE.  Use
	xfree and xstrdup when updating interpreter_p.  Install the
	default interpreter.  Add hack to stop mi1's copyright notice
	being encoded.
	* event-top.h (gdb_setup_readline): Declare.
	(gdb_disable_readline): Declare.
	* event-top.c: Include "interps.h".
	(display_gdb_prompt): Call current_interp_display_prompt_p.
	(gdb_setup_readline): Initialize gdb_stdout, gdb_stderr,
	gdb_stdlog, and gdb_stdtarg.
	(_initialize_event_loop): Don't call gdb_setup_readline.
	* cli-out.c (cli_out_set_stream): New function.
	* cli-out.h (cli_out_set_stream): Declare.
2003-02-06 01:19:12 +00:00
Andrew Cagney b1364885cb 2003-01-31 Andrew Cagney <ac131313@redhat.com>
* config/djgpp/fnchange.lst: Delete nindy files.
	* nindy-share/ttyflush.c, nindy-share/stop.h: Delete files.
	* nindy-share/nindy.c, nindy-share/env.h: Delete files.
	* nindy-share/coff.h, nindy-share/block_io.h: Delete files.
	* nindy-share/b.out.h, nindy-share/VERSION: Delete files.
	* nindy-share/README, nindy-share/Onindy.c: Delete files.
	* nindy-tdep.c, nindy-share/Makefile: Delete files.
	* Makefile.in (init.c): Remove nindy references.
	(saber_gdb): Delete rule.
	(ALLDEPFILES): Delete hp300ux-nat.c, nindy-tdep.c,
	nindy-share/Onindy.c, nindy-share/nindy.c, nindy-share/ttyflush.c,
	and a68v-nat.c.
	(hp300ux-nat.o, a68v-nat.o, ptx4-nat.o): Delete rules.
	(Onindy.o, nindy.o, ttyflush.o, nindy-tdep.o): Delete rules.
	(HFILES_NO_SRCDIR): Delete nindy-share/b.out.h,
	nindy-share/block_io.h, nindy-share/coff.h, nindy-share/env.h, and
	nindy-share/stop.h.
	* hp300ux-nat.c, a68v-nat.c, ptx4-nat.c: Delete files.
	* saber.suppress: Delete file.
2003-01-31 20:43:54 +00:00
Andrew Cagney c48861fb93 2003-01-31 Andrew Cagney <ac131313@redhat.com>
* README: Remove reference to Ericsson 1800 monitor.
	* Makefile.in (remote-es.o): Delete rule.
	(ALLDEPFILES): Delete remote-es.c.
	* remote-es.c: Delete file.
	* config/m68k/es1800.mt: Delete file.
	* config/djgpp/fnchange.lst: Update.
	* configure.tgt: Delete m68*-ericsson-* target.
2003-01-31 16:32:45 +00:00
Andrew Cagney 96ee522758 2003-01-30 Andrew Cagney <ac131313@redhat.com>
* Makefile.in (mon960-rom.o): Delete rule.
	* mon960-rom.c: Delete file.
2003-01-30 16:29:03 +00:00
Andrew Cagney 7f6104a94d 2003-01-30 Andrew Cagney <ac131313@redhat.com>
* d10v-tdep.c: Include "frame-unwind.h".
	(d10v_gdbarch_init): Append d10v_frame_p to the unwind predicate
	list.
	(next_addr, uses_frame): Delete.
	(struct d10v_unwind_cache): Define.
	(prologue_find_regs): Add struct d10v_unwind_cache info parameter.
	Use info instead of next_addr and uses_frame globals.
	(d10v_frame_init_saved_regs): Delete function.
	(d10v_init_extra_frame_info): Delete function.
	(d10v_gdbarch_init): Do not initialize init_extra_frame_info,
	frame_init_saved_regs or pop_frame, frame_chain, frame_chain_valid,
	init_frame_pc or frame_saved_pc.
	(d10v_pop_frame): Delete function.
	(do_d10v_pop_frame): Delete function.
	(d10v_frame_chain): Delete function.
	(d10v_frame_chain_valid): Delete function.
	(d10v_frame_pc_unwind): New function.
	(d10v_frame_id_unwind): New function.
	(saved_regs_unwinder): New function.
	(d10v_frame_register_unwind): New function.
	(d10v_frame_pop): New function.
	(d10v_frame_unwind): New variable.
	(d10v_frame_p): New function.
	(d10v_frame_saved_pc): Delete function.
	* Makefile.in (d10v-tdep.o): Update dependencies.
2003-01-30 15:11:20 +00:00
Andrew Cagney a94dd1fda2 2003-01-27 Andrew Cagney <ac131313@redhat.com>
* sentinel-frame.h, sentinel-frame.c: New files.
	* Makefile.in (frame.o): Update dependencies.
	(SFILES): Add sentinel-frame.c.
	(sentinel_frame_h): Define.
	(COMMON_OBS): Add sentinel-frame.o.
	(sentinel-frame.o): Specify dependencies.
	* frame.c: Include "sentinel-frame.h".
	(frame_register_unwind): Rewrite assuming that there is always a a
	->next frame.
	(frame_register, generic_unwind_get_saved_register): Ditto.
	(frame_read_unsigned_register, frame_read_signed_register): Ditto.
	(create_sentinel_frame, unwind_to_current_frame): New functions.
	(get_current_frame): Rewrite using create_sentinel_frame and
	unwind_to_current_frame.  When possible, always create a frame.
	(create_new_frame): Set next to the sentinel frame.
	(get_next_frame): Rewrite.  Don't go below the level 0 frame.
	(deprecated_update_frame_pc_hack): Update the next frame's PC and
	ID cache when necessary.
	(frame_saved_regs_id_unwind): Use frame_relative_level.
	(deprecated_generic_get_saved_register): Use frame_relative_level,
	get_frame_saved_regs, get_frame_pc, get_frame_base and
	get_next_frame.
	(frame_saved_regs_register_unwind): Use get_frame_saved_regs and
	frame_register.
2003-01-27 21:41:41 +00:00
Jim Blandy 5b5d99cf4d gdb/ChangeLog:
2003-01-23  Alexander Larsson <alexl@redhat.com>
	    Jim Blandy  <jimb@redhat.com>

	Add support for executables whose debug info has been separated
	out into a separate file, leaving only a link behind.
	* objfiles.h (struct objfile): New fields: separate_debug_objfile
	and separate_debug_objfile_backlink.
	(put_objfile_before): New declaration.
	* symfile.c: #include "filenames.h".
	(symbol_file_add_with_addrs_or_offsets): If this objfile has its
	debug info in a separate file, read that, too. Save the addrs
	argument, so we can use it again to read the separated debug info;
	syms_from_objfile modifies the table we pass it.
	(reread_symbols): After re-reading an objfile, call
	reread_separate_symbols to refresh its separate debug info
	objfile, if it has one.
	(reread_separate_symbols, find_separate_debug_file,
	get_debug_link_info, separate_debug_file_exists): New functions.
	(debug_file_directory): New global var.
	(_initialize_symfile): Initialize debug_file_directory, and
	provide the new `set debug-file-directory' command to let the user
	change it.
	* objfiles.c (free_objfile): If this objfile has its debug info in
	a separate objfile, free that one too.  If this is itself a
	separate debug info objfile, clear our parent's backlink.
	(put_objfile_before): New function.
	* utils.c (gnu_debuglink_crc32): New function.
	* defs.h (gnu_debuglink_crc32): New declaration.
	* Makefile.in (symfile.o): Note dependency on "filenames.h".
	* configure.in: Handle --with-separate-debug-dir config option.
	* acinclude.m4 (AC_DEFINE_DIR): New macro.
	* acconfig.h (DEBUGDIR): New macro.
	* configure, aclocal.m4, config.in: Regenerated.

gdb/doc/ChangeLog:
2003-01-23  Jim Blandy  <jimb@redhat.com>

	* gdb.texinfo (Separate Debug Files): New section.
2003-01-23 23:03:32 +00:00
Jim Blandy 7e8580c13a * symfile.c: #include "gdb_assert.h".
(syms_from_objfile): Add the ability to pass in a section offset
table directly, as an alternative to the section_addr_info table.
Document arguments better.
(symbol_file_add): Pass extra arguments to syms_from_objfile.
* symfile.h (syms_from_objfile): Update declaration.
* rs6000-nat.c (objfile_symbol_add): Pass new arguments to
syms_from_objfile.
* Makefile.in (symfile.o): List dependency on $(gdb_assert_h).
2003-01-23 07:30:18 +00:00
Daniel Jacobowitz d28f9cdffd Original patch by Tom Tromey <tromey@cygnus.com> and
Jason Molenda <jmolenda@apple.com>.
	* Makefile.in (PROFILE_CFLAGS): Substitute from configure.
	(INTERNAL_LDFLAGS): Don't include PROFILE_CFLAGS.
	* NEWS: Mention profiling.
	* configure.in (--enable-gdbtk): Fix typo.
	(--enable-profiling): New.  Set PROFILE_CFLAGS.
	* maint.c (maintenance_set_profile_cmd): Remove NOTYET.
	Fill in function.
	(profiling_state): New variable.
	(mcleanup_wrapper): New function.
	(_initialize_maint): Remove NOTYET, fix call to
	add_setshow_boolean_cmd for "maint set profile".
	* configure: Regenerated.
2003-01-22 23:50:35 +00:00
Martin Hunt df21e46583 2003-01-21 Martin M. Hunt <hunt@redhat.com>
* Makefile.in (install-gdbtk): Install PNG images too.
2003-01-21 21:39:31 +00:00
Andrew Cagney eb4f72c5f9 2003-01-21 Andrew Cagney <ac131313@redhat.com>
* frame.h (FRAME_OBSTACK_ZALLOC): Define.
	* blockframe.c (backtrace_below_main): Move to "frame.c".
	(frame_chain_valid): Delete check for backtrace_below_main.
	(_initialize_blockframe): Delete initialization, move ``set
	backtrace-below-main'' command to "frame.c".
	(do_flush_frames_sfunc): Delete function.
	* frame.c: Include "command.h" and "gdbcmd.h".
	(frame_type_from_pc): New function.
	(create_new_frame): Use frame_type_from_pc.
	(legacy_get_prev_frame): New function.
	(get_prev_frame): Rewrite.  When an old style frame, call
	legacy_get_prev_frame.  Otherwize, unwind the PC first.
	(_initialize_frame): Add ``set backtrace-below-main'' command.
	* Makefile.in (frame.o): Update dependencies.
2003-01-21 19:32:42 +00:00
Andrew Cagney 494cca16bd 2003-01-18 Andrew Cagney <ac131313@redhat.com>
* dummy-frame.h (dummy_frame_id_unwind): Delete declaration.
	(dummy_frame_pc_unwind, dummy_frame_register_unwind): Ditto.
	(struct frame_unwind): Declare opaque.
	(dummy_frame_p): Declare function.
	* dummy-frame.c (dummy_frame_id_unwind): Make static.
	(dummy_frame_pc_unwind, dummy_frame_register_unwind): Ditto.
	* dummy-frame.c: Include "frame-unwind.h".
	(dummy_frame_p): New function.
	(dummy_frame_unwind): New variable.
	* frame.c: Include "frame-unwind.h".
	(frame_pc_unwind, frame_id_unwind, frame_register_unwind): Update
	to use the new unwind field.
	(set_unwind_by_pc): Delete function.
	(create_new_frame, get_prev_frame): Set unwind field using
	frame_unwind_find_by_pc.
	(trad_frame_unwind, trad_frame_unwinder): New variables.
	* frame.h (trad_frame_unwind): Declare variable.
	(frame_id_unwind_ftype): Delete declaration.
	(frame_pc_unwind_ftype, frame_register_unwind_ftype): Ditto.
	(struct frame_unwind): Declare opaque.
	(struct frame_info): Replace the fields id_unwind, pc_unwind and
	register_unwind with a single unwind pointer.
	* frame-unwind.h, frame-unwind.c: New files.
	* Makefile.in (SFILES): Add frame-unwind.c.
	(frame_unwind_h): Define.
	(COMMON_OBS): Add frame-unwind.o.
	(frame-unwind.o): Specify dependencies.
	(frame.o, dummy-frame.o): Update dependencies.
2003-01-18 17:25:23 +00:00
Daniel Jacobowitz 030292b70e * Makefile.in (TARGET_SYSTEM_ROOT, TARGET_SYSTEM_ROOT_DEFINE): New
variables.
	(main.o): Custom rule which uses $(TARGET_SYSTEM_ROOT_DEFINE).
	* configure.in: Add --with-sysroot.
	* configure: Regenerated.
	* main.c (gdb_sysroot): New variable.
	(captured_main): Initialize gdb_sysroot.
	* defs.h (gdb_sysroot): New extern declaration.
	* solib.c (_initialize_solib): Initialize solib_absolute_prefix.
2003-01-13 18:00:16 +00:00
Andrew Cagney 4ef3f3be7a 2003-01-09 Andrew Cagney <ac131313@redhat.com>
* infrun.c (follow_fork): Use ISO C definition.
	* expprint.c (print_subexp): Use xfree instead of free.
	* charset.c: Include "gdb_string.h" instead of <string.h>.
	(register_iconv_charsets): Use ISO C definition.
	(host_charset, target_charset): Ditto.
	* Makefile.in (charset.o): Update dependencies.
	(mi-cmd-env.o): Update dependencies.

Index: mi/ChangeLog
2003-01-09  Andrew Cagney  <ac131313@redhat.com>

	* mi-cmd-env.c: Include "gdb_string.h" instead of <string.h>.
	Move all includes to after "defs.h".
2003-01-09 18:03:38 +00:00
Andrew Cagney 84dc46cbdb 2003-01-06 Andrew Cagney <cagney@redhat.com>
* x86-64-linux-tdep.c: Include "osabi.h".
	* Makefile.in (x86-64-linux-tdep.o): Update dependencies.
2003-01-06 20:45:30 +00:00
Daniel Jacobowitz 516034834f * arm-tdep.c (arm_frame_chain_valid): Remove unnecessary test.
* d10v-tdep.c (d10v_frame_chain_valid): Remove unnecessary tests.
	* hppa-tdep.c (hppa_frame_chain_valid): Remove unnecessary test.

	* blockframe.c: Include "gdbcmd.h" and "command.h".
	(backtrace_below_main): New variable.
	(file_frame_chain_valid, func_frame_chain_valid)
	(nonnull_frame_chain_valid, generic_file_frame_chain_valid)
	(generic_func_frame_chain_valid): Remove functions.
	(frame_chain_valid, do_flush_frames_sfunc): New functions.
	(_initialize_blockframe): New function.
	* Makefile.in (blockframe.o): Update dependencies.
	* frame.c (frame_saved_regs_id_unwind, get_prev_frame): Remove FIXME
	comment.  Call frame_chain_valid ().
	* frame.h: Remove old prototypes.  Add prototype for
	frame_chain_valid and update comments to match.
	* gdbarch.sh: Change FRAME_CHAIN_VALID into a predicated function.
	Remove old comment.
	* gdbarch.h: Regenerated.
	* gdbarch.c: Regenerated.

Plus updates to all other targets not to provide a FRAME_CHAIN_VALID.
2003-01-05 01:39:56 +00:00
Daniel Jacobowitz b00a803742 * Makefile.in (acconfig_h): Remove incorrect macro.
(config_h): Define.
	(osabi.o): Update dependencies.
	* configure.tgt: Set gdb_osabi based on target triplet.
	* configure.in: Define GDB_OSABI_DEFAULT based on gdb_osabi.
	* configure: Regenerated.
	* config.in: Regenerated.
	* osabi.c: Include "arch-utils.h", "gdbcmd.h", and "command.h".
	(GDB_OSABI_DEFAULT): Define if not already defined.
	(user_osabi_state, user_selected_osabi, gdb_osabi_available_names)
	(set_osabi_string): New variables.
	(gdbarch_register_osabi): Add new OS ABI to
	gdb_osabi_available_names.
	(gdbarch_lookup_osabi): Honor specified and default OS ABIs.
	(set_osabi, show_osabi): New functions.
	(_initialize_gdb_osabi): Add "set osabi" and "show osabi" commands.
2003-01-04 23:47:13 +00:00
Daniel Jacobowitz 4be87837a2 * arch-utils.c (gdbarch_info_init): Set osabi to
GDB_OSABI_UNINITIALIZED.
	* gdbarch.sh: Add osabi to struct gdbarch and to struct
	gdbarch_info.  Include "osabi.h" in gdbarch.c.  Check osabi
	in gdbarch_list_lookup_by_info and in gdbarch_update_p.
	* gdbarch.c: Regenerated.
	* gdbarch.h: Regenerated.
	* osabi.c (gdbarch_lookup_osabi): Return GDB_OSABI_UNINITIALIZED if
	there's no BFD.
	(gdbarch_init_osabi): Remove osabi argument; use info.osabi.
	* osabi.h (enum gdb_osabi): Move to defs.h.
	(gdbarch_init_osabi): Update prototype.
	* defs.h (enum gdb_osabi): Moved here.
	* Makefile.in: Update dependencies.

Plus updates to alpha, arm, hppa, i386, mips, ns32k, ppc, sh, sparc, and vax
ports to match.
2003-01-04 23:38:46 +00:00
Daniel Jacobowitz 1e69823536 gdb/
* buildsym.h (processing_hp_compilation): Remove obsolete variable.
	* gdbarch.sh Remove include of "value.h" in gdbarch.h.
	(COERCE_FLOAT_TO_DOUBLE): Remove.
	* gdbarch.c: Regenerate.
	* gdbarch.h: Regenerate.
	* Makefile.in: Remove value_h from gdbarch_h.
	* valops.c (coerce_float_to_double): New variable.
	(default_coerce_float_to_double): Remove.
	(standard_coerce_float_to_double): Remove.
	(value_arg_coerce): Use coerce_float_to_double.
	(_initialize_valops): Add "set coerce-float-to-double".
	* value.h (default_coerce_float_to_double): Remove prototype.
	(standard_coerce_float_to_double): Remove prototype.

	* hpread.c (hpread_process_one_debug_symbol): Mark C++ functions as
	prototyped.
	* mdebugread.c (parse_symbol): Likewise.
	* stabsread.c (define_symbol): Mark all functions as prototyped.

	* hppa-tdep.c (hppa_coerce_float_to_double): Remove.
	* alpha-tdep.c (alpha_gdbarch_init): Remove call to
	set_gdbarch_coerce_float_to_double.
	* arm-tdep.c (arm_gdbarch_init): Likewise.
	* frv-tdep.c (frv_gdbarch_init): Likewise.
	* h8300-tdep.c (h8300_gdbarch_init): Likewise (commented out).
	* i386-sol2-tdep.c (i386_sol2_init_abi): Likewise.
	* mips-tdep.c (mips_gdbarch_init): Likewise.
	(mips_coerce_float_to_double): Remove.
	* rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
	(rs6000_coerce_float_to_double): Remove.
	* s390-tdep.c (s390_gdbarch_init): Likewise.
	* sh-tdep.c (sh_gdbarch_init): Likewise.
	(sh_coerce_float_to_double): Remove.
	* sparc-tdep.c (sparc_gdbarch_init): Likewise.
	(sparc_coerce_float_to_double): Remove.
	* v850-tdep.c (v850_gdbarch_init): Likewise.
	* xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
	* config/m32r/tm-m32r.h (COERCE_FLOAT_TO_DOUBLE): Remove.
	* config/pa/tm-hppa.h: (COERCE_FLOAT_TO_DOUBLE): Remove.
	(hppa_coerce_float_to_double): Remove prototype.
	* config/sparc/tm-sparc.h (COERCE_FLOAT_TO_DOUBLE): Remove.
doc/
	* gdb.texinfo (Controlling GDB): Add ABI section.  Document
	"set coerce-float-to-double".
	* gdbint.texinfo (COERCE_FLOAT_TO_DOUBLE): Remove documentation.
testsuite/
	* gdb.base/callfuncs.exp: Don't XFAIL unprototyped functions for
	stabs.
	* gdb.base/completion.exp: Allow marker1(void) as well as marker1().
	* gdb.base/whatis.exp: Always allow (void) after function names.
2003-01-04 22:37:49 +00:00
Mark Kettenis 72cfdc7602 * configure.in: Remove code dealing with shared libraries.
* Makefile.in: Remove HLDFLAGS and HLDENV.
* configure: Regenerated.
2003-01-04 19:27:19 +00:00
Mark Kettenis 8dcde88743 * configure.in: Remove all use of the SUBDIRS variable; add
directories using the AC_CONFIG_SUBDIRS macro instead.  Polish
code providing the --enable-multi-ice option, and move it right in
front of the code that checks whether gdbserver is supported.
Polish that too.
* configure: Regenerated.
* Makefile.in (SUBDIRS): Substitute @subdirs@ instead of
@SUBDIRS@.
2003-01-03 23:19:28 +00:00
Mark Kettenis 8fe84d0149 * cli/cli-decode.h: Don't include "gdb_regex.h"; provide a forward
declaration for `struct re_pattern_buffer' instead.
* Makefile.in (cli_decode_h): Remove $(gdb_regex_h).
2003-01-03 14:10:08 +00:00
Mark Kettenis f5dbc56d4d * configure.in: Remove UI_OUT configuration code.
* ada-lang.c: Update assuming UI_OUT is always true.
* Makefile.in (UIOUT_CFLAGS): Remove.
* configure: Regenerated.
* TODO: Remove blurb about elimination of -DUI_OUT.
2003-01-02 20:29:15 +00:00
Mark Kettenis 287c1a400f * configure.in: Move code that provides the --enable-tui option
before the "Checks for libraries" section.  Polish the code
somewhat and set need_curses to yes if we build the TUI.  Rewrite
code that looks for a library providing termcap functionality to
match more closely what's done in the Readline library, and move
it into to the "Checks for libraries" section.
* configure: Regenerated.
* Makefile.in (TERMCAP): Remove variable.
* config/i386/go32.mh (TERMCAP): Remove variable.
2003-01-02 16:54:56 +00:00
Andrew Cagney 1b831c9308 2003-01-02 Andrew Cagney <ac131313@redhat.com>
* valarith.c (value_binop): Delete obsolete code and comments.
	* configure.host: Ditto.
	* buildsym.h (make_blockvector): Ditto.
	* buildsym.c (make_blockvector): Ditto.
	* defs.h (enum language): Ditto.
	(chill_demangle): Ditto.
	* elfread.c (elf_symtab_read): Ditto.
	* dwarfread.c (CHILL_PRODUCER): Ditto.
	(set_cu_language): Ditto.
	(handle_producer): Ditto.
	* expprint.c (print_subexp): Ditto.
	* gdbtypes.c (chill_varying_type): Ditto.
	* gdbtypes.h (builtin_type_chill_bool): Ditto.
	(builtin_type_chill_char, builtin_type_chill_long): Ditto.
	(builtin_type_chill_ulong, builtin_type_chill_real): Ditto.
	(chill_varying_type): Ditto.
	* language.h (_LANG_chill): Ditto.
	* language.c (binop_result_type, integral_type): Ditto.
	(character_type, string_type, structured_type): Ditto.
	(lang_bool_type, binop_type_check): Ditto.
	* stabsread.h (os9k_stabs): Ditto.
	* stabsread.c (os9k_type_vector, dbx_lookup_type): Ditto.
	(define_symbol, read_type, read_struct_fields): Ditto.
	(read_array_type, read_enum_type, read_huge_number): Ditto.
	(read_range_type, start_stabs): Ditto.
	* symfile.c (init_filename_language_table): Ditto.
	(add_psymbol_with_dem_name_to_list): Ditto.
	* symtab.c (symbol_init_language_specific): Ditto.
	(symbol_init_demangled_name, symbol_demangled_name): Ditto.
	* symtab.h (struct general_symbol_info): Ditto.
	(SYMBOL_CHILL_DEMANGLED_NAME): Ditto.
	* typeprint.c (typedef_print): Ditto.
	* utils.c (fprintf_symbol_filtered): Ditto.
	* valops.c (value_cast, search_struct_field, value_slice): Delete
	obsolete code.
	(varying_to_slice): Delete function.
	* value.h (COERCE_VARYING_ARRAY): Delete obsolete macro contents.
	(varying_to_slice): Delete declaration.
	* MAINTAINERS: Update.
2003-01-02 14:27:27 +00:00
Joel Brobecker 60e1ff2716 Continuing work to convert the hppa targets to multiarch partial.
* hppa-tdep.c: (hppa_register_raw_size): New function replacing
       the body of macro REGISTER_RAW_SIZE.
       * hppa-hpux-tdep.c: Add new functions replacing macro bodies from
       config/pa/tm-hppah.h. These functions will be used to initialize
       the gdbarch structure.
       (hppa_hpux_pc_in_sigtramp): New function.
       (hppa_hpux_frame_saved_pc_in_sigtramp): New function.
       (hppa_hpux_frame_base_before_sigtramp): New function.
       (hppa_hpux_frame_find_saved_regs_in_sigtramp): New function.
       Add gdbcore.h #include.
       * config/pa/tm-hppa.h (REGISTER_RAW_SIZE): Change the definition
       of this gdbarch-eligible macro to a call to the new associated
       function.
       * config/pa/tm-hppah.h (PC_IN_SIGTRAMP): Likewise.
       (FRAME_SAVED_PC_IN_SIGTRAMP): Change the definition of this macro
       into a call to the new associated function.
       (FRAME_BASE_BEFORE_SIGTRAMP): Likewise.
       (FRAME_FIND_SAVED_REGS_IN_SIGTRAMP): Likewise.
       * Makefile.in (hppa-hpux-tdep.o): Add dependency on gdbcore.h.
2002-12-26 09:36:43 +00:00
Kevin Buettner 96f026fc7b Add GNU/Linux specific support for the n32 and n64 MIPS ABIs. 2002-12-24 19:21:10 +00:00
Kevin Buettner 19ed69dd06 Multiarch SVR4_FETCH_LINK_MAP_OFFSETS and GET_LONGJMP_TARGET for GNU/Linux/MIPS. 2002-12-21 05:07:36 +00:00
Joel Brobecker 273f84299e * hppa-hpux-tdep.c: New file.
* hppa-tdep.c (hppa_gdbarch_init): call the registered osabi-
        specific initialization routines.
        * Makefile.in (ALLDEPFILES): Add hppa-hpux-tdep.c.
        (hppa-hpux-tdep.o): Add rule.
        * config/pa/hppahpux.mt (TDEPFILES): Add hppa-hpux-tdep.o.
        * config/pa/hppa64.mt (TDEPFILES): Likewise.
2002-12-16 16:51:47 +00:00
Jeff Johnston c04e0a08c9 2002-12-13 Jeff Johnston <jjohnstn@redhat.com>
* defs.h (init_last_source_visited): New prototype.
        (add_path): Ditto.
        * source.c (add_path): New function that adds to a specified path.
        (mod_path): Change to call add_path.
        (init_last_source_visited): New function to allow interfaces to
        initialize static variable: last_source_visited.  Part of fix
        for PR gdb/741.
        * Makefile.in: Add support for mi/mi-cmd-env.c.
2002-12-13 17:55:49 +00:00
Elena Zannoni aeeccc89ca 2002-12-08 Elena Zannoni <ezannoni@redhat.com>
* Makefile.in (readline_h): Define.
	(completer.o): Depend on readline_h.
	(corelow.o): Ditto.
	(event-top.o): Ditto.
	(exec.o): Ditto.
	(solib.o): Ditto.
	(source.o): Ditto.
	(symfile.o): Ditto.
	(symmisc.o): Ditto.
	(top.o): Ditto.
	(tracepoint.o): Ditto.
	(utils.o): Ditto.
	(cli-dump.o): Ditto.
	(tui-hooks.o): Ditto.
	(tuiWin.o): Ditto.
2002-12-09 01:28:10 +00:00
Elena Zannoni 57725d84f6 2002-12-06 Elena Zannoni <ezannoni@redhat.com>
* Makefile.in (thread-db.o): Add explicit rule to ignore the use of
        -Werror on this file.
2002-12-08 21:10:28 +00:00
Elena Zannoni 2b298b5d97 2002-12-06 Elena Zannoni <ezannoni@redhat.com>
* ia64-linux-nat.c: Include gdb_string.h.
	* alpha-nat.c: Ditto.
	* ppc-linux-nat.c: Ditto.
	* Makefile.in (ia64-linux-nat.o, alpha-nat.o, ppc-linux-nat.o):
	Update dependencies.
2002-12-06 18:38:44 +00:00