Commit Graph

964 Commits

Author SHA1 Message Date
Mark Kettenis 8a96bc77ca * i386fbsd-tdep.c: New file.
(i386fbsd_sigtramp_start, i386fbsd_sigtramp_end,
i386fbsd_sc_reg_offset, i386fbsdaout_init_abi, i386fbsd_init_abi,
i386fbsd4_sc_reg_offset, i386fbsd4_init_abi): Move here from
i386bsd-tdep.c.
(_initialize_i386fbsd_tdep): New function.
(i386fbsd_r_reg_offset, i386fbsd4_r_reg_offset): New varibles.
(i386fbsdaout_init_abi): Initialize TDEP->gregset_reg_offset,
TDEP->gregset_num_regs, TDEP->sizeof_gregset and
TDEP->sizeof_fpregset.  Use ARRAY_SIZE to initialize
TDEP->sc_num_regs.
(i386fbsd4_init_abi): Initialize TDEP->gregset_reg_offset,
TDEP->gregset_num_regs and TDEP->sizeof_gregset.  Use ARRAY_SIZE
to initialize TDEP->sc_num_regs.
* i386bsd-tdep.c (i386fbsd_sigtramp_start, i386fbsd_sigtramp_end,
i386fbsd_sc_reg_offset, i386fbsdaout_init_abi, i386fbsd_init_abi,
i386fbsd4_sc_reg_offset, i386fbsd4_init_abi): Remove.
(_initialize_i386bsd_tdep): Don't register FreeBSD a.out and
FreeBSD ELF OS/ABI's here.
* Makefile.in (ALLDEPFILES): Add i386fbsd-tdep.c.
(i386fbsd-tdep.o): New target.
* config/i386/fbsd.mt (TDEPFILES): Add i386fbsd-tdep.o.
* config/i386/fbsd64.mt (TDEPFILES):  Add i386fbsd-tdep.o.
2003-10-11 15:22:39 +00:00
Andrew Cagney 8be9034ab1 2003-10-10 Andrew Cagney <cagney@redhat.com>
* Makefile.in (ppc-sysv-tdep.o): Add $(gdb_assert_h).
	* rs6000-tdep.c (rs6000_gdbarch_init): When 64 bit SysV ABI, set
	push_dummy_call to ppc64_sysv_abi_push_dummy_call.
	* ppc-sysv-tdep.c: Include "gdb_assert.h".
	(ppc64_sysv_abi_push_dummy_call): New function.
	(ppc64_sysv_abi_broken_push_dummy_call): New function.
	* ppc-tdep.h (ppc64_sysv_abi_push_dummy_call): Declare.
	(ppc64_sysv_abi_broken_push_dummy_call): Declare.
2003-10-10 18:29:13 +00:00
Kazuhiro Inaoka 73e8eb5189 2003-10-08 Kei Sakamoto <sakamoto.kei@renesas.com>
* m32r-tdep.c : Include "dis-asm.h".
	* Makefile.in (m32r-tdep.o): Update dependencies.
2003-10-08 02:41:49 +00:00
Joel Brobecker 51065942b4 * completer.h (get_gdb_completer_word_break_characters): Delete.
* completer.c: include language.h.
        (gdb_completer_word_break_characters): Delete.
        (get_gdb_completer_word_break_characters): Delete.
        (location_completer): Use the word break characters of the current
        language.
        (complete_line): Likewise.
        (line_completion_function): Likewise.
        (skip_quoted_chars): Likewise.
        * Makefile.in (completer.o): Add dependency on language.h.
        * top.c (init_main): Set the readline word break characters
        to GDB's default word break characters.
2003-10-06 22:41:17 +00:00
Andrew Cagney a5d61f6618 2003-10-06 Andrew Cagney <cagney@redhat.com>
* Makefile.in (ALLDEPFILES): Remove "z8k-tdep.c" and
	"h8500-tdep.c".
	(z8k-tdep.o): Delete custom build rule.
2003-10-06 21:56:40 +00:00
Andrew Cagney 1bfd8a8364 2003-10-06 Andrew Cagney <cagney@redhat.com>
* Makefile.in: Update all dependencies.
2003-10-06 20:43:39 +00:00
Mark Kettenis 54c847345d * regset.h: New file.
* Makefile.in (regset_h): Add.
2003-09-26 14:36:56 +00:00
David Carlton 79c2c32df4 2003-09-25 David Carlton <carlton@kealia.com>
* c-exp.y: Include cp-support.h.  Add qualified_type.
	(yylex): Delete nested type hack; add comments.
	* cp-namespace.c (cp_lookup_nested_type): New function.
	* cp-support.h: Declare cp_lookup_nested_type.
	* eval.c (evaluate_subexp_standard): Call value_aggregate_elt
	instead of value_struct_elt_for_reference.
	* valops.c: Include cp-support.h.
	(value_aggregate_elt): New function.
	(value_namespace_elt): Ditto.
	(value_struct_elt_for_reference): Make static.
	* value.h: Delete declaration of value_struct_elt_for_reference;
	add declaration for value_aggregate_elt.
	* Makefile.in (c-exp.tab.o): Depend on $(cp_support_h).
	(valops.o): Ditto.

2003-09-25  David Carlton  <carlton@kealia.com>

	* gdb.cp/namespace.exp: Tweak comments.  Add non-quoted versions
	of some print tests, where appropriate.  Add tests for C::D::cd,
	E::ce, F::cXfX, G::XgX.
	* gdb.cp/namespace.cc: Add XgX, cXfX, ce.
2003-09-25 16:39:39 +00:00
Daniel Jacobowitz 898c62f580 * stack.c: Include "reggroups.h".
(frame_info): Only display registers in all_reggroup.
	* Makefile.in (stack.o): Update dependencies.
2003-09-25 16:12:32 +00:00
Andreas Schwab 3f244638cf * m68k-tdep.c: Include "dwarf2-frame.h".
(m68k_gdbarch_init): Add the DWARF CFI frame unwinder.
	* Makefile.in (m68k-tdep.o): Update dependencies.
