Commit Graph

1800 Commits

Author SHA1 Message Date
Tom Tromey 5ae98d2512 gdb
* Makefile.in (SUBDIRS): Add doc.
	* configure: Rebuild.
	* configure.ac: Don't configure in doc.  Create doc/Makefile.
gdb/doc
	* Makefile.in (Makefile): Run ../config.status.
	(distclean): Update.
	* configure: Remove.
	* configure.ac: Remove.
2010-11-23 14:37:26 +00:00
Tom Tromey 7ba86c9e66 * Makefile.in (.PRECIOUS): Reference ada-lex.c. 2010-11-22 20:30:58 +00:00
Tom Tromey 954d8cae71 2010-11-19 Jan Kratochvil <jan.kratochvil@redhat.com>
Tom Tromey  <tromey@redhat.com>

	* Makefile.in (.y.c): Directly create $@ from YLWRAP.
	(.PHONY): Remove for .y outputs.
2010-11-19 18:10:51 +00:00
Ken Werner f4b8a18de7 gdb:
* NEWS: Mention OpenCL C language support.
	* Makefile.in (SFILES): Add opencl-lang.c.
	(COMMON_OBS): Add opencl-lang.o.
	* opencl-lang.c: New File
	* defs.h (enum language): Add language_opencl.
	* dwarf2read.c (read_file_scope): Handle DW_AT_producer for the
	IBM XL C OpenCL compiler.
	* c-lang.h: Include "parser-defs.h".
	(evaluate_subexp_c): Declare.
	* c-lang.c (evaluate_subexp_c): Remove the static qualifier.
	(c_op_print_tab): Add declaration.
	* eval.c (binop_promote): Handle language_opencl.
	* c-exp.y: Lookup the primitive types instead of referring to the
	builtins.

gdb/testsuite:
	* Makefile.in (ALL_SUBDIRS): Add gdb.opencl.
	* configure.ac (AC_OUTPUT): Add gdb.opencl/Makefile.
	* configure: Regenerate.
	* gdb.opencl/Makefile.in: New File.
	* gdb.opencl/datatypes.exp: Likewise.
	* gdb.opencl/datatypes.cl: Likewise.
	* gdb.opencl/operators.exp: Likewise.
	* gdb.opencl/operators.cl: Likewise.
	* gdb.opencl/vec_comps.exp: Likewise.
	* gdb.opencl/vec_comps.cl: Likewise.
	* gdb.opencl/convs_casts.exp: Likewise.
	* gdb.opencl/convs_casts.cl: Likewise.
	* lib/opencl.exp: Likewise.
	* lib/opencl_hostapp.c: Likewise.
	* lib/opencl_kernel.cl: Likewise.
	* lib/cl_util.c: Likewise.
	* lib/cl_util.c: Likewise.
	* gdb.base/default.exp (set language): Add "opencl" to the list of
	languages.

gdb/doc:
	* gdb.texinfo: (Summary) Add mention about OpenCL C language support.
	(OpenCL C): New node.
2010-11-05 14:31:30 +00:00
Tom Tromey 50c97f3812 gdb
* NEWS: Mention Guile removal.
	* defs.h (enum language) <language_scm>: Remove.
	* Makefile.in (SFILES): Remove scm-exp.c, scm-lang.c,
	scm-valprint.c.
	(HFILES_NO_SRCDIR): Remove scm-lang.h, scm-tags.h.
	(COMMON_OBS): Remove scm-exp.o, scm-lang.o, scm-valprint.o.
	* scm-exp.c, scm-lang.c, scm-valprint.c, scm-lang.h, scm-tags.h:
	Remove.
gdb/testsuite
	* gdb.base/default.exp: Remove "scheme" from language list.
2010-11-02 18:55:54 +00:00
Jie Zhang f474844cb7 * Makefile.in (install): Remove dependency of install-only and
recursively invoke make for install-only.
	* data-directory/Makefile.in: Add FLAGS_TO_PASS variable.
	(install): Pass FLAGS_TO_PASS when recursively make install-only.

	gdbserver/
	* Makefile.in: Add FLAGS_TO_PASS variable.
	(install): Remove dependency of install-only and recursively
	invoke make for install-only.
2010-10-21 23:50:46 +00:00
Doug Evans 9c9606fba2 * Makefile.in (REQUIRED_SUBDIRS): New var.
(subdir_do): Verify required subdir Makefiles exist.
2010-10-06 16:46:12 +00:00
Doug Evans aa2e2d8d77 Create subdir data-directory.
* Makefile.in (XML_SYSCALL_DIR, XML_SYSCALL_FILES): Moved to
	data-directory/Makefile.in.
	(SUBDIRS): Add data-directory.
	(all): Remove xml-syscall-copy dependency.
	(xml-syscall-copy): Moved to data-directory/Makefile.in as
	stamp-syscalls.
	(xml-syscall-install): Moved to data-directory/Makefile.in as
	install-syscalls.
	(install-only): Remove xml-syscall-install dependency.
	(all-data-directory): New rule.
	(data-directory/Makefile): New rule.
	* configure.ac (AC_OUTPUT): Add data-directory/Makefile.
	* configure: Regenerate.
	* data-directory/Makefile.in: New file.
	* python/lib/gdb/__init__.py: New file.

	testsuite/
	* gdb.base/catch-syscall.exp (do_syscall_tests): Update location
	of syscall staging area.
2010-10-06 16:02:45 +00:00
Tom Tromey 1863c96c05 * Makefile.in (HFILES_NO_SRCDIR): Add progspace.h. 2010-09-13 17:59:59 +00:00
Jan Kratochvil 9a35ccf756 gdb/
* Makefile.in (GDB_WARN_CFLAGS_NO_FORMAT): Convert it to the no- form.
	(monitor.o): Replace $(INTERNAL_WARN_CFLAGS) by $(INTERNAL_CFLAGS) and
	add $(GDB_WARN_CFLAGS_NO_FORMAT).
	(printcmd.o): Replace $(INTERNAL_CFLAGS_BASE) by $(INTERNAL_CFLAGS).
2010-09-02 13:58:06 +00:00
Tom Tromey 4d2dc20ae3 * Makefile.in (install-python): Add DESTDIR. 2010-08-19 18:40:46 +00:00
Tom Tromey 94f7449c81 PR python/11900:
* configure: Rebuild.
	* configure.ac: Add install-python to CONFIG_INSTALL.
	* Makefile.in (install-python): New.
2010-08-18 22:57:46 +00:00
Tom Tromey c29c521f43 gdb
Revert gdb-add-index addition:
	* Makefile.in (install-only): Don't install gdb-add-index.
	* gdb-add-index.sh: Remove.
gdb/doc
	Revert gdb-add-index addition:
	* gdb.texinfo (Index Files): Don't document gdb-add-index.
2010-08-10 18:35:53 +00:00
Tom Tromey c2bbed2a5a gdb
* Makefile.in (install-only): Install gdb-add-index.
	* gdb-add-index.sh: New file.
gdb/doc
	* gdb.texinfo (Index Files): Mention gdb-add-index.
2010-07-30 20:46:34 +00:00
Tom Tromey 2bb4f988e5 * Makefile.in (HFILES_NO_SRCDIR): Remove link-warning.h. 2010-07-28 18:32:33 +00:00
Phil Muldoon 595939dea1 2010-06-28 Phil Muldoon <pmuldoon@redhat.com>
Tom Tromey  <tromey@redhat.com>
            Thiago Jung Bauermann  <bauerman@br.ibm.com>

	* value.c (pack_unsigned_long): New function.
	(value_from_ulongest): New function.
	* value.h (value_from_ulongest): Declare.
	* python/python.c (_initialize_python): Call
	gdbpy_initialize_thread and gdbpy_initialize_inferior.
	* python/python-internal.h: Define thread_object.
	(gdbpy_inferiors, gdbpy_selected_thread)
	(frame_info_to_frame_object, create_thread_object)
	(find_thread_object, find_inferior_object)
	(gdbpy_initialize_thread, gdbpy_initialize_inferiors)
	(gdbpy_is_value_object, get_addr_from_python): Declare.
	* python/py-value.c (builtin_type_upylong): Define.
	(convert_value_from_python): Add logic for ulongest.
	(gdbpy_is_value_object): New function.
	* python/py-utils.c (get_addr_from_python): New function.
	* python/py-frame.c (frame_info_to_frame_object): Return a PyObject.
	(gdbpy_selected_frame): Use PyObject over frame_info.
	* Makefile.in (SUBDIR_PYTHON_OBS): Add py-inferior and
	py-infthread.
	(SUBDIR_PYTHON_SRCS): Likewise.
	(py-inferior.o): New Rule.
	(py-infthread.o): New Rule.
	* python/py-inferior.c: New File.
	* python/py-infthread.c: New File.

2010-06-28  Phil Muldoon  <pmuldoon@redhat.com>
	    Tom Tromey  <tromey@redhat.com>
	    Thiago Jung Bauermann  <bauerman@br.ibm.com>

	* gdb.texinfo (Inferiors In Python): New node.
	* gdb.texinfo (Threads In Python): New node.

2010-06-28  Phil Muldoon  <pmuldoon@redhat.com>
            Tom Tromey  <tromey@redhat.com>
            Thiago Jung Bauermann  <bauerman@br.ibm.com>

	* gdb.python/py-inferior.c: New File.
	* gdb.python/py-infthread.c: New File.
	* gdb.python/py-inferior.exp: New File.
	* gdb.python/py-infthread.exp: New File.
2010-06-28 21:16:04 +00:00
Pedro Alves 98d64339ed * Makefile.in (ALL_TARGET_OBS): Remove solib-target.o.
(SFILES): Remove solib-null.c, add solib-target.c.
	(COMMON_OBS): Remove solib-null.o, add solib-target.o.
	(ALLDEPFILES): Remove solib-target.c.
	* solib-target.c (_initialize_solib_target): Set
	current_target_so_ops to solib_target_so_ops if not already set.
	* solib-null.c: Delete.
2010-06-15 17:57:38 +00:00
Ulrich Weigand 5b9a19af43 * Makefile.in (HFILES_NO_SRCDIR): Remove config/i386/nm-linux.h 2010-06-11 12:44:15 +00:00
Jan Kratochvil f6528abd64 gdb/
* Makefile.in (RDYNAMIC): New.
	(SFILES): Add proc-service.list.
	* config/alpha/alpha-linux.mh (NAT_CDEPS): New.
	(LOADLIBES): Replace -rdynamic by $(RDYNAMIC).
	* config/arm/linux.mh: Likewise.
	* config/i386/linux.mh: Likewise.
	* config/i386/linux64.mh: Likewise.
	* config/ia64/linux.mh: Likewise.
	* config/m32r/linux.mh: Likewise.
	* config/m68k/linux.mh: Likewise.
	* config/mips/linux.mh: Likewise.
	* config/pa/linux.mh: Likewise.
	* config/powerpc/linux.mh: Likewise.
	* config/powerpc/ppc64-linux.mh: Likewise.
	* config/s390/s390.mh: Likewise.
	* config/sparc/linux.mh: Likewise.
	* config/sparc/linux64.mh: Likewise.
	* config/xtensa/linux.mh: Likewise.
	* configure.ac: New RDYNAMIC on native host and GCC.
	(solaris*): Replace -Wl,-export-dynamic by $RDYNAMIC.
	* configure: Regenerate.
	* proc-service.list: New.

gdb/gdbserver/
	* Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
	(CDEPS): New.
	* configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping.  Test also
	-Wl,--dynamic-list.
	* configure: Regenerate.
	* proc-service.list: New.
2010-05-28 18:50:35 +00:00
Phil Muldoon d7b32ed3ab 2010-04-29 Phil Muldoon <pmuldoon@redhat.com>
Tom Tromey  <tromey@redhat.com>
            Thiago Jung Bauermann  <bauerman@br.ibm.com>

       	* Makefile.in (SUBDIR_PYTHON_OBS): Add py-parameter.
        (SUBDIR_PYTHON_SRCS): Likewise.
       	(py-parameter.o): New rule.
       	* python/py-parameter.c: New file.
        * python/python-internal.h (gdbpy_initialize_parameter)
        (gdbpy_parameter, gdbpy_parameter_value)
        (gdbpy_parse_command_name): Declare.
        * python/py-cmd.c (parse_command_name): Rename to
       	gdbpy_parse_command_name.
        (gdbpy_parse_command_name): Accept a starting list parameter and
       	use over cmdlist.
       	(cmdpy_init): Use gdbpy_parse_command_name.
        * python/python.c (parameter_to_python): Rename to
        gdbpy_parameter_to_python.  Accept enum var_types and value.
        (gdbpy_parameter): Use gdbpy_parameter_value.
        (_initialize_python): Call gdbpy_initialize_parameters.

2010-04-29  Phil Muldoon  <pmuldoon@redhat.com>

        * gdb.python/py-param.exp: New File.

2010-04-29  Phil Muldoon  <pmuldoon@redhat.com>
            Tom Tromey  <tromey@redhat.com>
            Thiago Jung Bauermann  <bauerman@br.ibm.com>

        * gdb.texinfo (Parameters In Python): New Node.
2010-04-29 15:45:57 +00:00
Joel Brobecker 6aecb9c228 D language support.
gdb/ChangeLog:

        D language support.
        * Makefile.in (SFILES): Add d-lang.c d-valprint.c.
        (COMMON_OBS): Add d-lang.o d-valprint.o.
        (HFILES_NO_SRCDIR): Add d-lang.h.
        * NEWS: Mention D language support.
        * c-lang.c (c_emit_char, exp_descriptor_c): Make public.
        * c-lang.h (c_emit_char, exp_descriptor_c): Add declaration.
        * d-lang.c: New file.
        * d-lang.h: New file.
        * d-valprint.c: New file.
        * defs.h (enum language): Add language_d.
        * dwarf2read.c (set_cu_language): Add DW_LANG_D.
        * language.c (binop_result_type, integral_type, character_type)
        (string_type, boolean_type, structured_type): Add language_d.
        * symfile.c (init_filename_language_table): Add language_d.
        * symtab.c: Include d-lang.h.
        (symbol_init_language_specific, symbol_find_demangled_name)
        (symbol_natural_name, lookup_symbol_in_language)
        (symbol_demangled_name, symbol_matches_domain): Add language_d.

gdb/doc/ChangeLog:

        * gdb.texinfo: (Summary) Add mention about D language support.
        (Filenames): Add D suffixes.
        (D): New node.

gdb/testsuite/ChangeLog:

        * gdb.base/default.exp: Fix "set language" test.
2010-04-29 14:45:39 +00:00
Pierre Muller e790e06ecb Removal of config/i386/nm-i386sol2.h native configuration file.
* config/i386/nm-i386sol2.h: Remove file.
	* config/i386/i386sol2.mh: Remove NAT_FILE definition.
	* config/i386/sol2-64.mh: Idem.
	* config/djgpp/fnchange.lst: Idem.
	* Makefile.in (HFILES_NO_SRCDIR): Remove reference to that file.
2010-04-26 13:53:57 +00:00
Pedro Alves ab38a727c9 * defs.h: Adjust comment.
* filesystem.h, filesystem.c: New files.
	* Makefile.in (SFILES): Add filesystem.c.
	(COMMON_OBS): Add filesystem.o.
	* solib.c (solib_find): Handle DOS-based filesystems.  Handle
	different target and host path flavours.
	* arm-symbian-tdep.c (arm_symbian_init_abi): Set
	has_dos_based_file_system on the gdbarch.
	* arm-wince-tdep.c (arm_wince_init_abi): Ditto.
	* i386-cygwin-tdep.c (i386_cygwin_init_abi): Ditto.
	* i386-tdep.c (i386_go32_init_abi): Ditto.
	* gdbarch.sh (has_dos_based_file_system): New.
	* gdbarch.h, gdbarch.c: Regenerate.
	* NEWS: Mention improved support for remote targets with DOS-based
	filesystems.  Mention new `set/show target-file-system-kind'
	commands.

	gdb/doc/
	* gdb.texinfo (Commands to specify files): Describe what how GDB
	looks up DOS-based filesystem paths on the system root.  Document
	the new `set/show target-file-system-kind' commands.
2010-04-24 13:12:56 +00:00
Doug Evans 8a1ea21f7e Add support for auto-loading scripts from .debug_gdb_scripts section.
* NEWS: Add entry for .debug_gdb_scripts.
	* Makefile.in SUBDIR_PYTHON_OBS): Add py-auto-load.o.
	(SUBDIR_PYTHON_SRCS): Add py-auto-load.c.
	(py-auto-load.o): New rule.
	* cli/cli-cmds.c (find_and_open_script): Make externally visible.
	* cli/cli-cmds.h (find_and_open_script): Update prototype.
	* python/py-auto-load.c: New file.
	* python/python-internal.h: #include <stdio.h>.
	(set_python_list, show_python_list): Declare.
	(gdbpy_initialize_auto_load): Declare.
	(source_python_script_for_objfile): Declare.
	* python/python.c: Remove #include of observer.h.
	(gdbpy_auto_load): Moved to py-auto-load.c.
	(GDBPY_AUTO_FILENAME): Ditto.
	(gdbpy_new_objfile): Delete.
	(source_python_script_for_objfile): New function.
	(set_python_list, show_python_list): Make externally visible.
	(_initialize_python): Move "auto-load" command to py-auto-load.c
	and observer_attach_new_objfile to py-auto-load.c.

	doc/
	* gdb.texinfo (Python): Move Auto-loading section here ...
	(Python API): from here.
	(Auto-loading): Add docs for .debug_gdb_scripts auto-loaded scripts.
	(Maintenance Commands): Add docs for "maint print section-scripts".

	testsuite/
	* gdb.python/py-section-script.c: New file.
	* gdb.python/py-section-script.exp: New file.
	* gdb.python/py-section-script.py: New file.
2010-04-23 16:20:13 +00:00
Doug Evans fa33c3cd05 * NEWS: Add entry for python program space support.
* Makefile.in (SUBDIR_PYTHON_OBS): Add py-progspace.o.
	(SUBDIR_PYTHON_SRCS): Add py-progspace.c.
	(py-progspace.o): New rule.
	* python/py-prettyprint.c (find_pretty_printer_from_objfiles): New
	function.
	(find_pretty_printer_from_progspace): New function.
	(find_pretty_printer_from_gdb): New function.
	(find_pretty_printer): Rewrite.
	* python/py-progspace.c: New file.
	* python/python-internal.h (program_space): Add forward decl.
	(pspace_to_pspace_object, pspy_get_printers): Declare.
	(gdbpy_initialize_pspace): Declare.
	* python/python.c: #include "progspace.h".
	(gdbpy_get_current_progspace, gdbpy_progspaces): New functions.
	(_initialize_python): Call gdbpy_initialize_pspace.
	(GdbMethods): Add current_progspace, progspaces.

	doc/
	* gdb.texinfo (Python API): Add progspaces section.
	(Selecting Pretty-Printers): Progspace pretty-printers are
	searched too.
	(Progspaces In Python): New section.

	testsuite/
	* gdb.python/py-progspace.c: New file.
	* gdb.python/py-progspace.exp: New file.
2010-04-15 19:54:13 +00:00
Phil Muldoon adc368187c 2010-04-09 Phil Muldoon <pmuldoon@redhat.com>
Thiago Jung Bauermann  <bauerman@br.ibm.com>
   	    Tom Tromey  <tromey@redhat.com>

	* breakpoint.c (condition_command): Simplify.  Move condition
	setting code to ...
	(set_breakpoint_condition): ... here.  New function.
	* breakpoint.h  (set_breakpoint_condition): Declare.
	* Makefile.in (SUBDIR_PYTHON_OBS): Add py-breakpoint.
	(SUBDIR_PYTHON_SRCS): Likewise.
	(py-breakpoint.o): New rule.
	* python/py-breakpoint.c: New file.
	* python/python-internal.h (gdbpy_breakpoints)
	(gdbpy_initialize_breakpoints): Declare.
	(GDB_PY_SET_HANDLE_EXCEPTION) Define.


2010-04-09  Phil Muldoon  <pmuldoon@redhat.com>

	* gdb.python/py-breakpoint.exp: New File.
	* gdb.python/py-breakpoint.C: Ditto.

2010-04-09  Phil Muldoon  <pmuldoon@redhat.com>
	    Thiago Jung Bauermann  <bauerman@br.ibm.com>
   	    Tom Tromey  <tromey@redhat.com>

	* gdb.texinfo (Breakpoints In Python): New Node.