2003-09-25 09:10:30 +00:00
Paul N. Hilfinger 5f9769d172 * parser-defs.h (struct exp_descriptor): New definition, containing
language-specific info for printing, prefixifying, dumping, and
evaluating expressions.
(exp_descriptor_standard): Declare new variable.
(print_subexp): Make global and declare here (from expprint.c).
(dump_subexp): Ditto.
(dump_subexp_body_standard): Declare.
(operator_length_standard): Declare.
(op_name_standard): Declare.
(print_subexp): Declare.
(print_subexp_standard): Declare.

* language.h (struct language_defn): Add la_exp_desc field to hold
pointer to table for language-specific operators.
Remove evaluate_exp field, which is now in struct exp_descriptor.

* parse.c (operator_length): Move most code to new
operator_length_standard function.  Use language-specific information.
(operator_length_standard): New function taking most code from
operator_length.
(exp_descriptor_standard): New constant.

* expression.h (enum exp_opcode): Add definitions of OP_EXTENDED0
and OP_EXTENDED_LAST.

* expprint.c (print_subexp): Use language-specific print_subexp.
Make global; remove static declaration.
Move most code to print_subexp_standard.
(print_subexp_standard): New function, containing code formerly in
print_subexp.
(op_name): Add expression to argument signature.
Use langauge-specific op_name.
Move most code to op_name_standard.
(op_name_standard): New function, containing code formerly in op_name.
(dump_subexp): 	Use new version of op_name function.
Use language-specific dump_subexp_body, and move most existing code to
dump_subexp_body_standard.
(dump_raw_expression): Use new op_name interface.
(dump_subexp_body): Move most code to dump_subexp_body_standard.
(dump_subexp_body_standard): New function, containing code formerly
in dump_subexp_body.

* language.c (unknown_language): Add default la_exp_desc field and
remove evaluate_exp field.
(auto_language): Ditto.
(local_language): Ditto.
* f-lang.c (f_language_defn): Ditto.
* c-lang.c (c_language_defn): Ditto.
(cplus_language_defn): Ditto.
(asm_language_defn): Ditto.
(minimal_language_defn): Ditto.
* p-lang.c (pascal_language_defn): Ditto.
* m2-lang.c (m2_language_defn): Ditto.
* objc-lang.c (objc_language_defn): Ditto.

* jv-lang.c (exp_descriptor_java): New variable, containing
Java-specific expression evaluator.
(java_language_defn): Add la_exp_desc field and remove evaluate_exp
field.
* scm-lang.c (exp_descriptor_scm): New variable, containing
Scheme-specific expression evaluator.
(scm_language_defn): Add la_exp_desc field and remove evaluate_exp
field.
* objc-lang.c (print_object_command): Take evaluate_exp from the
la_exp_desc field.

* Makefile.in (eval.o): Add dependency on parser-defs.h.

* eval.c: Include parser-defs.h for the full declaration of
la_exp_desc's type.
(evaluate_subexp): Get evaluate_exp out of la_exp_desc field.
2003-09-25 08:40:45 +00:00
Jim Blandy b55c33cc63 * Makefile.in (dis_asm_h): Note that this #includes "bfd.h". 2003-09-17 21:34:29 +00:00
Mark Kettenis ebf7d56bcf * Makefile.in (xm-i386-sv32.h, tm-i386gas.h): Remove. 2003-09-13 11:44:21 +00:00
David Carlton 5c4e30cabe 2003-09-11 David Carlton <carlton@kealia.com>
* gdbtypes.h: Add TYPE_CODE_NAMESPACE.
	* gdbtypes.c (init_type): Handle TYPE_CODE_NAMESPACE.
	(recursive_dump_type): Ditto.
	* printcmd.c (print_formatted): Ditto.
	* typeprint.c (print_type_scalar): Ditto.
	* c-typeprint.c (c_type_print_varspec_prefix): Ditto.
	(c_type_print_varspec_suffix, c_type_print_base): Ditto.
	* cp-support.h: Declare cp_check_possible_namespace_symbols,
	maint_cplus_cmd_list.
	* cp-support.c: Make maint_cplus_cmd_list extern.
	* cp-namespace.c: Include objfiles.h, gdbtypes.h, dictionary.h,
	command.h.
	(lookup_symbol_file): Look in possible namespace blocks when
	appropriate.
	(initialize_namespace_symtab): New.
	(get_possible_namespace_block, free_namespace_block)
	(check_possible_namespace_symbols)
	(check_possible_namespace_symbols_loop)
	(check_one_possible_namespace_symbol)
	(lookup_possible_namespace_symbol, maintenance_cplus_namespace)
	(_initialize_cp_namespace): Ditto.
	* block.h: Declare allocate_block.
	* block.c (allocate_block): New.
	* jv-lang.c (get_java_class_symtab): Allocate blocks via
	allocate_block.
	* symfile.h: Update declaration of add_psymbol_to_list.
	* symfile.c (add_psymbol_to_list): Return the partial symbol in
	question.
	* dwarf2read.c (dwarf2_build_psymtabs_hard): Add argument to
	scan_partial_symbols_call.
	(scan_partial_symbols): Add NAMESPACE argument; update calls to
	helper functions.
	(add_partial_symbol): If necessary, scan mangled names for names
	of namespaces.
	(add_partial_namespace): Add NAMESPACE argument; generate partial
	symbols associated  to namespaces.
	(add_partial_enumeration): Add NAMESPACE argument.
	(new_symbol): Allow namespace syms.
	(read_namespace): Generate namespace syms.
	* objfiles.h: Add opaque declaration of struct symtab.
	(struct objfile): Add cp_namespace_symtab member.
	* objfiles.c (allocate_objfile): Set
	objfile->cp_namespace_symtab.
	* Makefile.in (cp-namespace.o): Depend on objfiles_h, gdbtypes_h,
	dictionary_h, command_h.

2003-09-11  David Carlton  <carlton@kealia.com>

	* gdb.c++/namespace.exp: Add tests for namespace types.
	* gdb.c++/maint.exp (test_help): Test 'help maint cp namespace'.
	(test_namespace): New.
2003-09-11 19:49:20 +00:00
Joel Brobecker fde2cceb86 * hppa-tdep.c: Include "dis-asm.h". Fixes a build failure.
* Makefile.in (hppa-tdep.o): Update dependencies.
2003-09-11 02:00:51 +00:00
Kevin Buettner dcc6aaff9c * frv-tdep.c (dis-asm.h): Include.
* Makefile.in (frv-tdep.o): Update dependencies.
2003-09-10 07:32:47 +00:00
Andrew Cagney a89aa30014 2003-09-04 Andrew Cagney <cagney@redhat.com>
* avr-tdep.c: Include "dis-asm.h".
	* cris-tdep.c: Include "dis-asm.h".
	(cris_delayed_get_disassembler): Use "struct disassemble_info"
	instead of corresponding typedef.
	* h8300-tdep.c: Include "dis-asm.h".
	* ia64-tdep.c: Include "dis-asm.h".
	* i386-tdep.c: Include "dis-asm.h".
	(i386_print_insn): Use "struct disassemble_info" instead of
	corresponding typedef.
	* m68k-tdep.c: Include "dis-asm.h".
	* mcore-tdep.c: Include "dis-asm.h".
	* mips-tdep.c: Include "dis-asm.h".
	(gdb_print_insn_mips): Make static, use "struct disassemble_info"
	instead of corresponding typedef.
	* ns32k-tdep.c: Include "dis-asm.h".
	* s390-tdep.c: Include "dis-asm.h".
	* sparc-tdep.c: Include "dis-asm.h".
	* vax-tdep.c: Include "dis-asm.h".
	* v850-tdep.c: Include "dis-asm.h".
	* mn10300-tdep.c: Include "dis-asm.h".
	* rs6000-tdep.c: Include "dis-asm.h".
	* xstormy16-tdep.c: Include "dis-asm.h".
	(_initialize_xstormy16_tdep): Delete "extern" declaration of
	print_insn_xstormy16.
	* Makefile.in (v850-tdep.o): Update dependencies.
	(vax-tdep.o, sparc-tdep.o, s390-tdep.o): Ditto.
	(ns32k-tdep.o, mips-tdep.o, mcore-tdep.o): Ditto.
	(m68k-tdep.o, ia64-tdep.o, i386-tdep.o): Ditto.
	(h8300-tdep.o, cris-tdep.o, avr-tdep.o): Ditto.
	(mn10300-tdep.o, xstormy16-tdep.o, disasm.o): Ditto.
	(gdbarch_h): Remove $(dis_asm_h).
	* disasm.c: Include "dis-asm.h".
	(dis_asm_read_memory): Use "struct disassemble_info" instead of
	corresponding typedef.
	(dis_asm_memory_error, dump_insns, do_assembly_only): Ditto.
	(gdb_disassemble_info, gdb_disassembly, gdb_print_insn): Ditto.
	* gdbarch.sh: Do not include "dis-asm.h".
	(struct disassemble_info): Declare opaque.
	(TARGET_PRINT_INSN): Update declaration.
	* gdbarch.h, gdbarch.c: Re-generate.
2003-09-09 04:41:32 +00:00
Kevin Buettner 1cb761c72b Make frv-tdep.c use new frame mechanisms. 2003-09-08 23:01:29 +00:00
Jim Blandy 7c8a5605fc * Makefile.in (dbxread.o): Note new dependency on $(gdb_assert_h).
* dbxread.c: #include "gdb_assert.h".
(read_dbx_symtab): If the objfile has no .data section, use the
section index for the .bss section instead.
2003-09-08 19:22:30 +00:00
Corinna Vinschen 55ff77acc2 * Makefile.in (ALLDEPFILES): Add sh64-tdep.c.
(sh64-tdep.o): Add dependencies.
	* configure.tgt: Add FIXME to sh-*-linux*.
	* sh-tdep.c: Move sh64 support to sh64-tdep.c.
	(sh_gdbarch_init): Always set correct sh_show_regs function
	pointer.  Call sh64_gdbarch_init() if machine type is sh5.
	* sh-tdep.h: Move sh64 support to sh64-tdep.c.
	* sh64-tdep.c: New file, containing all sh64 related code from
	sh-tdep.c.
	* config/sh/embed.mt (TDEPFILES): Add sh64-tdep.o.
	* config/sh/linux.mt (TDEPFILES): Ditto.
	* config/sh/nbsd.mt (TDEPFILES): Ditto.
	* config/sh/tm-sh.h: Drop REGISTER_TYPE definition.
	* config/sh/wince.mt (TDEPFILES): Ditto.
2003-09-08 11:26:21 +00:00
Andrew Cagney c14a44d507 2003-09-04 Andrew Cagney <cagney@redhat.com>
* Makefile.in: Re-generate all dependencies.
2003-09-04 16:48:42 +00:00
Daniel Jacobowitz eb5492fa14 * arm-tdep.c: Include frame-unwind.h, frame-base.h, and
trad-frame.h.
	(arm_get_cache): Delete macro.
	(struct arm_prologue_cache): Update comments.  Make saved_regs into
	a trad_frame_saved_reg pointer.  Remove unwound_pc; rename unwound_sp
	to prev_sp.
	(thumb_scan_prologue): Update for cache changes.  Don't call
	DEPRECATED_PC_IN_CALL_DUMMY.
	(arm_scan_prologue): Update for cache changes.  Take NEXT_FRAME
	argument and use it in desperation search for our prologue.  Do not
	search past the specified PC.
	(arm_make_prologue_cache): Simplify.

	(arm_prologue_this_id, arm_prologue_prev_register)
	(arm_prologue_unwind, arm_prologue_unwind_sniffer)
	(arm_normal_frame_base, arm_normal_base, arm_make_sigtramp_cache)
	(arm_sigtramp_this_id, arm_sigtramp_prev_register)
	(arm_sigtramp_unwind, arm_sigtramp_unwind_sniffer)
	(arm_unwind_dummy_id, arm_unwind_pc, arm_unwind_sp): New.

	(arm_frame_chain_valid, arm_find_callers_reg)
	(arm_frame_saved_pc, arm_read_fp, arm_frame_init_saved_regs)
	(arm_pop_frame): Delete obsolete methods.
	(arm_minimal_frame_chain, arm_minimal_frame_info): Delete.

	(arm_gdbarch_init): Update for new frame methods.  Register prologue
	and sigtramp unwinders.  Set the default frame base method.

	* Makefile.in (arm-tdep.o): Update dependencies.
	* varobj.c (find_frame_addr_in_frame_chain): Call
	get_frame_base_address.
	* std-regs.c (value_of_builtin_frame_fp_reg): Likewise.