2010-04-09 09:41:43 +00:00
Mike Frysinger 64e3cf3d4f gdb: fix building with system readline
Building gdb with --enable-targets=all and --with-system-readline hits a
failure in a few targets all related to the inclusion of some opcodes
headers.  The usage of the bundled readline results in an -I to the top
srcdir, but if that isn't used, then there is no such -I path.  A few gdb
targets use this implicitly to include opcodes/ source header files.  So
make sure there is always an explicit -I path to the opcodes/ directory.
2010-03-23 21:31:29 +00:00
Tom Tromey ccefe4c44c gdb
* xcoffread.c: Include psymtab.h.
	(xcoff_sym_fns): Update.
	* symtab.h (struct partial_symbol): Remove.
	(PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.
	(struct partial_symtab): Remove.
	(PSYMTAB_TO_SYMTAB): Remove.
	(lookup_partial_symbol, lookup_partial_symtab, find_pc_psymtab)
	(find_pc_sect_psymtab): Remove.
	(find_pc_sect_symtab_via_partial): Declare.
	(find_pc_psymtab, find_pc_sect_psymbol, psymtab_to_symtab)
	(find_main_psymtab): Remove.
	(find_main_filename): Declare.
	(fixup_psymbol_section): Remove.
	(fixup_section): Declare.
	* symtab.c: Include psymtab.h.
	(lookup_symtab): Use lookup_symtab method.
	(lookup_partial_symtab): Remove.
	(find_pc_sect_psymtab_closer): Remove.
	(find_pc_sect_psymtab): Remove.
	(find_pc_sect_symtab_via_partial): New function.
	(find_pc_psymtab, find_pc_sect_psymbol, find_pc_psymbol): Remove.
	(fixup_section): No longer static.
	(fixup_psymbol_section): Remove.
	(lookup_symbol_aux): Use lookup_symbol_aux_quick.
	(lookup_global_symbol_from_objfile): Likewise.
	(lookup_symbol_aux_psymtabs): Remove.
	(lookup_symbol_aux_quick): New function.
	(lookup_symbol_global): Use lookup_symbol_aux_quick.
	(lookup_partial_symbol): Remove.
	(basic_lookup_transparent_type_quick): New function.
	(basic_lookup_transparent_type): Use it.
	(find_main_psymtab): Remove.
	(find_main_filename): New function.
	(find_pc_sect_symtab): Use find_pc_sect_symtab method.
	(find_line_symtab): Use expand_symtabs_with_filename method.
	(output_partial_symbol_filename): New function.
	(sources_info): Use map_partial_symbol_filenames.
	(struct search_symbols_data): New type.
	(search_symbols_file_matches): New function.
	(search_symbols_name_matches): Likewise.
	(search_symbols): Use expand_symtabs_matching method.
	(struct add_name_data): Rename from add_macro_name_data.
	(add_macro_name): Update.
	(add_partial_symbol_name): New function.
	(default_make_symbol_completion_list): Use
	map_partial_symbol_names.
	(struct add_partial_symbol_name): New type.
	(maybe_add_partial_symtab_filename): New function.
	(make_source_files_completion_list): Use
	map_partial_symbol_filenames.
	(expand_line_sal): Use expand_symtabs_with_filename method.
	* symmisc.c: Include psymtab.h.
	(print_objfile_statistics): Use print_stats method.
	(dump_objfile): Use dump method.
	(dump_psymtab, maintenance_print_psymbols)
	(maintenance_info_psymtabs, maintenance_check_symtabs)
	(extend_psymbol_list): Remove.
	* symfile.h (struct quick_symbol_functions): New struct.
	(struct sym_fns) <qf>: New field.
	(sort_pst_symbols): Remove.
	(increment_reading_symtab): Declare.
	* symfile.c: Include psymtab.h.
	(compare_psymbols, sort_pst_symbols): Remove.
	(psymtab_to_symtab): Remove.
	(increment_reading_symtab): New function.
	(symbol_file_add_with_addrs_or_offsets): Use expand_all_symtabs
	method.
	(set_initial_language): Use find_main_filename.
	(allocate_psymtab, discard_psymtab, cashier_psymtab): Remove.
	(free_named_symtabs): Remove unused code.
	(start_psymtab_common, add_psymbol_to_bcache)
	(append_psymbol_to_list, add_psymbol_to_list, init_psymbol_list):
	Remove.
	* stack.c: Include psymtab.h, symfile.h.
	(backtrace_command_1): Use find_pc_sect_symtab_via_partial.
	* source.h (psymtab_to_fullname): Don't declare.
	* source.c: Include psymtab.h.
	(select_source_symtab): Use find_last_source_symtab method.
	(forget_cached_source_info): Use forget_cached_source_info
	method.
	(find_and_open_source): No longer static.
	(psymtab_to_fullname): Remove.
	* somread.c: Include psymtab.h.
	(som_sym_fns): Update.
	* psympriv.h: New file.
	* psymtab.h: New file.
	* psymtab.c: New file.
	* objfiles.h: (ALL_OBJFILE_PSYMTABS): Remove.
	(ALL_PSYMTABS, ALL_PSPACE_PSYMTABS): Likewise.
	* objfiles.c: Include psymtab.h.
	(objfile_relocate1): Use relocate method.
	(objfile_has_partial_symbols): Use has_symbols method.
	* mipsread.c: Include psymtab.h.
	(ecoff_sym_fns): Update.
	* mi/mi-cmd-file.c: Include psymtab.h.
	(print_partial_file_name): New function.
	(mi_cmd_file_list_exec_source_files): Use
	map_partial_symbol_filenames.
	* mdebugread.c: Include psympriv.h.
	* machoread.c: Include psympriv.h.
	(macho_sym_fns): Update.
	* m2-exp.y (yylex): Use lookup_symtab.
	* elfread.c: Include psympriv.h.
	(elf_sym_fns): Update.
	* dwarf2read.c: Include psympriv.h.
	* dbxread.c: Include psympriv.h.
	(aout_sym_fns): Update.
	* cp-support.c: Include psymtab.h.
	(read_in_psymtabs): Remove.
	(make_symbol_overload_list_qualified): Use
	expand_symtabs_for_function method.
	* coffread.c: Include psympriv.h.
	(coff_sym_fns): Update.
	* blockframe.c: Include psymtab.h.
	(find_pc_partial_function): Use find_pc_sect_symtab method.
	* ada-lang.h (ada_update_initial_language): Update.
	* ada-lang.c: Include psymtab.h.
	(ada_update_initial_language): Remove 'main_pst' argument.
	(ada_lookup_partial_symbol): Remove.
	(struct ada_psym_data): New type.
	(ada_add_psyms): New function.
	(ada_add_non_local_symbols): Use map_ada_symtabs method.
	(struct add_partial_datum): New type.
	(ada_add_partial_symbol_completions): New function.
	(ada_make_symbol_completion_list): Use map_partial_symbol_names.
	(ada_exception_support_info_sniffer): Update.
	* Makefile.in (SFILES): Add psymtab.c.
	(COMMON_OBS): Add psymtab.o.
	(HFILES_NO_SRCDIR): Add psymtab.h, psympriv.h.
gdb/doc
	* gdbint.texinfo (Symbol Handling): Update.
2010-03-10 18:20:08 +00:00
Corinna Vinschen 2f9e05b472 * Makefile.in (SUBDIR_MI_OBS): Move mi-common.o from here...
(COMMON_OBS): ... to here since it's used unconditionally.
	(SUBDIR_MI_SRCS): Move mi/mi-common.c from here...
	(SFILES): To here.
2010-02-28 15:04:13 +00:00
Pedro Alves 78664fa36a Symbian config
gdb/
	* arm-symbian-tdep.c: New.
	* configure.tgt (arm*-*-symbianelf*): New target.
	(*-*-symbianelf*): New OS.
	* osabi.c (gdb_osabi_names): Add Symbian.
	* defs.h (gdb_osabi): Add GDB_OSABI_SYMBIAN.
	* Makefile.in (ALL_TARGET_OBJS): Add arm-symbian-tdep.o.
	(ALLDEPFILES): Add arm-symbian-tdep.c.
2010-02-25 20:30:58 +00:00
Phil Muldoon f3e9a8177c 2010-02-24 Phil Muldoon <pmuldoon@redhat.com>
Tom Tromey  <tromey@redhat.com>
	    Thiago Jung Bauermann  <bauerman@br.ibm.com>

	* python/python.c (_initialize_python): Call
	gdbpy_initialize_symtabs, gdbpy_initialize_symbols and
	gdbpy_initialize_blocks.
	* python/python-internal.h: Declare struct symbol, block and
	symtab_and_line.  Declare block_object_type and
	symbol_object_type
	(gdbpy_lookup_symbol gdbpy_block_for_pc)
	(symtab_and_line_to_sal_object, symtab_to_symtab_object)
	(symbol_to_symbol_object,  block_to_block_object)
	(gdbpy_initialize_symtabs,gdbpy_initialize_symbols)
	(gdbpy_initialize_blocks ): Declare.
	* python/py-frame.c (frapy_block, frapy_function, frapy_find_sal)
	(frapy_select): Add methods.
	(frapy_read_var): Add symbol branch.
	* Makefile.in (SUBDIR_PYTHON_OBS): Add py-symbol, py-symtab,
	py-block.
	(SUBDIR_PYTHON_SRCS): Likewise.
	(py-symbol.o): New rule.
	(py-symtab.o): Likewise.
	(py-block.o): Likewise.
	* python/py-symbol.c: New file.
	* python/py-symtab.c: Likewise.
	* python/py-block.c: Likewise.


2010-02-24  Phil Muldoon  <pmuldoon@redhat.com>

	* Makefile.in: Add py-block and py-symbol.
	* gdb.python/py-symbol.exp: New File.
	* gdb.python/py-symtab.exp: New File.
	* gdb.python/py-block.exp: New File.
	* gdb.python/py-symbol.c: New File.
	* gdb.python/py-block.c: New File.


2010-02-24  Phil Muldoon  <pmuldoon@redhat.com>

	* gdb.texinfo (Frames In Python): Add block, find_sal, function
	and select method descriptions.
	(Python API): Add Blocks In Python, Symbols in Python and Symbol
	Tables in Python to menu.
	(Blocks In Python): New node.
	(Symbols In Python): New node.
	(Symbol Tables in Python): New node.
2010-02-24 21:18:28 +00:00
David S. Miller 09de9781bd gdb: Add sparc*-*-linux catch syscall support.
2010-02-24  David S. Miller  <davem@davemloft.net>

	* gdb_ptrace.h (PT_SYSCALL): If PTRACE_SYSCALL is available, use it.
	* syscalls/sparc-linux.xml: New.
	* syscalls/sparc64-linux.xml: New.
	* Makefile.in (XML_SYSCALL_FILES): Add new syscall XML files.
	* sparc-linux-tdep.c (XML_SYSCALL_FILENAME_SPARC32): Define.
	(sparc32_linux_get_syscall_number): New function.
	(sparc32_linux_init_abi): Set syscall XML file name and hook up
	syscall number fetcher.
	* sparc64-linux-tdep.c (XML_SYSCALL_FILENAME_SPARC64): Define.
	(sparc64_linux_get_syscall_number): New function.
	(sparc64_linux_init_abi): Set syscall XML file name and hook up
	syscall number fetcher.
2010-02-24 15:14:31 +00:00
Tom Tromey f23f4c5973 * gnu-v2-abi.c: Don't include gnu-v2-abi.h.
(gnuv2_baseclass_offset): Now static.
	* Makefile.in (HFILES_NO_SRCDIR): Remove gnu-v2-abi.h.
	* gnu-v2-abi.h: Remove.
2010-02-02 23:16:53 +00:00
Phil Muldoon be759fcf73 2010-01-13 Phil Muldoon <pmuldoon@redhat.com>
PR python/10705

	* python/python-internal.h: Add lazy_string_object_type
	definition.
	(create_lazy_string_object, gdbpy_initialize_lazy_string)
	(gdbpy_is_lazystring, gdbpy_extract_lazy_string): Define.
	* python/py-value.c (valpy_lazy_string): New function.
	(convert_value_from_python): Add lazy string conversion.
	* python/py-prettyprint.c (pretty_print_one_value): Check if
	return is also a lazy string.
	(print_string_repr): Add lazy string printing branch.
	(print_children): Likewise.
	* python/py-lazy-string.c: New file. Implement lazy strings.
	* python/python.c (_initialize_python): Call
	gdbpy_initialize_lazy_string.
	* varobj.c (value_get_print_value): Add lazy string printing
	branch.  Account for encoding.
	* c-lang.c (c_printstr): Account for new encoding argument.  If
	encoding is NULL, find encoding suited for type, otherwise use
	user encoding.
	* language.h (language_defn): Add encoding argument.
	(LA_PRINT_STRING): Likewise.
	* language.c (unk_lang_printstr): Update to reflect new encoding
	argument to language_defn.
	* ada-lang.h (ada_printstr): Likewise.
	* c-lang.h (c_printstr): Likewise.
	* p-lang.h (pascal_printstr);
	* f-lang.c (f_printstr): Likewise.
	* m2-lang.c (m2_printstr): Likewise.
	* objc-lang.c (objc_printstr): Likewise.
	* p-lang.c (pascal_printstr): Likewise.
	* scm-lang.c (scm_printstr): Likewise.
	* c-valprint.c (c_val_print): Update LA_PRINT_STRING call for
	encoding argument.
	* ada-valprint.c (ada_printstr): Likewise.
	* f-valprint.c (f_val_print): Likewise
	* m2-valprint.c (m2_val_print): Likewise.
	* p-valprint.c (pascal_val_print): Likewise.
	* expprint.c (print_subexp_standard): Likewise.
	* valprint.c (val_print_string): Likewise.
	* Makefile.in (SUBDIR_PYTHON_OBS): Add py-lazy-string.
	(SUBDIR_PYTHON_SRCS): Likewise.
	(py-lazy-string.o): New rule.

2010-01-13  Phil Muldoon  <pmuldoon@redhat.com>

	* gdb.texinfo (Values From Inferior): Document lazy_string value
	method.
	(Python API): Add Lazy strings menu item.
	(Lazy Strings In Python): New node.

2010-01-13  Phil Muldoon  <pmuldoon@redhat.com>

	* gdb.python/py-value.exp (test_lazy_strings): Add lazy string test.
	* gdb.python/py-prettyprint.py (pp_ls): New printer.
	* gdb.python/py-prettyprint.exp (run_lang_tests): Add lazy string
	test.
	* gdb.python/py-prettyprint.c: Define lazystring test structure.
	* gdb.python/py-mi.exp: Add lazy string test.
2010-01-14 08:03:37 +00:00
Vladimir Prus dc146f7c09 Implement core awareness.
* bcache.c (compare_ints): Remove
	(print_percentage): Use compare_positive_ints.
	* defs.h (compare_positive_ints): Declare.
	* linux-nat.h (struct lin_lwp): New field core.
	(linux_nat_core_of_thread_1): Declare.
	* linux-nat.c (add_lwp): Init the 'core' field.
	(linux_nat_wait_1): Record the core.
	(linux_nat_core_of_thread_1, linux_nat_core_of_thread): New.
	(linux_nat_add_target): Register the above.
	* linux-thread-db.c (update_thread_core): New.
	(thread_db_find_new_threads): Update core information for
	every thread.
	* remote.c (struct private_thread_info): New.
	(free_private_thread_info, demand_private_info): New.
	(PACKET_qXfer_threads, use_osdata_threads): New.
	(struct thread_item, threads_parsing_context
	(start_thread, end_thread, thread_attributes)
	(thread_children, threads_children, threads_elements): New.
	(remote_threads_info): Try qXfer:threads before anything
	else.
	(remote_protocol_packets): Register qXfer:threads.
	(remote_open_1): Init use_osdata_threads.
	(struct stop_reply): New field 'core'.
	(remote_parse_stop_reply): Parse core number.
	(process_stop_reply): Record core number.
	(remote_xfer_partial): Handle qXfer:threads.
	(remote_core_of_thread): New.
	(init_remote_ops): Register remote_core_of_thread.
	(_initialize_remote): Register qXfer:read.
	* target.c (target_core_of_thread): New
	* target.h (enum target_object): New value TARGET_OBJECT_THREADS.
	(struct target_ops): New field to_core_of_threads.
	(target_core_of_thread): Declare.
	* gdbthread.h (struct thread_info): New field private_dtor.
	* thread.c (print_thread_info): Report the core.
	* ui-out.c (MAX_UI_OUT_LEVELS): Increase.
	* utils.c (compare_positive_ints): New.
	* features/threads.dtd: New.
	* mi/mi-interp.c (mi_on_normal_stop): Report the core.
	* mi/mi-main.c (struct collect_cores_data, collect_cores)
	(do_nothing, free_vector_of_osdata_items)
	(splay_tree_int_comparator, free_splay_tree): New.
	(print_one_inferior_data): Implemented printing of selected
	inferiors.  Collect and print cores.
	(output_cores): New.
	(mi_cmd_list_thread_groups): Support --recurse.  Permit specifying
	thread groups together with --available.
2010-01-12 21:40:25 +00:00
Joel Brobecker 4c38e0a4fc Update copyright year in most headers.
Automatic update by copyright.sh.
2010-01-01 07:32:07 +00:00
Tom Tromey f747b78daa * Makefile.in (SFILES): Add exceptions.c. 2009-12-23 20:28:44 +00:00
Hui Zhu 9b4eba8eb8 2009-10-26 Michael Snyder <msnyder@vmware.com>
Hui Zhu  <teawater@gmail.com>

	* Makefile.in (SFILES): Add gcore.c.
	(COMMON_OBS): Add gcore.o.
	* config/alpha/alpha-linux.mh (NATDEPFILES): Delete gcore.o.
	* config/alpha/fbsd.mh (NATDEPFILES): Ditto.
	* config/arm/linux.mh (NATDEPFILES): Ditto.
	* config/i386/fbsd.mh (NATDEPFILES): Ditto.
	* config/i386/fbsd64.mh (NATDEPFILES): Ditto.
	* config/i386/i386sol2.mh (NATDEPFILES): Ditto.
	* config/i386/linux.mh (NATDEPFILES): Ditto.
	* config/i386/linux64.mh (NATDEPFILES): Ditto.
	* config/i386/sol2-64.mh (NATDEPFILES): Ditto.
	* config/ia64/linux.mh (NATDEPFILES): Ditto.
	* config/m32r/linux.mh (NATDEPFILES): Ditto.
	* config/m68k/linux.mh (NATDEPFILES): Ditto.
	* config/mips/linux.mh (NATDEPFILES): Ditto.
	* config/pa/linux.mh (NATDEPFILES): Ditto.
	* config/powerpc/linux.mh (NATDEPFILES): Ditto.
	* config/powerpc/ppc64-linux.mh (NATDEPFILES): Ditto.
	* config/s390/s390.mh (NATDEPFILES): Ditto.
	* config/sparc/fbsd.mh (NATDEPFILES): Ditto.
	* config/sparc/linux.mh (NATDEPFILES): Ditto.
	* config/sparc/linux64.mh (NATDEPFILES): Ditto.
	* config/sparc/sol2.mh (NATDEPFILES): Ditto.
	* config/xtensa/linux.mh (NATDEPFILES): Ditto.
	* target.c (dummy_find_memory_regions): Change output.
	(dummy_make_corefile_notes): Ditto.
2009-10-26 18:30:39 +00:00
Hui Zhu 0ebc209651 2009-10-26 Michael Snyder <msnyder@vmware.com>
Hui Zhu  <teawater@gmail.com>

	* Makefile.in (SFILES): Add gcore.c.
	(COMMON_OBS): Add gcore.o.
	* config/alpha/alpha-linux.mh (NATDEPFILES): Delete gcore.o.
	* config/alpha/fbsd.mh (NATDEPFILES): Ditto.
	* config/arm/linux.mh (NATDEPFILES): Ditto.
	* config/i386/fbsd.mh (NATDEPFILES): Ditto.
	* config/i386/fbsd64.mh (NATDEPFILES): Ditto.
	* config/i386/i386sol2.mh (NATDEPFILES): Ditto.
	* config/i386/linux.mh (NATDEPFILES): Ditto.
	* config/i386/linux64.mh (NATDEPFILES): Ditto.
	* config/i386/sol2-64.mh (NATDEPFILES): Ditto.
	* config/ia64/linux.mh (NATDEPFILES): Ditto.
	* config/m32r/linux.mh (NATDEPFILES): Ditto.
	* config/m68k/linux.mh (NATDEPFILES): Ditto.
	* config/mips/linux.mh (NATDEPFILES): Ditto.
	* config/pa/linux.mh (NATDEPFILES): Ditto.
	* config/powerpc/linux.mh (NATDEPFILES): Ditto.
	* config/powerpc/ppc64-linux.mh (NATDEPFILES): Ditto.
	* config/s390/s390.mh (NATDEPFILES): Ditto.
	* config/sparc/fbsd.mh (NATDEPFILES): Ditto.
	* config/sparc/linux.mh (NATDEPFILES): Ditto.
	* config/sparc/linux64.mh (NATDEPFILES): Ditto.
	* config/sparc/sol2.mh (NATDEPFILES): Ditto.
	* config/xtensa/linux.mh (NATDEPFILES): Ditto.
	* target.c (dummy_find_memory_regions): Change output.
	(dummy_make_corefile_notes): Ditto.
2009-10-26 18:28:13 +00:00
Andrew Stubbs c9ac0a72c9 2009-10-21 Andrew Stubbs <ams@codesourcery.com>
Joel Brobecker  <brobecker@adacore.com>

	* Makefile.in (HFILES_NO_SRCDIR): Remove shnbsd-tdep.h
	* configure.tgt (sh*-*-linux*): Add corelow.o to gdb_target_obs.
	* sh-linux-tdep.c: Include sh-tdep.h.
	(REGSx16): New macro.
	(gregs_table, fpregs_table): New variables.
	(sh_linux_init_abi): Set core_gregmap and fpregmap.
	* sh-tdep.c: Include regset.h.
	(sh_corefile_supply_regset): New function.
	(sh_corefile_collect_regset): New function.
	(sh_corefile_gregset, sh_corefile_fpregset): New variables.
	(sh_regset_from_core_section): New function.
	(sh_gdbarch_init): Set up tdep value.
	Call set_gdbarch_regset_from_core_section.
	* sh-tdep.h (PC_REGNUM): New enum value.
	(struct sh_corefile_regs): New type.
	(sh_corefile_gregset): Export variable.
	(sh_corefile_supply_regset): New prototype.
	(sh_corefile_collect_regset): New prototype.
	* shnbsd-tdep.c: Remove include of regcache.h, gdb_assert.h and
	shnbsd-tdep.h.
	(regmap): Use new definition using struct sh_corefile_regs.
	(shnbsd_supply_gregset, shnbsd_collect_gregset): Delete.
	(shnbsd_gregset): Delete.
	(shnbsd_regset_from_core_section): Delete.
	(shnbsd_supply_reg, shnbsd_fill_reg): Use new regset interface.
	(shnbsd_init_abi): Set core_gregmap.
	(shnbsd_supply_reg): Delete.
	(shnbsd_fill_reg): Delete.
	(SHNBSD_SIZEOF_GREGS): Move ...
	* shnbsd-nat.c (SHNBSD_SIZEOF_GREGS): ... to here.
	Remove include of shnbsd-tdep.h.
	(shnbsd_fetch_inferior_registers): Replace shnbsd_supply_reg call
	with sh_corefile_supply_regset.
	(shnbsd_store_inferior_registers): Replace shnbsd_fill_reg call with
	sh_corefile_collect_regset.
	* shnbsd-tdep.h: Delete file.
2009-10-21 14:14:57 +00:00
Pedro Alves 6c95b8df7f 2009-10-19 Pedro Alves <pedro@codesourcery.com>
Stan Shebs	<stan@codesourcery.com>

	Add base multi-executable/process support to GDB.

	gdb/
	* Makefile.in (SFILES): Add progspace.c.
	(COMMON_OBS): Add progspace.o.
	* progspace.h: New.
	* progspace.c: New.

	* breakpoint.h (struct bp_target_info) <placed_address_space>: New
	field.
	(struct bp_location) <pspace>: New field.
	(struct breakpoint) <pspace>: New field.
	(bpstat_stop_status, breakpoint_here_p)
	(moribund_breakpoint_here_p, breakpoint_inserted_here_p)
	(regular_breakpoint_inserted_here_p)
	(software_breakpoint_inserted_here_p, breakpoint_thread_match)
	(set_default_breakpoint): Adjust prototypes.
	(remove_breakpoints_pid, breakpoint_program_space_exit): Declare.
	(insert_single_step_breakpoint, deprecated_insert_raw_breakpoint):
	Adjust prototypes.
	* breakpoint.c (executing_startup): Delete.
	(default_breakpoint_sspace): New.
	(breakpoint_restore_shadows): Skip if the address space doesn't
	match.
	(update_watchpoint): Record the frame's program space in the
	breakpoint location.
	(insert_bp_location): Record the address space in target_info.
	Adjust to pass the symbol space to solib_name_from_address.
	(breakpoint_program_space_exit): New.
	(insert_breakpoint_locations): Switch the symbol space and thread
	when inserting breakpoints.  Don't insert breakpoints in a vfork
	parent waiting for vfork done if we're not attached to the vfork
	child.
	(remove_breakpoints_pid): New.
	(reattach_breakpoints): Switch to a thread of PID.  Ignore
	breakpoints of other symbol spaces.
	(create_internal_breakpoint): Store the symbol space in the sal.
	(create_longjmp_master_breakpoint): Iterate over all symbol
	spaces.
	(update_breakpoints_after_exec): Ignore breakpoints for other
	symbol spaces.
	(remove_breakpoint): Rename to ...
	(remove_breakpoint_1): ... this.  Pass the breakpoints symbol
	space to solib_name_from_address.
	(remove_breakpoint): New.
	(mark_breakpoints_out): Ignore breakpoints from other symbol
	spaces.
	(breakpoint_init_inferior): Ditto.
	(breakpoint_here_p): Add an address space argument and adjust to
	use breakpoint_address_match.
	(moribund_breakpoint_here_p): Ditto.
	(regular_breakpoint_inserted_here_p): Ditto.
	(breakpoint_inserted_here_p): Ditto.
	(software_breakpoint_inserted_here_p): Ditto.
	(breakpoint_thread_match): Ditto.
	(bpstat_check_location): Ditto.
	(bpstat_stop_status): Ditto.
	(print_breakpoint_location): If there's a location to print,
	switch the current symbol space.
	(print_one_breakpoint_location): Add `allflag' argument.
	(print_one_breakpoint): Ditto.	Adjust.
	(do_captured_breakpoint_query): Adjust.
	(breakpoint_1): Adjust.
	(breakpoint_has_pc): Also match the symbol space.
	(describe_other_breakpoints): Add a symbol space argument and
	adjust.
	(set_default_breakpoint): Add a symbol space argument.	Set
	default_breakpoint_sspace.
	(breakpoint_address_match): New.
	(check_duplicates_for): Add an address space argument, and adjust.
	(set_raw_breakpoint): Record the symbol space in the location and
	in the breakpoint.
	(set_longjmp_breakpoint): Skip longjmp master breakpoints from
	other symbol spaces.
	(remove_thread_event_breakpoints, remove_solib_event_breakpoints)
	(disable_breakpoints_in_shlibs): Skip breakpoints from other
	symbol spaces.
	(disable_breakpoints_in_unloaded_shlib): Match symbol spaces.
	(create_catchpoint): Set the symbol space in the sal.
	(disable_breakpoints_before_startup): Skip breakpoints from other
	symbol spaces.	Set executing_startup in the current symbol space.
	(enable_breakpoints_after_startup): Clear executing_startup in the
	current symbol space.  Skip breakpoints from other symbol spaces.
	(clone_momentary_breakpoint): Also copy the symbol space.
	(add_location_to_breakpoint): Set the location's symbol space.
	(bp_loc_is_permanent): Switch thread and symbol space.
	(create_breakpoint): Adjust.
	(expand_line_sal_maybe): Expand comment to mention symbol spaces.
	Switch thread and symbol space when reading memory.
	(parse_breakpoint_sals): Set the symbol space in the sal.
	(break_command_really): Ditto.
	(skip_prologue_sal): Switch and space.
	(resolve_sal_pc): Ditto.
	(watch_command_1): Record the symbol space in the sal.
	(create_ada_exception_breakpoint): Adjust.
	(clear_command): Adjust.  Match symbol spaces.
	(update_global_location_list): Use breakpoint_address_match.
	(breakpoint_re_set_one): Switch thread and space.
	(breakpoint_re_set): Save symbol space.
	(breakpoint_re_set_thread): Also reset the symbol space.
	(deprecated_insert_raw_breakpoint): Add an address space argument.
	Adjust.
	(insert_single_step_breakpoint): Ditto.
	(single_step_breakpoint_inserted_here_p): Ditto.
	(clear_syscall_counts): New.
	(_initialize_breakpoint): Install it as inferior_exit observer.

	* exec.h: Include "progspace.h".
	(exec_bfd, exec_bfd_mtime): New defines.
	(exec_close): Declare.
	* exec.c: Include "gdbthread.h" and "progspace.h".
	(exec_bfd, exec_bfd_mtime, current_target_sections_1): Delete.
	(using_exec_ops): New.
	(exec_close_1): Rename to exec_close, and make public.
	(exec_close): Rename to exec_close_1, and adjust all callers.  Add
	description.  Remove target sections and close executables from
	all program spaces.
	(exec_file_attach): Add comment.
	(add_target_sections): Check on `using_exec_ops' to check if the
	target should be pushed.
	(remove_target_sections): Only unpush the target if there are no
	more target sections in any symbol space.
	* gdbcore.h: Include "exec.h".
	(exec_bfd, exec_bfd_mtime): Remove declarations.

	* frame.h (get_frame_program_space, get_frame_address_space)
	(frame_unwind_program_space): Declare.
	* frame.c (struct frame_info) <pspace, aspace>: New fields.
	(create_sentinel_frame): Add program space argument.  Set the
	pspace and aspace fields of the frame object.
	(get_current_frame, create_new_frame): Adjust.
	(get_frame_program_space): New.
	(frame_unwind_program_space): New.
	(get_frame_address_space): New.
	* stack.c (print_frame_info): Adjust.
	(print_frame): Use the frame's program space.

	* gdbthread.h (any_live_thread_of_process): Declare.
	* thread.c (any_live_thread_of_process): New.
	(switch_to_thread): Switch the program space as well.
	(restore_selected_frame): Don't warn if trying to restore frame
	level 0.

	* inferior.h: Include "progspace.h".
	(detach_fork): Declare.
	(struct inferior) <removable, aspace, pspace>
	<vfork_parent, vfork_child, pending_detach>
	<waiting_for_vfork_done>: New fields.
	<terminal_info>: Remove field.
	<data, num_data>: New fields.
	(register_inferior_data, register_inferior_data_with_cleanup)
	(clear_inferior_data, set_inferior_data, inferior_data): Declare.
	(exit_inferior, exit_inferior_silent, exit_inferior_num_silent)
	(inferior_appeared): Declare.
	(find_inferior_pid): Typo.
	(find_inferior_id, find_inferior_for_program_space): Declare.
	(set_current_inferior, save_current_inferior, prune_inferiors)
	(number_of_inferiors): Declare.
	(inferior_list): Declare.
	* inferior.c: Include "gdbcore.h" and "symfile.h".
	(inferior_list): Make public.
	(delete_inferior_1): Always delete thread silently.
	(find_inferior_id): Make public.
	(current_inferior_): New.
	(current_inferior): Use it.
	(set_current_inferior): New.
	(restore_inferior): New.
	(save_current_inferior): New.
	(free_inferior): Free the per-inferior data.
	(add_inferior_silent): Allocate per-inferior data.
	Call inferior_appeared.
	(delete_threads_of_inferior): New.
	(delete_inferior_1): Adjust interface to take an inferior pointer.
	(delete_inferior): Adjust.
	(delete_inferior_silent): Adjust.
	(exit_inferior_1): New.
	(exit_inferior): New.
	(exit_inferior_silent): New.
	(exit_inferior_num_silent): New.
	(detach_inferior): Adjust.
	(inferior_appeared): New.
	(discard_all_inferiors): Adjust.
	(find_inferior_id): Make public.  Assert pid is not zero.
	(find_inferior_for_program_space): New.
	(have_inferiors): Check if we have any inferior with pid not zero.
	(have_live_inferiors): Go over all pushed targets looking for
	process_stratum.
	(prune_inferiors): New.
	(number_of_inferiors): New.
	(print_inferior): Add executable column.  Print vfork parent/child
	relationships.
	(inferior_command): Adjust to cope with not running inferiors.
	(remove_inferior_command): New.
	(add_inferior_command): New.
	(clone_inferior_command): New.
	(struct inferior_data): New.
	(struct inferior_data_registration): New.
	(struct inferior_data_registry): New.
	(inferior_data_registry): New.
	(register_inferior_data_with_cleanup): New.
	(register_inferior_data): New.
	(inferior_alloc_data): New.
	(inferior_free_data): New.
	(clear_inferior_data): New.
	(set_inferior_data): New.
	(inferior_data): New.
	(initialize_inferiors): New.
	(_initialize_inferiors): Register "add-inferior",
	"remove-inferior" and "clone-inferior" commands.

	* objfiles.h: Include "progspace.h".
	(struct objfile) <pspace>: New field.
	(symfile_objfile, object_files): Don't declare.
	(ALL_PSPACE_OBJFILES): New.
	(ALL_PSPACE_OBJFILES_SAFE): New.
	(ALL_OBJFILES, ALL_OBJFILES_SAFE): Adjust.
	(ALL_PSPACE_SYMTABS): New.
	(ALL_PRIMARY_SYMTABS): Adjust.
	(ALL_PSPACE_PRIMARY_SYMTABS): New.
	(ALL_PSYMTABS): Adjust.
	(ALL_PSPACE_PSYMTABS): New.
	* objfiles.c (object_files, symfile_objfile): Delete.
	(struct objfile_sspace_info): New.
	(objfiles_pspace_data): New.
	(objfiles_pspace_data_cleanup): New.
	(get_objfile_pspace_data): New.
	(objfiles_changed_p): Delete.
	(allocate_objfile): Set the objfile's program space.  Adjust to
	reference objfiles_changed_p in pspace data.
	(free_objfile): Adjust to reference objfiles_changed_p in pspace
	data.
	(objfile_relocate): Ditto.
	(update_section_map): Add pspace argument.  Adjust to iterate over
	objfiles in the passed in pspace.
	(find_pc_section): Delete sections and num_sections statics.
	Adjust to refer to program space's objfiles_changed_p.	Adjust to
	refer to sections and num_sections store in the objfile's pspace
	data.
	(objfiles_changed): Adjust to reference objfiles_changed_p in
	pspace data.
	(_initialize_objfiles): New.
	* linespec.c (decode_all_digits, decode_dollar): Set the sal's
	program space.
	* source.c (current_source_pspace): New.
	(get_current_source_symtab_and_line): Set the sal's program space.
	(set_current_source_symtab_and_line): Set current_source_pspace.
	(select_source_symtab): Ditto.	Use ALL_OBJFILES.
	(forget_cached_source_info): Iterate over all program spaces.
	* symfile.c (clear_symtab_users): Adjust.
	* symmisc.c (print_symbol_bcache_statistics): Iterate over all
	program spaces.
	(print_objfile_statistics): Ditto.
	(maintenance_print_msymbols): Ditto.
	(maintenance_print_objfiles): Ditto.
	(maintenance_info_symtabs): Ditto.
	(maintenance_info_psymtabs): Ditto.
	* symtab.h (SYMTAB_PSPACE): New.
	(struct symtab_and_line) <pspace>: New field.
	* symtab.c (init_sal): Clear the sal's program space.
	(find_pc_sect_symtab): Set the sal's program space.  Switch thread
	and space.
	(append_expanded_sal): Add program space argument.  Iterate over
	all program spaces.
	(expand_line_sal): Iterate over all program spaces.  Switch
	program space.

	* target.h (enum target_waitkind) <TARGET_WAITKIND_VFORK_DONE>: New.
	(struct target_ops) <to_thread_address_space>: New field.
	(target_thread_address_space): Define.
	* target.c (target_detach): Only remove breakpoints from the
	inferior we're detaching.
	(target_thread_address_space): New.

	* defs.h (initialize_progspace): Declare.
	* top.c (gdb_init): Call it.

	* solist.h (struct so_list) <sspace>: New field.
	* solib.h (struct program_space): Forward declare.
	(solib_name_from_address): Adjust prototype.
	* solib.c (so_list_head): Replace with a macro referencing the
	program space.
	(update_solib_list): Set the so's program space.
	(solib_name_from_address): Add a program space argument and adjust.

	* solib-svr4.c (struct svr4_info) <pid>: Delete field.
	<interp_text_sect_low, interp_text_sect_high, interp_plt_sect_low>
	<interp_plt_sect_high>: New fields.
	(svr4_info_p, svr4_info): Delete.
	(solib_svr4_sspace_data): New.
	(get_svr4_info): Rewrite.
	(svr4_sspace_data_cleanup): New.
	(open_symbol_file_object): Adjust.
	(svr4_default_sos): Adjust.
	(svr4_fetch_objfile_link_map): Adjust.
	(interp_text_sect_low, interp_text_sect_high, interp_plt_sect_low)
	(interp_plt_sect_high): Delete.
	(svr4_in_dynsym_resolve_code): Adjust.
	(enable_break): Adjust.
	(svr4_clear_solib): Revert bit that removed the svr4_info here,
	and reinstate clearing debug_base, debug_loader_offset_p,
	debug_loader_offset and debug_loader_name.
	(_initialize_svr4_solib): Register solib_svr4_pspace_data.  Don't
	install an inferior_exit observer anymore.

	* printcmd.c (struct display) <pspace>: New field.
	(display_command): Set the display's sspace.
	(do_one_display): Match the display's sspace.
	(display_uses_solib_p): Ditto.

	* linux-fork.c (detach_fork): Moved to infrun.c.
	(_initialize_linux_fork): Moved "detach-on-fork" command to
	infrun.c.
	* infrun.c (detach_fork): Moved from linux-fork.c.
	(proceed_after_vfork_done): New.
	(handle_vfork_child_exec_or_exit): New.
	(follow_exec_mode_replace, follow_exec_mode_keep)
	(follow_exec_mode_names, follow_exec_mode_string)
	(show_follow_exec_mode_string): New.
	(follow_exec): New.  Reinstate the mark_breakpoints_out call.
	Remove shared libraries before attaching new executable.  If user
	wants to keep the inferior, keep it.
	(displaced_step_fixup): Adjust to pass an address space to the
	breakpoints module.
	(resume): Ditto.
	(clear_proceed_status): In all-stop mode, always clear the proceed
	status of all threads.
	(prepare_to_proceed): Adjust to pass an address space to the
	breakpoints module.
	(proceed): Ditto.
	(adjust_pc_after_break): Ditto.
	(handle_inferior_event): When handling a process exit, switch the
	program space to the inferior's that had exited.  Call
	handle_vfork_child_exec_or_exit.  Adjust to pass an address space
	to the breakpoints module.  In non-stop mode, when following a
	fork and detach-fork is off, also resume the other branch.  Handle
	TARGET_WAITKIND_VFORK_DONE.  Set the program space in sals.
	(normal_stop): Prune inferiors.
	(_initialize_infrun): Install the new "follow-exec-mode" command.
	"detach-on-fork" moved here.

	* regcache.h (get_regcache_aspace): Declare.
	* regcache.c (struct regcache) <aspace>: New field.
	(regcache_xmalloc): Clear the aspace.
	(get_regcache_aspace): New.
	(regcache_cpy): Copy the aspace field.
	(regcache_cpy_no_passthrough): Ditto.
	(get_thread_regcache): Fetch the thread's address space from the
	target, and store it in the regcache.

	* infcall.c (call_function_by_hand): Set the sal's pspace.

	* arch-utils.c (default_has_shared_address_space): New.
	* arch-utils.h (default_has_shared_address_space): Declare.

	* gdbarch.sh (has_shared_address_space): New.
	* gdbarch.h, gdbarch.c: Regenerate.

	* linux-tdep.c: Include auxv.h, target.h, elf/common.h.
	(linux_has_shared_address_space): New.
	(_initialize_linux_tdep): Declare.

	* arm-tdep.c (arm_software_single_step): Pass the frame's address
	space to insert_single_step_breakpoint.
	* arm-linux-tdep.c (arm_linux_software_single_step): Pass the
	frame's pspace to breakpoint functions.
	* cris-tdep.c (crisv32_single_step_through_delay): Ditto.
	(cris_software_single_step): Ditto.
	* mips-tdep.c (deal_with_atomic_sequence): Add frame argument.
	Pass the frame's pspace to breakpoint functions.
	(mips_software_single_step): Adjust.
	(mips_single_step_through_delay): Adjust.
	* rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
	* rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
	* solib-irix.c (enable_break): Adjust to pass the current frame's
	address space to breakpoint functions.
	* sparc-tdep.c (sparc_software_single_step): Ditto.
	* spu-tdep.c (spu_software_single_step): Ditto.
	* alpha-tdep.c (alpha_software_single_step): Ditto.
	* record.c (record_wait): Adjust to pass an address space to the
	breakpoints module.

	* fork-child.c (fork_inferior): Set the new inferior's program and
	address spaces.
	* inf-ptrace.c (inf_ptrace_follow_fork): Copy the parent's program
	and address spaces.
	(inf_ptrace_attach): Set the inferior's program and address spaces.
	* linux-nat.c: Include "solib.h".
	(linux_child_follow_fork): Manage parent and child's program and
	address spaces.	 Clone the parent's program space if necessary.
	Don't wait for the vfork to be done here.  Refuse to resume if
	following the vfork parent while leaving the child stopped.
	(resume_callback): Don't resume a vfork parent.
	(linux_nat_resume): Also check for pending events in the
	lp->waitstatus field.
	(linux_handle_extended_wait): Report TARGET_WAITKIND_VFORK_DONE
	events to the core.
	(stop_wait_callback): Don't wait for SIGSTOP on vfork parents.
	(cancel_breakpoint): Adjust.
	* linux-thread-db.c (thread_db_wait): Don't remove thread event
	breakpoints here.
	(thread_db_mourn_inferior): Don't mark breakpoints out here.
	Remove thread event breakpoints after mourning.
	* corelow.c: Include progspace.h.
	(core_open): Set the inferior's program and address spaces.
	* remote.c (remote_add_inferior): Set the new inferior's program
	and address spaces.
	(remote_start_remote): Update address spaces.
	(extended_remote_create_inferior_1): Don't init the thread list if
	we already debugging other inferiors.
	* darwin-nat.c (darwin_attach): Set the new inferior's program and
	address spaces.
	* gnu-nat.c (gnu_attach): Ditto.
	* go32-nat.c (go32_create_inferior): Ditto.
	* inf-ttrace.c (inf_ttrace_follow_fork, inf_ttrace_attach): Ditto.
	* monitor.c (monitor_open): Ditto.
	* nto-procfs.c (procfs_attach, procfs_create_inferior): Ditto.
	* procfs.c (do_attach): Ditto.
	* windows-nat.c (do_initial_windows_stuff): Ditto.

	* inflow.c (inferior_process_group)
	(terminal_init_inferior_with_pgrp, terminal_inferior,
	(terminal_ours_1, inflow_inferior_exit, copy_terminal_info)
	(child_terminal_info, new_tty_postfork, set_sigint_trap): Adjust
	to use per-inferior data instead of inferior->terminal_info.
	(inflow_inferior_data): New.
	(inflow_new_inferior): Delete.
	(inflow_inferior_data_cleanup): New.
	(get_inflow_inferior_data): New.

	* mi/mi-interp.c (mi_new_inferior): Rename to...
	(mi_inferior_appeared): ... this.
	(mi_interpreter_init): Adjust.

	* tui/tui-disasm.c: Include "progspace.h".
	(tui_set_disassem_content): Pass an address space to
	breakpoint_here_p.

	* NEWS: Mention multi-program debugging support.  Mention new
	commands "add-inferior", "clone-inferior", "remove-inferior",
	"maint info program-spaces", and new option "set
	follow-exec-mode".

2009-10-19  Pedro Alves	 <pedro@codesourcery.com>
	    Stan Shebs	<stan@codesourcery.com>

	gdb/doc/
	* observer.texi (new_inferior): Rename to...
	(inferior_appeared): ... this.

2009-10-19  Pedro Alves	 <pedro@codesourcery.com>
	    Stan Shebs	<stan@codesourcery.com>

	gdb/testsuite/
	* gdb.base/foll-vfork.exp: Adjust to spell out "follow-fork".
	* gdb.base/foll-exec.exp: Adjust to expect a process id before
	"Executing new program".
	* gdb.base/foll-fork.exp: Adjust to spell out "follow-fork".
	* gdb.base/multi-forks.exp: Ditto.  Adjust to the inferior being
	left listed after having been killed.
	* gdb.base/attach.exp: Adjust to spell out "symbol-file".
	* gdb.base/maint.exp: Adjust test.

	* Makefile.in (ALL_SUBDIRS): Add gdb.multi.
	* gdb.multi/Makefile.in: New.
	* gdb.multi/base.exp: New.
	* gdb.multi/goodbye.c: New.
	* gdb.multi/hangout.c: New.
	* gdb.multi/hello.c: New.
	* gdb.multi/bkpt-multi-exec.c: New.
	* gdb.multi/bkpt-multi-exec.exp: New.
	* gdb.multi/crashme.c: New.

2009-10-19  Pedro Alves	 <pedro@codesourcery.com>
	    Stan Shebs	<stan@codesourcery.com>

	gdb/doc/
	* gdb.texinfo (Inferiors): Rename node to ...
	(Inferiors and Programs): ... this.  Mention running multiple
	programs in the same debug session.
	<info inferiors>: Mention the new 'Executable' column if "info
	inferiors".  Update examples.  Document the "add-inferior",
	"clone-inferior", "remove-inferior" and "maint info
	program-spaces" commands.
	(Process): Rename node to...
	(Forks): ... this.  Document "set|show follow-exec-mode".
2009-10-19 09:51:43 +00:00
Michael Eager 2d1c1221e2 * config/djgpp/fnchange.lst: Add translations for cpu-microblaze.c,
elf32-microblaze.c, microblaze-rom.c, microblaze-linux-tdep.c,
	microblaze-tdep.h, microblaze-tdep.c, microblaze-opc.h,
	microblaze-opcm.h, microblaze-dis.c, microblaze-dis.h, sim/microblaze,
	microblaze.h, and microblaze.isa.
	* configure.tgt: Add targets microblaze*-linux-*, microblaze*-xilinx-*.
	* Makefile.in: Build microblaze-tdep.o, microblaze-linux-tdep.o.
	HFILES_NO_SRCDIR: Add microblaze-tdep.h.
	* microblaze-linux-tdep.c: New.
	* microblaze-tdep.c: New.
	* microblaze-tdep.h: New.
	* NEWS: Announce Xilinx MicroBlaze support.
2009-10-15 19:28:52 +00:00
H.J. Lu 11e6390e80 2009-09-16 H.J. Lu <hongjiu.lu@intel.com>
PR gdb/10649
	* Makefile.in (GDB_DATADIR_PATH): Renamed to ...
	(GDB_DATADIR): This.
	(xml-syscall-install): Updated.
2009-09-16 21:55:57 +00:00
Jan Kratochvil 8285870aeb gdb/
Fix gcc-4.5 HEAD warnings for enum ada_operator.
	* Makefile.in (HFILES_NO_SRCDIR): Add ada-operator.inc.
	* ada-lang.h (enum ada_operator): Move it to ...
	* ada-operator.inc: ... a new file.
	* expression.h (enum exp_opcode): Include ada-operator.inc.
	New element OP_UNUSED_LAST.  Update comment for OP_EXTENDED0.

gdb/
	Fix gcc-4.5 HEAD warnings for GDB_FORM_cached_string.
	* dwarf2read.c (GDB_FORM_cached_string)
	(dwarf_form_name <GDB_FORM_cached_string>): Remove.
	(struct attribute <dwarf_form>): Reduce the bit width.
	(struct attribute <string_is_canonical>, DW_STRING_IS_CANONICAL): New.
	(read_attribute_value <DW_FORM_string>)
	(read_attribute_value <DW_FORM_strp>): Initialize
	DW_STRING_IS_CANONICAL.
	(dwarf2_name, dump_die_shallow <DW_FORM_string>)
	(dump_die_shallow <DW_FORM_strp>): Update the code using former
	GDB_FORM_cached_string.
2009-09-15 16:09:32 +00:00
Sergio Durigan Junior a96d9b2e9a Implementing catch syscall.
* amd64-linux-tdep.c: Include xml-syscall.h header, define the XML
syscall name for the architecture.
(amd64_linux_get_syscall_number): New function.
(amd64_linux_init_abi): Register the correct functions for syscall
catchpoint; set the correct syscall file name.
* breakpoint.c: New include: xml-syscall.h.
(set_raw_breakpoint_without_location): Setting the parameters
for the catch syscall feature.
(insert_catch_syscall): New.
(remove_catch_syscall): New.
(breakpoint_hit_catch_syscall): New.
(print_it_catch_syscall): New.
(print_one_catch_syscall): New.
(print_mention_catch_syscall): New.
(catch_syscall_breakpoint_ops): New.
(syscall_catchpoint_p): New.
(create_catchpoint_without_mention): New.
(create_catchpoint): Modified in order to use
create_catchpoint_without_mention.
(create_syscall_event_catchpoint): New.
(clean_up_filters): New.
(catch_syscall_split_args): New.
(catch_syscall_command_1): New.
(delete_breakpoint): Add cleanup for catch syscall.
(is_syscall_catchpoint_enabled): New.
(catch_syscall_enabled): New.
(catching_syscall_number): New.
(catch_syscall_completer): New completer function.
(add_catch_command): Add the completer function for catchpoints.
* breakpoint.h (syscalls_to_be_caught): New vector.
(catch_syscall_enabled): New.
(catching_syscall_number): New.
* gdbarch.c: Regenerated.
* gdbarch.h: Regenerated.
* gdbarch.sh: Add syscall catchpoint functions and structures.
(get_syscall_number): New.
(UNKNOWN_SYSCALL): New definition.
* i386-linux-nat.c (i386_linux_resume): Select the proper request
to be made for ptrace() considering if we are catching syscalls
or not.
* i386-linux-tdep.c: Include xml-syscall.h header, define the XML
syscall name for the architecture.
(i386_linux_get_syscall_number): New.
(i386_linux_init_abi): Register the correct functions for syscall
catchpoint; set the correct syscall file name.
* inf-child.c (inf_child_set_syscall_catchpoint): New.
(inf_child_target): Assign default values to target_ops.
* inf-ptrace.c (inf_ptrace_resume): Select the proper request
to be made for ptrace() considering if we are catching syscalls
or not.
* inferior.h (struct inferior): Included new variables
any_syscall_count, syscalls_counts and total_syscalls_count,
used to keep track of requested syscall catchpoints.
* infrun.c (resume): Add syscall catchpoint.
(deal_with_syscall_event): New.
(handle_inferior_event): Add syscall entry/return events.
(inferior_has_called_syscall): New.
* linux-nat.c: Define some helpful variables to track wether we have
support for the needed ptrace option.
(linux_test_for_tracesysgood): New.
(linux_supports_tracesysgood): New.
(linux_enable_tracesysgood): New.
(linux_enable_event_reporting): Save the current used ptrace
options.
(linux_child_post_attach): Calling linux_enable_tracesysgood.
(linux_child_post_startup_inferior): Likewise.
(linux_child_set_syscall_catchpoint): New function.
(linux_handle_extended_wait): Handle the case which the inferior stops
because it has called or returned from a syscall.
(linux_target_install_ops): Install the necessary functions to handle
syscall catchpoints.
* linux-nat.h (struct lwp_info): Include syscall_state into the
structure, which indicates if we are in a syscall entry or return.
* ppc-linux-tdep.c: Include xml-syscall.h header, define the XML
syscall filename for the arch.
(ppc_linux_get_syscall_number): New.
(ppc_linux_init_abi): Register the correct functions for syscall
catchpoint; setting the correct name for the XML syscall file.
* target.c (update_current_target): Update/copy functions related to
syscall catchpoint.
(target_waitstatus_to_string): Add syscall catchpoint entry/return
events.
* target.h (struct target_waitstatus): Add syscall number.
(struct syscall): New struct to hold information about syscalls
in the system.
(struct target_ops): Add ops for syscall catchpoint.
(inferior_has_called_syscall): New.
(target_set_syscall_catchpoint): New.
* xml-support.c (xml_fetch_content_from_file): New function,
transferred from xml-tdesc.c.
* xml-support.h (xml_fetch_content_from_file): New.
* xml-tdesc.c (fetch_xml_from_file): Function removed;
transferred to xml-support.c.
(file_read_description_xml): Updated to use the new
xml_fetch_content_from_file function.
* syscalls/gdb-syscalls.dtd: New definition file for syscall's XML
support.
* syscalls/amd64-linux.xml: New file containing information about
syscalls for GNU/Linux systems that use amd64 architecture.
* syscalls/i386-linux.xml: New file containing information about
syscalls for GNU/Linux systems that use i386 architecture.
* syscalls/ppc-linux.xml: New file containing information about
syscalls for GNU/Linux systems that use PPC architecture.
* syscalls/ppc64-linux.xml: New file containing information about
syscalls for GNU/Linux systems that use PPC64 architecture.
* xml-syscall.c: New file containing functions for manipulating
syscall's XML files.
* xml-syscall.h: New file, exporting the functions above mentioned.
* Makefile.in: Support for relocatable GDB datadir and XML
syscall.
* NEWS: Added information about the catch syscall feature.
* doc/gdb.texinfo (Set Catchpoints): Documentation about the new
feature.
* testsuite/Makefile.in: Inclusion of catch-syscall object.
* testsuite/gdb.base/catch-syscall.c: New file.
* testsuite/gdb.base/catch-syscall.exp: New file.
2009-09-15 03:30:08 +00:00
Joel Brobecker 5172aecbd2 Checking in this patch for Thiago: Rename python-* files into py-*,
more 8+3 friendly.


gdb/
        * Makefile.in (py-cmd.o): Renamed from python-cmd.o.  Updated
        references.
        (py-frame.o): Renamed from python-frame.o.  Updated references.
        (py-function.o): Renamed from python-function.o.  Updated references.
        (py-objfile.o): Renamed from python-objfile.o.  Updated references.
        (py-prettyprint.o): Renamed from python-prettyprint.o.  Updated
+references.
        (py-type.o): Renamed from python-type.o.  Updated references.
        (py-utils.o): Renamed from python-utils.o.  Updated references.
        (py-value.o): Renamed from python-value.o.  Updated references.
        * py-cmd.o: Renamed from python-cmd.o.
        * py-frame.o: Renamed from python-frame.o.
        * py-function.o: Renamed from python-function.o.
        * py-objfile.o: Renamed from python-objfile.o.
        * py-prettyprint.o: Renamed from python-prettyprint.o.
        * py-type.o: Renamed from python-type.o.
        * py-utils.o: Renamed from python-utils.o.
        * py-value.o: Renamed from python-value.o.

gdb/testsuite/
        * gdb.python/Makefile.in (EXECUTABLES): Adjust to new executable
        names, add missing ones.
        * gdb.python/py-cmd.exp: Rename from python-cmd.exp.
        * gdb.python/py-frame.c: Rename from python-frame.c.
        * gdb.python/py-frame.exp: Rename from python-frame.exp.  Adjust
        testfile name.
        * gdb.python/py-function.exp: Rename from python-function.exp.
        * gdb.python/py-mi.exp: Rename from python-mi.exp.  Adjust
        testfile name.
        * gdb.python/py-prettyprint.c: Rename from python-prettyprint.c.
        * gdb.python/py-prettyprint.exp: Rename from python-prettyprint.exp.
        Adjust testfile name.
        * gdb.python/py-prettyprint.py: Rename from python-prettyprint.py.
        * gdb.python/py-template.cc: Rename from python-template.cc.
        * gdb.python/py-template.exp: Rename from python-template.exp.
        Adjust testfile name.
        * gdb.python/py-value.c: Rename from python-value.c.
        * gdb.python/py-value.exp: Rename from python-value.exp.  Adjust
        testfile name.
2009-09-09 17:45:42 +00:00
Ralf Wildenhues a5bbabf3b5 Fix parallel check//% rule in gdb for non-VPATH build.
gdb/:
	* gdb/Makefile.in (check//%): Parse 'config.status --version'
	output to recreate the configuration from the testsuite directory,
	rather than running 'config.status --recheck' from a different
	build directory.  Let configure do the recursion rather than
	doing it manually.
2009-09-08 18:50:40 +00:00
Doug Evans 4efc650796 Add interface for JIT code generation.
* NEWS: Announce JIT interface.
	* Makefile.in (SFILES): Add jit.c.
	(HFILES_NO_SRCDIR): Add jit.h.
	(COMMON_OBS): Add jit.o.
	* jit.c: New file.
	* jit.h: New file.
	* breakpoint.h (enum bptype): Add bp_jit_event to enum.
	* breakpoint.c:
	(update_breakpoints_after_exec): Delete jit breakpoints after exec.
	(bpstat_what): Update event table for bp_jit_event.
	(print_it_typical): Added case for bp_jit_event.
	(print_one_breakpoint_location): Added case for bp_jit_event.
	(allocate_bp_location): Added case for bp_jit_event.
	(mention): Added case for bp_jit_event.
	(delete_command): Added case for bp_jit_event.
	(breakpoint_re_set_one): Added case for bp_jit_event.
	(breakpoint_re_set): Added call to jit_inferior_created_hook.
	(create_jit_event_breakpoint): New.
	* infrun.c (handle_inferior_event): Add handler for jit event.
	(follow_exec): Add call to jit_inferior_created_hook.
	* doc/gdb.texinfo: Add chapter on JIT interface.
2009-08-20 18:02:48 +00:00
Tom Tromey a8d1234eac * Makefile.in (ALL_TARGET_OBS): Remove prologue-value.o, solib.o. 2009-08-18 15:22:12 +00:00
Ulrich Weigand 85e747d249 ChangeLog:
* target.h (enum strata): New value arch_stratum.
	* target.c (target_require_runnable): Skip arch_stratum targets.

	* configure.tgt (powerpc-*-linux* | powerpc64-*-linux*): Add
	solib-spu.o and spu-multiarch.o to gdb_target_obs.
	* Makefile.in (ALL_TARGET_OBS): Add solib-spu.o and spu-multiarch.o.
	(ALLDEPFILES): Add solib-spu.c and spu-multiarch.c.

	* solib-spu.c: New file.
	* solib-spu.h: New file.
	* spu-multiarch.c: New file.

	* spu-tdep.h (SPUADDR, SPUADDR_SPU, SPUADDR_ADDR): New macros.

	* spu-tdep.c (struct gdbarch_tdep): New member id.
	(spu_gdbarch_id): New function.
	(spu_lslr): New function.

	(spu_address_to_pointer): New function.
	(spu_pointer_to_address): Support SPU ID address encoding.  Use
	spu_gdbarch_id and spu_lslr.
	(spu_integer_to_address): Likewise.
	(spu_frame_unwind_cache): Update for encoded addresses.
	(spu_unwind_pc, spu_unwind_sp): Likewise.
	(spu_read_pc, spu_write_pc): Likewise.
	(spu_push_dummy_call): Likewise.
	(spu_software_single_step): Likewise.
	(spu_get_longjmp_target): Likewise.
	(spu_overlay_update_osect): Likewise.

	(spu_dis_asm_print_address): New function.
	(gdb_print_insn_spu): Likewise.

	(spu_gdbarch_init): Store SPU ID in tdep structure.
	Install spu_address_to_pointer and gdb_print_insn_spu.

	* ppc-linux-tdep.c: Include "observer.h", "auxv.h", "elf/common.h"
	and "solib-spu.h".
	(ppc_linux_entry_point_addr): New static variable.
	(ppc_linux_inferior_created): New function.
	(ppc_linux_displaced_step_location): Likewise.
	(ppc_linux_init_abi): Enable Cell/B.E. support if supported
	by the target.
	(_initialize_ppc_linux_tdep): Attach to inferior_created observer.

	* NEWS: Mention multi-architecture and Cell/B.E. debugging
	capabilities.

testsuite/ChangeLog:

	* gdb.xml/tdesc-regs.exp: Skip for SPU targets.
2009-07-31 15:28:27 +00:00
Ralf Wildenhues 1983cb9a62 intl/
* Makefile.in (aclocal_deps): New variable.
	($(srcdir)/aclocal.m4): Use it, for portable makefile syntax.

libdecnumber/
	* Makefile.in (aclocal_deps): New variable.
	($(srcdir)/aclocal.m4): Use it, for portable makefile syntax.

etc/
	* Makefile.in (AUTOCONF, configure_deps): New variables.
	($(srcdir)/configure, config.status): New rules.
	(Makefile): Depend on config.status.
	* configure.in: Accept --enable-maintainer-mode, set and
	substitute MAINT accordingly.

gdb/
	* Makefile.in (ACLOCAL, ACLOCAL_AMFLAGS, aclocal_m4_deps)
	(AUTOCONF, configure_deps, AUTOHEADER): New variables.
	($(srcdir)/aclocal.m4, $(srcdir)/configure, $(srcdir)/config.in)
	(am--refresh): New rules.
	(stamp-h, config.status): List config.in and configure including
	$(srcdir)/ prefix.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
2009-07-30 22:44:50 +00:00
Tristan Gingold 5cd226f275 2009-06-29 Tristan Gingold <gingold@adacore.com>
* i386-darwin-tdep.c (amd64_darwin_thread_state_reg_offset)
	(amd64_darwin_thread_state_num_regs)
	(amd64_darwin_sigcontext_addr, x86_darwin_init_abi_64): Moved to
	amd64-darwin-tdep.c
	(_initialize_i386_darwin_tdep): Remove 64 bits parts.
	(darwin_dwarf_signal_frame_p): Make public.
	* amd64-darwin-tdep.c: New file with most chunks from
	i386-darwin-tdep.c
	* i386-darwin-tdep.h: Add a prototype for darwin_dwarf_signal_frame_p.
	(amd64_darwin_thread_state_reg_offset)
	(amd64_darwin_thread_state_num_regs): Moved to amd64-darwin-tdep.h
	* amd64-darwin-tdep.h: New file.
	* i386-darwin-nat.c: Only includes amd64-nat.h and amd64-darwin-tdep.h
	if BFD64 is defined.
	(i386_darwin_fetch_inferior_registers): Add #ifdef BFD64/#endif around
	64 bits parts.
	(i386_darwin_store_inferior_registers): Ditto.
	(darwin_set_sstep): Ditto.
	(darwin_complete_target): Ditto.
	(amd64_darwin_sstep_at_sigreturn): Ditto.
	* configure.tgt: Create a separate entry for x86_64-*-darwin.
	Add 64 bits support for i386-*-darwin if --enable-64-bit-bfd.
	* Makefile.in (ALLDEPFILES): Add amd64-darwin-tdep.c, darwin-nat.c,
	i386-darwin-tdep.c i386-darwin-nat.c
	(ALL_64_TARGET_OBS): Add amd64-darwin-tdep.o
2009-07-03 12:06:36 +00:00
Nick Roberts ae0a7e74bf (HFILES_NO_SRCDIR): Remove entries for deleted files. 2009-06-30 22:36:27 +00:00
Jan Kratochvil 59dd3af6a2 gdb/
* Makefile.in (TARGET_FLAGS_TO_PASS): Include also FORCE_PARALLEL.
	(check//%): Construct FORCE_PARALLEL for the sub-make.  Extend the
	comment for it.

gdb/testsuite/
	Fix `make check//%' target after `make check' has been ran.
	* Makefile.in (TEST_TARGETS): Remove the %/.dir dependency.  Add
	a mkdir call.
	(check-gdb.base%): Remove the gdb.base%/.dir dependency.
	(%/.dir): Remove.
2009-06-30 21:23:38 +00:00
Ulrich Weigand 6d10c194d7 * Makefile.in (ALL_64_TARGET_OBS): Add amd64-windows-tdep.o.
(ALL_TARGET_OBS): Add moxie-tdep.o, i386-darwin-tdep.o, and
	solib-darwin.o.

	* configure.tgt: Add comment.
2009-06-29 13:10:39 +00:00
Daniel Jacobowitz edb3359dff gdb/
* NEWS: Document inlined function support.
	* Makefile.in (SFILES): Add inline-frame.c.
	(COMMON_OBS): Add inline-frame.o.
	* block.c (contained_in): Rewrite to use lexical nesting.
	(block_linkage_function): Skip inlined function blocks.
	(block_inlined_p): New.
	* block.h (struct block): Update comment.
	(block_inlined_p): New prototype.
	* blockframe.c (get_frame_block): Handle inlined functions.
	(get_frame_function): Do not use block_linkage_function.
	(block_innermost_frame): Use get_frame_block and contained_in.
	* breakpoint.c (watchpoint_check): Remove extra reinit_frame_cache.
	Skip over inlined functions.  Simplify epilogue check.
	(bpstat_check_breakpoint_conditions): Use get_stack_frame_id.
	Update comments.
	(set_momentary_breakpoint): Only accept non-inlined frames.
	(watch_command_1): Use frame_unwind_caller_pc and
	frame_unwind_caller_id instead of get_prev_frame.
	(until_break_command): Likewise.  Use get_stack_frame_id.
	* buildsym.c (end_symtab): Set SYMBOL_SYMTAB for block functions.
	* dwarf2loc.c (dwarf_expr_frame_base): Use block_linkage_function.
	* dwarf2read.c (process_die): Handle DW_TAG_inlined_subroutine.
	(read_func_scope, new_symbol): Likewise.  Handle arguments specially
	for inlined functions without call site information.
	(inherit_abstract_dies): Allow tag mismatch for inlined subroutines.
	(die_specification): Treat DW_AT_abstract_origin as a specification.
	(read_type_die): Handle DW_TAG_inlined_subroutine.
	* frame-unwind.c (frame_unwind_init): Add inline_frame_unwind.
	* frame.c (fprint_frame_id): Print inline depth.
	(fprint_frame_type): Handle INLINE_FRAME and SENTINEL_FRAME.
	(skip_inlined_frames, get_stack_frame_id): New.
	(frame_unwind_caller_id): Use skip_inlined_frames.
	(frame_id_inlined_p): New.
	(frame_id_eq): Make the logic match the comments.  Add inline_depth
	check.
	(frame_id_inner): Handle inlined functions.
	(frame_unwind_pc): New function, copied from frame_unwind_caller_pc.
	(frame_unwind_caller_pc): Use skip_inlined_frames and frame_unwind_pc.
	(get_prev_frame_1): Check for inline frames.  Split out frame
	allocation to get_prev_frame_raw.
	(get_prev_frame_raw): New function.
	(get_prev_frame): Handle inline frames.
	(get_frame_pc): Use frame_unwind_pc.
	(get_frame_address_in_block): Skip inlined frames on both sides.
	(pc_notcurrent): Delete.
	(find_frame_sal): Rewrite to handle inline call sites.  Use
	get_frame_address_in_block.
	(deprecated_update_frame_pc_hack): Make static.
	* frame.h: Update comments.
	(struct frame_id): Add inline_depth.
	(enum frame_type): Add INLINE_FRAME.
	(frame_id_inlined_p, get_stack_frame_id): New prototypes.
	* gdbthread.h (struct thread_info): Add step_stack_frame_id field.
	* infcmd.c (set_step_frame): New function.
	(step_once): Use set_step_frame.  Handle inlined functions.
	(until_next_command): Use set_step_frame.
	(finish_backward), finish_forward): Use get_stack_frame_id.
	(finish_command): Support inlined functions.
	* inferior.h (set_step_info): New prototype.
	* infrun.c (RESUME_ALL): Use minus_one_ptid.
	(clear_proceed_status): Clear step_stack_frame_id.
	(init_wait_for_inferior): Call clear_inline_frame_state.
	(init_execution_control_state): Make static.
	(set_step_info): New function.
	(init_thread_stepping_state): Do not set the symtab or line here.
	(stepped_in_from): New function.
	(handle_inferior_event): Handle inlined functions.  Use set_step_info.
	(insert_step_resume_breakpoint_at_frame): Use get_stack_frame_id.
	(struct inferior_status): Add step_stack_frame_id.
	(save_inferior_status, restore_inferior_status): Save and restore
	step_stack_frame_id.
	* inline-frame.c, inline-frame.h: New files.
	* minsyms.c (prim_record_minimal_symbol_and_info): Use XCALLOC.
	* regcache.c (regcache_write_pc): Call reinit_frame_cache.
	* s390-tdep.c (s390_prologue_frame_unwind_cache): Handle INLINE_FRAME.
	* stack.c (frame_show_address): New.
	(print_frame_info, print_frame): Use it.
	(find_frame_funname): Use get_frame_function.  Handle inlined blocks.
	(frame_info): Mark inlined functions.
	(backtrace_command_1): Use get_current_user_frame.
	(print_frame_local_vars, print_frame_label_vars): Update comments.
	(return_command): Refuse inlined functions.
	* symtab.c (lookup_symbol_aux_local): Stop at inlined function
	boundaries.
	(find_function_start_sal): Avoid inlined functions.
	(completion_list_add_fields): New function.
	(default_make_symbol_completion_list): Use it.  Use block_static_block
	and block_global_block.  Check for inlined functions.
	(skip_prologue_using_sal): Avoid line number comparison across
	inlining.
	* symtab.h (struct symbol): Add is_inlined.
	(SYMBOL_INLINED): New.
	* target.c (target_resume): Call clear_inline_frame_state.
	* valops.c (value_of_variable): Check block_inlined_p.

	gdb/doc/
	* gdb.texinfo (Debugging Optimized Code): New chapter.
	(Compiling for Debugging): Reference it.  Move some
	text to the new section.

	gdb/testsuite/
	* gdb.base/break.exp: Add an XFAIL for gcc/36748.
	* gdb.cp/annota2.exp: Accept frames-invalid in more places.
	* gdb.opt/Makefile.in (EXECUTABLES): Update.
	* gdb.opt/clobbered-registers-O2.exp: Update to GPL v3.
	* gdb.opt/inline-bt.c, gdb.opt/inline-bt.exp,
	gdb.opt/inline-cmds.c, gdb.opt/inline-cmds.exp,
	gdb.opt/inline-locals.c, gdb.opt/inline-locals.exp,
	gdb.opt/inline-markers.c: New files.
	* lib/gdb.exp (skip_inline_frame_tests): New function.
	(skip_inline_var_tests): New function.
2009-06-28 00:20:24 +00:00
Tom Tromey a6bac58e84 gdb
2009-05-27  Tom Tromey  <tromey@redhat.com>
	    Thiago Jung Bauermann  <bauerman@br.ibm.com>
	    Phil Muldoon  <pmuldoon@redhat.com>
	    Paul Pluzhnikov  <ppluzhnikov@google.com>
	    Vladimir Prus  <vladimir@codesourcery.com>

	* python/python-value.c (value_object_to_value): New function.
	* python/python-internal.h: Include frameobject.h.
	(gdbpy_children_cst, gdbpy_to_string_cst, gdbpy_display_hint_cst):
	Declare.
	(value_object_to_value): Declare.
	* printcmd.c (struct format_data) <raw>: New field.
	(last_format): Default to 0.
	(decode_format): Initialize val.raw.  Handle /r flag.
	(print_command_1): Initialize fmt.raw and opts.raw.
	(output_command): Likewise.
	(x_command): Fix initialization of fmt.format.  Initialize
	fmt.raw.
	(display_command): Initialize fmt.raw.
	(do_one_display): Set opts.raw.
	* python/python.c (gdbpy_to_string_cst, gdbpy_children_cst,
	gdbpy_display_hint_cst): New globals.
	(_initialize_python): Initialize them.  Set gdb.pretty_printers.
	* cp-valprint.c: Include python.h.
	(cp_print_value): Call apply_val_pretty_printer.
	* python/python.h (apply_val_pretty_printer): Declare.
	* stack.c (print_this_frame_argument_p): Remove.
	(print_frame_args): Compute summary flag.  Don't use
	print_this_frame_argument_p.
	* valprint.c: Include python.h.
	(user_print_options): Initialize new fields.
	(scalar_type_p): New function.
	(val_print): Handle 'raw' and 'summary' modes.  Call
	apply_val_pretty_printer.
	(value_print): Handle 'raw' mode.
	* valprint.h (struct value_print_options) <raw, summary>: New
	fields.
	* Makefile.in (SUBDIR_PYTHON_OBS): Add python-prettyprint.o
	(SUBDIR_PYTHON_SRCS): Add python-prettyprint.c.
	(python-prettyprint.o): New target.
	* python/python-prettyprint.c: New file.

gdb/doc

2009-05-27  Tom Tromey  <tromey@redhat.com>
	    Thiago Jung Bauermann  <bauerman@br.ibm.com>
	    Phil Muldoon  <pmuldoon@redhat.com>

	* gdb.texinfo (Objfiles In Python): Reference pretty printing.
	(Pretty Printing): New node.
	(Selecting Pretty-Printers): Likewise.
	(Python API): Update.
	(Output Formats): Document /r format.

gdb/testsuite

2009-05-27  Tom Tromey  <tromey@redhat.com>
	    Thiago Jung Bauermann  <bauerman@br.ibm.com>
	    Phil Muldoon  <pmuldoon@redhat.com>
	    Paul Pluzhnikov  <ppluzhnikov@google.com>

	* gdb.python/python-prettyprint.exp: New file.
	* gdb.python/python-prettyprint.c: New file.
	* gdb.python/python-prettyprint.py: New file.
	* gdb.base/display.exp: print/r is now valid.
2009-05-28 01:05:14 +00:00
Tom Tromey 2c74e83381 gdb
2009-05-27  Tom Tromey  <tromey@redhat.com>
	    Thiago Jung Bauermann  <bauerman@br.ibm.com>
	    Phil Muldoon  <pmuldoon@redhat.com>
	    Paul Pluzhnikov  <ppluzhnikov@google.com>

	* python/python.c (_initialize_python): Call
	gdbpy_initialize_types.
	(GdbMethods): Add "lookup_type".
	* python/python-value.c (value_object) <type>: New field.
	(valpy_dealloc): Decref type.
	(valpy_new): Initialize type.
	(valpy_get_type): New function.
	(value_to_value_object): Initialize type.
	(valpy_cast): New function.
	(value_object_getset): Add "type".
	(value_object_methods): Add "cast".
	* python/python-internal.h (type_to_type_object): Declare.
	(type_object_to_type): Likewise.
	(gdbpy_initialize_types): Likewise.
	(gdbpy_lookup_type): Declare.
	* Makefile.in (SUBDIR_PYTHON_OBS): Add python-type.o.
	(SUBDIR_PYTHON_SRCS): Add python-type.c.
	(python-type.o): New target.
	* python/python-type.c: New file.

gdb/doc

2009-05-27  Thiago Jung Bauermann  <bauerman@br.ibm.com>
	    Tom Tromey  <tromey@redhat.com>

	* gdb.texinfo (Types In Python): New node.
	(Values From Inferior): "type" is now an attribute.
	(Python API): Update.


gdb/testsuite

2009-05-27  Thiago Jung Bauermann  <bauerman@br.ibm.com>
	    Tom Tromey  <tromey@redhat.com>
	    Pedro Alves  <pedro@codesourcery.com>
	    Paul Pluzhnikov  <ppluzhnikov@google.com>

	* gdb.python/python-template.exp: New file.
	* gdb.python/python-template.cc: New file.
	* gdb.python/python.exp (gdb_py_test_multiple): Add two objfile
	tests.
	* gdb.python/python-value.exp (py_objfile_tests): New proc.
	Call it.
	(test_value_after_death): New proc.
	* gdb.python/python-value.c (PTR): New typedef.
	(main): New variable 'x'.
2009-05-28 00:47:20 +00:00
Tom Tromey 89c73adef9 gdb
2009-04-01  Tom Tromey  <tromey@redhat.com>
	    Thiago Jung Bauermann  <bauerman@br.ibm.com>
	    Phil Muldoon  <pmuldoon@redhat.com>

	* python/python.c: Include objfiles.h, observer.h.
	(gdbpy_auto_load): New global.
	(gdbpy_current_objfile): Likewise.
	(GDBPY_AUTO_FILENAME): New define.
	(gdbpy_new_objfile): New function.
	(gdbpy_get_current_objfile): Likewise.
	(gdbpy_objfiles): Likewise.
	(_initialize_python): Add "maint set auto-load".  Call
	gdbpy_initialize_objfile.  Attach objfile observer.
	(GdbMethods): New methods current_objfile, objfiles.
	* python/python-objfile.c: New file.
	* python/python-internal.h (objfile_to_objfile_object): Declare.
	(objfpy_get_printers): Likewise.
	(gdbpy_initialize_objfile): Likewise.
	* Makefile.in (SUBDIR_PYTHON_OBS): Add python-objfile.o.
	(SUBDIR_PYTHON_SRCS): Add python-objfile.c.
	(python-objfile.o): New target.

gdb/doc

2009-04-01  Tom Tromey  <tromey@redhat.com>
	    Thiago Jung Bauermann  <bauerman@br.ibm.com>

	* gdb.texinfo (Python API): Update.
	(Auto-loading): New node.
	(Objfiles In Python): New node.

gdb/testsuite

2009-04-06  Tom Tromey  <tromey@redhat.com>

	* gdb.python/python.exp (gdb_py_test_multiple): Add two objfile
	tests.
	* gdb.python/python-value.exp (py_objfile_tests): New proc.
	Call it.
2009-05-28 00:40:24 +00:00
Jon Beniston c28c63d86b gdb/
2009-05-18  Jon Beniston <jon@beniston.com>

        * MAINTAINERS: Add lm32 target.
        * Makefile.in: Add lm32 dependencies.
        * NEWS: Indicate lm32 is a new target.
        * configure.tgt: Add lm32 targets.
        * lm32-tdep.c: New file.

gdb/testsuite
2009-05-18  Jon Beniston <jon@beniston.com>

        * gdb.asm/asm-source.exp: Add lm32 target.

include/gdb/
2009-05-18  Jon Beniston <jon@beniston.com>

        * sim-lm32.h: New file.

sim/
2009-05-18  Jon Beniston <jon@beniston.com>

        * MAINTAINERS: Add Jon Beniston as maintainer of lm32 sim.
        * configure.ac: Add lm32 target.
        * lm32: New directory.

sim/common
2009-05-18  Jon Beniston <jon@beniston.com>

        * gennltvals.sh: Add lm32 target.
        * nltvals.def: Add lm32 syscall definitions.

sim/lm32/
2009-05-18  Jon Beniston <jon@beniston.com>

        * Makefile.in: New file.
        * arch.c: New file.
        * arch.h: New file.
        * config.in: New file.
        * configure: New file.
        * configure.ac: New file.
        * cpu.c: New file.
        * cpu.h: New file.
        * cpuall.h: New file.
        * decode.c: New file.
        * decode.h: New file.
        * dv-lm32cpu.c: New file.
        * dv-lm32timer.c: New file.
        * dv-lm32uart.c: New file.
        * lm32.c: New file.
        * lm32-sim.h: New file.
        * mloop.in: New file.
        * model.c: New file.
        * sem.c: New file.
        * sem-switch.c: New file.
        * sim-if.c: New file.
        * sim-main.c: New file.
        * tconfig.in: New file.
        * traps.c: New file.
        * user.c: New file.
2009-05-18 13:25:35 +00:00
Hui Zhu b7f6bf2299 Linux process record and replay support.
* Makefile.in (ALLDEPFILES): Add linux-record.c.
(ALL_TARGET_OBS): Add linux-record.o.
* configure.tgt (x86_64-*-linux*): Add linux-record.o.
(i[34567]86-*-linux*): Add linux-record.o.
* linux-record.c, linux-record.h: New file.
2009-04-30 03:04:28 +00:00
Hui Zhu 69d05d3898 Process record and replay target.
* Makefile.in (SFILES): Add record.c.
(COMMON_OBS): Add record.o.
* record.c, record.h: New file.
2009-04-30 02:58:37 +00:00
Eli Zaretskii 90b9b5173a * Makefile.in (ALLDEPFILES): Remove duplicate entries for
sparc-sol2-nat.c and sparc-sol2-tdep.c.
2009-04-25 10:05:22 +00:00
Andreas Schwab cfd5360553 * configure.ac: Don't postprocess Makefile in config.status.
Substitute GDB_NM_FILE.  Don't substitute nm_h.
	* Makefile.in (GDB_NM_FILE): Substitute.
	(TAGS): Use $(GDB_NM_FILE) instead of $(NAT_FILE).
	* configure: Regenerate.
	* gnulib/Makefile.in: Regenerate.
2009-04-21 20:19:13 +00:00
Joseph Myers 2b83188937 gdb:
2009-04-18  Carlos O'Donell  <carlos@codesourcery.com>

	* Makefile.in (MAKEHTML): Set to makeinfo --html.
	(MAKEHTMLFLAGS): Set to empty.

gdb/doc:
2009-04-18  Carlos O'Donell  <carlos@codesourcery.com>
            Joseph Myers  <joseph@codesourcery.com>

	* Makefile.in (MAKEHTML): Set to makeinfo --html.
	(MAKEHTMLFLAGS): Set to empty.
	(html__strip_dir): Define.
	(HTMLFILES): Define.
	(HTMLFILES_INSTALL): Define.
	(install-html): Copy new automake rule.
	(html): Depend on $(HTMLFILES).
	(gdb_toc.html): Rename to gdb/index.html.
	(gdbint_toc.html): Rename to gdbint/index.html.
	(stabs_toc.html): Rename to stabs/index.html.
	(annotate_toc.html): Rename to annotate/index.html.
2009-04-18 17:11:02 +00:00
Joseph Myers 89a34d1b2c gdb:
2009-04-17  Carlos O'Donell  <carlos@codesourcery.com>

	* configure.ac: AC_SUBST datarootdir, docdir, htmldir, pdfdir.
	* configure: Regenerate.
	* Makefile.in: Set datarootdir, docdir, htmldir, and pdfdir from
	configure substitutions.
	(FLAGS_TO_PASS): Add datarootdir, docdir, and htmldir.

gdb/doc:
2009-04-17  Carlos O'Donell  <carlos@codesourcery.com>

	* Makefile.in: Set pdfdir and htmldir from configure
	substitutions.
	* configure.ac: AC_SUBST datarootdir, docdir, htmldir, pdfdir.
	* configure: Regenerate.

readline:
2009-04-17  Carlos O'Donell  <carlos@codesourcery.com>

	* Makefile.in: Add html target.  Add dummy install-html and
	install-pdf targets.

sim:
2009-04-17  Carlos O'Donell  <carlos@codesourcery.com>

	* Makefile.in: Add dummy install-pdf, html, and
	install-html targets.
2009-04-17 17:44:05 +00:00
Thiago Jung Bauermann f8f6f20b6e gdb/
Expose frames to Python.
	* Makefile.in (SUBDIR_PYTHON_OBS): Add python-frame.o.
	(SUBDIR_PYTHON_SRCS): Add python-frame.c.
	(python-frame.o): New target.
	* python/python-frame.c: New file.
	* python/python-internal.h (gdbpy_frames, gdbpy_newest_frame,
	gdbpy_frame_stop_reason_string, gdbpy_selected_frame,
	gdbpy_initialize_frames): New prototypes.
	* python/python.c (_initialize_python): Call gdbpy_initialize_frames.
	(GdbMethods): Add `selected_frame' and `frame_stop_reason_string'
	entries.
	* stack.c (find_frame_funname): New function, factored out of
	print_frame.
	(print_frame): Call find_frame_funname.
	* stack.h (find_frame_funname): Add prototype.

gdb/doc/
	* gdb.texinfo (Frames in Python): New node.
	(Python API): Update.

gdb/testsuite/
	* gdb.python/python-frame.c: New file.
	* gdb.python/python-frame.exp: New file.
2009-03-30 19:54:33 +00:00
Tom Tromey fc3b640d97 2009-03-24 Tom Tromey <tromey@redhat.com>
Pedro Alves  <pedro@codesourcery.com>

	* configure, config.in: Rebuild.
	* configure.ac: Check for libiconvlist.
	* charset.c: Check HAVE_LIBICONVLIST.
	* acinclude.m4 (AM_ICONV): Don't subst LIBICONV, LIBICONV_INCLUDE,
	LIBICONV_LIBDIR.  Update CPPFLAGS and LIBS.
	* Makefile.in (LIBICONV, LIBICONV_INCLUDE, LIBICONV_LIBDIR):
	Remove.
	(INTERNAL_CFLAGS_BASE): Update.
	(INTERNAL_LDFLAGS): Update.
	(CLIBS): Update.
2009-03-25 00:58:37 +00:00
Joel Brobecker dcb626be9b * gdb_usleep.h, gdb_usleep.c: New files.
* Makefile.in (SFILES): Add gdb_usleep.c.
            (HFILES_NO_SRCDIR): Add gdb_usleep.h.
            (COMMON_OBS): Add gdb_usleep.o.
            * ser-unix.c (hardwire_send_break): Replace call to gdb_select
            by call to gdb_usleep.
2009-03-24 01:37:48 +00:00
Thiago Jung Bauermann bc3b79fd1a gdb/
2009-03-05  Tom Tromey  <tromey@redhat.com>

	Add support for convenience functions in Python.
	* Makefile.in (SUBDIR_PYTHON_OBS): Add python-function.o.
	(SUBDIR_PYTHON_SRCS): Add python-function.c.
	(python-function.o): New target.
	* eval.c: Include "python/python.h" and <ctype.h>.
	(evaluate_subexp_standard): Handle values of type
	TYPE_CODE_INTERNAL_FUNCTION.
	* gdbtypes.h (type_code): Add TYPE_CODE_INTERNAL_FUNCTION.
	* parse.c (write_exp_string): Remove duplicate word in comment.
	* python/python-function.c: New file.
	* python/python-internal.h (gdbpy_initialize_functions): Add
	prototype.
	* python/python.c (_initialize_python): Call
	gdbpy_initialize_functions.
	* valprint.c (value_check_printable): Handle values of type
	TYPE_CODE_INTERNAL_FUNCTION.
	* value.c: Include "cli/cli-decode.h".
	(internal_function): New struct.
	(functionlist, internal_fn_type): New static variables.
	(lookup_only_internalvar,
	lookup_internalvar): Add const qualifier to name argument.
	(create_internalvar): Likewise.  Initialize new field.
	(set_internal_var): Fix typo in comment.  Don't allow assignment
	to canonical variable.
	(value_create_internal_function, value_internal_function_name,
	call_internal_function, function_command, function_destroyer,
	add_internal_function): New functions.
	(_initialize_values): Create `function' placeholder command.
	Initialize internal_fn_type.
	* value.h (lookup_only_internalvar, create_internalvar,
	lookup_internalvar): Add const qualifier to name argument.
	(internal_function_fn, add_internal_function, call_internal_function,
	value_internal_function_name): Add prototypes.
	(struct internalvar) <canonical>: New field.

gdb/doc/
2008-03-05  Tom Tromey  <tromey@redhat.com>

	* gdb.texinfo (Convenience Vars): Document convenience functions.
	(Functions In Python): New node.
	(Python API): Update.

gdb/testsuite/
2009-03-05  Thiago Jung Bauermann  <bauerman@br.ibm.com>

	* gdb.python/python-function.exp: New file.
2009-03-21 03:03:56 +00:00
Tom Tromey 6c7a06a3fa gdb:
2009-03-19  Tom Tromey  <tromey@redhat.com>
	    Julian Brown  <julian@codesourcery.com>

	PR i18n/7220, PR i18n/7821, PR exp/8815, PR exp/9103,
	PR i18n/9401, PR exp/9613:
	* NEWS: Update
	* value.h (value_typed_string): Declare.
	(val_print_string): Update.
	* valprint.h (print_char_chars): Update.
	* valprint.c (print_char_chars): Add type argument.  Update.
	(val_print_string): Likewise.
	* valops.c (value_typed_string): New function.
	* utils.c (host_char_to_target): New function.
	(parse_escape): Use host_char_to_target, host_hex_value.  Update.
	Remove '^' case.
	(no_control_char_error): Remove.
	* typeprint.c (print_type_scalar): Update.
	* scm-valprint.c (scm_scmval_print): Update.
	* scm-lang.h (scm_printchar, scm_printstr): Update.
	* scm-lang.c (scm_printchar): Add type argument.
	(scm_printstr): Likewise.
	* printcmd.c (print_formatted): Update.
	(print_scalar_formatted): Update.
	(printf_command) <wide_string_arg, wide_char_arg>: New constants.
	Handle '%lc' and '%ls'.
	* parser-defs.h (struct typed_stoken): New type.
	(struct stoken_vector): Likewise.
	(write_exp_string_vector): Declare.
	* parse.c (write_exp_string_vector): New function.
	* p-valprint.c (pascal_val_print): Update.
	* p-lang.h (is_pascal_string_type, pascal_printchar,
	pascal_printstr): Update.
	* p-lang.c (is_pascal_string_type): Remove 'char_size' argument.
	Add 'char_type' argument.
	(pascal_emit_char): Add type argument.
	(pascal_printchar): Likewise.
	(pascal_printstr): Likewise.
	* objc-lang.c (objc_emit_char): Add type argument.
	(objc_printchar): Likewise.
	(objc_printstr): Likewise.
	* macroexp.c (get_character_constant): Handle unicode characters.
	Use c_parse_escape.
	(get_string_literal): Handle unicode strings.  Use
	c_parse_escape.
	* m2-valprint.c (print_unpacked_pointer): Update.
	(m2_print_array_contents): Update.
	(m2_val_print): Update.
	* m2-lang.c (m2_emit_char): Add type argument.
	(m2_printchar): Likewise.
	(m2_printstr): Likewise.
	* language.h (struct language_defn) <la_printchar>: Add type
	argument.
	<la_printstr, la_emitchar>: Likewise.
	(LA_PRINT_CHAR): Likewise.
	(LA_PRINT_STRING): Likewise.
	(LA_EMIT_CHAR): Likewise.
	* language.c (unk_lang_emit_char): Add type argument.
	(unk_lang_printchar): Likewise.
	(unk_lang_printstr): Likewise.
	* jv-valprint.c (java_val_print): Update.
	* jv-lang.c (java_emit_char): Add type argument.
	* f-valprint.c (f_val_print): Update.
	* f-lang.c (f_emit_char): Add type argument.
	(f_printchar): Likewise.
	(f_printstr): Likewise.
	* expprint.c (print_subexp_standard): Update.
	* charset.h (target_wide_charset): Declare.
	(c_target_char_has_backslash_escape, c_parse_backslash,
	host_char_print_literally, host_char_to_target,
	target_char_to_host, target_char_to_control_char): Remove.
	(enum transliterations): New type.
	(convert_between_encodings): Declare.
	(HOST_ESCAPE_CHAR): New define.
	(host_letter_to_control_character, host_hex_value): Declare.
	(enum wchar_iterate_result): New enum.
	(struct wchar_iterator): Declare.
	(make_wchar_iterator, make_cleanup_wchar_iterator, wchar_iterator,
	wchar_push_back): Declare.
	* charset-list.h: New file.
	* c-valprint.c (textual_name): New function.
	(textual_element_type): Handle wide character types.
	(c_val_print): Pass original type to textual_element_type.  Handle
	wide character types.
	(c_value_print): Use textual_element_type.  Pass original type of
	value to val_print.
	* c-lang.h (enum c_string_type): New type.
	(c_printchar, c_printstr): Update.
	* c-lang.c (classify_type): New function.
	(print_wchar): Likewise.
	(c_emit_char): Add type argument.  Handle wide characters.
	(c_printchar): Likewise.
	(c_printstr): Add type argument.  Handle wide and multibyte
	character sets.
	(convert_ucn): New function.
	(emit_numeric_character): Likewise.
	(convert_octal): Likewise.
	(convert_hex): Likewise.
	(ADVANCE): New macro.
	(convert_escape): New function.
	(parse_one_string): Likewise.
	(evaluate_subexp_c): Likewise.
	(exp_descriptor_c): New global.
	(c_language_defn): Use exp_descriptor_c.
	(cplus_language_defn): Likewise.
	(asm_language_defn): Likewise.
	(minimal_language_defn): Likewise.
	(charset_for_string_type): New function.
	* c-exp.y (%union): Add 'svec' and 'tsval'.
	(CHAR): New token.
	(exp): Add CHAR production.
	(string_exp): Rewrite.
	(exp) <string_exp>: Rewrite.
	(tempbuf): Now global.
	(tempbuf_init): New global.
	(parse_string_or_char): New function.
	(yylex) <tempbuf>: Now global.
	<tokptr, tempbufindex, tempbufsize, token_string, class_prefix>:
	Remove.
	Handle 'u', 'U', and 'L' prefixes.  Call parse_string_or_char.
	(c_parse_escape): New function.
	* auxv.c (fprint_target_auxv): Update.
	* ada-valprint.c (ada_emit_char): Add type argument.
	(ada_printchar): Likewise.
	(ada_print_scalar): Update.
	(printstr): Add type argument.  Update calls to ada_emit_char.
	(ada_printstr): Add type argument.
	(ada_val_print_array): Update.
	(ada_val_print_1): Likewise.
	* ada-lang.c (emit_char): Add type argument.
	* ada-lang.h (ada_emit_char, ada_printchar, ada_printstr): Add
	type arguments.
	* gdb_locale.h: Include langinfo.h.
	* charset.c (_initialize_charset): Set default host charset from
	the locale.  Don't register charsets.  Add target-wide-charset
	commands.  Call find_charset_names.
	(struct charset, struct translation): Remove.
	(GDB_DEFAULT_HOST_CHARSET): Remove.
	(GDB_DEFAULT_TARGET_WIDE_CHARSET): New define.
	(target_wide_charset_name): New global.
	(show_host_charset_name): Handle "auto".
	(show_target_wide_charset_name): New function.
	(host_charset_enum, target_charset_enum): Remove.
	(charset_enum): New global.
	(all_charsets, register_charset, lookup_charset, all_translations,
	register_translation, lookup_translation): Remove.
	(simple_charset, ascii_print_literally, ascii_to_control): Remove.
	(iso_8859_print_literally, iso_8859_to_control,
	iso_8859_family_charset): Remove.
	(ebcdic_print_literally, ebcdic_to_control,
	ebcdic_family_charset): Remove.
	(struct cached_iconv, check_iconv_cache, cached_iconv_convert,
	register_iconv_charsets): Remove.
	(target_wide_charset_be_name, target_wide_charset_le_name): New
	globals.
	(identity_either_char_to_other): Remove.
	(set_be_le_names, validate): New functions.
	(backslashable, backslashed, represented): Remove.
	(default_c_target_char_has_backslash_escape): Remove.
	(default_c_parse_backslash, iconv_convert): Remove.
	(ascii_to_iso_8859_1_table, ascii_to_ebcdic_us_table,
	ascii_to_ibm1047_table, iso_8859_1_to_ascii_table,
	iso_8859_1_to_ebcdic_us_table, iso_8859_1_to_ibm1047_table,
	ebcdic_us_to_ascii_table, ebcdic_us_to_iso_8859_1_table,
	ebcdic_us_to_ibm1047_table, ibm1047_to_ascii_table,
	ibm1047_to_iso_8859_1_table, ibm1047_to_ebcdic_us_table): Remove.
	(table_convert_char, table_translation, simple_table_translation):
	Remove.
	(current_host_charset, current_target_charset,
	c_target_char_has_backslash_escape_func,
	c_target_char_has_backslash_escape_baton): Remove.
	(c_parse_backslash_func, c_parse_backslash_baton): Remove.
	(host_char_to_target_func, host_char_to_target_baton): Remove.
	(target_char_to_host_func, target_char_to_host_baton): Remove.
	(cached_iconv_host_to_target, cached_iconv_target_to_host):
	Remove.
	(lookup_charset_or_error, check_valid_host_charset): Remove.
	(set_host_and_target_charsets): Remove.
	(set_host_charset, set_target_charset): Remove.
	(set_host_charset_sfunc, set_target_charset_sfunc): Rewrite.
	(set_target_wide_charset_sfunc): New function.
	(show_charset): Print target wide character set.
	(host_charset, target_charset): Rewrite.
	(target_wide_charset): New function.
	(c_target_char_has_backslash_escape): Remove.
	(c_parse_backslash): Remove.
	(host_letter_to_control_character): New function.
	(host_char_print_literally): Remove.
	(host_hex_value): New function.
	(target_char_to_control_char): Remove.
	(cleanup_iconv): New function.
	(convert_between_encodings): New function.
	(target_char_to_host): Remove.
	(struct wchar_iterator): Define.
	(make_wchar_iterator, make_cleanup_wchar_iterator, wchar_iterator,
	wchar_push_back): New functions.
	(do_cleanup_iterator): New function.
	(char_ptr): New typedef.
	(charsets): New global.
	(add_one, find_charset_names): New functions.
	(default_charset_names): New global.
	(auto_host_charset_name): Likewise.
	* aclocal.m4, config.in, configure: Rebuild.
	* configure.ac: Call AM_LANGINFO_CODESET.
	(GDB_DEFAULT_HOST_CHARSET): Default to UTF-8.
	(AM_ICONV): Invoke earlier.
	* acinclude.m4: Include codeset.m4.  Subst LIBICONV_INCLUDE and
	LIBICONV_LIBDIR.  Check for libiconv in build tree.
	* Makefile.in (LIBICONV_LIBDIR, LIBICONV_INCLUDE): New macros.
	(INTERNAL_CFLAGS_BASE): Add LIBICONV_INCLUDE.
	(INTERNAL_LDFLAGS): Add LIBICONV_LIBDIR.
	* gdb_obstack.h (obstack_grow_wstr): New define.
        * gdb_wchar.h: New file.
        * defs.h: Include it.
gdb/testsuite:
	* gdb.base/store.exp: Update for change to escape output.
	* gdb.base/callfuncs.exp (fetch_all_registers): Update for change
	to escape output.
	* gdb.base/pointers.exp: Update for change to escape output.
	* gdb.base/long_long.exp (gdb_test_long_long): Update for change
	to escape output.
	* gdb.base/constvars.exp (do_constvar_tests): Update for change to
	escape output.
	* gdb.base/call-rt-st.exp (print_struct_call): Update for change
	to escape output.
	* gdb.cp/ref-types.exp (gdb_start_again): Update for change to
	escape output.
	* gdb.base/setvar.exp: Update for change to escape output.
	* lib/gdb.exp (default_gdb_start): Set LC_CTYPE to C.
	* gdb.base/printcmds.exp (test_print_all_chars): Update for change
	to escape output.
	(test_print_string_constants): Likewise.
	* gdb.base/charset.exp (valid_host_charset): Check size of
	wchar_t.  Handle UCS-2 and UCS-4.  Add tests for wide and unicode
	cases.  Handle "auto"-related output.
	* gdb.base/charset.c (char16_t, char32_t): New typedefs.
	(uvar, Uvar): New globals.
gdb/doc:
	* gdb.texinfo (Character Sets): Remove obsolete text.  Document
	set target-wide-charset.
	(Requirements): Mention iconv.
2009-03-20 23:04:40 +00:00
Nathan Sidwell 5b1ba0e546 * Makefile.in: Update license to GPLv3.
* ada-exp.y: Update license to GPLv3.
	* ada-lex.l: Update license to GPLv3.
	* c-exp.y: Update license to GPLv3.
	* cp-name-parser.y: Update license to GPLv3.
	* darwin-nat-info.c: Update license to GPLv3.
	* f-exp.y: Update license to GPLv3.
	* gdb_thread_db.h: Update license to GPLv3.
	* hppanbsd-nat.c: Update license to GPLv3.
	* hppanbsd-tdep.c: Update license to GPLv3.
	* hppaobsd-tdep.c: Update license to GPLv3.
	* jv-exp.y: Update license to GPLv3.
	* m2-exp.y: Update license to GPLv3.
	* objc-exp.y: Update license to GPLv3.
	* p-exp.y: Update license to GPLv3.
	* reply_mig_hack.awk: Update license to GPLv3.
	* reverse.c: Update license to GPLv3.
	* xtensa-xtregs.c: Update license to GPLv3.
2009-03-18 08:51:11 +00:00
Doug Evans 3c54f1401b * Makefile.in (clean): rm -f $(DEPDIR)/*. 2009-03-02 01:27:35 +00:00
Doug Evans 2aecd87f56 * Makefile.in (GDB_CFLAGS): Add -I$(srcdir)/common.
(init.c): signals/ -> common/.
	(signals.o): Update.
	* target.h (target_signal_to_string,target_signal_to_string)
	(target_signal_from_name,target_signal_to_host_p)
	(target_signal_from_host,target_signal_to_host): Move to ...
	* common/gdb_signals.h: ... here.  New file.
	* common/signals.c: Moved here from signals/signals.c.
	#include gdb_signals.h, remove #include of target.h in gdb case.
	(target_signal_from_command,default_target_signal_to_host)
	(default_target_signal_from_host): Move inside #ifndef GDBSERVER.

	* gdbserver/Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
	(server_h): Add gdb_signals.h.
	(signals.o): Update.
	* server.h (target_signal_from_host,target_signal_to_host_p)
	(target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
2009-03-02 00:45:13 +00:00
Pedro Alves 4c1d29734e * Makefile.in (ALL_64_TARGET_OBS): Add amd64-dicos-tdep.o.
(ALL_TARGET_OBS): Add dicos-tdep.o.
	(ALLDEPFILES): Add amd64-dicos-tdep.c and dicos-tdep.c.
	* configure.tgt (i[34567]86-*-dicos*): Add dicos-tdep.o to
	gdb_target_obs.
	(x86_64-*-dicos*): Add dicos-tdep.o and amd64-dicos-tdep.o to
	gdb_target_obs.
	* dicos-tdep.h, dicos-tdep.c: New.
	* amd64-dicos-tdep.c: New.
	* i386-dicos-tdep.c: Don't include solib.h, solib-target.h or
	inferior.h.  Include dicos-tdep.h.
	(i386_dicos_init_abi): Call dicos_init_abi.
	(i386_dicos_bfd_has_symbol_p): Delete.
	(i386_dicos_osabi_sniffer): Use dicos_load_module_p.

	* NEWS: Mention x86-64 DICOS target support.
2009-02-17 17:56:50 +00:00
Pedro Alves 4aa995e123 2009-02-06 Pedro Alves <pedro@codesourcery.com>
gdb/
	* target.h (enum target_object): Add new TARGET_OBJECT_SIGNAL_INFO.
	* infrun.c (siginfo_value_read, siginfo_value_write): New.
	(siginfo_value_funcs): New.
	(siginfo_make_value): New.
	(_initialize_infrun): Create the $_siginfo convenience variable.
	* gdbtypes.h (append_composite_type_field_aligned): Declare.
	* gdbtypes.c (append_composite_type_field): Rename to...
	(append_composite_type_field_aligned): ... this.  Add ALIGNMENT
	argument.  Handle it.
	(append_composite_type_field): Rewrite on top of
	append_composite_type_field_aligned.
	* value.h (internalvar_make_value): New typedef.
	(struct internalvar) <make_value>: New field.
	(create_internalvar_type_lazy): Declare.
	* value.c (create_internalvar): Clear make_value.
	(create_internalvar_type_lazy): New.
	(value_of_internalvar): If make_value is set use it.
	(preserve_values): Skip internal variables that don't have a
	value.
	* gdbarch.sh (get_siginfo_type): New.
	* gdbarch.h, gdbarch.c: Regenerate.

	* linux-tdep.h, linux-tdep.c: New.
	* amd64-linux-tdep.c: Include "linux-tdep.h".
	(amd64_linux_init_abi): Register linux_get_siginfo_type and
	linux_get_siginfo_mapper.
	* i386-linux-tdep.c: Include "linux-tdep.h".
	(i386_linux_init_abi): Register linux_get_siginfo_type and
	linux_get_siginfo_mapper.
	* arm-linux-tdep.c: Include "linux-tdep.h".
	(i386_linux_init_abi): Register linux_get_siginfo_type and
	linux_get_siginfo_mapper.

	* linux-nat.c (linux_xfer_siginfo): New.
	(linux_nat_xfer_partial): Handle TARGET_OBJECT_SIGNAL_INFO.
	* remote.c (PACKET_qXfer_siginfo_read)
	(PACKET_qXfer_siginfo_write): New.
	(feature remote_protocol_features): Add "qXfer:siginfo:read" and
	"qXfer:siginfo:write" features.
	(remote_xfer_partial): Handle TARGET_OBJECT_SIGNAL_INFO.
	(_initialize_remote): Add "set/show remote read-siginfo-object"
	and "set/show remote write-siginfo-object" commands.

	* Makefile.in (ALL_TARGET_OBS): Add linux-tdep.o.
	(HFILES_NO_SRCDIR): Add linux-tdep.h.
	(ALLDEPFILES): Add linux-tdep.c.

	* configure.tgt (arm*-*-linux* | arm*-*-uclinux*)
	(i[34567]86-*-linux*, x86_64-*-linux*): Add linux-tdep.o to
	gdb_target_obs.

2009-02-06  Pedro Alves  <pedro@codesourcery.com>

	gdb/gdbserver/
	* server.c (handle_query): Report qXfer:siginfo:read and
	qXfer:siginfo:write as supported and handle them.
	* target.h (struct target_ops) <qxfer_siginfo>: New field.
	* linux-low.c (linux_xfer_siginfo): New.
	(linux_target_ops): Set it.

2009-02-06  Pedro Alves  <pedro@codesourcery.com>

	gdb/doc/
	* gdb.texinfo (Signals): Document $_siginfo.
	(Convenience Variables): Mention $_siginfo.
	(Remote Configuration): Document qXfer:siginfo:read,
	qXfer:siginfo:write packets, and the read-siginfo-object,
	write-siginfo-object commands.

2009-02-06  Pedro Alves  <pedro@codesourcery.com>

	gdb/testsuite/
	* gdb.base/siginfo-obj.c, gdb.base/siginfo-obj.exp: New.
2009-02-06 22:59:01 +00:00
Thiago Jung Bauermann d8906c6f0e gdb/
2009-02-06  Tom Tromey  <tromey@redhat.com>

	* Makefile.in (SUBDIR_PYTHON_OBS): Add python-cmd.o.
	(SUBDIR_PYTHON_SRCS): Add python-cmd.c.
	(python-cmd.o): New target.
	* cli/cli-decode.c (set_cmd_completer): Add self parameter to
	completer prototype.
	(add_cmd): Initialize destroyer member of cmd_list_element. Use
	make_symbol_completion_list_fn as completer.
	(delete_cmd): Call destroyer if one is set.
	* cli/cli-decode.h (cmd_list_element): Add cmd parameter to
	completer member.  Add destroyer member.
	(set_cmd_completer): Add self parameter to
	completer prototype.
	* command.h (set_cmd_completer): Add cmd parameter to
	completer prototype.
	* completer.c (noop_completer, filename_completer,
	location_completer, expression_completer, command_completer): Adapt
	to new completer prototype.
	(complete_line_internal): Pass new parameter to completer function.
	* completer.h (noop_completer, filename_completer,
	location_completer, expression_completer, command_completer): Adapt
	prototypes to new completer prototype.
	* interps.c (interpreter_completer): Adapt to new completer
	prototype.
	* python/python-cmd.c: New file.
	* python/python-internal.h (gdbpy_initialize_commands): Add
	prototype.
	(gdbpy_doc_cst): Add forward declaration.
	* python/python.c (gdbpy_doc_cst): Declare.
	(_initialize_python): Call gdbpy_initialize_commands.  Initialize
	gdbpy_doc_cst.
	* symtab.c (make_symbol_completion_list_fn): New function.
	* symtab.h (make_symbol_completion_list_fn): Add prototype.

gdb/doc/
2009-02-06  Tom Tromey  <tromey@redhat.com>

	* gdb.texinfo (Python API): Add entry for Commands In Python.
	(Commands In Python): New node.

gdb/testsuite/
2009-02-06  Thiago Jung Bauermann  <bauerman@br.ibm.com>

	* gdb.python/python-cmd.exp: New file.
2009-02-06 21:33:59 +00:00
Tom Tromey 5abdf4bdf2 * Makefile.in (HFILES_NO_SRCDIR): Remove i386-cygwin-tdep.h. 2009-01-30 22:14:52 +00:00
Christopher Faylor 31b060a20f Fix linking with --enable-targets=all:
* Makefile.in (ALL_TARGET_OBS): Add windows-tdep.o.
(HFILES_NO_SRCDIR): Add windows-tdep.h.
(ALLDEPFILES): Add windows-tdep.c.
* win32-tdep.h: Delete.
* windows-tdep.h: Rename from win32-tdep.h.
* win32-nat.h: Delete.
* windows-nat.h: Rename from win32-nat.h.
* win32-nat.c: Delete.
* windows-nat.c: Rename from win32-nat.c.
* win32-termcap.c: Delete.
* windows-termcap.c: Rename from win32-termcap.c.
* amd64-windows-nat.c: Handle rename from win32-nat.h -> windows-nat.h.
* configure.ac: Handle rename from win32-termcap.c -> windows-termcap.c.
* configure: Regenerate.
* gdb_curses.h: Change comment to reflect rename from win32-termcap.c ->
windows-termcap.c.
* i386-cygwin-tdep.c: Handle rename from win32-tdep.h -> windows-tdep.h.
* i386-windows-nat.c: Refect rename from win32-nat.h -> windows-nat.h.
* windows-nat.c: Ditto.  Also reflect rename from from win32-tdep.h ->
windows-tdep.h.
(win32_make_so): Handle cygwin compiler warning due to change of load_addr from
DWORD to LPVOID.
(handle_load_dll): Use %p in format string to properly print address and avoid
a compiler warning.
(DEBUG_EXCEPTION_SIMPLE): Ditto.
(handle_exception): Ditto.
* windows-tdep.c: Handle rename from win32-tdep.h -> windows-tdep.h.
* config/i386/cygwin.mh: Handle rename from win32-nat.o -> windows-nat.o.
* config/i386/mingw.mh: Ditto.
* config/i386/mingw64.mh: Ditto.
2009-01-12 01:10:28 +00:00
Andreas Schwab 25fc659104 * Makefile.in (init.c): Set LANG/LC_ALL to C, not c. 2009-01-09 21:15:10 +00:00
Joel Brobecker 0fb0cc7590 Updated copyright notices for most files. 2009-01-03 05:58:08 +00:00
Vladimir Prus 07e059b5a9 Implement -list-thread-groups --available
* Makefile.in (XMLFILES): Add osdata.dtd.
        (SFILES): Add osdata.c.
        (COMMON_OBS): Add osdata.o.
        * linux-nat.c: Include pwd.h, sys/types.h, gdb_dirent.h and xml-support.h.
        (linux_nat_xfer_osdata): New function.
        (linux_xfer_partial): Handle TARGET_OBJECT_OSDATA.
        * osdata.c: New file.
        * osdata.h: New file.
        * remote.c (PACKET_qXfer_osdata): New packet enum.
        (remote_protocol_features): Add "qXfer:osdata:read".
        (remote_read_qxfer): Handle TARGET_OBJECT_OSDATA.
        (extended_remote_can_run): New.
        (init_extended_remote_ops): Set to_can_run to
        extended_remote_can_run.
        (_initialize_remote): Add packet config command for
        "qXfer:osdata:read".
        * xml-support.c (obstack_xml_printf): New function.
        * xml-support.h (obstack_xml_printf): Declare.
        * target.c (target_get_osdata): New function.
        * target.h (enum target_object): Add TARGET_OBJECT_OSDATA.
        (target_os_data): Declare.
        * features/osdata.dtd: New file.
        * mi/mi-main.c (mi_list_thread_groups): Handle the --available
        option.
2008-12-02 07:57:38 +00:00
Tom Tromey f154cae1fd * Makefile.in (SUBDIR_CLI_OBS): Don't mention cli-utils.o.
(SUBDIR_CLI_DEPS): Don't mention cli-utils.c.
	(HFILES_NO_SRCDIR): Don't mention cli-utils.h.
	(cli-utils.o): Remove.
	* cli/cli-utils.c: Remove.
	* cli/cli-utils.h: Remove.
2008-10-28 20:50:18 +00:00
Pedro Alves 676e87b308 * Makefile.in (.y.c, .l.c): sed free to xfree. 2008-10-27 11:46:24 +00:00
Pedro Alves f0323ca003 gdb/
* Makefile.in (INSTALLED_LIBS, CLIBS): Remove reference to
	$(TM_CLIBS).
	(CDEPS): Remove reference to $(TM_CDEPS).

gdb/doc/
	* gdbint.texinfo (Adding a New Target): Don't mention TDEPFILES,
	.mt files, TM_CLIBS or TM_CDEPS.
	(x86 Watchpoints): Don't mention TDEPFILES.
2008-10-27 11:37:40 +00:00
Joel Brobecker 0ef643c89c * target.h (struct target_ops): Add new field to_get_ada_task_ptid.
(target_get_ada_task_ptid): New macro.
        * target.c (default_get_ada_task_ptid): New function.
        (update_current_target): Inherit field default_get_ada_task_ptid.
        (update_current_target): Make default_get_ada_task_ptid the default
        value for field to_get_ada_task_ptid.
        * ada-lang.h (struct task_control_block): Delete. Never used.
        (struct task_ptid, task_ptid_t, struct task_entry, task_list):
        Likewise.
        (struct ada_task_info): New.
        (ada_task_is_alive, ada_find_printable_frame)
        (ada_task_list_iterator_ftype, iterate_over_live_ada_tasks): Add
        declarations.
        (ada_build_task_list): Update prototype.
        (init_task_list, ada_is_exception_breakpoint): Remove prototypes.
        * ada-lang.c (ada_find_printable_frame): Make non-static.
        * ada-tasks.c: New file.
        * Makefile.in (SFILES): Add ada-tasks.c.
        (COMMON_OBS): Add ada-tasks.o.
        * linux-thread-db.c (thread_db_find_thread_from_tid)
        (thread_db_get_ada_task_ptid): New functions.
        (init_thread_db_ops): Set thread_db_ops.to_get_ada_task_ptid.
2008-10-22 19:45:05 +00:00
Michael Snyder b2175913c5 2008-10-17 Michael Snyder <msnyder@vmware.com>
Target interface for reverse debugging.
	* target.h (enum target_waitkind):
	Add new wait event, TARGET_WAITKIND_NO_HISTORY.
	(struct target_ops): New method to_can_execute_reverse.
	(target_can_execute_reverse): New macro.
	* target.c (update_current_target): Inherit to_can_execute_reverse.

	Remote interface for reverse debugging.
	* remote.c (remote_can_execute_reverse): New target method.
	(remote_resume): Check for reverse exec direction, and send
	appropriate command to target.
	(remote_wait_as): Check target response for NO_HISTORY status.
	Also check for empty reply (target doesn't understand "bs" or "bc).
	(remote_vcont_resume): Jump out if attempting reverse execution.

	Event handling interface for reverse debugging.
	* infrun.c (execution_direction): New state variable.
	(enum inferior_stop_reason): Add NO_HISTORY reason.
	(handle_inferior_event): Handle TARGET_WAITKIND_NO_HISTORY.
	Handle stepping over a function call in reverse.
	Handle stepping thru a line range in reverse.
	Handle setting a step-resume breakpoint in reverse.
	Handle stepping into a function in reverse.
	Handle stepping between line ranges in reverse.
	(print_stop_reason): Print reason for NO_HISTORY.
	(step_into_function): Rename to handle_step_into_function.
	(handle_step_into_function_backward): New function.
	(set_exec_direction_func, show_exec_direction_func): New funcs.
	(proceed): No need to singlestep over a breakpoint
	when resuming in reverse.

	* inferior.h (enum exec_direction_kind): New enum.
	(execution_direction): Export new execution state variable.

	* breakpoint.c (make_breakpoint_silent): New function.
	* breakpoint.h (make_breakpoint_silent): Export.
	* infcmd.c (finish_command): Check for reverse exec direction.
	(finish_backward): New function, handle finish cmd in reverse.

	User interface for reverse execution.
	* Makefile.in (reverse.c): New file.
	* reverse.c: New file.  User interface for reverse execution.
2008-10-17 19:43:47 +00:00
Thiago Jung Bauermann a08702d647 2008-10-16 Thiago Jung Bauermann <bauerman@br.ibm.com>
Tom Tromey  <tromey@redhat.com>

gdb/
	* Makefile.in (SUBDIR_PYTHON_OBS): Add python-value.o.
	(SUBDIR_PYTHON_SRCS): Add python-value.c.
	(python-value.o): New target.
	* configure.ac (CONFIG_OBS): Add python-value.o.
	(CONFIG_SRCS): Add python/python-value.c
	* configure: Regenerate.
	* python-internal.h (value_object_type): Add external declaration.
	(gdbpy_get_value_from_history, value_to_value_object,
	convert_value_from_python, gdbpy_initialize_values): Add function
	prototype.
	* python/python-value.c: New file.
	* python/python.c (GdbMethods): Add gdbpy_get_value_from_history.
	(_initialize_python): Call gdbpy_initialize_values.
	* python/python.h (values_in_python): Add external declaration.
	* value.c (value_prepend_to_list, value_remove_from_list): New
	functions.
	(preserve_values): Iterate over values_in_python list as well.
	* value.h (value_prepend_to_list, value_remove_from_list): Add
	function prototypes.

gdb/doc/
	* gdb.texinfo. (Values From Inferior): New subsubsection.

gdb/testsuite/
	* gdb.python/python-value.c: New file.
	* gdb.python/python-value.exp: New file.
2008-10-16 03:54:00 +00:00
Thomas Schwinge d11d9deb00 2008-10-09 Thomas Schwinge <tschwinge@gnu.org>
* Makefile.in (gnu-nat.o): Revert the 2008-09-10 change, as the problem
	is fixed upstream.
2008-10-09 16:06:22 +00:00
Pedro Alves 0b62613e31 2008-10-09 Pedro Alves <pedro@codesourcery.com>
Make it compile without warnings.

	* procfs.c (create_procinfo): Initialize `parent'.
	(dead_procinfo): Pass a constant string as format to error.
	(procfs_address_to_host_pointer): Add cast to gdb_type *.
	(procfs_find_LDT_entry): Adjust format string to long int
	ptid.tid.
	(procfs_xfer_partial): Adjust prototype.  Add gdb_byte* cast.
	(procfs_xfer_memory): Adjust prototype.
	(info_mappings_callback, info_proc_mappings): Adjust to not pass a
	variable as printf_filtered format.
	(procfs_make_note_section): Change type of auxv local to gdb_byte.
	* Makefile.in: Remove special rule.
2008-10-09 13:49:13 +00:00
Tom Tromey 40debb5a97 * Makefile.in (HFILES_NO_SRCDIR): Remove gdb-events.h, gstdint.h. 2008-10-02 17:39:08 +00:00
Pedro Alves b77209e000 gdb/
* inferior.h: Forward declare struct ui_out.
	Forward declare struct private_inferior.
	(struct inferior): New.
	(init_inferior_list, add_inferior, add_inferior_silent)
	(delete_inferior, delete_inferior_silent, detach_inferior)
	(gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
	(valid_inferior_id, find_inferior_pid): New functions.
	(inferior_callback_func): New typedef.
	(iterate_over_inferiors, print_inferior, have_inferiors)
	(current_inferior): New functions.
	* inferior.c: New file.

	* Makefile.in (SFILES): Add inferior.c.
	(COMMON_OBS): Add inferior.o.

gdb/doc/
	* gdb.texinfo (Inferiors): New section.
2008-09-22 15:12:19 +00:00
Pedro Alves 3d0bb823b0 gdb/
* Makefile.in (generated_files): Add $(NAT_GENERATED_FILES).
	* config/i386/i386gnu.mh (NAT_GENERATED_FILES): New.

gdb/doc/
	* gdbint.texinfo (Native Debugging): Mention NAT_GENERATED_FILES.
2008-09-12 10:39:03 +00:00
Pedro Alves e5fa801315 * Makefile.in (gnu-nat.o): New rule. 2008-09-10 18:13:21 +00:00
Mark Kettenis b365f67721 * Makefile.in: Remove page break; OpenBSD make chokes on them. 2008-08-20 10:18:23 +00:00
Daniel Jacobowitz c068b4e871 * Makefile.in (stamp-h): Also create .deps. 2008-08-09 18:57:08 +00:00
Tom Tromey 21374e5f9e * Makefile.in (generated_files): Add GNULIB_H. 2008-08-09 18:27:04 +00:00
Tom Tromey 2b26d9faa9 * Makefile.in (python.o): Remove dependencies. Use COMPILE and
POSTCOMPILE.
	(python-utils.o): Likewise.
2008-08-08 17:38:35 +00:00
Ralf Wildenhues a417dc5696 gdb/
* aclocal.m4, configure: Rebuild.
	* configure.in: Call ZW_CREATE_DEPDIR,
	ZW_PROG_COMPILER_DEPENDENCIES, AC_PROG_MAKE_SET.
	(MAKE, GMAKE): New substs.
	* acinclude.m4: Include depstand.m4.
	* Makefile.in (DEPMODE, DEPDIR, COMPILE.post, COMPILE.pre,
	COMPILE, POSTCOMPILE, depcomp): New variables.
	Remove all _h variables.
	Remove many .o targets.
	($(srcdir)/copying.c): avoid backslash-newline after comment
	sign (@maintainer_mode_true@).
	(HFILES_NO_SRCDIR): Regenerate.
	(generated_files): New variable.
	(all_gdbtk_cflags): Likewise.
	(.c.o): Rewrote.
	(init.o, version.o, copying.o): Remove.
	(distclean): Remove DEPDIR.
	(test-cp-name-parser.o, hpux-thread.o, main.o, monitor.o,
	printcmd.o, procfs.o, v850ice.o): Rewrite.
	(cli-cmds.o, cli-decode.o, cli-dump.o, cli-interp.o, cli-logging.o,
	cli-script.o, cli-setshow.o, cli-utils.o): Likewise.
	(gdbtk.o, gdbtk-bp.o, gdbtk-cmds.o, gdbtk-hooks.o, gdbtk-interp.o,
	gdbtk-main.o, gdbtk-register.o, gdbtk-stack.o, gdbtk-varobj.o,
	gdbtk-wrapper.o): Likewise.
	(mi-cmd-break.o, mi-cmd-disas.o, mi-cmd-env.o, mi-cmd-file.o,
	mi-cmds.o, mi-cmd-stack.o, mi-cmd-target.o, mi-cmd-var.o,
	mi-console.o, mi-getopt.o, mi-interp.o, mi-main.o, mi-out.o,
	mi-parse.o, mi-symbol-cmds.o, mi-common.o, signals.o, tui.o,
	tui-command.o, tui-data.o, tui-disasm.o, tui-file.o, tui-hooks.o,
	tui-interp.o, tui-io.o, tui-layout.o, tui-main.o, tui-out.o,
	tui-regs.o, tui-source.o, tui-stack.o, tui-win.o, tui-windata.o,
	tui-wingeneral.o, tui-winsource.o): Likewise.
	(all_object_files): New variable.
	($(all_object_files)): New target.
	Include dependency files, when using GNU Make.

gdb/gdbserver/
	* Makefile.in (GDBREPLAY_OBS): New variable.
	(gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
2008-08-07 22:49:10 +00:00
Thiago Jung Bauermann d57a3c85f6 Initial python support.
gdb/
2008-08-06  Vladimir Prus  <vladimir@codesourcery.com>
	    Tom Tromey  <tromey@redhat.com>
	    Thiago Jung Bauermann  <bauerman@br.ibm.com>
	    Doug Evans  <dje@google.com>

	* Makefile.in (SUBDIR_PYTHON_OBS, SUBDIR_PYTHON_SRCS,
	SUBDIR_PYTHON_DEPS, SUBDIR_PYTHON_LDFLAGS, SUBDIR_PYTHON_CFLAGS,
	PYTHON_CFLAGS): New.
	(python_h, python_internal_h): New.
	(cli-script.o): Depend on python.h
	(python.o, python-utils.o): New.
	* cli/cli-script.c (print_command_lines): Handle python_control.
	(execute_control_command): Handle python_control.
	(execute_control_command_untraced): New function.
	(while_command): Call execute_control_command_untraced.
	(if_command): Likewise.
	(get_command_line): Remove static attribute.
	(read_next_line): Handle "python".
	(recurse_read_control_structure): Handle python_control.
	(read_command_lines): Handle python_control.
	Include python.h.
	* cli/cli-script.h (get_command_line): Add prototype.
	(execute_control_command_untraced): Likewise.
	* configure.ac: Add --with-python.
	* defs.h (enum command_control_type) <python_control>: New
	constant.
	* python/python-internal.h: New file.
	* python/python.c: New file.
	* python/python.h: New file.
	* python/python-utils.c: New file.
	* NEWS: Mention Python scripting support and its new commands.

gdb/doc/
2008-08-06  Tom Tromey  <tromey@redhat.com>

	* gdb.texinfo (Extending GDB): New chapter.
	(Sequences): Demoted chapter, now a section under the new
	Extending GDB chapter.
	(Python): New section.

gdb/testsuite/
2008-08-06  Tom Tromey  <tromey@redhat.com>

	* gdb.python/python.exp: New file.
2008-08-06 19:41:33 +00:00
Keith Seitz 5062cc192e * acinclude.m4: Include ../config/tcl.m4 to pick up
standard Tcl configury bits.
        Remove all Tcl, Tk, Itcl, Itk, etc definitions.
        * configure.ac: Don't check if ../itcl exists when building
        gdbtk. It could be installed.
        Rewrite gdbtk configury to allow for using system-supplied
        Tcl and Tk. Gdbtk no longer requires build-time access to
        itcl and itk.
        * Makefile.in: Remove everything related to itcl and itk.
        Rewrite the Tcl bits for gdbtk to correspond to rewrite of
        configure.ac.
        Remove v850ice.o build rule.
        (ALL_TCL_CFLAGS): New convenience defintion. Change all
        gdbtk sources to use it.
        * configure: Regenerate.
2008-08-02 21:36:06 +00:00
Tom Tromey 7f4b89d1b6 * annotate.h (deprecated_annotate_starting_hook): Remove.
(deprecated_annotate_stopped_hook): Remove.
	(deprecated_annotate_exited_hook): Remove.
	* Makefile.in (annotate.o): Depend on observer_h.
	* top.c (deprecated_delete_breakpoint_hook): Remove.
	(deprecated_create_breakpoint_hook): Likewise.
	(deprecated_modify_breakpoint_hook): Likewise.
	* interps.c (clear_interpreter_hooks): Update for removed hooks.
	* breakpoint.c (mention): Don't call removed hook.
	(delete_breakpoint): Likewise.
	(disable_breakpoint): Likewise.
	(do_enable_breakpoint): Likewise.
	* annotate.c: Include observer.h.
	(breakpoint_changed): Change type of argument.
	(_initialize_annotate): Register observers.
	(deprecated_annotate_starting_hook): Remove.
	(deprecated_annotate_stopped_hook): Remove.
	(deprecated_annotate_exited_hook): Remove.
	(annotate_starting): Update for hook removal.
	(annotate_stopped): Likewise.
	(annotate_exited): Likewise.
	* defs.h (deprecated_delete_breakpoint_hook): Remove.
	(deprecated_create_breakpoint_hook): Likewise.
	(deprecated_modify_breakpoint_hook): Likewise.
2008-07-28 17:53:52 +00:00
Tom Tromey 383f836e20 gdb:
* tui/tui-hooks.c: Include observer.h.
	(tui_event_default, tui_old_event_hooks, tui_event_hooks):
	Remove.
	(tui_bp_created_observer, tui_bp_deleted_observer,
	tui_bp_modified_observer): New globals.
	(tui_install_hooks): Use observers, not events.
	(tui_remove_hooks): Likewise.
	* mi/mi-cmd-break.c: Include observer.h, not gdb-events.h.
	(mi_breakpoint_observers_installed, mi_can_breakpoint_notify): New
	globals.
	(breakpoint_notify): Check mi_can_breakpoint_notify.
	(breakpoint_hooks): Remove.
	(mi_cmd_break_insert): Attach observers.  Don't use events.
	* tracepoint.c: Include observer.h, not gdb-events.h.
	(tracepoint_operation, trace_pass_command): Notify observer.
	* interps.c: Don't include gdb-events.h.
	(clear_interpreter_hooks): Don't call clear_gdb_event_hooks.
	* gdbarch.c: Rebuild.
	* gdbarch.sh: Emit include for observer.h, not gdb-events.h.
	(deprecated_current_gdbarch_select_hack): Notify observer.
	* breakpoint.h: Don't include gdb-events.h.
	* breakpoint.c: Don't include gdb-events.h.
	(condition_command): Notify observer.
	(commands_command): Likewise.
	(commands_from_control_command): Likewise.
	(mention, delete_breakpoint, set_ignore_count): Likewise.
	(disable_breakpoint, do_enable_breakpoint): Likewise.
	* Makefile.in (gdb_events_h): Remove.
	(breakpoint_h): Update.
	(COMMON_OBS): Remove gdb-events.o.
	(gdb-events.o): Remove.
	(breakpoint.o, gdbarch.o, interps.o, tracepoint.o, gdbtk-bp.o,
	gdbtk-hooks.o, mi-cmd-break.o, tui-hooks.o): Update.
	* gdb-events.c: Remove.
	* gdb-events.h: Remove.
	* gdb-events.sh: Remove.
gdb/doc:
	* observer.texi (GDB Observers): Document new observers:
	breakpoint_created, breakpoint_deleted, breakpoint_modified,
	tracepoint_created, tracepoint_deleted, tracepoint_modified,
	architecture_changed.
gdb/gdbtk:
	* generic/gdbtk-hooks.c: Include observer.h, not gdb-events.h.
	(gdbtk_add_hooks): Use observers, not events.
	(gdbtk_architecture_changed): Add argument, for observer.
	* generic/gdbtk-bp.c: Include observer.h.
	(gdb_set_bp): Notify observer.
	(gdb_set_bp_addr): Likewise.
2008-07-25 16:12:03 +00:00
Tom Tromey d7d9f01ea1 gdb
PR gdb/855:
	* NEWS: Add entry for macro commands.
	* Makefile.in (macrocmd.o): Add gdb_string.h.
	* macroscope.h (user_macro_scope): Declare.
	(default_macro_scope): Update documentation.
	(macro_user_macros): Declare.
	* c-lang.c (c_preprocess_and_parse): Always attempt macro lookup.
	Use user_macro_scope.
	(null_macro_lookup): Remove.
	* macrotab.h (macro_callback_fn): Declare.
	(macro_for_each): Likewise.
	(macro_allow_redefinitions): Likewise.
	* macrotab.c (foreach_macro): New function
	(macro_for_each): Likewise.
	(struct macro_table) <redef_ok>: New field.
	(macro_allow_redefinitions): New function.
	(new_macro_table): Update.
	(macro_define_function): Likewise.
	(macro_define_object): Likewise.
	* macroscope.c (user_macro_scope): New function.
	(default_macro_scope): Use it.
	(macro_user_macros): New global.
	(standard_macro_lookup): Look in macro_user_macros.
	(_initialize_macroscope): New function.
	* macroexp.h (macro_is_whitespace, macro_is_digit,
	macro_is_identifier_nondigit): Declare.
	* macroexp.c (macro_is_whitespace): Rename.  No longer static.
	(macro_is_digit): Likewise.
	(macro_is_identifier_nondigit): Likewise.
	(get_identifier): Update.
	(get_pp_number): Likewise.
	(get_token): Likewise.
	* macrocmd.c (skip_ws): New function.
	(extract_identifier): Likewise.
	(free_macro_definition_ptr): Likewise.
	(user_macros): Remove.
	(macro_define_command): Implement.
	(_initialize_macrocmd): Update.
	(macro_undef_command): Implement.
	(print_one_macro): New function.
	(macro_list_command): Implement.
gdb/doc
	* gdb.texinfo (Macros): Update.  Use @code rather than @command.
gdb/testsuite
	* gdb.base/macscp.exp: Add macro tests.
2008-07-18 20:55:33 +00:00
Paul Pluzhnikov 7093c834d7 Fix for PR gdb/2477 2008-07-14 18:28:57 +00:00
Vladimir Prus dbba82516a Skip varobj in running threads.
* mi/mi-cmd-var.c (mi_cmd_var_update): If varobj's
        thread is not stopped, skip the varobj.
        * Makefile.in: Update dependencies.
2008-07-13 05:31:44 +00:00
Ulrich Weigand d5b254911b * spu-linux-nat.c: Include "gdbthread.h".
(spu_child_post_startup_inferior): Register main thread.
	(spu_child_post_attach): Likewise.
	* Makefile.in (spu-linux-nat.o): Update dependencies.
2008-07-12 22:16:34 +00:00
Pedro Alves 4f8d22e3b4 Exited threads.
* thread.c (enum thread_state): New.
	(thread_state main_thread_running): Delete, in favor of...
	(thread_state main_thread_state): ... this.  Update throughout.
	(clear_thread_inferior_resources): New, split from free_thread.
	(free_thread): Call clear_thread_inferior_resources.
	(init_thread_list): Set main thread to stopped state.
	(add_thread_silent): Take care of PTID reuses.
	(delete_thread): If deleting inferior_ptid or a thread with
	refcount > 0, mark it as exited, but still keep it in the list.
	Only notify of thread exits, if we haven't done so yet.
	(iterate_over_threads): Make it safe to delete threads while
	iterating over them.
	(do_captured_list_thread_ids): Don't account for exited threads.
	(thread_alive): Check for the THREAD_EXITED state, and don't set
	ptid to -1 on exited threads.
	(set_running): Update to account for extra possible states.
	(is_thread_state): New.
	(is_stopped, is_exited): New.
	(is_running): Implement in terms of is_thread_state.
	(any_running): Update.
	(print_thread_info): Update.  Account for exited threads.  Don't
	warn about missed frame restoring here, its done in the cleanup.
	(switch_to_thread): Don't read from a thread that has gone.
	(restore_current_thread): In non-stop mode, do a full context
	switch.
	(restore_selected_frame): Add a frame_level argument.  Rewrite.
	(struct current_thread_cleanup): Add selected_frame_level and
	was_stopped members.
	(do_restore_current_thread_cleanup): Check if thread was stopped
	and still is, and if the target has registers, stack and memory
	before restoring the selected frame.  Don't delete the cleanup
	argument here.
	(restore_current_thread_cleanup_dtor): New.
	(make_cleanup_restore_current_thread): Remove all arguments.
	Rewrite.
	(thread_apply_all_command): Update.  Prune threads.
	(thread_apply_command): Update.
	(thread_command): Account for currently selected exited thread.
	(do_captured_thread_select): Check for a running thread.  Prune
	threads.
	(_initialize_thread): Make "info threads", "thread", "thread
	apply", and "thread apply all" appliable without a selected thread.
	* gdbthread.h (struct thread_info): Replace running_ by state_.
	Add refcount.
	(is_exited, is_stopped): Declare.
	(make_cleanup_restore_current_thread): Remove all arguments.
	* infrun.c: Include "event-top.h".
	(fetch_inferior_event): In non-stop mode, restore selected thread
	and frame after handling the event and running breakpoint
	commands.  Display GDB prompt if needed.
	(normal_stop): In non-stop mode, don't print thread switching
	notice.
	* cli/cli-decode.c (set_cmd_no_selected_thread_ok)
	(get_cmd_no_selected_thread_ok): New.
	* cli/cli-decode.h (CMD_NO_SELECTED_THREAD_OK): New.
	(set_cmd_no_selected_thread_ok, get_cmd_no_selected_thread_ok):
	Declare.
	* cli/cli-cmds.c: Set "pwd", "help", "info", "show" as
	no-selected-thread ok.
	* top.c (execute_command): Check for non no-selected-thread-ok
	commands.
	* linux-nat.c (struct saved_ptids, threads_to_delete)
	(record_dead_thread, prune_lwps): Delete.
	(exit_lwp): Unconditionally delete thread.
	(linux_nat_resume): Remove prune_lwps call.
	* infcmd.c (proceed_thread_callback): Check if !is_stopped instead
	of is_running.  Adjust to make_cleanup_restore_current_thread
	interface change.
	* mi/mi-main.c (mi_cmd_execute): Only allow a few commands if the
	selected thread has exited.
	* inf-loop.c (inferior_event_handler): Don't display the prompt
	here.
	* varobj.c (c_value_of_root): Update.
	* defs.h (make_cleanup_dtor): Declare.
	* utils.c (make_cleanup_dtor): New.

	* Makefile.in (infrun.o): Depend on $(event_top_h).
2008-07-11 11:07:39 +00:00
Pedro Alves 94cc34afe2 Non-stop inferior control.
* infrun.c (resume): In non-stop mode, always resume just one
	thread.
	(proceed): Don't call prepare_to_proceed in non-stop mode.
	(fetch_inferior_event): In non-stop mode, switch context before
	handling the event.
	(error_is_running, ensure_not_running): New.
	(handle_inferior_event): In non-stop mode: Mark only the event
	thread as stopped.  Require that the target module manages adding
	threads to the thread list.  Assert that there isn't a
	deferred_step_ptid set.  Don't switch to infwait_thread_hop_state.
	(normal_stop): Only mark not-running if inferior hasn't exited.
	In non-stop mode, only mark the event thread.

	* thread.c:Include "cli/cli-decode.h".
	(print_thread_info): Don't read from a running thread.
	Output "(running)" if thread is running.
	(switch_to_thread): Don't read stop_pc if thread is executing.
	(do_restore_current_thread_cleanup): Don't write to a running
	thread.
	(thread_apply_all_command): Don't read from a running thread.  In
	non-stop mode, do a full context-switch instead of just switching
	threads.
	(thread_apply_command): In non-stop mode, do a full context-switch
	instead of just switching threads.
	(do_captured_thread_select): Likewise.  Inform user if selected
	thread is running.
	(_initialize_thread): Mark "info threads" and "thread" and
	async_ok.

	* inf-loop.c (inferior_event_handler): In non-stop mode, don't
	unregister the target from the event loop.

	* infcmd.c (continue_command, step_1, jump_command)
	(signal_command): Ensure the selected thread isn't running.
	(interrupt_target_command): In non-stop mode, interrupt only the
	selected thread.

	* inferior.h (error_is_running, ensure_not_running): Declare.

	* target.h (struct target_ops): Add ptid argument to the to_stop
	member.
	(target_stop): Add ptid_t argument.

	* target.c (update_current_target): Add ptid argument to to_stop's
	type.
	(debug_to_stop): Add ptid_t argument.
	(debug_to_rcmd): Set to_stop_ptid.

	* remote.c (remote_stop): Add ptid_t argument.
	(async_remote_interrupt): Add inferior_ptid to target_stop.
	* inf-ptrace.c (inf_ptrace_stop): Add ptid argument.

	* Makefile.in (thread.o): Depend on $(cli_decode_h).
2008-07-09 22:42:43 +00:00
Pedro Alves a474d7c2a3 Per-thread commands.
* gdbthread.h: Remove unneeded forward declarations.
	Include "inferior.h".
	(struct thread_info): Add continuations,
	intermediate_continuations, proceed_to_finish, step_over_calls,
	stop_step, step_multi and stop_signal members.
	(save_infrun_state): Add continuations,
	intermediate_continuations, proceed_to_finish, step_over_calls,
	stop_step, step_multi, stop_signal and stop_bpstat parameters.
	(load_infrun_state): Add continuations,
	intermediate_continuations, proceed_to_finish, step_over_calls,
	stop_step, step_multi, stop_signal and stop_bpstat parameters.

	* thread.c (load_infrun_state): In non-stop mode, load
	continuations, intermediate_continuations, proceed_to_finish,
	step_over_calls, stop_step, step_multi and stop_signal.
	(save_infrun_state): Store continuations,
	intermediate_continuations, proceed_to_finish, step_over_calls,
	stop_step, step_multi, stop_signal and stop_bpstat.
	(save_infrun_state): Store continuations,
	intermediate_continuations, proceed_to_finish, step_over_calls,
	stop_step, step_multi, stop_signal and stop_bpstat.
	(free_thread): Clear The thread's stop_bpstat.

	* inferior.h (context_switch_to): Declare.

	* infrun.c (ecss): New global.
	(context_switch): Context switch continuations,
	intermediate_continuations, proceed_to_finish, step_over_calls,
	stop_step, step_multi, stop_signal and stop_bpstat.
	(wait_for_inferior): Use global ecss.
	(async_ecss, async_ecs): Delete.
	(fetch_inferior_event): Use global ecss.
	(context_switch_to): New.

	* top.c (execute_command): In non-stop, only check if the current
	thread is running, in all-stop, check if there's any thread
	running.

	* breakpoint.c (bpstat_remove_breakpoint): New.
	(bpstat_remove_breakpoint_callback): New.
	(delete_breakpoint): Clear the stop_bpstats of all threads.

	* mi/mi-main.c (mi_cmd_execute): In non-stop, only check if the
	current thread is running, in all-stop, check if there's any
	thread running.

	* Makefile.in (gdbthread_h): Depend on $(inferior_h).
2008-07-09 22:30:46 +00:00
Pedro Alves 8ea051c51f Add "executing" property to threads.
* inferior.h (target_executing): Delete.
	* gdbthread.h (struct thread_info): Add executing_ field.
	(set_executing, is_executing): New.
	* thread.c (main_thread_executing): New.
	(init_thread_list): Clear it and also main_thread_running.
	(is_running): Return false if target has no execution.
	(any_running, is_executing, set_executing): New.

	* top.c: Include "gdbthread.h".
	(target_executing): Delete.
	(execute_command): Replace target_executing check by any_running.
	* event-top.c: Include "gdbthread.h".
	(display_gdb_prompt, command_handler): Replace target_executing by
	is_running.
	* inf-loop.c: Include "gdbthread.h".  Don't mark as not executing
	here.  Replace target_executing by is_running.
	* infrun.c (handle_inferior_event): Mark all threads as
	not-executing.
	* linux-nat.c (linux_nat_resume): Don't mark thread as executing
	here.
	* stack.c (get_selected_block): Return null if inferior is
	executing.
	* target.c (target_resume): Mark resumed ptid as executing.
	* breakpoint.c (until_break_command): Replace target_executing
	check by is_executing.
	* remote.c (remote_async_resume): Don't mark inferior as executing
	here.
	* mi/mi-interp.c (mi_cmd_interpreter_exec): Replace target_executing
	by any_running.

	* mi/mi-main.c (mi_cmd_exec_interrupt, mi_cmd_execute)
	(mi_execute_async_cli_command): Replace target_executing by
	is_running.

	* frame.c (get_current_frame): Error out if the current thread is
	executing.
	(has_stack_frames): New.
	(get_selected_frame, deprecated_safe_get_selected_frame): Check
	has_stack_frames.

	* Makefile.in (event-top.o, frame.o, inf-loop.o, top.o): Depend on
	$(gdbthread_h).
2008-07-09 22:16:15 +00:00
Pedro Alves 9de2bdd7d4 * remote-sim.c: Include gdbthread.h.
(remote_sim_ptid): New global.
	(gdbsim_create_inferior): Silently add the main task to GDB's
	thread list.
	(gdbsim_close, gdbsim_mourn_inferior): Silently delete the main
	task from GDB's thread list.
	(gdbsim_resume): Adjust to use remote_sim_ptid.
	(gdbsim_thread_alive, gdbsim_pid_to_str): New.
	(init_gdbsim_ops): Register gdbsim_thread_alive and
	gdbsim_pid_to_str.
	(_initialize_remote_sim): Initialize remote_sim_ptid.
	* Makefile.in (remote-sim.o): Depend on $(gdbthread_h).
2008-07-09 11:02:56 +00:00
Pedro Alves 42f0bc8eaf * i386-dicos-tdep.c: Include "inferior.h".
(i386_dicos_frame_align): New.
	(i386_dicos_init_abi): Register i386_dicos_frame_align.  Set call
	dummy location ON_STACK.
	* Makefile.in (i386-dicos-tdep.o): Depend on $(inferior_h).
2008-07-07 22:05:45 +00:00
Pedro Alves c0a2216eb3 * infrun.c (start_remote): Don't clear thread list here.
* monitor.c (monitor_open): Include "gdbthread.h".  Clear thread
	list here.
	* remote.c (record_currthread): Upgrade the main thread and its
	entry in the thread list if this is the first time we hear about
	threads.
	(remote_thread_alive): Consider magic_null_ptid or a ptid without
	a tid member always alive.
	(remote_find_new_threads): Don't update the main thread here.
	(remote_start_remote): Clear thread list here.  Always add the
	main thread.
	(extended_remote_attach_1): Add the main thread here.
	(extended_remote_mourn_1): Re-add the main thread here.
	(extended_remote_create_inferior_1): Add a main thread.

	* Makefile.in (monitor.o): Depend on $(gdbthread_h).
2008-06-27 11:54:21 +00:00
Daniel Jacobowitz d5af19bafb * Makefile.in (GNULIB_H): Use GNULIB_STDINT_H.
(gdb_stdint_h, gdb_stdint.h, stamp-int): Delete.  Remove
	all dependencies on $(gdb_stdint_h).
	(distclean): Do not delete gdb_stdint.h.
	* acinclude.m4: Do not use stdint.m4.
	* configure.ac: Set GNULIB_STDINT_H.  Remove tests for stdint.h,
	uintptr_t, and gdb_stdint.h.
	* defs.h: Include <stdint.h>.
	* gdb_thread_db.h: Assume stdint.h is already included.
	* breakpoint.c, findcmd.c, hppa-tdep.c, inf-ptrace.c, proc-service.c,
	rs6000-nat.c, spu-linux-nat.c, target.c, win32-nat.c: Do not
	include gdb_stdint.h.
	* configure, config.in: Regenerate.
2008-06-26 15:51:28 +00:00
Vladimir Prus e1ac332873 Implement *running.
* Makefile.in: Update dependencies.
        * gdbthread.h (struct thread_info): New field
        running_.
        (set_running, is_running): New.
        * thread.c (set_running, is_running): New.
        * inferior.h (suppress_normal_stop_observer): Rename to...
        (suppress_run_stop_observers): ..this.
        * infcmd.c (suppress_normal_stop_observer): Rename to...
        (suppress_run_stop_observers): ..this.
        (finish_command_continuation, finish_command): Adjust.
        * infcall.c (call_function_by_hand): Adjust.
        * infrun.c (normal_stop): Call set_running.
        * target.c (target_resume): New.  Call set_running.
        * target.h (target_resume): Convert from macro to
        a function.

        * mi/mi-interp.c (mi_on_resume): New.
        (mi_interpreter_init): Register mi_on_resume.
2008-06-10 10:23:54 +00:00
Tom Tromey 65d12d83a5 gdb
* value.h (evaluate_subexpression_type, extract_field_op):
	Declare.
	* printcmd.c (_initialize_printcmd): Use expression_completer for
	'p', 'inspect', 'call'.
	* parser-defs.h (parse_field_expression): Declare.
	* parse.c: Include exceptions.h.
	(in_parse_field, expout_last_struct): New globals.
	(mark_struct_expression): New function.
	(prefixify_expression): Return int.
	(prefixify_subexp): Return int.  Use expout_last_struct.
	(parse_exp_1): Update.
	(parse_exp_in_context): Add 'out_subexp' argument.  Handle
	in_parse_field.
	(parse_field_expression): New function.
	* expression.h (parse_field_expression): Declare.
	(in_parse_field): Likewise.
	* eval.c (evaluate_subexpression_type): New function.
	(extract_field_op): Likewise.
	* completer.h (expression_completer): Declare.
	* completer.c (expression_completer): New function.
	(count_struct_fields, add_struct_fields): New functions.
	* c-exp.y (yyparse): Redefine.
	(COMPLETE): New token.
	(exp): New productions.
	(saw_name_at_eof, last_was_structop): New globals.
	(yylex): Return COMPLETE when needed.  Recognize in_parse_field.
	(c_parse): New function.
	* breakpoint.c (_initialize_breakpoint): Use expression_completer
	for watch, awatch, and rwatch.
	* Makefile.in (parse.o): Depend on exceptions_h.
gdb/testsuite
	* gdb.base/break1.c (struct some_struct): New struct.
	(values): New global.
	* gdb.base/completion.exp: Add field name completion test.
gdb/doc
	* gdb.texinfo (Completion): Add field name example.
2008-06-06 20:58:08 +00:00
Jan Kratochvil 1e3a102aba * Makefile.in: Update dependencies.
* dwarf2expr.c: New include "gdb_assert.h".
	(new_dwarf_expr_context): Initialize MAX_RECURSION_DEPTH.
	(dwarf_expr_eval): Sanity check the RECURSION_DEPTH count.
	(execute_stack_op): Error out on too large RECURSION_DEPTH.
	Increase/decrease RECURSION_DEPTH around the function.
2008-06-05 18:25:30 +00:00
Carlos Eduardo Seo 17ea7499a9 * gdbarch.sh: Added new gdbarch struct
core_regset_sections.
	* gdbarch.c: Refreshed.
	* gdbarch.h: Refreshed.
	* regset.h (core_regset_section): Declared.
	* linux-nat.c (linux_nat_do_thread_registers): Added
	support for the new gdbarch struct core_regset_sections.
	* utils.c (host_address_to_string): New function.
	* defs.h (host_address_to_string): New prototype.
	* i386-linux-tdep.c (i386_regset_rections): New register
	sections list for i386.
	  (i386_linux_init_abi): Initialized new gdbarch struct
	  core_regset_sections.
	* Makefile.in: Updated to reflect dependency changes.
	* ppc-linux-tdep.c (ppc_regset_sections): Register
	sections list for ppc.
	  (ppc_linux_init_abi): Initialized new gdbarch struct
	  core_regset_sections
2008-05-24 16:32:01 +00:00
Ulrich Weigand 0cd9ab92e5 * alpha-mdebug-tdep.c: Include "trad-frame.h".
(struct alpha_mdebug_unwind_cache): Change type of SAVED_REGS to
	struct trad_frame_saved_reg *.
	(alpha_mdebug_frame_unwind_cache): Allocate SAVED_REGS using
	trad_frame_alloc_saved_regs.  Update accesses.  Record previous
	value of SP as being vfp.
	(alpha_mdebug_frame_prev_register): Use trad_frame_get_prev_register.
	* Makefile.in (alpha-mdebug-tdep.o): Update dependencies.
2008-05-21 14:47:26 +00:00
Nick Roberts 6b59c36b65 (thread.o): Add dependency on annotate.h. 2008-05-20 21:06:56 +00:00
Ulrich Weigand 42848c9656 * minsyms.c: Include "target.h".
(find_solib_trampoline_target): Handle minimal symbols pointing
	to function descriptors as well.
	* Makefile.in (minsyms.o): Update dependencies.

	* ppc-linux-tdep.c (ppc64_standard_linkage): Rename to ...
	(ppc64_standard_linkage1): ... this.  Fix optional instructions.
	(PPC64_STANDARD_LINKAGE_LEN): Rename to ...
	(PPC64_STANDARD_LINKAGE1_LEN): ... this.
	(ppc64_standard_linkage2, ppc64_standard_linkage3): New.
	(PPC64_STANDARD_LINKAGE2_LEN, PPC64_STANDARD_LINKAGE3_LEN): New.
	(ppc64_standard_linkage_target): Rename to ...
	(ppc64_standard_linkage1_target): ... this.
	(ppc64_standard_linkage2_target, ppc64_standard_linkage3_target): New.
	(ppc64_skip_trampoline_code): Support three variants of standard
	linkage stubs.  Call find_solib_trampoline_target to handle
	glink stubs.
2008-05-16 12:51:21 +00:00
Andreas Schwab 87669130a4 (dwarf2loc.o): Remove $(addrmap_h).
(dwarf2read.o): Add $(addrmap_h).
2008-05-15 09:38:40 +00:00
Joel Brobecker 20c625669c * findcmd.c: Add #include "gdb_stdint.h".
* Makefile.in (findcmd.o): Update dependencies.
2008-05-14 04:23:03 +00:00
Doug Evans 08388c79d5 New "find" command.
* NEWS: Document find command and qSearch:memory packet.
	* Makefile.in (SFILES): Add findcmd.c.
	(COMMON_OBJS): Add findcmd.o.
	(findcmd.o): New rule.
	* findcmd.c: New file.
	* target.h (target_ops): New member to_search_memory.
	(simple_search_memory): Declare.
	(target_search_memory): Declare.
	* target.c (simple_search_memory): New fn.
	(target_search_memory): New fn.
	* remote.c (PACKET_qSearch_memory): New packet kind.
	(remote_search_memory): New fn.
	(init_remote_ops): Init to_search_memory.
	(init_extended_remote_ops): Ditto.
	(_initialize_remote): Add qSearch:memory packet config command.

	* gdbserver/server.h (decode_search_memory_packet): Declare.
	* gdbserver/remote-utils.c (decode_search_memory_packet): New fn.
	* gdbserver/server.c (handle_search_memory_1): New fn.
	(handle_search_memory): New fn.
	(handle_query): Process qSearch:memory packets.

	* doc/gdb.texinfo: Document "find" command, qSearch:memory packet.

	* testsuite/gdb.base/find.exp: New file.
	* testsuite/gdb.base/find.c: New file.
2008-05-09 17:02:03 +00:00
Joel Brobecker d8ca156b0e * valprint.c (val_print): Add new language parameter and use it
instead of using the current_language. Update calls to val_print
        throughout.
        (common_val_print): Add new langauge parameter and pass it to
        val_print.
        * value.h (struct language_defn): Add opaque declaration.
        (val_print, common_val_print): Update declarations.
        * stack.c (print_frame_args): Update call to common_val_print
        using the appropriate language.
        * mi/mi-cmd-stack.c (list_args_or_locals): Likewise.
        * c-valprint, f-valprint.c, m2-valprint.c, mt-tdep.c, infcmd.c,
        mi/mi-main.c, jv-valprint.c, ada-valprint.c, varobj.c, p-valprint.c,
        scm-valprint.c, cp-valprint.c, sh64-tdep.c, printcmd.c:
        #include "language.h" if necessary.
        Update calls to val_print and common_val_print.
        * Makefile.in (mt-tdep.o, sh64-tdep.o, mi-cmds.o, mi-main.o):
        Update dependencies.
2008-05-06 21:35:01 +00:00
Jan Kratochvil ff013f42f4 gdb/
* Makefile.in: Update dependencies.
	* dwarf2read.c: Include "addrmap.h"
	(struct dwarf2_cu): New fields RANGES_OFFSET and HAS_RANGES_OFFSET.
	(dwarf2_ranges_read): New prototype.
	(dwarf2_build_psymtabs_hard): Initialize and prepare PSYMTABS_ADDRMAP.
	Add discontiguous range to PSYMTABS_ADDRMAP by DWARF2_RANGES_READ on
	HAS_RANGES_OFFSET, otherwise add there the contiguous range.
	(dwarf2_ranges_read): New parameter RANGES_PST, update the function
	comment for it.  Add the found ranges to RANGES_PST.  New variable
	BASEADDR, initialize it the common way.
	(dwarf2_get_pc_bounds): Update the caller for the new parameter.
	(read_partial_die): `DW_AT_ranges' now only sets RANGES_OFFSET and
	HAS_RANGES_OFFSET for the later processing.
	* objfiles.h (struct objfile): New field PSYMTABS_ADDRMAP.
	* symtab.c: Include "addrmap.h"
	(find_pc_sect_psymtab): Support reading the field PSYMTABS_ADDRMAP.
	Move the psymtab locator into ...
	(find_pc_sect_psymtab_closer): ... a new function.

	gdb/testsuite/
	* gdb.dwarf2/dw2-ranges.S: Merge the secondary section with `.fini'.
	* gdb.dwarf2/dw2-ranges.exp: Compile also `dw2-ranges2.S' and
	`dw2-ranges3.S' and test also their MAIN2, FUNC2 and MAIN3 symbols.
	* gdb.dwarf2/dw2-ranges2.S, gdb.dwarf2/dw2-ranges3.S: New files.
2008-05-04 17:27:01 +00:00
Ulrich Weigand 4a7622d18f * rs6000-tdep.c: Do not include "rs6000-tdep.h".
(rs6000_find_toc_address_hook): Move to rs6000-aix-tdep.c.
	(SIG_FRAME_PC_OFFSET): Likewise.
	(SIG_FRAME_LR_OFFSET): Likewise.
	(SIG_FRAME_FP_OFFSET): Likewise.
	(rs6000_push_dummy_call): Likewise.
	(rs6000_return_value): Likewise.
	(rs6000_convert_from_func_ptr_addr): Likewise.
	(branch_dest, rs6000_software_single_step): Likewise.
	(deal_with_atomic_sequence): Rename to ...
	(ppc_deal_with_atomic_sequence): ... this.  Adapt all callers.
	Do not call branch_dest; inline required parts of that function.
	(rs6000_skip_trampoline_code): Replace DEPRECATED_SYMBOL_NAME
	with SYMBOL_LINKAGE_NAME.
	(struct reg, regsize): Delete.
	(read_memory_addr): Delete; inline into callers.
	(rs6000_skip_prologue): Move after skip_prologue.
	(skip_prologue): Remove prototype.
	(rs6000_gdbarch_init): Remove sysv_abi variable; perform all
	initialization as if this variable were true.  Do not install
	ppc64_sysv_abi_adjust_breakpoint_address.

	* rs6000-aix-tdep.c: Include "gdb_assert.h", "gdbtypes.h",
	"gdbcore.h", "target.h", "value.h", "infcall.h", "objfiles.h",
	and "breakpoint.h".
	(rs6000_find_toc_address_hook): Move here from rs6000-tdep.c.
	(SIG_FRAME_PC_OFFSET): Likewise.
	(SIG_FRAME_LR_OFFSET): Likewise.
	(SIG_FRAME_FP_OFFSET): Likewise.
	(rs6000_push_dummy_call): Likewise.
	(rs6000_return_value): Likewise.
	(rs6000_convert_from_func_ptr_addr): Likewise.
	(branch_dest, rs6000_software_single_step): Likewise.  Replace
	tdep->text_segment_base by AIX_TEXT_SEGMENT_BASE.
	(rs6000_aix_init_osabi): Install rs6000_push_dummy_call,
	rs6000_return_value, and rs6000_convert_from_func_ptr_addr.
	Call set_gdbarch_long_double_bit and set_gdbarch_frame_red_zone_size.
	Set tdep->lr_frame_offset.  Do not set tdep->text_segment_base.

	* rs6000-tdep.h (rs6000_software_single_step): Remove prototype.
	(AIX_TEXT_SEGMENT_BASE): New macro.
	* rs6000-nat.c (exec_one_dummy_insn): Replace tdep->text_segment_base
	by AIX_TEXT_SEGMENT_BASE.

	* ppc-tdep.h (ppc_deal_with_atomic_sequence): Add prototype.
	(struct gdbarch_tdep): Remove text_segment_base member.
	* ppc-linux-tdep.c (ppc_linux_init_abi): On 64-bit, install
	ppc64_sysv_abi_adjust_breakpoint_address.

	* Makefile.in (rs6000-tdep.o): Update dependencies.
	(rs6000-aix-tdep.o): Likewise.
2008-05-03 23:50:43 +00:00
Daniel Jacobowitz 30510692eb * Makefile.in (objfiles.o): Update.
* exec.c (exec_set_section_address): Support p->addr != 0.
	* objfiles.c (objfile_relocate): Update exec_ops section
	addresses.
	* symfile.c (place_section): Move exec_set_section_address call...
	(default_symfile_offsets): ...to here.
2008-05-03 18:04:02 +00:00
Ulrich Weigand 7284e1bed8 ChangeLog:
* Makefile.in (ppc_linux_tdep_h): New macro.
	(powerpc_32l_c, powerpc_altivec32_c, powerpc_altivec32l_c): Likewise.
	(powerpc_64l_c, powerpc_altivec64_c, powerpc_altivec64l_c): Likewise.
	(powerpc_e500l_c): Likewise.
	(ppc-linux-nat.o): Update dependencies.
	(ppc-linux-tdep.o): Update dependencies.
	(rs6000-tdep.o): Update dependencies.

	* ppc-tdep.h (ppc_linux_memory_remove_breakpoint): Remove.
	(ppc_linux_svr4_fetch_link_map_offsets): Remove.
	(ppc_linux_gregset, ppc_linux_fpregset): Move to ppc-linux-tdep.h
	(ppc_supply_reg, ppc_collect_reg): Add prototypes.
	(tdesc_powerpc_e500): Remove.

	* rs6000.c: Include "features/rs6000/powerpc-altivec32.c"
	and "features/rs6000/powerpc-altivec64.c".
	(ppc_supply_reg, ppc_collect_reg): Make global.
	(variants): Use tdesc_powerpc_32 for "powerpc" and
	tdesc_powerpc_altivec64 for "powerpc64".
	(_initialize_rs6000_tdep): Initialize AltiVec descriptions.

	* ppc-linux-tdep.h: New file.

	* ppc-linux-tdep.c: Include "ppc-linux-tdep.c".
	Include "features/rs6000/powerpc-32l.c".
	Include "features/rs6000/powerpc-altivec32l.c".
	Include "features/rs6000/powerpc-64l.c".
	Include "features/rs6000/powerpc-altivec64l.c".
	Include "features/rs6000/powerpc-e500l.c".
	(ppc_linux_supply_gregset): New function.
	(ppc_linux_collect_gregset): Handle orig_r3 and trap registers.
	(ppc32_linux_gregset): Use ppc_linux_supply_gregset.
	(ppc64_linux_gregset): Likewise.
	(ppc_linux_sigtramp_cache): Handle orig_r3 and trap registers.
	(ppc_linux_trap_reg_p): New function.
	(ppc_linux_write_pc): New function.
	(ppc_linux_core_read_description): New function.
	(ppc_linux_init_abi): Install ppc_linux_write_pc and
	ppc_linux_core_read_description.  Install orig_r3 and trap
	registers if present in the target description.
	(_initialize_ppc_linux_tdep): Initialize Linux target descriptions.

	* ppc-linux-nat.c: Include "ppc-linux-tdep.h".
	(PT_ORIG_R3, PT_TRAP): Define if necessary.
	(ppc_register_u_addr): Handle orig_r3 and trap registers.
	(fetch_ppc_registers): Likewise.
	(store_ppc_registers): Likewise.
	(store_register): Likewise.
	(ppc_linux_read_description): Check whether AltiVec is supported.
	Check whether inferior is 32-bit or 64-bit.  Return the appropriate
	Linux target description.

	* features/Makefile (WHICH): Use rs6000/powerpc-32l and
	rs6000/powerpc-altivec32l instead of rs6000/powerpc-32.
	Use rs6000/powerpc-64l and rs6000/powerpc-altivec64l instead
	of rs6000/powerpc-64.  Use rs6000/powerpc-e500l instead of
	rs6000/powerpc-e500.  Update -expedite variables accordingly.

	* features/rs6000/power-spe.xml: Use regnum 73 for "acc".
	* features/rs6000/powerpc-32.xml: Do not include power-altivec.xml.
	* features/rs6000/powerpc-64.xml: Do not include power-altivec.xml.
	* features/rs6000/powerpc-e500.c: Regenerate.
	* features/rs6000/powerpc-32.c: Regenerate.
	* features/rs6000/powerpc-64.c: Regenerate.

	* features/rs6000/power-linux.xml: New file.
	* features/rs6000/power64-linux.xml: New file.
	* features/rs6000/powerpc-32l.xml: New file.
	* features/rs6000/powerpc-altivec32l.xml: New file.
	* features/rs6000/powerpc-64l.xml: New file.
	* features/rs6000/powerpc-altivec64l.xml: New file.
	* features/rs6000/powerpc-e500l.xml: New file.
	* features/rs6000/powerpc-32l.c: New (generated) file.
	* features/rs6000/powerpc-altivec32l.c: New (generated) file.
	* features/rs6000/powerpc-64l.c: New (generated) file.
	* features/rs6000/powerpc-altivec64l.c: New (generated) file.
	* features/rs6000/powerpc-e500l.xml: New (generated) file.

	* regformats/reg-ppc.dat: Remove.
	* regformats/reg-ppc64.dat: Remove.
	* regformats/rs6000/powerpc-32.dat: Remove.
	* regformats/rs6000/powerpc-64.dat: Remove.
	* regformats/rs6000/powerpc-e500.dat: Remove.
	* regformats/rs6000/powerpc-32l.dat: New (generated) file.
	* regformats/rs6000/powerpc-altivec32l.dat: New (generated) file.
	* regformats/rs6000/powerpc-64l.dat: New (generated) file.
	* regformats/rs6000/powerpc-altivec64l.dat: New (generated) file.
	* regformats/rs6000/powerpc-e500l.dat: New (generated) file.

gdbserver/ChangeLog:

	* configure.srv (powerpc*-*-linux*): Set srv_regobj to
	powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
	powerpc-64l.o, and powerpc-altivec64l.o.
	Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
	rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
	rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
	rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
	rs6000/power-linux.xml, and rs6000/power64-linux.xml
	to srv_xmlfiles.

	* Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
	(powerpc-32l.o, powerpc-32l.c): ... these new rules.
	(powerpc-32.o, powerpc-32.c): Remove, replace by ...
	(powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
	(powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
	(powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
	(reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
	(powerpc-64l.o, powerpc-64l.c): ... these new rules.
	(powerpc-64.o, powerpc-64.c): Remove, replace by ...
	(powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
	(clean): Update.

	* linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
	(init_registers_powerpc_32l): ... this new prototype.
	(init_registers_powerpc_32): Remove, replace by ...
	(init_registers_powerpc_altivec32l): ... this new prototype.
	(init_registers_powerpc_e500): Remove, replace by ...
	(init_registers_powerpc_e500l): ... this new prototype.
	(init_registers_ppc64): Remove, replace by ...
	(init_registers_powerpc_64l): ... this new prototype.
	(init_registers_powerpc_64): Remove, replace by ...
	(init_registers_powerpc_altivec64l): ... this new prototype.
	(ppc_num_regs): Set to 73.
	(PT_ORIG_R3, PT_TRAP): Define if necessary.
	(ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
	(ppc_cannot_store_register): Handle orig_r3 and trap.
	(ppc_arch_setup): Update init_registers_... calls.
	(ppc_fill_gregset): Handle orig_r3 and trap.

	* inferiors.c (clear_inferiors): Reset current_inferior.
2008-05-03 17:16:44 +00:00
Ulrich Weigand bccdca4a5f * linespec.c: Include "target.h".
(minsym_found): Handle minimal symbols pointing to function
	descriptors.  Use find_function_start_pc.
	* minsyms.c (msymbol_objfile): New function.
	* parse.c (write_exp_msymbol): Handle minimal symbols pointing
	to function descriptors.
	* symtab.c (fixup_section): Only use minimal symbol at the same
	address to determine section of a symbol.
	(find_function_start_pc): New function.
	(find_function_start_sal): Use it.
	* symtab.h (msymbol_objfile): Add prototype.
	(find_function_start_pc): Likewise.
	* value.c: Include "objfiles.h".
	(value_fn_field): Handle minimal symbols pointing to function
	descriptors.
	* Makefile.in (linespec.o): Update dependencies.
	(value.o): Likewise.
2008-05-03 00:37:35 +00:00
Daniel Jacobowitz 60c5725ca9 * Makefile.in (arm-tdep.o): Update.
* arm-tdep.c (arm_objfile_data_key, struct arm_mapping_symbol)
	(struct arm_per_objfile, arm_compare_mapping_symbols): New.
	(arm_pc_is_thumb): Use mapping symbols.
	(arm_objfile_data_cleanup, arm_record_special_symbol): New.
	(arm_gdbarch_init): Call set_gdbarch_record_special_symbol.
	(_initialize_arm_tdep): Initialize arm_objfile_data_key.
	* elfread.c (elf_symtab_read): Use gdbarch_record_special_symbol.
	* gdbarch.sh: Add record_special_symbol.
	* gdbarch.c, gdbarch.h: Regenerated.
	* objfiles.c (struct objfile_data): Add cleanup member.
	(register_objfile_data_with_cleanup): New function, from
	register_objfile_data.
	(register_objfile_data): Use it.
	(objfile_free_data): Call clear_objfile_data.
	(clear_objfile_data): Call cleanup functions.
	* objfiles.h (register_objfile_data_with_cleanup): Declare.
2008-05-02 20:38:16 +00:00
Pedro Alves 237fc4c9cd Implement displaced stepping.
gdb/
	* gdbarch.sh (max_insn_length): New 'variable'.
	(displaced_step_copy, displaced_step_fixup)
	(displaced_step_free_closure, displaced_step_location): New
	functions.
	(struct displaced_step_closure): Add forward declaration.
	* gdbarch.c, gdbarch.h: Regenerated.

	* arch-utils.c: #include "objfiles.h".
	(simple_displaced_step_copy_insn)
	(simple_displaced_step_free_closure)
	(displaced_step_at_entry_point): New functions.
	* arch-utils.h (simple_displaced_step_copy_insn)
	(simple_displaced_step_free_closure)
	(displaced_step_at_entry_point): New prototypes.

	* i386-tdep.c (I386_MAX_INSN_LEN): Rename to...
	(I386_MAX_MATCHED_INSN_LEN): ... this.
	(i386_absolute_jmp_p, i386_absolute_call_p)
	(i386_ret_p, i386_call_p, i386_breakpoint_p, i386_syscall_p)
	(i386_displaced_step_fixup): New functions.
	(struct i386_insn, i386_match_insn): Update.
	(i386_gdbarch_init): Set gdbarch_max_insn_length.
	* i386-tdep.h (I386_MAX_INSN_LEN): New.
	(i386_displaced_step_fixup): New prototype.
	* i386-linux-tdep.c (i386_linux_init_abi): Include "arch-utils.h".
	Register gdbarch_displaced_step_copy,
	gdbarch_displaced_step_fixup, gdbarch_displaced_step_free_closure,
	and gdbarch_displaced_step_location functions.

	* infrun.c (debug_displaced): New variable.
	(show_debug_displaced): New function.
	(struct displaced_step_request): New struct.
	(displaced_step_request_queue, displaced_step_ptid)
	(displaced_step_gdbarch, displaced_step_closure)
	(displaced_step_original, displaced_step_copy)
	(displaced_step_saved_copy, can_use_displaced_stepping): New
	variables.
	(show_can_use_displaced_stepping, use_displaced_stepping)
	(displaced_step_clear, cleanup_displaced_step_closure)
	(displaced_step_dump_bytes, displaced_step_prepare)
	(displaced_step_clear_cleanup, write_memory_ptid)
	(displaced_step_fixup): New functions.
	(resume): Call displaced_step_prepare.
	(proceed): Call read_pc once, and remember the value.  If using
	displaced stepping, don't remove breakpoints.
	(handle_inferior_event): Call displaced_step_fixup.  Add some
	debugging output.  When we try to step over a breakpoint, but get
	a signal to deliver to the thread instead, ensure the step-resume
	breakpoint is actually inserted.  If a thread hop is needed, and
	displaced stepping is enabled, don't remove breakpoints.
	(init_wait_for_inferior): Call displaced_step_clear.
	(_initialize_infrun): Add "set debug displaced" command.  Add
	"maint set can-use-displaced-stepping" command.  Clear
	displaced_step_ptid.
	* inferior.h (debug_displaced): Declare variable.
	(displaced_step_dump_bytes): Declare function.

	* Makefile.in (arch-utils.o, i386-linux-tdep.o): Update
	dependencies.

	gdb/testsuite/
	* gdb.asm/asmsrc1.s: Add scratch space.

	gdb/doc/
	* gdb.texinfo (Debugging Output): Document "set/show debug
	displaced".
	(Maintenance Commands): Document "maint set/show
	can-use-displaced-stepping".
2008-05-02 16:49:54 +00:00
Andrew Stubbs d01a8610c3 2008-05-02 Andrew Stubbs <andrew.stubbs@st.com>
* main.h (batch_silent): Declare.
	* event-top.c: Include main.h.
	(gdb_setup_readline): Remove extern batch_silent declaration.
	* infrun.c (normal_stop): Don't print source location when running in
	--batch-silent mode.
	* Makefile.in (event-top.o): Add main.h dependency.
2008-05-02 13:58:38 +00:00
Pedro Alves a15c5c831a * configure.tgt: Add i[34567]86-*-dicos* and x86_64-*-dicos*.
(i[34567]86-*-dicos*, x86_64-*-dicos*):
	Set gdb_osabi to GDB_OSABI_DICOS.

	* defs.h (enum gdb_osabi): Add GDB_OSABI_DICOS.
	* osabi.c (gdb_osabi_name): Add "DICOS".

	* i386-dicos-tdep.c: New file.

	* Makefile.in (ALL_TARGET_OBS): Add i386-dicos-tdep.o.
	(ALLDEPFILES): Add i386-dicos-tdep.c.
	(i386-dicos-tdep.o): New rule.
2008-05-01 23:09:14 +00:00
Daniel Jacobowitz a0ef42744d 2008-05-01 Daniel Jacobowitz <dan@codesourcery.com>
Pedro Alves  <pedro@codesourcery.com>

	Based on work by Jan Kratochvil <jan.kratochvil@redhat.com> and Jeff
 	Johnston <jjohnstn@redhat.com>.

	* NEWS: Mention attach to stopped process fix.
	* infcmd.c (detach_command, disconnect_command): Discard the thread
	list.
	* infrun.c (handle_inferior_event): Do not ignore non-SIGSTOP while
	attaching.  Use signal_stop_state.
	(signal_stop_state): Check stop_soon.
	* linux-nat.c (kill_lwp): Declare earlier.
	(pid_is_stopped, linux_nat_post_attach_wait): New.
	(lin_lwp_attach_lwp): Use linux_nat_post_attach_wait.  Update
	comments.
	(linux_nat_attach): Use linux_nat_post_attach_wait.
	(detach_callback, linux_nat_detach): Improve handling for signalled
	processes.
	(linux_nat_pid_to_str): Always print out the LWP ID if it differs
	from the process ID.
	* Makefile.in (infcmd.o): Update.

2008-05-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
	    Daniel Jacobowitz  <dan@codesourcery.com>

	* gdb.threads/attach-into-signal.c, gdb.threads/attach-into-signal.exp,
	gdb.threads/attach-stopped.c, gdb.threads/attach-stopped.exp,
	gdb.threads/attachstop-mt.c, gdb.threads/attachstop-mt.exp: New.
2008-05-01 18:50:14 +00:00
Daniel Jacobowitz 25492ce3f9 * trad-frame.c (struct trad_frame_cache): Rename next_frame to this_frame.
(trad_frame_cache_zalloc, trad_frame_alloc_saved_regs): Expect
	this_frame.
	(trad_frame_get_prev_register, trad_frame_get_register): Update signature.
	* trad-frame.h (trad_frame_cache_zalloc, trad_frame_get_register)
	(trad_frame_alloc_saved_regs, trad_frame_get_prev_register): Update
	signature.
	* tramp-frame.c (tramp_frame_cache, tramp_frame_start): Expect
	this_frame.
	(tramp_frame_this_id, tramp_frame_prev_register, tramp_frame_sniffer):
	Update signature.
	* tramp-frame.h (struct tramp_frame): Update signature of init.
	* Makefile.in (trad-frame.o): Update.
2008-04-30 21:19:10 +00:00
Daniel Jacobowitz 669fac235d Convert frame unwinders to use the current frame and
"struct value".

	* frame.c (frame_debug): Make global.
	(get_frame_id): Pass this frame to unwinder routines.
	(frame_pc_unwind): Remove unused unwind->prev_pc support.
	(do_frame_register_read): Do not discard the return value of
	frame_register_read.
	(frame_register_unwind): Remove debug messages.  Use
	frame_unwind_register_value.
	(frame_unwind_register_value, get_frame_register_value): New
	functions.
	(create_new_frame, get_frame_base_address, get_frame_locals_address)
	(get_frame_args_address, get_frame_type): Pass this frame to
	unwinder routines.
	(frame_cleanup_after_sniffer, frame_prepare_for_sniffer): New
	functions.
	* frame.h: Update comments.
	(frame_debug, frame_unwind_register_value, get_frame_register_value)
	(frame_prepare_for_sniffer): Declare.
	* frame-unwind.h: Update comments and parameter names.
	(default_frame_sniffer): Declare.
	(frame_prev_register_ftype): Return a struct value *.
	(struct frame_unwind): Remove prev_pc member.
	(frame_unwind_sniffer_ftype, frame_unwind_append_sniffer): Delete.
	(frame_unwind_append_unwinder, frame_unwind_got_optimized)
	(frame_unwind_got_register, frame_unwind_got_memory)
	(frame_unwind_got_constant, frame_unwind_got_address): Declare.
	* frame-base.h: Update comments and parameter names.
	* valops.c (value_fetch_lazy): Use get_frame_register_value.  Iterate
	if necessary.  Add debugging output.
	* sentinel-frame.c (sentinel_frame_prev_register)
	(sentinel_frame_this_id): Update for new signature.
	(sentinel_frame_prev_pc): Delete.
	(sentinel_frame_unwinder): Remove prev_pc.
	* ia64-tdep.c (ia64_libunwind_frame_unwind): Do not initialize
	prev_pc.
	* libunwind-frame.c (libunwind_frame_unwind): Likewise.
	* frame-unwind.c (struct frame_unwind_table_entry): Remove sniffer.
	(frame_unwind_append_sniffer): Delete.
	(frame_unwind_append_unwinder): New function.
	(frame_unwind_find_by_frame): Take this frame.  Only use sniffers
	from unwinders.  Use frame_prepare_for_sniffer.
	(default_frame_sniffer, frame_unwind_got_optimized)
	(frame_unwind_got_register, frame_unwind_got_memory)
	(frame_unwind_got_constant, frame_unwind_got_address): New functions.
	* dummy-frame.c (dummy_frame_sniffer): Use gdbarch_dummy_id.
	(dummy_frame_prev_register, dummy_frame_this_id): Update for new
	signature.
	* gdbarch.sh: Replace unwind_dummy_id with dummy_id.
	* gdbarch.c, gdbarch.c: Regenerated.
	* frame-base.c (default_frame_base_address)
	(default_frame_locals_address, default_frame_args_address): Update
	for new signature.
	(frame_base_find_by_frame): Pass this frame to unwinder routines.
	* infcall.c (call_function_by_hand): Update comments.
	* Makefile.in (frame-unwind.o): Update dependencies.

	* gdbint.texinfo (Stack Frames): New chapter.
	(Algorithms): Move Frames text to the new chapter.
	(Target Conditionals): Delete SAVE_DUMMY_FRAME_TOS.  Document
	gdbarch_dummy_id instead of gdbarch_unwind_dummy_id.
2008-04-30 21:16:46 +00:00
Vladimir Prus 74960c6002 * breakpoint.h (bp_location_p): New typedef.
Register a vector of bp_location_p.
	* breakpoint.c (always_inserted_mode)
	(show_always_inserted_mode): New.
	(unlink_locations_from_global_list): Remove.
	(update_global_location_list)
	(update_global_location_list_nothrow): New.
	(update_watchpoint): Don't free locations.
	(should_insert_location): New.
	(insert_bp_location): Use should_insert_location.
	(insert_breakpoint_locations): Copied from
	insert_breakpoints.
	(insert_breakpoint): Use insert_breakpoint_locations.
	(bpstat_stop_status): Call update_global_location_list
	when disabling breakpoint.
	(allocate_bp_location): Don't add to bp_location_chain.
	(set_raw_breakpoint)
	(create_longjmp_breakpoint, enable_longjmp_breakpoint)
	(disable_longjmp_breakpoint, create_overlay_event_breakpoint)
	(enable_overlay_breakpoints, disable_overlay_breakpoints)
	(set_longjmp_resume_breakpoint)
	(enable_watchpoints_after_interactive_call_stop)
	(disable_watchpoints_before_interactive_call_start)
	(create_internal_breakpoint)
	(create_fork_vfork_event_catchpoint)
	(create_exec_event_catchpoint, set_momentary_breakpoint)
	(create_breakpoints, break_command_1, watch_command_1)
	(create_exception_catchpoint)
	(handle_gnu_v3_exceptions)
	(disable_breakpoint, breakpoint_re_set_one)
	(create_thread_event_breakpoint, create_solib_event_breakpoint)
	(create_ada_exception_breakpoint): : Don't call check_duplicates.
	Call update_global_location_list.
	(delete_breakpoint): Don't remove locations and don't
	try to reinsert them. Call update_global_location_list.
	(update_breakpoint_locations): Likewise.
	(restore_always_inserted_mode): New.
	(update_breakpoints_after_exec): Temporary disable
	always inserted mode.
	* Makefile.in: Update dependencies.

	* infrun.c (proceed): Remove breakpoints while stepping
	over breakpoint.
	(handle_inferior_event): Don't remove or insert
	breakpoints.
	* linux-fork.c (checkpoint_command): Remove breakpoints
	before fork and insert after.
	(linux_fork_context): Remove breakpoints before switch
	and insert after.
	* target.c (target_disconnect, target_detach): Remove
	breakpoints from target.
2008-04-24 10:21:45 +00:00
Maxim Grigoriev ee967b5f61 2008-04-23 Maxim Grigoriev <maxim2405@gmail.com>
* Makefile.in (xtensa-tdep.o): Update dependencies.
	* configure.tgt (xtensa*): Update dependencies.
	* xtensa-tdep.c (arreg_number): Renamed from areg_number.
	Local variable areg renamed to arreg.
	(areg_number): New function.
	(xtensa_pseudo_register_read, xtensa_pseudo_register_write)
	(xtensa_extract_return_value, xtensa_store_return_value): areg_number
	replaced by arreg_number.
	(xtensa_windowed_frame_cache, struct xtensa_frame_cache): New comments.
	(xtensa_alloc_frame_cache): Initialize cache->wd.ws.
	(xtensa_scan_prologue): New function.
	(xtensa_frame_cache): New local fp_regnum. Handle separately the case,
	when ENTRY instraction hasn't been executed yet. Get the frame pointer
	value based on prologue analysis. Fix the bugs preventing WS and
	AR4-AR7/A11 registers from getting right values for intermediate frames,
	whose registers have been already spilled.
	(xtensa_frame_prev_register): Fix WS register value. Use are_number
	and arreg_number appropriately.
	(xtensa_gdbarch_init): Set solib_svr4_fetch_link_map_offsets to
	svr4_ilp32_fetch_link_map_offsets.
2008-04-23 21:17:05 +00:00
Nick Roberts bb2edc7f62 (linespec.o, mi-interp.o): Add dependencies. 2008-04-19 06:12:16 +00:00
Tom Tromey 700b53b17a * cli/cli-decode.h (CMD_ASYNC_OK): New define.
(set_cmd_async_ok, get_cmd_async_ok): Declare.
	* cli/cli-decode.c (set_cmd_async_ok): New function.
	(get_cmd_async_ok): New function.
	* cli/cli-cmds.c (init_cli_cmds): Mark "pwd", "help", "info", and
	"show" as async-ok.
	* top.c (execute_command): Use get_cmd_async_ok.
	* infcmd.c: Include cli/cli-decode.h.
	(_initialize_infcmd): Mark "interrupt" as async-ok.
	* Makefile.in (infcmd.o): Depend on cli_decode_h.
2008-04-17 00:25:01 +00:00
Daniel Jacobowitz aa11fd3fc4 * Makefile.in (GNULIB_H): New. Trigger all-lib.
(defs_h): Use $(GNULIB_H).
	(all-lib): Depend on gnulib/Makefile.
	(gnulib/Makefile): Regenerate gnulib/Makefile and gnulib/.deps.
	* config.in, gnulib/Makefile.in: Regenerated.
2008-04-14 19:47:29 +00:00
Daniel Jacobowitz e28b33320c * Makefile.in (LIBGNU, INCGNU): Define.
(INTERNAL_CFLAGS_BASE): Add INCGNU.
	(INTERNAL_LIBS, CLIBS, CDEPS): Add LIBGNU.
	(CLEANDIRS): New.
	($(LIBGNU), all-lib): New rules.
	(clean, distclean, do-maintainer-clean): Use CLEANDIRS.
	* configure.ac: Use gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE.
	Simplify AC_CONFIG_AUX_DIR.  Generate gnulib/Makefile.
	* gnulib: New directory, from gnulib-tool.
	* configure, aclocal.m4: Regenerated.

	* Makefile.in (LIBOBJS): New.
	(OBS): Use LIBOBJS.
	(memmem.o): New rule.
	* configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
	* configure: Regenerated.
2008-04-14 18:04:00 +00:00
Marc Khouzam de051565df gdb/ChangeLog
2008-04-09  Marc Khouzam  <marc.khouzam@ericsson.com>

        * mi/mi-cmd-var.c: Include "mi-getopt.h".
        (mi_parse_format): New.  Factored out from mi_cmd_var_set_format.
        (mi_cmd_var_set_format): Use new mi_parse_format.
        (mi_cmd_var_evaluate_expression): Support for -f option to specify
        format.
        * Makefile.in (mi-cmd-var.o): Update dependencies.

        * varobj.h (varobj_get_formatted_value): Declare.
        * varobj.c (my_value_of_variable): Added format parameter.
        (cplus_value_of_variable): Likewise.
        (java_value_of_variable): Likewise.
        (c_value_of_variable): Likewise.  Evaluate expression based
        on format parameter.
        (struct language_specific): Add format parameter to function member
        *value_of_variable.
        (varobj_get_formatted_value): New.
        (varobj_get_value): Added format parameter to method call.

gdb/doc/ChangeLog
2008-04-09  Marc Khouzam  <marc.khouzam@ericsson.com>

        * gdb.texinfo (GDB/MI Variable Objects): Add anchor to
        -var-set-format.  Add -f option to -var-evaluate-expression.

gdb/testsuite/ChangeLog
2008-04-09  Marc Khouzam  <marc.khouzam@ericsson.com>

        * gdb.mi/mi2-var-display.exp: Added tests for the new -f
        option of -var-evaluate-expression.
        * gdb.mi/mi2-var-display.exp: Likewise.
2008-04-09 13:29:55 +00:00
Pedro Alves effa26a936 * alphanbsd-tdep.c: Include "target.h".
* mn10300-tdep.c: Include "target.h".
	* Makefile.in (alphanbsd-tdep.o, mn10300-tdep.o): Update.
2008-04-07 11:45:58 +00:00
Ulrich Weigand 5e2b427df3 * objfiles.h (struct objfile): New GDBARCH member.
(get_objfile_arch): Add prototype.
	* objfiles.c: Include "arch-utils.h".
	(allocate_objfile): Look up gdbarch associated with bfd.
	(get_objfile_arch): New function.
	* Makefile (objfiles.o): Update dependencies.

	* dwarf2-frame.c (decode_frame_entry_1): Replace current_gdbarch
	by objfile arch.
	* dwarf2loc.c (dwarf_expr_read_reg): Replace current_gdbarch
	by frame arch.
	(locexpr_describe_location): Replace current_gdbarch by
	objfile arch.
	* dwarf2read.c (die_type): Replace current_gdbarch by objfile arch.
	(dwarf2_add_field): Likewise.
	(read_tag_pointer_type): Likewise.
	(read_base_type): Likewise.
	(new_symbol): Likewise.

	* coffread.c (decode_type): Add OBJFILE argument.  Update callers.
	(decode_base_type, decode_function_type): Likewise.
	(coff_read_struct_type, coff_read_enum_type): Likewise.
	(coff_symtab_read): Replace current_gdbarch by objfile arch.
	(decode_base_type): Likewise.
	(coff_read_enum_type): Likewise.
	(coff_read_struct_type): Replace current_objfile by OBJFILE argument.
	(coff_read_enum_type): Likewise.

	* dbxread.c (read_dbx_symtab): Replace current_gdbarch by objfile arch.
	(end_psymtab): Likewise.
	(process_one_symbol): Likewise.

	* mdebugread.c (parse_symbol): Replace current_gdbarch by objfile arch.
	(parse_procedure): Likewise.
	(parse_partial_symbols): Likewise.

	* somread.c (som_symtab_read): Replace current_gdbarch by objfile arch.

	* stabsread.c (define_symbol): Replace current_gdbarch by objfile arch.
	Replace static pcc_promotion_type and pcc_unsigned_promotion_type by
	built-in types.
	(read_range_type): Replace current_gdbarch by objfile arch.  Replace
	static range_index_type by built-in type.
	(read_one_struct_field): Replace current_gdbarch by objfile arch.
	(read_enum_type): Likewise.

	* xcoffread.c (read_xcoff_symtab): Replace current_gdbarch by
	objfile arch.
2008-03-26 14:53:28 +00:00
Vladimir Prus 6208b47d6c * thread.c (make_cleanup_restore_current_thread): Make it
globally visible.
	* gdbthread.h (make_cleanup_restore_current_thread): Declare.
	* varobj.c (varobj_update): Don't save/restore frame.
	(c_value_of_root): Save/restore thread and frame here,
	using make_cleanup_restore_current_thread.
	* Makefile.in: Update dependecies.
2008-03-23 09:53:52 +00:00
Pedro Alves b84876c212 gdb/
* target.h (struct target_ops): Delete to_async_mask_value and add
	to_async_mask.
	(target_is_async_p, target_async): Formatting.
	(target_async_mask_value): Delete.
	(target_async_mask): Delete function declaration, and add new
	target macro with the same name.

	* target.c (update_current_target): Replace to_async_mask_value by
	to_async_mask.  Default to_async_mask to return_one.
	(target_async_mask): Delete.
	(find_default_can_async_p, find_default_is_async_p): New.
	(init_dummy_target): register find_default_can_async_p and
	find_default_is_async_p on the dummy target.

	* linux-nat.c: Include inf-loop.h, event-loop.h and event-top.h.
	(debug_linux_nat_async): New global.
	(show_debug_linux_nat_async): New function.
	(linux_nat_async_enabled, linux_nat_async_mask_value)
	(linux_nat_event_pipe, linux_nat_num_queued_events)
	(linux_nat_async_events_enabled): New globals.
	(struct waitpid_result): New struct.
	(waitpid_queue): New global.
	(queued_waitpid, push_waitpid, drain_queued_events): New.
	(my_waitpid): Call queued_waitpid.
	(linux_child_follow_fork): Disable async events during the call.
	(blocked_mask): Delete.
	(sync_sigchld_action, async_sigchld_action): New globals.
	(lin_lwp_attach_lwp): In sync mode, don't reblock SIGCHLD.  In
	async mode, block events during the call.
	(linux_nat_create_inferior): New.
	(linux_nat_attach): In sync mode, restore the mask states.  In
	async mode, wake the event loop immediatelly.
	(detach_callback): Drain all queued events of the lwp we're
	detaching from.
	(linux_nat_detach): Block async mode, and drain events of the main
	process.
	(linux_nat_resume): If in async mode, mask async events during the
	call.  If short circuiting, force event loop to wake up.  If
	resuming, set target_executing, and register target events in the
	event loop.
	(pipe_to_local_event_queue, local_event_queue_to_pipe): New.
	(linux_nat_wait): In async mode, block events during the call.
	Only enable/disable passing SIGINT to the inferior in sync mode.
	Get events from local waitpid queue.  If no interesting events was
	found, return to events loop.  Reregister target events in the
	event loop on exit.  In sync mode, no need to reblock SIGCHLD.
	(linux_nat_kill): Disable events on entry.
	(linux_nat_mourn_inferior): In sync mode, don't restore the masks
	here.  Detach async mode from the event loop if there are no more
	forks available, otherwise leave it on.
	(sigchld_handler): Assure this is called only in sync mode.
	(linux_async_permitted, linux_async_permitted_1): New globals.
	(set_maintenance_linux_async_permitted)
	(show_maintenance_linux_async_permitted): New functions.
	(linux_nat_is_async_p, linux_nat_can_async_p)
	(linux_nat_async_mask): New.
	(linux_nat_event_pipe_pop, linux_nat_event_pipe_push): New.
	(get_pending_events, async_sigchld_handler): New.
	(linux_nat_async_events): New.
	(async_terminal_is_ours): New global.
	(linux_nat_terminal_inferior, linux_nat_terminal_ours): New.
	(async_client_callback, async_client_context): New.
	(linux_nat_async_file_handler, linux_nat_async)
	(linux_nat_disable_async, linux_nat_enable_async): New.
	(linux_nat_add_target): Register linux_nat_create_inferior,
	linux_nat_can_async_p, linux_nat_is_async_p, linux_nat_async,
	linux_nat_async_mask, linux_nat_terminal_inferior and
	linux_nat_terminal_ours.
	(_initialize_linux_nat): Remove local action variable, and update
	code that used it to use sync_sigchld_action.  Add new
	"lin-lwp-async" debug set/show command.  Put the "lin-lwp" debug
	set/show command in the maintenance class.  Add new "linux-async"
	maintenance set/show command.  Block SIGCHLD by default.  Setup
	async_sichld_action, and sync_sigchld_action.  Install the default
	async mode.
	(lin_thread_get_thread_signals): Use a local sigset_t for blocking
	the cancel signals.

	* linux-thread-db.c (re_check_for_thread_db): New.
	(clear_lwpid_callback): Handle TARGET_WAITKIND_IGNORE.
	(thread_db_can_async_p, thread_db_is_async_p, thread_db_async)
	(thread_db_async_mask): New.
	(init_thread_db_ops): Register thread_db_can_async_p,
	thread_db_is_async_p, thread_db_async and thread_db_async_mask.

	* remote.c (remote_async_mask_value): New.
	(remote_return_zero): New.
	(init_remote_ops): Register remote_return_zero as callbacks of
	to_can_async_p and to_is_async_p.
	(remote_can_async_p, remote_is_async_p, remote_async): Update to
	use remote_async_mask_value.
	(remote_async_mask): New.
	(init_remote_async_ops): Remove to_async_mask_value setting and
	register remote_async_mask as to_async_mask callback in
	remote_async_ops.

	* Makefile.in (linux-nat.o): Update.

gdb/doc/
	* gdb.texinfo (Debugging Output): Document
	"set/show debug lin-lwp-async".
	(Maintenance Commands): Document "maint set/show linux-async".
2008-03-21 17:09:35 +00:00
Nick Hudson f01be29bbc * Makefile.in (amd64nbsd-nat.o): New dependency.
* amd64nbsd-nat.c: Include "nbsd-nat.h".
        (_initialize_amd64nbsd_nat): Update target vector to use
        nbsd_pid_to_exec_file.
        * config/i386/nbsd64.mh (NATDEPFILES): Add nbsd-nat.o.
2008-03-16 08:50:43 +00:00
Vladimir Prus 8e8901c5c2 Implement -thread-info.
* gdbthread.h (print_thread_info): Declare.

        * thread.c (print_thread_info): New, extracted
        from info_threads_command and adjusted to
        work for CLI and MI.
        (info_threads_command): Use print_thread_info.
	* Makefile.in: Update dependencies.

        * mi/mi-cmds.c (mi_cmds): Specify a handler
        for -thread-info.
        * mi/mi-cmds.h (mi_cmd_thread_info): Declare.
        * mi/mi-main.c (mi_cmd_thread_info): New.
        (mi_cmd_list_features): Include 'thread-info'.
2008-03-15 13:53:25 +00:00
Vladimir Prus 32c1e744c1 Async mode fixes.
* Makefile.in (infcmd.o, inf-loop.o): Update dependencies.
        * breakpoint.c (bpstat_do_actions): In async mode,
        don't jump to top expecting stop_bpstat to be already
        updated.
        * event-loop.c (start_event_loop): Call async_enable_stdin
        on exception.
        * event-top.c (async_enable_stdin): Do nothing if sync_execution
        is not set.
        (command_handler): Do not setup continuation here.
        (command_line_handler_continuation): Move to...
        * top.c (command_line_handler_continuation): ... here.
        (execute_command): In async mode, register continuation.
        Don't check frame's language in running in async mode.
        * exceptions.c (throw_exception): Don't do exec_error_cleanups.
        * inf-loop.c (complete_execution): Inline into...
        (inferior_event_handler): ... here.  Clear target_executing before
        doing any cleanups.  Don't try to show prompt if the target was
        resumed.
        * infcmd.c (signal_command): Add support for async mode.
        (finish_command): Only add continuation if the target was
        successfully resumed.
        * remote.c (init_async_opts): Register to_get_thread_local_address
        handler.
        * mi/mi-interp.c (mi_cmd_interpreter_exec): Don't mess
        with sync_execution.
        * tui/tui-interp.c (tui_command_loop): Call async_enable_stdin
        on exception.
2008-03-14 18:57:44 +00:00
Vladimir Prus 683f2885af Implement MI notification for new threads.
* doc/observer.texi (new_thread): Document.
        * observer.sh: Forward declare struct thread_info.
        * thread.c (add_thread): Notify observer.

        * interps.h (interp_init_ftype): New parameter
        top_level.
        (interp_set): Likewise.
        (top_level_interpreter_data): Declare.
        * interps.c (interp_set): New parameter top_level.
        Pass it to interpreter's init function.  Remember
        top level interpreter.
        (interpreter_exec_cmd): Adjust.
        (top_level_interpreter_data): New.
        * main.c (captured_main): Pass 1 for top_level
        parameter of interp_set.
	* cli/cli-interp.c (cli_interpreter_init): New
        parameter top_level.
        * tui/tui-interp.c (tui_init): New parameter top_level.

        * mi/mi-interp.c (mi_new_thread): New.
        (mi_interpreter_init): If top level, register
        observer for new threads.

        * Makefile.in (mi-interp.o, thread.o): Update dependencies.
2008-03-14 17:21:08 +00:00
Daniel Jacobowitz 8defab1af7 * breakpoint.h (breakpoint_restore_shadows): New
declaration.
	* breakpoint.c (breakpoint_restore_shadows): New.
	(read_memory_nobpt): Delete.
	* gdbcore.h (read_memory_nobpt): Delete declaration.
	* target.c (memory_xfer_partial): Call
	breakpoint_restore_shadows.
	(restore_show_memory_breakpoints)
	(make_show_memory_beakpoints_cleanup): New.
	(show_memory_breakpoints): New.
	* target.h (make_show_memory_beakpoints_cleanup): Declare.
	* ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint):
	Make sure we see memory breakpoints when checking if
	breakpoint is still there.
	* alpha-tdep.c, alphanbsd-tdep.c, frame.c, frv-tdep.c,
	hppa-linux-tdep.c, hppa-tdep.c, i386-linux-nat.c, i386-tdep.c,
	m68klinux-tdep.c, mips-tdep.c, mn10300-tdep.c, s390-tdep.c,
	sparc-tdep.c: Use target_read_memory instead of read_memory_nobpt.
2008-03-13 12:22:14 +00:00
Daniel Jacobowitz ccd213ac7e * Makefile.in (fork-child.o): Update.
* NEWS: Document "set exec-wrapper" and the gdbserver --wrapper
	argument.  Gather all gdbserver features together.
	* fork-child.c (exec_wrapper): New variable.
	(fork_inferior): Use it.
	(startup_inferior): Skip an extra trap if using "set exec-wrapper".
	(unset_exec_wrapper_command, _initialize_fork_child): New.

	* gdb.texinfo (Starting): Document "set exec-wrapper".
	(Server): Document gdbserver --wrapper.

	* server.c (wrapper_argv): New.
	(start_inferior): Handle wrapper_argv.  If set, expect an extra
	trap.
	(gdbserver_usage): Document --wrapper.
	(main): Parse --wrapper.
2008-03-10 23:14:06 +00:00
Daniel Jacobowitz b803fb0f0f * Makefile.in (mingw-hdep.o, posix-hdep.o, remote-fileio.o): Update.
* event-loop.c (call_async_signal_handler): New.
	* event-loop.h (call_async_signal_handler)
	(gdb_call_async_signal_handler): Declare.
	(mark_async_signal_handler): Add comments.
	* event-top.c (handle_sigint): Use gdb_call_async_signal_handler.
	* mingw-hdep.c (sigint_event, sigint_handler): New.
	(gdb_select): Use them.  Wait for the readline signal handler
	to finish.
	(gdb_call_async_signal_handler, _initialize_mingw_hdep): New functions.
	* posix-hdep.c (gdb_call_async_signal_handler): New function.
	* remote-fileio.c (sigint_fileio_token, async_remote_fileio_interrupt):
	New.
	(remote_fileio_ctrl_c_signal_handler): Use
	gdb_call_async_signal_handler.
	(initialize_remote_fileio): Initialize sigint_fileio_token.
	* remote.c (initialize_sigint_signal_handler, handle_remote_sigint): Do
	not initialize tokens here.
	(handle_remote_sigint_twice): Likewise.  Reinstall
	handle_remote_sigint.
	(async_remote_interrupt_twice): Just call interrupt_query.
	(cleanup_sigint_signal_handler): Do not delete tokens.
	(remote_interrupt, remote_interrupt_twice): Use
	gdb_call_async_signal_handler.
	(interrupt_query): Reinstall the default signal handler.
	(_initialize_remote): Initialize tokens here.
2008-03-05 17:21:10 +00:00
Daniel Jacobowitz c03374d554 * Makefile.in (i386-nat.o): Update.
* amd64-linux-nat.c (_initialize_amd64_linux_nat): Call
	i386_use_watchpoints.
	* i386-linux-nat.c (_initialize_i386_linux_nat): Call
	i386_use_watchpoints.
	* i386-nat.c (i386_stopped_data_address): Take two arguments.
	(i386_stopped_by_watchpoint): Update call.
	(i386_can_use_hw_breakpoint, i386_use_watchpoints): New.
	* config/i386/nm-i386.h: Conditionalize definitions on
	! I386_WATCHPOINTS_IN_TARGET_VECTOR.
	(i386_use_watchpoints): Declare.
	(i386_stopped_data_address): Update.
	* config/i386/nm-linux.h (I386_WATCHPOINTS_IN_TARGET_VECTOR): Define.
	* config/i386/nm-linux64.h (I386_WATCHPOINTS_IN_TARGET_VECTOR): Define.
2008-03-01 04:39:36 +00:00
Daniel Jacobowitz e25c958c98 * configure.tgt (sh-*-linux*): Match sh*. Add glibc-tdep.o.
* sh-linux-tdep.c (sh_linux_init_abi): Use glibc_skip_solib_resolver
	and svr4_fetch_objfile_link_map.
	* Makefile.in (sh-linux-tdep.o): Update.
2008-02-27 01:06:21 +00:00
Markus Deuling 07ea644b36 2008-02-20 Markus Deuling <deuling@de.ibm.com>
Mark Kettenis  <kettenis@gnu.org>

	* alpha-tdep.c (alpha_heuristic_unwind_cache): Replace saved_regs by
	trad_frame_saved_reg.
	(trad-frame.h): New include.

	(alpha_heuristic_frame_unwind_cache): Use trad_frame_alloc_saved_regs
	instead of frame_obstack_zalloc.
	(alpha_heuristic_frame_prev_register): Use trad_frame_get_prev_register.

	* Makefile.in (alpha-tdep.o): Add dependency to trad_frame_h.
2008-02-20 15:45:20 +00:00
Markus Deuling f6fbcbf926 * Makefile.in (ALL_TARGET_OBS): Remove dependency to xtensa-linux-nat.o. 2008-02-14 04:49:12 +00:00
Maxim Grigoriev 94a0e87711 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
* NEWS (New native configurations): Xtensa GNU/Linux.
	(New targets): Xtensa GNU/Linux.
	* Makefile.in (ALL_TARGET_OBS): Add xtensa-linux-nat.o and
	xtensa-linux-tdep.o
	(ALLDEPFILES): Add xtensa-linux-tdep.c and xtensa-linux-nat.c
	(xtensa-linux-nat.o, xtensa-linux-tdep.o): New dependencies.
	* configure.tgt (xtensa*-*-linux*): New entry.
	* xtensa-config.c (xtensa_tdep): New variable.
	(xtensa_config_byte_order, xtensa_config_tdep): Removed.
	(rmap): Change format based on new macro XTREG.
	(XTENSA_CONFIG_INSTANTIATE): Use new macro defined in xtensa-tdep.h.
	* xtensa-linux-nat.c: New.
	* xtensa-linux-tdep.c: New.
	* xtensa-xtregs.c: New.
	* xtensa-tdep.h (xtensa_elf_gregset_t): Update.
	(XTENSA_ELF_NGREG, XTREG, XTREG_END, XTENSA_GDBARCH_TDEP_INSTANTIATE)
	(XCHAL_NUM_CONTEXTS, XCHAL_HAVE_EXCEPTIONS): New macros.
	(xtensa_register_t): New field coprocessor.
	(XTENSA_REGISTER_FLAGS_PRIVILEGED): Name spelling corrected.
	* xtensa-tdep.c (xtensa_config_tdep, xtensa_config_byte_order): Removed.
	(xtensa_pseudo_register_read, xtensa_pseudo_register_write):
	Update to handle privileged registers.
	(xtensa_supply_gregset) Remove exccause and excvaddr registers.
	(xtensa_push_dummy_call): Set windowstart register correctly.
	(call0_analyze_prologue): Initialize xtensa_default_isa.
	(xtensa_derive_tdep): New.
	(xtensa_gdbarch_init): Get rid of xtensa_config_byte_order and
	xtensa_config_tdep, use XCHAL_HAVE_BE and xtensa_tdep instead.
	Call xtensa_derive_tdep().
	* config/xtensa/linux.mh: New.
	* regformats/reg-xtensa.dat: New.
2008-02-11 21:58:41 +00:00
Eli Zaretskii f90c07ac03 * corelow.c (core_open): Use IS_ABSOLUTE_PATH.
(filenames.h): New include.
	* Makefile.in (corelow.o): Add dependency for filenames.h.
2008-02-09 13:45:33 +00:00
Doug Evans 776592bf17 * breakpoint.c: #include "hashtab.h".
(ambiguous_names_p): New fn.
	(update_breakpoint_locations): When restoring bp enable status, don't
	compare function names if any functions have same name.
	* Makefile.in (breakpoint.o): Add hashtab.h dependency.

	* gdb.cp/mb-inline.exp: New.
	* gdb.cp/mb-inline.h: New.
	* gdb.cp/mb-inline1.cc: New.
	* gdb.cp/mb-inline2.cc: New.
2008-02-08 00:42:07 +00:00
Joel Brobecker 2ba95b9b76 * ada-lang.c: #include "vec.h".
(struct string_vector, new_string_vector, string_vector_append):
        Delete.
        (char_ptr): New typedef.
        (DEF_VEC_P (char_ptr)): New VEC type.
        (symbol_completion_add): Update profile to take the new VEC type
        instead of the old string_vector structure. Update code accordingly.
        (ada_make_symbol_completion_list): Use the new VEC type instead of
        the old string_vector structure, and update the code accordingly.
        * Makefile.in (ada-lang.o): Add dependency on vec.h.
2008-02-07 19:06:51 +00:00
Vladimir Prus d56d46f5c7 Use vector for varobj_list_children interface.
* gdb/varobj.c (varobj_list_children): Return vector
        of varobjs.
        * gdb/varobj.h (varobj_list_children): Adjust
        prototype.
        (varobj_p): Declare.  Declare vector thereof.
        * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust
        for varobj_list_children change.
	* Makefile.in (varobj_h): Update dependencies.
2008-01-30 07:17:31 +00:00
Daniel Jacobowitz e85a822c15 * Makefile.in (symfile.o): Update.
* NEWS: Mention exec tracing support.
	* inf-ttrace.c (inf_ttrace_wait): Return TARGET_WAITKIND_EXECD for
	exec events.
	* infcmd.c (kill_if_already_running, detach_command)
	(disconnect_command): Replace SOLIB_RESTART with no_shared_libraries.
	* infrun.c (MAY_FOLLOW_EXEC, may_follow_exec): Delete.
	(follow_exec): Do not check may_follow_exec.  Do not mourn and push
	targets.  Apply the sysroot path to the loaded executable.  Use
	no_shared_libraries.
	* linux-nat.c (linux_child_follow_fork): Print fork following
	messages if verbose.
	(kill_wait_callback): Kill again before waiting a second time.
	* symfile.c (symbol_file_clear): Replace SOLIB_RESTART with
	no_shared_libraries.

	* gdb.base/foll-exec.exp: Update header.  Skip on remote targets.
	Run on GNU/Linux.
	(do_exec_tests): Check for systems which do not support catchpoints.
	Do not match START.
	* gdb.base/foll-fork.exp: Update header.  Skip on remote targets.
	Run on GNU/Linux.  Enable verbose output.
	(check_fork_catchpoints): New.
	(explicit_fork_child_follow, catch_fork_child_follow)
	(tcatch_fork_parent_follow): Update expected messages.
	(do_fork_tests): Use check_fork_catchpoints.
	* gdb.base/foll-vfork.exp: Update header.  Skip on remote targets.
	Run on GNU/Linux.  Enable verbose output.
	(check_vfork_catchpoints): New.
	(vfork_parent_follow_to_bp, tcatch_vfork_then_child_follow): Update
	expected messages.
	(do_vfork_and_exec_tests): Use check_fork_catchpoints.
2008-01-29 22:47:20 +00:00
Joel Brobecker b4d5ed91ae * nto-tdep.h: Remove #include "defs.h".
* nto-tdep.c: Add #include "defs.h".
        * Makefile.in (nto_tdep_h): Update dependencies.
        (nto-tdep.o): Likewise.
2008-01-29 21:26:04 +00:00
Nick Hudson af5ca30dc3 Add NetBSD/hppa target and host support.
* hppabsd-tdep.c (hppabsd_supply_gregset): Move to ...
	(hppabsd_gregset): Move to ...
	(hppabsd_regset_from_core_section): Rename
	hppaobsd_regset_from_core_section and move to ...
	(hppabsd_find_global_pointer): Update comment.
	(hppabsd_init_abi): Make global. Do not register
	hppabsd_regset_from_core_section.
	(hppabsd_core_osabi_sniffer): Rename hppaobsd_core_osabi_sniffer and
	move to ...
	(_initialize_hppabsd_tdep): Move to ...
	* hppaobsd-tdep.c: ... here. New file.
	* hppnbsd-tdep.c: New file.
	* hppnbsd-nat.c: New file.
        * Makefile.in (ALL_TARGET_OBS): Add hppanbsd-tdep.o and hppaobsd-tdep.o.
	(ALLDEPFILES): Add hppabsd-nat.c and hppabsd-tdep.c.
        (hppabsd-nat.o, hppabsd-tdep.o): New dependencies.
        (hppabsd-tdep.o, hppaobsd-tdep.o): Update dependencies.
	* configure.host (hppa*-*-netbsd*): New entry.
	* configure.tgt (hppa*-*-netbsd*): New entry.
	(hppa*-*-openbsd*): Update.
	* NEWS (New native configuration): Mention NetBSD/hppa.
	(New targets): Mention NetBSD/hppa.
2008-01-19 15:03:50 +00:00
Markus Deuling ed49a04fe1 * exec.c: #include "arch-utils.h"
(print_section_info): Use gdbarch_from_bfd to get at the
	current architecture. Replace current_gdbarch. Fix indention.
	Replace deprecated_print_address_numeric by paddress.
	* Makefile.in (exec.o) Add dependency to arch-utils.h.

	* valprint.c (val_print_string): Replace
	deprecated_print_address_numeric.
	* tracepoint.c (trace_mention, scope_info): Likewise.
	* symmisc.c (dump_msymbols, dump_psymtab, dump_symtab_1, print_symbol)
	(print_symbol, print_partial_symbols, maintenance_info_psymtabs)
	(maintenance_check_symtabs): Likewise.
	* symfile.c (list_overlays_command): Likewise.
	* stack.c (frame_info, print_block_frame_labels): Likewise.
	* printcmd.c (print_address, print_address_demangle)
	(address_info): Likewise.
	* corefile.c (memory_error): Likewise.
	* infcmd.c (jump_command): Likewise.
	* breakpoint.c (insert_bp_location, describe_other_breakpoints)
	(mention, delete_breakpoint): Likewise.
	* c-valprint.c (print_function_pointer_address, c_val_print): Likewise.
	* dwarf2read.c (dump_die): Likewise.
	* ada-valprint.c (ada_val_print_1): Likewise.
	* f-valprint.c (f_val_print): Likewise.
	* linux-fork.c (info_forks_command): Likewise.
	* m32r-com.c (m32r_load_section, m32r_load)
	(m32r_upload_command): Likewise.

	* ui-out.c (ui_out_field_core_addr): Remove unnecessary comment.
2008-01-11 13:34:15 +00:00
Joel Brobecker a93c0eb695 * ada-lang.c (ada_convert_actual): Renames convert_actual.
Make non-static.
        (ada_convert_actuals): Delete.
        * ada-lang.h (ada_convert_actual): Add declaration.
        (ada_convert_actuals): Remove declaration.
        * infcall.c: #include "ada-lang.h".
        (value_arg_coerce): Add new parameter sp.  Update function
        documetnation.  Add handling of Ada function call parameters.
        * Makefile.in (infcall.o): Update dependencies.
2008-01-08 19:28:09 +00:00
Thiago Jung Bauermann 4ef30785ea * Makefile.in (dfp.o): Depend on expression.h, gdbtypes.h and value.h.
(valarith.o): Depend on dfp.h.
	(valops.o): Likewise.
	* dfp.c: Include expression.h, gdbtypes.h, value.h and dfp.h.
	(set_decnumber_context): New function.
	(decimal_check_errors): Likewise.
	(decimal_from_number): Likewise.
	(decimal_to_number): Likewise.
	(decimal_from_string): Use set_decnumber_context and
	decimal_check_errors.
	(decimal_from_integral): New function.
	(decimal_from_floating): Likewise.
	(decimal_to_double): Likewise.
	(promote_decimal): Likewise.
	(decimal_binop): Likewise.
	(decimal_is_zero): Likewise.
	(decimal_compare): Likewise.
	(decimal_convert): Likewise.
	* dfp.h (decimal_from_integral): New prototype.
	(decimal_from_floating): Likewise.
	(decimal_to_double): Likewise.
	(decimal_binop): Likewise.
	(decimal_is_zero): Likewise.
	(decimal_compare): Likewise.
	(decimal_convert): Likewise.
	* eval.c (evaluate_subexp_standard): Remove expect_type argument from
	call to value_from_decfloat.
	* valarith.c: Include dfp.h.
	(value_args_as_decimal): New function.
	(value_binop): Add if block to handle TYPE_CODE_DECFLOAT values.
	(value_logical_not): Likewise.
	(value_equal): Likewise.
	(value_less): Likewise.
	(value_pos): Likewise.
	(value_neg): Formatting fix.
	* valops.c: Include dfp.h.
	(value_cast): Add if block to handle TYPE_CODE_DECFLOAT values.
	* value.c (unpack_long): Add case to handle TYPE_CODE_DECFLOAT.
	(unpack_double): Add if block to handle TYPE_CODE_DECFLOAT.
	(value_from_decfloat): Remove expect_type argument.
	* value.h (value_from_decfloat): Update prototype.
2008-01-07 22:33:57 +00:00
Daniel Jacobowitz 9b254dd1ce Updated copyright notices for most files. 2008-01-01 22:53:26 +00:00
Mark Kettenis 70f13f6b00 * i386nbsd-tdep.c: Include "trad-frame.h" and "tramp-frame.h"
(sigtramp_retcode, i386nbsd_sigtramp_offset, i386nbsd_sigtramp_p):
Remove
(i386nbsd_mc_reg_offset): New array.
(i386nbsd_sigtramp_cache_init): New function.
(i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2, i386nbsd_sigtramp_si2)
(i386nbsd_sigtramp_si31, i386nbsd_sigtramp_si4): New signal trampoline
frame descriptions.
(i386nbsd_init_abi): Override ABI sigcontext defaults and register
new signal frame unwinders
* Makefile.in (i386nbsd-tdep.o): Update dependencies.
* tramp-frame.h (struct tramp_frame): Allow for 48 instructions
2007-12-29 17:01:41 +00:00
Joel Brobecker 3463063964 * rs6000-tdep.h: Remove defs.h #include.
* Makefile.in (rs6000_tdep_h): Update dependencies.
2007-12-21 04:59:00 +00:00
Joel Brobecker 10d00faca9 * symtab.h: Remove "defs.h" #include.
* Makefile.in (symtab_h): Update dependencies.
2007-12-20 05:36:14 +00:00
Joel Brobecker 67cd94cafd * symtab.h: #include "defs.h".
(enum language): Remove opaque declaration.
        * Makefile.in (symtab_h): Update dependencies.
2007-12-19 13:21:32 +00:00
Maciej W. Rozycki 9544c605b6 * utils.c (string_to_core_addr): If the executable format
indicates that addresses should be sign-extended and there are
only 8 hex digits in the address, then do so.
* Makefile.in (utils.o): Depend on $(gdbcore_h).
2007-12-17 17:49:29 +00:00
Pierre Muller 2c6474365f 2007-12-06 Pierre Muller <muller@ics.u-strasbg.fr>
* win32-nat.c: Allow compilation if CORE_ADDR is 8 byte long.
	Add "gdb_stdint.h" dependency required for uintptr_t type use.
	(handle_output_debug_string): Use uintptr_t typecast.
	(handle_exception): Ditto.
	(win32_xfer_memory): Ditto.
	* Makefile.in (win32-nat.o): Add dependency to gdb_stdint header.
2007-12-06 11:17:03 +00:00
Jim Blandy 801e3a5b56 Support lexical blocks and function bodies that occupy
non-contiguous address ranges.
* addrmap.c, addrmap.h: New files.
* block.h (struct addrmap): New forward declaration.
(struct blockvector): New member, 'map'.
(BLOCKVECTOR_MAP): New accessor macro.
* block.c: #include "addrmap.h"
(blockvector_for_pc_sect): If the blockvector we've found has
an address map, use it instead of searching the blocks.
* buildsym.c: #include "addrmap.h"
(pending_addrmap_obstack, pending_addrmap_interesting): New static
variables.
(really_free_pendings): If we have a pending addrmap, free it too.
(record_block_range): New function.
(make_blockvector): If we have an interesting pending addrmap,
record it in the new blockvector.
(start_symtab, buildsym_init): Assert that there is no pending
addrmap now; we should have cleaned up any addrmaps we'd built
previously.
(end_symtab): If there is a pending addrmap left over that didn't
get included in the blockvector, free it.
* buildsym.h (struct addrmap): New forward declaration.
(record_block_range): New prototype.
* objfiles.c: #include "addrmap.h".
(objfile_relocate): Relocate the blockvector's address map, if
present.
* dwarf2read.c (dwarf2_record_block_ranges): New function.
(read_func_scope, read_lexical_block_scope): Call it.
* Makefile.in (SFILES): Add addrmap.c.
(addrmap_h): New header dependency variable.
(COMMON_OBS): Add addrmap.o.
(addrmap.o): New rule.l
(block.o, objfiles.o, buildsym.o): Depend on $(addrmap_h).

* block.c (blockvector_for_pc, blockvector_for_pc_sect): Return a
pointer to the block, not its index in the blockvector.
(block_for_pc_sect): Use the returned block, instead of looking it
up ourselves.
* block.h (blockvector_for_pc, blockvector_for_pc_sect): Update
declarations.
* breakpoint.c (resolve_sal_pc): Use returned block, instead of
looking it up ourselves.
* stack.c (print_frame_label_vars): Disable function, which
depends on the block's index.

* buildsym.c (finish_block): Return the block we've built.
* buildsym.h (finish_block): Update prototype.

* defs.h (CORE_ADDR_MAX): New constant.
2007-12-04 23:43:57 +00:00
Daniel Jacobowitz a6b151f187 * remote.c (remote_cmdlist): New variable.
(PACKET_vFile_open, PACKET_vFile_pread, PACKET_vFile_pwrite)
	(PACKET_vFile_close, PACKET_vFile_unlink): New constants.
	(remote_buffer_add_string, remote_buffer_add_bytes)
	(remote_buffer_add_int, remote_hostio_parse_result)
	(remote_hostio_send_command, remote_hostio_open, remote_hostio_pwrite)
	(remote_hostio_pread, remote_hostio_close, remote_hostio_unlink)
	(remote_fileio_errno_to_host, remote_hostio_error, fclose_cleanup)
	(remote_hostio_close_cleanup, remote_file_put, remote_file_get)
	(remote_file_delete, remote_put_command, remote_get_command)
	(remote_delete_command, remote_command): New functions.
	(_initialize_remote): Register new packets and commands.
	* Makefile.in (gdb_fileio_h): New variable.
	(remote.o): Update.
	(SUBDIR_MI_OBS): Add mi-cmd-target.o.
	(SUBDIR_MI_SRCS): Add mi/mi-cmd-target.c.
	(mi-cmd-target.o): New rule.
	* mi/mi-cmd-target.c: New file.
	* mi/mi-cmds.c (mi_cmds): Add target-file-delete, target-file-get,
	and target-file-put.
	* mi/mi-cmds.h (mi_cmd_target_file_get, mi_cmd_target_file_put)
	(mi_cmd_target_file_delete): Declare.
	* remote.h (remote_file_put, remote_file_get, remote_file_delete):
	Declare.
	* NEWS: Describe new file transfer support.

	* gdb.texinfo (Debugging Programs with Multiple Processes): Correct
	formatting.
	(Remote Debugging): Add File Transfer section.
	(Remote Configuration): Document Host I/O packets.
	(GDB/MI): Add GDB/MI File Transfer Commands section.
	(Remote Protocol): Add Host I/O Packets section.
	(Packets): Add vFile.

	* Makefile.in (OBS): Add hostio.o.
	(hostio.o): New rule.
	* server.h (handle_vFile): Declare.
	* hostio.c: New file.
	* server.c (handle_v_requests): Take packet_len and new_packet_len
	for binary packets.  Call handle_vFile.
	(main): Update call to handle_v_requests.

	* gdb.server/file-transfer.exp, gdb.server/transfer.txt,
	gdb.mi/mi-file-transfer.exp: New.
2007-11-30 21:50:19 +00:00
Ulrich Weigand c0993dbe92 * Makefile.in (ALL_TARGET_OBS): Remove object files that require
64-bit CORE_ADDR and BFD support, move them to ...
	(ALL_64_TARGET_OBS): ... this new variable.
	* configure.ac: Check for --enable-64-bit-bfd option.  Only add
	64-bit targets with --enable-targets=all if BFD supports 64-bit.
	* configure: Regenerate.

	* i386-cygwin-tdep.c (i386_cygwin_osabi_sniffer): Do not claim
	all elf32-i386 executables, only cygwin core files.
2007-11-27 17:06:12 +00:00
Ulrich Weigand d0c678e6de * configure.ac (--enable-targets): New configure option.
Collect gdb_target_obs of multiple targets into TARGET_OBS.
	Call configure.tgt multiple times, using $targ as operand.
	* configure.tgt: Operate on $targ instead of $target.
	* configure: Regenerate.
	* Makefile.in (ALL_TARGET_OBS): Define.

	* NEWS: Mention --enable-targets option.
2007-11-17 01:02:01 +00:00
Ulrich Weigand ec20a626bd * amd64fsdb-tdep.c (amd64fbsd_sigtramp_start_addr): Use ULL suffix.
(amd64fbsd_sigtramp_end_addr): Likewise.

	* iq2000-tdep.c (iq2000_pointer_to_address): Fix argument type.
	(iq2000_address_to_pointer): Likewise.
	(iq2000_frame_prev_register): Likewise.
	(iq2000_extract_return_value): Use regcache_cooked_read_unsigned
	instead of regcache_cooked_read into CORE_ADDR variable.
	(iq2000_return_value): Fix argument types.

	* m32r-rom.c (m32r_load_section): Fix printf argument type.
	(m32r_load): Likewise.

	* m68kbsd-tdep.c: Include "gdbtypes.h".
	* Makefile.in: Update dependencies.

	* mn10300-tdep.c (mn10300_frame_unwind_cache): Fix aliasing violation.

	* nto-tdep.c (LM_ADDR): Do not refer to no-longer-existing
	lmo->l_addr_size element.

	* remote-m32r-sdi.c (m32r_xfer_memory): Use paddr to print address.
	(m32r_insert_breakpoint): Likewise.
	(m32r_remove_breakpoint): Likewise.
	(m32r_insert_watchpoint): Likewise.
	(m32r_remove_watchpoint): Likewise.
	(m32r_load): Fix printf argument type.

	* xtensa-tdep.c (xtensa_regset_from_core_section): Fix printf
	argument type.
	(xtensa_frame_this_id): Do not cast pointers to "int" for output.
	(xtensa_frame_prev_register): Likewise.
	(xtensa_push_dummy_call): Likewise.
2007-11-17 00:55:29 +00:00
Ulrich Weigand a4ce5b0d02 * config/alpha/alpha-linux.mt: Remove file.
* config/alpha/alpha.mt: Remove file.
	* config/alpha/alpha-osf1.mt: Remove file.
	* config/alpha/fbsd.mt: Remove file.
	* config/alpha/nbsd.mt: Remove file.
	* config/alpha/obsd.mt: Remove file.
	* config/arm/embed.mt: Remove file.
	* config/arm/linux.mt: Remove file.
	* config/arm/nbsd.mt: Remove file.
	* config/arm/obsd.mt: Remove file.
	* config/arm/wince.mt: Remove file.
	* config/avr/avr.mt: Remove file.
	* config/cris/cris.mt: Remove file.
	* config/frv/frv.mt: Remove file.
	* config/h8300/h8300.mt: Remove file.
	* config/i386/cygwin.mt: Remove file.
	* config/i386/fbsd64.mt: Remove file.
	* config/i386/fbsd.mt: Remove file.
	* config/i386/i386gnu.mt: Remove file.
	* config/i386/i386.mt: Remove file.
	* config/i386/i386sol2.mt: Remove file.
	* config/i386/linux64.mt: Remove file.
	* config/i386/linux.mt: Remove file.
	* config/i386/mingw.mt: Remove file.
	* config/i386/nbsd64.mt: Remove file.
	* config/i386/nbsd.mt: Remove file.
	* config/i386/nto.mt: Remove file.
	* config/i386/obsd64.mt: Remove file.
	* config/i386/obsd.mt: Remove file.
	* config/i386/sol2-64.mt: Remove file.
	* config/ia64/ia64.mt: Remove file.
	* config/ia64/linux.mt: Remove file.
	* config/iq2000/iq2000.mt: Remove file.
	* config/m32c/m32c.mt: Remove file.
	* config/m32r/linux.mt: Remove file.
	* config/m32r/m32r.mt: Remove file.
	* config/m68hc11/m68hc11.mt: Remove file.
	* config/m68k/linux.mt: Remove file.
	* config/m68k/monitor.mt: Remove file.
	* config/m68k/nbsd.mt: Remove file.
	* config/m68k/obsd.mt: Remove file.
	* config/m88k/obsd.mt: Remove file.
	* config/mep/mep.mt: Remove file.
	* config/mips/embed.mt: Remove file.
	* config/mips/irix5.mt: Remove file.
	* config/mips/irix6.mt: Remove file.
	* config/mips/linux.mt: Remove file.
	* config/mips/nbsd.mt: Remove file.
	* config/mips/obsd64.mt: Remove file.
	* config/mn10300/linux.mt: Remove file.
	* config/mn10300/mn10300.mt: Remove file.
	* config/mt/mt.mt: Remove file.
	* config/pa/hppahpux.mt: Remove file.
	* config/pa/hppa.mt: Remove file.
	* config/pa/linux.mt: Remove file.
	* config/pa/obsd.mt: Remove file.
	* config/powerpc/aix.mt: Remove file.
	* config/powerpc/linux.mt: Remove file.
	* config/powerpc/nbsd.mt: Remove file.
	* config/powerpc/obsd.mt: Remove file.
	* config/powerpc/ppc-eabi.mt: Remove file.
	* config/s390/s390.mt: Remove file.
	* config/score/embed.mt: Remove file.
	* config/sh/embed.mt: Remove file.
	* config/sh/linux.mt: Remove file.
	* config/sh/nbsd.mt: Remove file.
	* config/sh/obsd.mt: Remove file.
	* config/sh/sh64.mt: Remove file.
	* config/sparc/embed.mt: Remove file.
	* config/sparc/fbsd.mt: Remove file.
	* config/sparc/linux64.mt: Remove file.
	* config/sparc/linux.mt: Remove file.
	* config/sparc/nbsd64.mt: Remove file.
	* config/sparc/nbsd.mt: Remove file.
	* config/sparc/obsd64.mt: Remove file.
	* config/sparc/obsd.mt: Remove file.
	* config/sparc/sol2-64.mt: Remove file.
	* config/sparc/sol2.mt: Remove file.
	* config/sparc/sparc64.mt: Remove file.
	* config/sparc/sparc.mt: Remove file.
	* config/spu/spu.mt: Remove file.
	* config/v850/v850.mt: Remove file.
	* config/vax/nbsd.mt: Remove file.
	* config/vax/obsd.mt: Remove file.
	* config/vax/vax.mt: Remove file.
	* config/xstormy16/xstormy16.mt: Remove file.
	* config/xtensa/xtensa.mt: Remove file.

	* configure.tgt (gdb_target_cpu): Remove.  Do not set anywhere.
	(gdb_target): Likewise.
	(gdb_target_obs): Document.  Set for every target to contents
	of TDEPFILES in former .mt makefile fragment.

	* configure.ac (TARGET_OBS): Define.
	(target_makefile_frag, gdb_target_cpu): Do not define.
	* configure: Regenerate.

	* Makefile.in (MT_FLAGS): Remove.
	(GLOBAL_CFLAGS): Update.
	(TARGET_OBS): Substitute from configure.
	(DEPFILES): Remove TDEPFILES, add TARGET_OBS.
	(@target_makefile_frag@): Remove.

doc/ChangeLog:

	* Makefile.in (Makefile): Do not depend on target_makefile_frag.

testsuite/ChangeLog:

	* Makefile.in (Makefile): Do not depend on target_makefile_frag.
	(target_cpu): Remove.
2007-11-17 00:54:18 +00:00
Ulrich Weigand 9b624dbeed * config/arm/embed.mt (SIM_OBS, SIM): Remove.
* config/avr/avr.mt (SIM_OBS, SIM): Remove.
	* config/frv/frv.mt (SIM_OBS, SIM): Remove.
	* config/h8300/h8300.mt (SIM_OBS, SIM): Remove.
	* config/iq2000/iq2000.mt (SIM_OBS, SIM): Remove.
	* config/m32c/m32c.mt (SIM_OBS, SIM): Remove.
	* config/m32r/linux.mt (SIM_OBS, SIM): Remove.
	* config/m32r/m32r.mt (SIM_OBS, SIM): Remove.
	* config/m68hc11/m68hc11.mt (SIM_OBS, SIM): Remove.
	* config/mips/embed.mt (SIM_OBS, SIM): Remove.
	* config/mips/linux.mt (SIM_OBS, SIM): Remove.
	* config/mips/nbsd.mt (SIM_OBS, SIM): Remove.
	* config/mn10300/mn10300.mt (SIM_OBS, SIM): Remove.
	* config/powerpc/linux.mt (SIM_OBS, SIM): Remove.
	* config/powerpc/nbsd.mt (SIM_OBS, SIM): Remove.
	* config/powerpc/ppc-sim.mt: Remove file.
	* config/sh/embed.mt (SIM_OBS, SIM): Remove.
	* config/sh/linux.mt (SIM_OBS, SIM): Remove.
	* config/sh/nbsd.mt (SIM_OBS, SIM): Remove.
	* config/sh/sh64.mt (SIM_OBS, SIM): Remove.
	* config/sparc/embed.mt (SIM_OBS, SIM): Remove.
	* config/v850/v850.mt (SIM_OBS, SIM): Remove.
	* config/xstormy16/xstormy16.mt (SIM_OBS, SIM): Remove.

	* configure.tgt (gdb_sim): Document variable.
	(arm*-*-* | thumb*-*-* | strongarm*-*-* | xscale-*-*): Set it.
	(avr-*-*): Likewise.
	(frv-*-*): Likewise.
	(h8300-*-*): Likewise.
	(iq2000-*-*): Likewise.
	(m32c-*-*): Likewise.
	(m32r*-*-linux*): Likewise.
	(m32r*-*-*): Likewise.
	(m68hc11*-*-*|m6811*-*-*): Likewise.
	(mips*-*-*): Likewise.
	(mips*-*-linux*): Likewise.
	(mips*-*-netbsd* | mips*-*-knetbsd*-gnu): Likewise.
	(mn10300-*-*): Likewise.
	(powerpc-*-linux* | powerpc64-*-linux*): Likewise.
	(powerpc-*-netbsd* | powerpc-*-knetbsd*-gnu): Likewise.
	(powerpc*-*-*): Use ppc-eabi target.  Conditionally set gdb_sim.
	(sh*): Set gdb_sim.
	(sh-*-linux*): Likewise.
	(sh*-*-netbsdelf* | sh*-*-knetbsd*-gnu): Likewise.
	(sh64-*-elf*): Likewise.
	(sparc-*-rtems*): Likewise.
	(v850*-*-elf): Likewise.
	(xstormy16-*-*): Likewise.

	* configure.ac (IGNORE_SIM, IGNORE_SIM_OBS): Do not set.
	(SIM, SIM_OBS): Set depending on ${ignore_sim} and ${gdb_sim}.
	* configure: Regenerate.
	* Makefile.in (SIM, SIM_OBS): Substitute from configure.
	(@IGNORE_SIM@, @IGNORE_SIM_OBS@): Remove.
2007-11-17 00:44:38 +00:00
Ulrich Weigand db985757a9 * configure.ac (hostfile, targetfile): Remove.
(GDB_XM_FILE, GDB_TM_FILE): Do not define.
	(xm_h, tm_h): Likewise.
	(DEPRECATED_TM_FILE, XM_FILE): Do not substitute into Makefile.
	* configure, config.in: Regenerate.

	* Makefile.in (xm_h, tm_h): Remove.  Update dependencies.
	(TAGS): Do not consider DEPRECATED_TM_FILE or XM_FILE.
	(clean, local-maintainer-clean): Do not remove xm.h or tm.h.
	* defs.h: Do not include "xm.h" or "tm.h".

	* gdbarch.sh (verify_gdbarch): Do not dump GDB_XM_FILE or GDB_TM_FILE.
	* gdbarch.c: Regenerate.

	* config/score/embed.mt: Remove obsolete comment.
2007-11-17 00:41:17 +00:00
Vladimir Prus d6e956e5c2 Prevent clear_command from directly modifying breakpoint list.
* Makefile.in (breakpoint_h): Update dependency.
	* breakpoint.c (clear_command): Do not remove
	breakpoints from breakpoint_chain.  Collect breakpoints
	to delete in a vector.
	* breakpoint.h (breakpoint_p): New typedef for pointer to
	breakpoint.  Register vector of breakpoint_p.
2007-11-15 06:28:19 +00:00
Daniel Jacobowitz 55eddb0f7a * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Check the selected
soft float and vector ABIs.  Support the generic vector ABI for
	AltiVec types.
	(do_ppc_sysv_return_value): Likewise.  Correct argument types and
	casts.
	(ppc64_sysv_abi_push_dummy_call): Assert that floating point is
	supported.
	* ppc-tdep.h (enum powerpc_vector_abi): New.
	(struct gdbarch_tdep): Add soft_float and vector_abi.
	* rs6000-tdep.c (setpowerpccmdlist, showpowerpccmdlist)
	(powerpc_soft_float_global, powerpc_vector_strings)
	(powerpc_vector_abi_global, powerpc_vector_abi_string): New.
	(rs6000_gdbarch_init): Check for soft-float and vector ABI markings.
	(set_powerpc_command, show_powerpc_command, powerpc_set_soft_float)
	(powerpc_set_vector_abi): New.
	(_initialize_rs6000_tdep): Register "set powerpc" and "show powerpc"
	commands.
	* Makefile.in (elf_ppc_h): New.
	(rs6000-tdep.o): Update.

	* gdb.texinfo (PowerPC): Document "set powerpc vector-abi" and "set
	powerpc soft-float".

	* gdb.arch/altivec-abi.exp: Run multiple times for GCC on GNU/Linux.
	Test "set powerpc vector-abi".  Skip auto-detection tests for old
	toolchains.
2007-10-30 19:35:35 +00:00
Thiago Jung Bauermann 9b913628cf 2007-10-25 Wu Zhou <woodzltc@cn.ibm.com>
Thiago Jung Bauermann  <bauerman@br.ibm.com>

	* Makefile.in (LIBDECNUMBER_DIR, LIBDECNUMBER, LIBDECNUMBER_SRC
	LIBDECNUMBER_CFLAGS): New macros for libdecnumber.
	(INTERNAL_CFLAGS_BASE): Add LIBDECNUMBER_CFLAGS in.
	(INSTALLED_LIBS): Add -ldecnumber in.
	(CLIBS): Add LIBDECNUMBER in.
	(decimal128_h, decimal64_h, decimal32_h): New macros for decimal
	headers.
	(dfp_h): New macros for decimal floating point.
	(dfp.o): New target.
	(COMMON_OBS): Add dfp.o in.
	(c-exp.o): Add dfp_h as dependency.
	(valprint.o): Add dfp_h as dependency.
	(value.o): Add dfp_h as dependency.
	* dfp.h: New header file for decimal floating point support in
	GDB.
	* dfp.c: New source file for decimal floating point support in
	GDB.  Implement decimal_from_string and decimal_to_string based
	on libdecnumber API.
	* configure.ac: Add AC_C_BIGENDIAN test.
	* config.in, configure: Regenerate.
2007-10-25 17:52:32 +00:00
Maciej W. Rozycki ad84214454 PR exp/1926
* infcmd.c (registers_info): Check for a user register before
calling target's gdbarch_print_registers_info().  If found to be
so, extract the implicit value of user register and call
print_scalar_formatted().
* Makefile.in: (infcmd.o): Add $(user_regs_h).
2007-10-25 11:30:55 +00:00
Ulrich Weigand 8d00578918 * solib-svr4.c (legacy_svr4_fetch_link_map_offsets_hook): Remove.
(solib_svr4_init): Initialize fetch_link_map_offsets to NULL.
	* solib-svr4.h (legacy_svr4_fetch_link_map_offsets_hook): Remove.
	* solib-legacy.c: Remove file.

	* config/alpha/alpha-linux.mt (TDEPFILES): Remove solib-legacy.o.
	* config/arm/linux.mt (TDEPFILES): Likewise.
	* config/i386/i386gnu.mh (NATDEPFILES): Likewise.
	* config/ia64/linux.mt (TDEPFILES): Likewise.
	* config/m32r/linux.mt (TDEPFILES): Likewise.
	* config/powerpc/linux.mt (TDEPFILES): Likewise.
	* config/s390/s390.mt (TDEPFILES): Likewise.

	* alpha-linux-tdep.c (alpha_linux_init_abi): Call
	set_solib_svr4_fetch_link_map_offsets.
	* i386gnu-tdep.c (i386gnu_init_abi): Likewise.
	* ia64-linux-tdep.c (ia64_linux_init_abi): Likewise.

	* i386gnu-tdep.c: Include "solib-svr4.h".
	* Makefile.in: Update dependencies.
2007-10-24 21:21:16 +00:00
Ulrich Weigand 59215afbea * i386-nto-tdep.c: Include "solib.h".
(i386nto_init_abi): Use set_solib_ops instead of overwriting
	current_target_so_ops members.
	* solist.h (TARGET_SO_RELOCATE_SECTION_ADDRESSES): Remove.
	(TARGET_SO_FIND_AND_OPEN_SOLIB): Remove.
	(TARGET_SO_IN_DYNSYM_RESOLVE_CODE): Remove.
	* Makefile.in: Update dependencies.
2007-10-24 21:18:52 +00:00
Ulrich Weigand 8d46538969 * arm-wince-tdep.c: Include "solib.h" and "solib-target.h".
(arm_wince_init_abi): Call set_solib_ops.
	* i386-cygwin-tdep.c: Include "solib.h" and "solib-target.h".
	(i386_cygwin_init_abi): Call set_solib_ops.
	* solib-target.c: Include "solib-target.h".
	(solib_target_so_ops): Make global.
	(_initialize_solib_target): Do not set current_target_so_ops.
	* solib-target.h: New file.
	* Makefile.in: Update dependencies.
2007-10-24 21:16:30 +00:00
Ulrich Weigand 734598d921 * mips-irix-tdep.c: Include "gdb_string.h", "solib.h", "solib-irix.h".
(mips_irix_init_abi): Call set_solib_ops.
	* solib-irix.c: Include "solib.h" and "solib-irix.h".
	(irix_so_ops): Make global.
	(_initialize_irix_solib): Do not set current_target_so_ops.
	* solib-irix.h: New file.
	* Makefile.in: Update dependencies.
2007-10-24 21:15:35 +00:00
Ulrich Weigand d542061a79 * configure.tgt: Remove hppa*64*-*-hpux11* special case.
* config/pa/hppa64.mt: Delete file.
	* config/pa/hppahpux.mt (MT_CFLAGS): Remove.
	(TDEPFILES): Move somread.o to ...
	* config/pa/hpux.mh (NATDEPFILES): ... here.

	* configure.ac: Add check for elf_hp.h header.
	Search libdl and libxpdl for dlgetmodinfo.
	* config.in, configure: Regenerate.
	* solib-pa64.c: Conditionalize compilation on #ifdef HAVE_ELF_HP_H
	instead of #ifndef PA_SOM_ONLY.  Include "solib.h".
	(pa64_solib_select): Take gdbarch instead of tdep argument.  Call
	set_solib_ops instead of modifying current_target_so_ops.
	* solib-pa64.h (pa64_solib_select): Update prototype.
	* solib-som.c: Remove include of "som.h".  Include "solib.h".
	(som_solib_select): Take gdbarch instead of tdep argument.  Call
	set_solib_ops instead of modifying current_target_so_ops.
	* solib-som.h (som_solib_select): Update prototype.
	* hppa-hpux-tdep.c (hppa_hpux_som_init_abi): Pass gdbarch instead
	of tdep to som_solib_select call.
	(hppa_hpux_elf_init_abi): Pass gdbarch instead of tdep to
	pa64_solib_select call.
	* Makefile.in: Update dependencies.
2007-10-24 21:14:17 +00:00
Ulrich Weigand 917630e4a0 * frv-tdep.c: Include "solib.h".
(frv_gdbarch_init): Call set_solib_ops.
	* frv-tdep.h (struct target_so_ops): Add forward reference.
	(frv_so_ops): Add extern declaration.
	* solib-frv.c (frv_so_ops): Make global.
	(_initialize_frv_solib): Do not set current_target_so_ops.
	* Makefile.in: Update dependencies.
2007-10-24 21:08:23 +00:00
Daniel Jacobowitz f88e9fd315 * cp-support.c: Include "safe-ctype.h".
(cp_already_canonical): New function.
	(cp_canonicalize_string): Use it.  Return NULL for already canonical
	strings.
	(mangled_name_to_comp): Update call to cp_demangled_name_to_comp.
	(cp_func_name, remove_params): Likewise.
	(cp_find_first_component_aux): Use ISSPACE.
	* cp-support.h (cp_demangled_name_to_comp): Correct comment.  Remove
	MEMORY_P argument.
	* cp-name-parser.y (ALLOC_CHUNK): Define.
	(struct demangle_info): Add PREV and NEXT.  Increase the size of
	COMPS.
	(d_grab): Convert to a function.
	(allocate_info): Rewrite.
	(cp_demangled_name_to_comp): Remove MEMORY argument.  Do not use
	strlen.  Update call to allocate_info.  Do not free it on failure.
	(main): Update calls to cp_demangled_name_to_comp.
	* Makefile.in (cp-support.o): Update.
2007-10-22 14:37:36 +00:00
Daniel Jacobowitz 7cc46491b1 * NEWS: Document target described register support for PowerPC.
* ppc-tdep.h: Remove ppc_spr constants.
	(struct gdbarch_tdep): Remove regs, ppc_sr0_regnum, and
	ppc_builtin_type_vec128 members.
	(PPC_R0_REGNUM, PPC_F0_REGNUM, PPC_PC_REGNUM, PPC_MSR_REGNUM)
	(PPC_CR_REGNUM, PPC_LR_REGNUM, PPC_CTR_REGNUM, PPC_XER_REGNUM)
	(PPC_FPSCR_REGNUM, PPC_MQ_REGNUM, PPC_SPE_UPPER_GP0_REGNUM)
	(PPC_SPE_ACC_REGNUM, PPC_SPE_FSCR_REGNUM, PPC_VR0_REGNUM)
	(PPC_VSCR_REGNUM, PPC_VRSAVE_REGNUM, PPC_NUM_REGS): New constants.
	* rs6000-tdep.c: Include preparsed descriptions.
	(init_sim_regno_table): Do not iterate over pseudo registers.
	Look up segment registers by name.  Use sim_spr_register_name
	for SPRs.
	(rs6000_register_sim_regno): Call init_sim_regno_table here.
	(rs6000_builtin_type_vec128): Delete.
	(rs6000_register_name): Only handle SPE pseudo registers and upper
	halves.  Call tdesc_register_name for everything else.
	(rs6000_register_type): Delete.  Replace with...
	(rs6000_pseudo_register_type): ...this new function.  Only handle
	SPE pseudo registers.
	(rs6000_register_reggroup_p): Delete.  Replace with...
	(rs6000_pseudo_register_reggroup_p): ...this new function.  Only
	handle SPE pseudo registers.
	(rs6000_convert_register_p): Use ppc_fp0_regnum instead of
	"struct reg".
	(rs6000_register_to_value, rs6000_value_to_register): Remove check
	of reg->fpr.
	(e500_register_reggroup_p): Delete.
	(STR, R, R4, R8, R16, F, P8, R32, R64, R0, A4, S, S4, SN4, S64)
	(COMMON_UISA_REGS, PPC_UISA_SPRS, PPC_UISA_NOFP_SPRS)
	(PPC_SEGMENT_REGS, PPC_OEA_SPRS, PPC_ALTIVEC_REGS, PPC_SPE_GP_REGS)
	(PPC_SPE_UPPER_GP_REGS, PPC_EV_PSEUDO_REGS): Delete macros.
	(registers_powerpc, registers_403, registers_403GC, registers_505)
	(registers_860, registers_601, registers_602, registers_603)
	(registers_604, registers_750, registers_7400, registers_e500): Delete
	variables.
	(struct variant): Delete nregs, npregs, num_tot_regs, and regs.  Add
	tdesc.
	(tot_num_registers, num_registers, num_pseudo_registers): Delete.
	(variants): Delete outdated comment.  Use standard target descriptions
	instead of "struct reg" arrays.
	(init_variants): Delete.
	(rs6000_gdbarch_init): Do not guess word size from the BFD
	architecture if we have a target description.  Select a variant
	before creating a new architecture.  Use the variant's target
	description if the target did not define a register layout.
	Validate target-supplied registers.  Reject mismatches.  Use
	fixed register numbers and new constants instead of magic
	numbers.  Call set_gdbarch_ps_regnum.  Call tdesc_use_registers.
	(_initialize_rs6000_tdep): Initialize the preparsed target
	descriptions.
	* target-descriptions.c (tdesc_predefined_types): Add int128 and
	uint128.
	(tdesc_find_register_early): New function.
	(tdesc_numbered_register): Use it.
	(tdesc_register_size): New function.
	(tdesc_use_registers): Take a target_desc argument.  Do not use
	gdbarch_target_desc.
	* target-descriptions.h (tdesc_use_registers): Update prototype
	and comment.
	(tdesc_register_size): New prototype.
	* Makefile.in (powerpc_32_c, powerpc_403_c, powerpc_403gc_c)
	(powerpc_505_c, powerpc_601_c, powerpc_602_c, powerpc_603_c)
	(powerpc_604_c, powerpc_64_c, powerpc_7400_c, powerpc_750_c)
	(powerpc_860_c, powerpc_e500_c, rs6000_c): New macros.
	(rs6000-tdep.o): Update.
	* arm-tdep.c (arm_gdbarch_init): Update call to tdesc_use_registers.
	* m68k-tdep.c (m68k_gdbarch_init): Likewise.
	* mips-tdep.c (mips_gdbarch_init): Likewise.

	* gdb.texinfo (Predefined Target Types): Add int128
	and uint128.
	(Standard Target Features): Add PowerPC features.

	* gdb.xml/tdesc-regs.exp: Add PowerPC support.

	* sim-ppc.h (sim_spr_register_name): New prototype.

	* gdb-sim.c (regnum2spr): Rename to...
	(sim_spr_register_name): ... this.  Make global.
2007-10-15 19:45:31 +00:00
Daniel Jacobowitz 81adfcedc8 * target-descriptions.c (tdesc_predefined_types): New.
(tdesc_named_type): Use it.
	(tdesc_type_id, maint_print_c_tdesc_cmd): New functions.
	(_intialize_target_descriptions): Register "maint print c-tdesc".
	* features/Makefile (XMLTOC, CFILES, GDB): New macros.
	(cfiles, %.c): New rules.
	* features/arm-with-iwmmxt.c, features/mips-linux.c,
	features/mips64-linux.c: New generated files.

	* arm-linux-nat.c: Include preparsed description instead of
	"xml-support.h".
	(super_xfer_partial, arm_linux_xfer_partial): Remove.
	(arm_linux_read_description): New function.
	(_initialize_arm_linux_nat): Set to_read_description instead of
	to_xfer_partial.  Initialize preparsed description.
	* config/arm/linux.mh (TDEP_XML): Delete.
	* mips-linux-nat.c: Include preparsed descriptions instead of
	"xml-support.h".
	(super_xfer_partial, mips_linux_xfer_partial): Remove.
	(mips_linux_read_description): New function.
	(_initialize_mips_linux_nat): Set to_read_description instead of
	to_xfer_partial.  Initialize preparsed description.
	* config/mips/linux.mh (TDEP_XML): Delete.
	* Makefile.in (XMLFILES): Remove $(TDEP_XML).
	(features_headers, arm_with_iwmmxt_c, mips_linux_c)
	(mips64_linux_c): New macros.
	(arm-linux-nat.o, mips-linux-nat.o): Update.

	* gdb.texinfo (Maintenance Commands): Document "maint print c-tdesc".
2007-10-15 19:19:18 +00:00
Ulrich Weigand 62f6180c25 * alpha-mdebug-tdep.c: Include "gdb_string.h".
(find_proc_desc): Add fix-up code for setjmp procedure descriptor.
	* mdebugread.c (parse_procedure): Remove setjmp fix-up code.
	* Makefile.in (alpha-mdebug-tdep.o): Update dependencies.

	* config/alpha/alpha.mt (DEPRECATED_TM_FILE): Remove.
	* config/alpha/alpha-linux.mt (DEPRECATED_TM_FILE): Remove.
	* config/alpha/alpha-osf1.mt (DEPRECATED_TM_FILE): Remove.
	* config/alpha/fbsd.mt (DEPRECATED_TM_FILE): Remove.
	* config/alpha/tm-alpha.h: Remove file.
2007-10-12 16:13:20 +00:00