2003-09-03 20:46:02 +00:00
Michael Chastain 12e035e235 2003-08-30 Michael Chastain <mec@shout.net>
* Makefile.in: Remove tm-hp300bsd.h, tm-hp300hpux.h.
	* config/m68k/nm-hp300hpux.h: Delete.
	* config/m68k/tm-hp300hpux.h: Delete.
	* config/m68k/xm-hp300hpux.h: Delete.
	* config/m68k/xm-hp300bsd.h: Delete.
	* config/djgpp/fnchange.lst: Remove nm-hp300hpux.h,
	tm-hp300hpux.h, xm-hp300hpux.h.
	* somsolib.c: Remove comment about hp300 shared libraries.
2003-09-01 02:11:07 +00:00
Andrew Cagney 36482093be 2003-08-27 Andrew Cagney <cagney@redhat.com>
* Makefile.in (cris-tdep.o): Update dependencies.
	* cris-tdep.c: Include "gdb_assert.h".
	(cris_gdbarch_init): Set print_insn.
	(_initialize_cris_tdep): Do not set deprecated_tm_print_insn.
	(cris_delayed_get_disassembler): Simplify, directly call the
	disassembler returned by cris_get_disassembler.
	* hppa-tdep.c (hppa_gdbarch_init): Set print_insn.
	(_initialize_hppa_tdep): Do not set deprecated_tm_print_insn.
	* ns32k-tdep.c (ns32k_gdbarch_init): Set print_insn.
	(_initialize_ns32k_tdep): Do not set deprecated_tm_print_insn.
	* mn10300-tdep.c (mn10300_gdbarch_init): Set print_insn.
	(_initialize_mn10300_tdep): Do not set deprecated_tm_print_insn.
	* mcore-tdep.c (mcore_gdbarch_init): Set print_insn.
	(_initialize_mcore_tdep): Do not set deprecated_tm_print_insn.
	* frv-tdep.c (frv_gdbarch_init): Set print_insn.
	(_initialize_frv_tdep): Do not set deprecated_tm_print_insn.
	* sparc-tdep.c (sparc_gdbarch_init): Set print_insn.
	(gdb_print_insn_sparc): Delete function.
	(_initialize_sparc_tdep): Do not set deprecated_tm_print_insn or
	deprecated_tm_print_insn_info.
	* v850-tdep.c (v850_gdbarch_init): Set print_insn.
	(_initialize_v850_tdep): Do not set deprecated_tm_print_insn.
	(v850_gdbarch_init): Do not set deprecated_tm_print_insn_info.
	* xstormy16-tdep.c (xstormy16_gdbarch_init): Set print_insn.
	(_initialize_xstormy16_tdep): Do not set deprecated_tm_print_insn.
	* s390-tdep.c (gdb_print_insn_s390): Delete function.
	(_initialize_s390_tdep): Do not set deprecated_tm_print_insn.
	(s390_gdbarch_init): Set print_insn.
2003-08-28 03:03:44 +00:00
Andrew Cagney cdcd555211 2003-08-27 Andrew Cagney <cagney@redhat.com>
* dsrec.c: Include "gdb_string.h".
	* Makefile.in (dsrec.o): Update dependencies.
2003-08-28 00:49:31 +00:00
Kevin Buettner 8baa6f9257 * frv-tdep.c (gdb_string.h, frame.h, trad-frame.h): Include.
(frv_frame_init_saved_regs): Add declaration.
	(frame_extra_info): Add new field ``saved_regs''.
	(frv_frame_chain, frv_frame_saved_pc, frv_analyze_prologue)
	(frv_skip_prologue, frv_init_extra_frame_info, frv_pop_frame_regular):
	Update frame related code.
	(frv_extract_struct_value_address): Adjust formatting.
	* Makefile.in (frv-tdep.o): Update dependencies.
	* config/frv/tm-frv.h (target_insert_watchpoint)
	(target_remove_watchpoint, target_insert_hw_breakpoint)
	(target_remove_hw_breakpoint): Delete these macros.
	(remote_insert_watchpoint, remote_remove_watchpoint)
	(remote_insert_hw_watchpoint, remote_remove_hw_watchpoint): Remove
	these declarations.
2003-08-20 20:22:41 +00:00
Daniel Jacobowitz 4de4c07c6b * Makefile.in (i386-linux-nat.o): Update dependencies.
* config/i386/nm-linux.h (LINUX_CHILD_POST_STARTUP_INFERIOR): Define.
	* config/nm-linux.h (CHILD_POST_STARTUP_INFERIOR, CHILD_POST_ATTACH)
	(CHILD_FOLLOW_FORK, KILL_INFERIOR): Define.
	* i386-linux-nat.c: Include "linux-nat.h".
	(child_post_startup_inferior): New function.
	* i386-nat.c (child_post_startup_inferior): Wrap in #ifdef.
	* infptrace.c (kill_inferior): Wrap in #ifdef.
	* lin-lwp.c (lin_lwp_attach_lwp): Call child_post_attach after
	attaching to each LWP.
	(child_wait, lin_lwp_wait): Call linux_handle_extended_wait.
	(init_lin_lwp_ops): Fill in some more operations.
	* linux-nat.h (linux_enable_event_reporting)
	(linux_handle_extended_wait, linux_child_post_startup_inferior): New
	prototypes.
	* linux-nat.c (linux_enable_event_reporting): New function.
	(child_post_attach, linux_child_post_startup_inferior)
	(child_post_startup_inferior, child_follow_fork)
	(linux_handle_extended_wait, kill_inferior): New functions.
2003-08-17 18:22:25 +00:00
Andrew Cagney 4677b45628 Oops, merge lost Makefile.in:printcmd.o part of change:
2003-08-16  Andrew Cagney  <cagney@redhat.com>

	* Makefile.in (printcmd.o, valprint.o): Do not try to build with
	-Werror.  -Wformat-nonliteral problems.
2003-08-16 17:49:12 +00:00
Andrew Cagney 07978cd823 2003-08-16 Andrew Cagney <cagney@redhat.com>
* Makefile.in (printcmd.o, valprint.o): Do not try to build with
	-Werror.  -Wformat-nonliteral problems.
2003-08-16 17:44:51 +00:00
Joel Brobecker 3ff7cf9eed Further multiarching work mostly for hppa64-*-hpux11:
* hppa-tdep.h: New file.
        * hppa-tdep.c: #include hppa-tdep.c.
        (hppa32_num_regs): Renamed from hppa_num_regs.
        (hppa64_num_regs): New constant.
        (hppa64_call_dummy_breakpoint_offset): New constant.
        (hppa32_call_dummy_length): New constant.
        (hppa64_call_dummy_length): New constant.
        (hppa32_stack_align): Make name 32bit explicit.
        (hppa32_register_virtual_type): Likewise.
        (hppa32_extract_return_value): Likewise.
        (hppa32_use_struct_convention): Likewise.
        (hppa32_store_return_value): Likewise.
        (hppa64_register_virtual_type): New function.
        (hppa64_extract_return_value): New function.
        (hppa64_use_struct_convention): New function.
        (hppa64_store_return_value): New function.
        (hppa_frame_locals_address): Remove declaration, function does
        not exist anymore.
        (hppa_register_byte): Add support for PA64 ABI.
        (hppa_gdbarch_init): Add support for PA64 ABI.
        * hppa-hpux-tdep.c (hppa32_hpux_frame_saved_pc_in_sigtramp):
        Make name 32bit explicit.
        (hppa32_hpux_frame_base_before_sigtramp): Likewise.
        (hppa32_hpux_frame_find_saved_regs_in_sigtramp): Likewise.
        (hppa64_hpux_frame_saved_pc_in_sigtramp): New function.
        (hppa64_hpux_frame_base_before_sigtramp): New function.
        (hppa64_hpux_frame_find_saved_regs_in_sigtramp): New function.
        * config/pa/tm-hppa64.h: Remove macros that are no longer
        necessary now that the gdbarch vector is properly setup.
        Transform some macros into function calls. Some minor cleanup.
        * config/pa/tm-hppah.h: Update function calls in macros
        following the function renaming in hppa-hpux-tdep.c.
        * Makefile.in (hppa_tdep_h): New variable.
        (hppa-tdep.o): Add dependency over hppa_tdep_h.
2003-08-15 23:02:05 +00:00
Andrew Cagney 44160db329 2003-08-12 Andrew Cagney <cagney@redhat.com>
* Makefile.in (dsrec.o): Update dependencies.
	* dsrec.c: Include "gdb_assert.h".
	(make_srec): Use snprintf instead of sprintf, use a literal format
	string.
2003-08-12 19:34:20 +00:00
Andrew Cagney cf6a0e73af 2003-08-10 Andrew Cagney <cagney@redhat.com>
* Makefile.in (monitor.o): Do not build monitor.c with -Werror.
2003-08-10 19:58:21 +00:00
H.J. Lu c938e9b01d gdb/
2003-08-08  H.J. Lu  <hongjiu.lu@intel.com>

	* Makefile.in (FLAGS_TO_PASS): Add DESTDIR.
	(install-only): Support DESTDIR.
	(uninstall): Likewise.
	(install-gdbtk): Likewise.

gdb/doc/

2003-08-08  H.J. Lu  <hongjiu.lu@intel.com>

	* Makefile.in (install-info): Support DESTDIR.
	(install-html): Likewise.

gdb/gdbserver/

2003-08-08  H.J. Lu  <hongjiu.lu@intel.com>

	* Makefile.in (install-only): Create dest dir. Support DESTDIR.
	(uninstall): Support DESTDIR.

mmalloc/

2003-08-08  H.J. Lu  <hongjiu.lu@intel.com>

	* Makefile.in (install-info): Create dest dir. Support DESTDIR.
	(install): Likewise.
2003-08-08 17:30:37 +00:00
Daniel Jacobowitz 89b7795b14 * Makefile.in (tui-interp.o): Update dependencies. 2003-08-04 19:28:05 +00:00
Andrew Cagney 91092ee55b 2003-08-02 Andrew Cagney <cagney@redhat.com>
* Makefile.in: Update all dependencies and definitions.
2003-08-02 20:11:48 +00:00
Elena Zannoni c3228f1238 2003-07-22 Elena Zannoni <ezannoni@redhat.com>
* findvar.c (read_var_value): Remove case for thread local storage
	variables.  It is now entirely handled by the dwarf2 location
	expression code.
	* printcmd.c (address_info): Ditto.
	* symtab.h (address_class): Remove LOC_THREAD_LOCAL_STATIC
	enumeration value.
	(struct symbol): Remove objfile field, which was used by
	LOC_THREAD_LOCAL_STATIC only.
	* dwarf2read.c (decode_locdesc): Remove is_thread_local variable.
	* dwarf2loc.h (struct dwarf2_loclist_baton): Add comment about
	usage of objfile pointer.
	* dwarf2loc.c (locexpr_describe_location): Add case to handle
	thread local variables.
	Add include of objfiles.h.
	* dwarf2expr.c (execute_stack_op): Add comments about thread local
	storage variables.
	* Makefile.in (dwarf2loc.o): Update dependencies.
2003-07-22 15:41:59 +00:00
Elena Zannoni c43af07cc8 2003-07-17 Elena Zannoni <ezannoni@redhat.com>
* Makefile.in (x86-64-linux-nat.o): Update dependencies.
	* x86-64-linux-nat.c (ps_get_thread_area): New function.  Add
	include of asm/prctl.h, asm/ptrace.h, and gdb_proc_service.h.
2003-07-17 12:49:52 +00:00
Mark Kettenis 68cc0bfb7d * configure.host: Add x86_64-*-freebsd*.
* configure.tgt: Add x86_64-*-freebsd*.
* Makefile.in (amd64fbsd-nat.o, amd64fbsd-tdep.o): New targets.
* amd64fbsd-nat.c: New file.
* amd64fbsd-tdep.c: New file.
* config/i386/nm-fbsd64.h: New file.
* config/i386/fbsd64.mh: New file.
* config/i386/fbsd64.mt: New file.
2003-07-13 16:15:59 +00:00
Theodore A. Roth 95303a6828 * Makefile.in: Quote sed expression when generating transformed_name. 2003-07-11 17:53:20 +00:00
Richard Henderson 6896c0c737 * Makefile.in (dwarf2-frame.o): Add complaints_h.
* dwarf2-frame.c: Include complaints.h.
        (decode_frame_entry_1): Rename from decode_frame_entry; tidy
        variable initialization; return NULL on error.
        (decode_frame_entry): New.
2003-07-11 16:22:17 +00:00
Andrew Cagney 1517c6d1f3 2003-07-08 Andrew Cagney <cagney@redhat.com>
* Makefile.in: Make dependency section headers consistent.
	(config_h): Move to $BUILD headers section.
	(exc_request_U_h, exc_request_S_h, msg_reply_S_h): Ditto.
	(msg_U_h, notify_S_h, process_reply_S_h): Ditto.
	(ada-exp.tab.c): Move to YACC/LEX section.
	(ada-lex.c, c-exp.tab.c, f-exp.tab.c): Ditto.
	(jv-exp.tab.c, m2-exp.tab.c, objc-exp.tab.c, p-exp.tab.c): Ditto.
2003-07-08 20:18:41 +00:00
Daniel Jacobowitz c139e7d9ef * Makefile.in (sparc_tdep_h): New.
(sparc-linux-nat.o, sparc-nat.o, sparc-tdep.o, sparc64nbsd-nat.o)
	(sparcnbsd-nat.o, sparcnbsd-tdep.o): Depend on $(sparc_tdep_h).
	* sparc-linux-nat.c: Include "sparc-tdep.h".
	* sparc-nat.c: Likewise.
	* sparc-tdep.c: Likewise.
	* sparc64nbsd-nat.c: Likewise.
	* sparcnbsd-nat.c: Likewise.
	* sparcnbsd-tdep.c: Likewise.
	* sparc-tdep.h: New file.
	* config/sparc/tm-sparc.h: Remove prototypes for sparc_y_regnum
	and sparc_npc_regnum.
2003-07-07 15:56:08 +00:00
Andreas Schwab 8de307e0c2 * Makefile.in (m68k-tdep.o, m68klinux-tdep.o): Update
dependencies.
	* m68k-tdep.c (NUM_FREGS): Delete.
	(SIG_PC_FP_OFFSET): Delete.
	(TARGET_M68K): Delete.
	(P_MOVEAL_SP_FP, P_ADDAW_SP, P_ADDAL_SP, P_SUBQW_SP,
	P_SUBQL_SP, P_LEA_SP_SP, P_LEA_PC_A5, P_FMOVEMX_SP,
	P_MOVEL_SP, P_MOVEML_SP): Define.
	(P_MOVL_SP_FP, P_MOVL, P_JSR, P_BSR, P_LEAL, P_MOVML, P_FMOVM,
	P_TRAP): Delete.
        (m68k_register_raw_size): Delete.
	(m68k_register_virtual_size): Delete.
	(m68k_register_type): Renamed from m68k_register_virtual_type and
	add gdbarch argument.
	(m68k_store_struct_return): Delete.
	(m68k_deprecated_extract_return_value): Delete.
	(m68k_deprecated_extract_struct_value_address): Delete.
	(m68k_frame_chain): Delete.
	(m68k_frame_saved_pc): Delete.
	(m68k_fix_call_dummy): Delete.
	(m68k_push_dummy_frame): Delete.
	(m68k_pop_frame): Delete.
	(m68k_extract_return_value): New function.
	(m68k_store_return_value): Rewrite using regcache.
	(m68k_extract_struct_value_address): Rewrite using regcache.
	(m68k_push_dummy_call): New function.
	(struct m68k_frame_cache): Define.
	(m68k_alloc_frame_cache): New function.
	(m68k_analyze_frame_setup): New function.
	(m68k_analyze_register_saves): New function.
	(m68k_analyze_prologue): New function.
	(m68k_skip_prologue): Rewrite using above functions.
	(m68k_unwind_pc): New function.
	(m68k_frame_cache): New function.
	(m68k_frame_this_id): New function.
	(m68k_frame_prev_register): New function.
	(m68k_frame_unwind): New variable.
	(m68k_frame_p): New function.
	(m68k_sigtramp_frame_cache): New function.
	(m68k_sigtramp_frame_this_id): New function.
	(m68k_sigtramp_frame_prev_register): New function.
	(m68k_sigtramp_frame_unwind): New variable.
	(m68k_sigtramp_frame_p): New function.
	(m68k_frame_base_address): New function.
	(m68k_frame_base): New function.
	(m68k_unwind_dummy_id): New function.
	(fill_gregset): Use regcache_collect.
	(fill_fpregset): Likewise.
	(m68k_saved_pc_after_call): Only define if SYSCALL_TRAP is
	defined.
	(m68k_gdbarch_init): Don't define call_dummy_words.  Don't set
	deprecated_init_frame_pc, deprecated_store_struct_return,
	deprecated_extract_return_value, deprecated_store_return_value,
	deprecated_frame_chain, deprecated_frame_saved_pc,
	deprecated_frame_init_saved_regs, deprecated_register_raw_size,
	deprecated_register_virtual_size,
	deprecated_max_register_raw_size,
	deprecated_max_register_virtual_size,
	deprecated_register_virtual_type, deprecated_register_size,
	deprecated_register_byte, deprecated_register_bytes,
	deprecated_fp_regnum, deprecated_use_generic_dummy_frames,
	call_dummy_location, deprecated_call_dummy_breakpoint_offset,
	deprecated_pc_in_call_dummy, deprecated_call_dummy_length,
	deprecated_call_dummy_start_offset, deprecated_call_dummy_words,
	deprecated_sizeof_call_dummy_words, deprecated_fix_call_dummy,
	deprecated_push_dummy_frame, deprecated_pop_frame,
	deprecated_dummy_write_sp.  Set deprecated_saved_pc_after_call
	only if SYSCALL_TRAP is defined.  Set extract_return_value,
	store_return_value, extract_struct_value_address, register_type,
	push_dummy_call, unwind_dummy_id, unwind_pc.  Add two frame unwind
	predicates.
	* m68k-tdep.h (M68K_D1_REGNUM, M68K_NUM_REGS,
	M68K_MAX_REGISTER_SIZE): Define.
	(struct m68k_sigtramp_info): Define.
	(struct gdbarch_tdep): Add get_sigtramp_info.
	* m68klinux-nat.c (fetch_register): Use register_size instead of
	REGISTER_RAW_SIZE.  Don't put assignment in if.
	(store_register): Likewise.
	(fetch_inferior_registers): Likewise.
	(store_inferior_registers): Likewise.
	* m68klinux-tdep.c (m68k_linux_sigtramp_saved_pc): Delete.
	(m68k_linux_frame_saved_pc): Delete.
	(m68k_linux_sigcontext_reg_offset,
	m68k_linux_ucontext_reg_offset): Define.
	(m68k_linux_get_sigtramp_info): New function.
	(m68k_linux_extract_return_value): Rewrite using regcache.
	(m68k_linux_store_return_value): Likewise.
	(m68k_linux_extract_struct_value_address): Likewise.
	(m68k_linux_init_abi): Set get_sigtramp_info in tdep structure.
	Don't set deprecated_frame_saved_pc,
	deprecated_extract_return_value, deprecated_store_return_value,
	deprecated_extract_struct_value_address.  Set
	extract_return_value, store_return_value,
	extract_struct_value_address.
2003-07-07 15:06:11 +00:00
Andrew Cagney eb8bc28217 2003-07-07 Andrew Cagney <cagney@redhat.com>
* expprint.c: Include "user-regs.h" instead of "frame.h".
	(print_subexp): Use user_reg_map_regnum_to_name, instead of
	frame_map_regnum_to_name.
	* frame.c: Include "user-regs.h" instead of "builtin-regs.h".
	(frame_map_name_to_regnum): Simplify, call
	user_reg_map_name_to_regnum.
	(frame_map_regnum_to_name): Simplify, call
	user_reg_map_regnum_to_name.
	(frame_register_unwind): Update.
	* std-regs.c: Include "user-regs.h" instead of "builtin-regs.h".
	(_initialize_frame_reg): Call user_reg_add_builtin.
	* findvar.c: Include "user-regs.h" instead of "builtin-regs.h".
	(value_of_register): Use value_of_user_reg.
	* eval.c (evaluate_subexp_standard): Update.
	* parse.c (write_dollar_variable): Update.
	* d10v-tdep.c (d10v_print_registers_info): Update.
	* infcmd.c (registers_info): Update.
	* Makefile.in (SFILES): Delete "builtin-regs.c", add "user-regs.c".
	(builtin_regs_h): Delete macro.
	(user_regs_h): Define.
	(COMMON_OBS): Delete "builtin-regs.o", add "user-regs.o".
	(builtin-regs.o): Delete target.
	(user-regs.o): Specify dependencies.
	(expprint.o): Update dependencies.
	(findvar.o): Update dependencies.
	(frame.o): Update dependencies.
	(std-regs.o): Update dependencies.
2003-07-07 14:36:58 +00:00
David Carlton b2a7f303a2 2003-06-30 David Carlton <carlton@kealia.com>
Band-aid for PR c++/1245.
	* Makefile.in (cp-support.o): Depend on complaints_h.
	* cp-support.c: Include complaints.h.  Add declaration for
	find_last_component.
	(cp_find_first_component): Separate code into
	cp_find_first_component_aux.
	(cp_find_first_component_aux): Call demangled_name_complaint.
	(demangled_name_complaint): New.

2003-06-30  David Carlton  <carlton@kealia.com>

	* gdb.c++/maint.exp (test_invalid_name): New.
	(test_first_component): Add tests for invalid names.
2003-06-30 16:21:16 +00:00
Daniel Jacobowitz 0fac0b4199 ./
* cli/cli-logging.c: New file.
	* cli-out.c (struct ui_out_data): Add original_stream.
	(cli_redirect): New function.
	(cli_ui_out_impl): Add cli_redirect.
	(cli_out_new): Initialize original_stream.
	* ui-out.c (default_ui_out_impl): Add NULL for redirect member.
	(uo_redirect, ui_out_redirect): New.
	* ui-out.h (struct ui_out_impl): Add redirect member.
	(redirect_ftype): New.
	(ui_out_redirect): Add prototype.
	* Makefile.in: Add rules for cli-logging.c.
	* NEWS: Mention "set logging".
mi/
	* mi-out.c (mi_ui_out_impl): Add NULL for redirect member.
tui/
	* tui-out.c (tui_ui_out_impl): Add NULL for redirect member.
doc/
	* gdb.texinfo (Logging output): New chapter.
2003-06-28 16:19:07 +00:00
Andrew Cagney a4b8ebc89d 2003-06-21 Andrew Cagney <cagney@redhat.com>
* mips-tdep.c: Include "reggroups.h" and "sim-regno.h".
	(mips_register_name): Return names for NUM_REGS..2*NUM_REGS
	instead of 0..NUM_REGS.
	(mips_register_reggroup_p): New function.
	(mips_pseudo_register_write): New function.
	(mips_pseudo_register_read): New function.
	(mips_register_raw_size): For NUM_REGS..2*NUM_REGS return the size
	based on the register's type.
	(read_next_frame_reg): Simplify.  Assert that REGNO is a pseudo /
	cooked.
	(mips_get_saved_register): Simplify.  Assert that REGNO is a
	pseudo / cooked.
	(mips_register_byte): New function.  Use MIPS_REGISTER_BYTE.
	(mips_register_type): Replace mips_register_virtual_type.  Map
	NUM_REGS..2*NUM_REGS onto 0..NUM_REGS.  Use MIPS_REGISTER_TYPE
	when available.
	(read_next_frame_reg): Simplify, but handle SP_REGNUM.  Assert
	that the register is cooked / virtual.
	(mips_frame_saved_pc): Fetch the cooked PC, and not the raw PC.
	Only get the extra info when needed.
	(set_reg_offset): Save the offset in NUM_REGS..2*NUM_REGS as well.
	(mips32_heuristic_proc_desc): Fetch the cooked register.
	(heuristic_proc_desc, mips_pop_frame, get_frame_pointer): Ditto.
	(mips_init_extra_frame_info, get_frame_pointer): Ditto.
	(mips_print_register): Use gdbarch_register_type, instead of
	REGISTER_VIRTUAL_TYPE.
	(print_gp_register_row): Use gdbarch_register_type, instead of
	REGISTER_VIRTUAL_TYPE.  Allow for a pseudo / cooked REGNUM.
	(mips_print_registers_info): Assert REGNO is pseodo / cooked.
	Print the pseudo / cooked registers.
	(mips_print_registers_info): Assert REGNO is pseodo / cooked.
	Print the pseudo / cooked registers.
	(mips_xfer_register): Use regcache_cooked_read_part.  Assert that
	REG_NUM is pseudo / cooked.
	(mips_o32_xfer_return_value): Xfer the pseudo / cooked register.
	(mips_n32n64_xfer_return_value): Ditto.
	(mips_stab_reg_to_regnum): Map onto NUM_REGS..2*NUM_REGS.
	(mips_dwarf_dwarf2_ecoff_reg_to_regnum): Ditto.
	(mips_register_sim_regno): New function.
	(mips_gdbarch_init): Set deprecated_register_byte,
	register_group_p, pseudo_register_write, pseudo_register_read,
	register_sim_regno, and num_pseudo_regs.  Set register_type,
	instead of register_virtual_type.
	* Makefile.in (mips-tdep.o): Update dependencies.
	* config/mips/tm-mips64.h (MIPS_REGISTER_TYPE): Rename
	REGISTER_VIRTUAL_TYPE.
	* config/mips/tm-mips.h	(MIPS_REGISTER_TYPE): Ditto.
	* config/mips/tm-irix5.h (MIPS_REGISTER_TYPE): Ditto.
	* config/mips/tm-mips.h (MIPS_REGISTER_BYTE): Rename REGISTER_BYTE.
	* config/mips/tm-irix6.h (MIPS_REGISTER_BYTE): Ditto.
	* config/mips/tm-irix5.h (MIPS_REGISTER_BYTE): Ditto.
2003-06-21 23:14:44 +00:00
Daniel Jacobowitz 325ed08915 * Makefile.in (cli-cmds.o): Depend on $(gdb_vfork_h)
* cli/cli-cmds.c: Include "gdb_vfork.h".
	(shell_escape): Use vfork.
2003-06-21 18:38:28 +00:00
Michael Snyder 0274a8cedb 2003-06-19 Michael Snyder <msnyder@redhat.com>
* linux-nat.h: New file.
	* linux-nat.c: Include linux-nat.h.
	* lin-lwp.c: Include linux-nat.h.
	Move struct lwp_info def to linux-nat.h.
	* linux-proc.c: Include linux-nat.h.
	(linux_make_note_section): Iterate over lwps instead of threads.
	(linux_do_thread_registers): Use lwp instead of merged pid.
	* config/nm-linux.h: Move miscelaneous def'ns to linux-nat.h.
	* Makefile.in (lin-lwp.o, linux-proc.o, linux-nat.o):
	Add dependency on linux_nat_h.
2003-06-19 22:52:04 +00:00
Daniel Jacobowitz 3993f6b15a * Makefile.in (linux-nat.o): Add rule.
* linux-nat.c: New file.
	* config/nm-linux.h (CHILD_INSERT_FORK_CATCHPOINT): Define.
	(CHILD_INSERT_VFORK_CATCHPOINT): Define.
	(CHILD_INSERT_EXEC_CATCHPOINT): Define.
	* config/alpha/alpha-linux.mh (NATDEPFILES): Add linux-nat.o.
	* config/arm/linux.mh (NATDEPFILES): Likewise.
	* config/i386/linux.mh (NATDEPFILES): Likewise.
	* config/i386/x86-64linux.mh (NATDEPFILES): Likewise.
	* config/ia64/linux.mh (NATDEPFILES): Likewise.
	* config/m68k/linux.mh (NATDEPFILES): Likewise.
	* config/mips/linux.mh (NATDEPFILES): Likewise.
	* config/powerpc/linux.mh (NATDEPFILES): Likewise.
	* config/s390/s390.mh (NATDEPFILES): Likewise.
	* config/sparc/linux.mh (NATDEPFILES): Likewise.
2003-06-15 20:56:48 +00:00