Commit Graph

1800 Commits

Author SHA1 Message Date
Markus Metzger d02ed0bbfa Split record.h into record.h and record-full.h.
Split record.c into record.c and record-full.c.

The split leaves the command part in record.c and moves the target part into
record-full.c.

gdb/
	* record.h: Split into this and ...
	* record-full.h: ... this.
	* record.c: Split into this and ...
	* record-full.c: ... this.
	* target.h (target_ops): Add new fields to_info_record,
	to_save_record, to_delete_record, to_record_is_replaying,
	to_goto_record_begin, to_goto_record_end, to_goto_record.
	(target_info_record): New.
	(target_save_record): New.
	(target_supports_delete_record): New.
	(target_delete_record): New.
	(target_record_is_replaying): New.
	(target_goto_record_begin): New.
	(target_goto_record_end): New.
	(target_goto_record): New.
	* target.c (target_info_record): New.
	(target_save_record): New.
	(target_supports_delete_record): New.
	(target_delete_record): New.
	(target_record_is_replaying): New.
	(target_goto_record_begin): New.
	(target_goto_record_end): New.
	(target_goto_record): New.
	* record.h: Declare struct cmd_list_element.
	(record_cmdlist): New declaration.
	(set_record_cmdlist): New declaration.
	(show_record_cmdlist): New declaration.
	(info_record_cmdlist): New declaration.
	(cmd_record_goto): New declaration.
	* record.c: Remove unnecessary includes.
	Include inferior.h.
	(cmd_record_goto): Remove declaration.
	(record_cmdlist): Now extern. Initialize.
	(set_record_cmdlist): Now extern. Initialize.
	(show_record_cmdlist): Now extern. Initialize.
	(info_record_cmdlist): Now extern. Initialize.
	(find_record_target): New.
	(require_record_target): New.
	(cmd_record_start): Update.
	(cmd_record_delete): Remove target-specific code.
	Call target_delete_record.
	(cmd_record_stop): Unpush any record target.
	(set_record_insn_max_num): Move to record-full.c
	(set_record_command): Add comment.
	(show_record_command): Add comment.
	(info_record_command): Update comment.
	Remove target-specific code.
	Call the record target's to_info_record.
	(cmd_record_start): New.
	(cmd_record_goto): Now extern.
	Remove target-specific code.
	Call target_goto_begin,  target_goto_end, or target_goto.
	(_initialize_record): Move record target ops initialization to
	record-full.c.
	Change "record" command help text.
	Move "record restore", "record set", and "record show" commands to
	record-full.c.
	* Makefile.in (SFILES): Add record-full.c.
	(HFILES_NO_SRCDIR): Add record-full.h.
	(COMMON_OBS): Add record-full.o.
	* amd64-linux-tdep.c: Include record-full.h instead of record.h.
	* arm-tdep.c: Include record-full.h.
	* i386-linux-tdep.c: Include record-full.h instead of record.h.
	* i386-tdep.c: Include record-full.h.
	* infrun.c: Include record-full.h.
	* linux-record.c: Include record-full.h.
	* moxie-tdep.c: Include record-full.h.
	* record-full.c: Include record-full.h.
	Change module comment.
	(set_record_full_cmdlist): New.
	(show_record_full_cmdlist): New.
	(record_full_cmdlist): New.
	(record_goto_insn): New declaration.
	(record_save): New declaration.
	(record_check_insn_num): Change query string.
	(record_info): New.
	(record_delete): New.
	(record_is_replaying): New.
	(record_goto_entry): New.
	(record_goto_begin): New.
	(record_goto_end): New.
	(record_goto): New.
	(init_record_ops): Update.
	(init_record_core_ops): Update.
	(cmd_record_save): Rename to record_save. Remove target and arg checks.
	(cmd_record_start): New.
	(set_record_insn_max_num): Moved from record.c
	(set_record_full_command): New.
	(show_record_full_command): New.
	(_initialize_record_full): New.
2013-03-11 08:42:55 +00:00
Markus Metzger c12a29171f Define the xml document style for transferring branch trace data.
Add a function to parse a btrace xml document into a vector of branch trace
blocks.

gdb/
	* features/btrace.dtd: New file.
	* Makefile.in (XMLFILES): Add btrace.dtd.
	* btrace.h (parse_xml_btrace): New declaration.
	* btrace.c: Include xml-support.h.
	(parse_xml_btrace): New function.
	(parse_xml_btrace_block): New function.
	(block_attributes): New struct.
	(btrace_attributes): New struct.
	(btrace_children): New struct.
	(btrace_elements): New struct.
2013-03-11 08:28:58 +00:00
Markus Metzger 7c97f91ebf Implement branch tracing on Linux based on perf_event such that it can be shared
between gdb and gdbserver.

gdb/
	* common/linux_btrace.h: New file.
	* common/linux_btrace.c: New file.
	* Makefile.in (SFILES): Add btrace.c.
	(HFILES_NO_SRCDIR): Add common/linux-btrace.h.
	(COMMON_OBS): Add btrace.o.
	(linux-btrace.o): New rule.

gdbserver/
	* Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
	(linux_btrace_h): New variable.
	(linux-btrace.o): New rule.
2013-03-11 08:24:07 +00:00
Markus Metzger 02d2762576 Add branch trace information to struct thread_info.
Add functions to enable, disable, clear, and fetch a thread's branch trace.

gdb/
	* target.h: Include btrace.h.
	(struct target_ops) <to_supports_btrace, to_enable_btrace,
	to_disable_btrace, to_teardown_btrace, to_read_btrace>: New.
	* target.c (target_supports_btrace): New function.
	(target_enable_btrace): New function.
	(target_disable_btrace): New function.
	(target_teardown_btrace): New function.
	(target_read_btrace): New function.
	* btrace.h: New file.
	* btrace.c: New file.
	* Makefile.in: Add btrace.c.
	* gdbthread.h: Include btrace.h.
	(struct thread_info): Add btrace field.
	* thread.c: Include btrace.h.
	(clear_thread_inferior_resources): Call target_teardown_btrace.
	* common/btrace-common.h: New file.
2013-03-11 08:17:08 +00:00
Marcus Shawcroft 9d19df7513 Adding aarch64-linux-nat support.
2013-02-08  Jim MacArthur  <jim.macarthur@arm.com>
	    Marcus Shawcroft  <marcus.shawcroft@arm.com>
	    Nigel Stephens  <nigel.stephens@arm.com>
	    Yufeng Zhang  <yufeng.zhang@arm.com>

	* aarch64-linux-nat.c: New file.
	* config/aarch64/linux.mh: New file.
	* configure.host: Add AArch64.
	* Makefile.in (ALLDEPFILES): Add aarch64-linux-nat.c.
2013-02-08 09:00:35 +00:00
Andreas Tobler dc18f110f2 2013-02-04 Andreas Tobler <andreast@fgznet.ch>
* Makefile.in (ALL_TARGET_OBS): Add powerpc FreeBSD files.
	* configure.host: Add powerpc*-*-freebsd* target.
	* configure.tgt: Add target info for powerpc*-*-freebsd*.
	* ppcfbsd-nat.c, ppcfbsd-tdep.h, ppcfbsd-tdep.c: New files.
	* config/powerpc/fbsd.mh: New file.
2013-02-04 20:48:53 +00:00
Marcus Shawcroft cf0dbd6fe7 Adding aarch64-newlib-tdep support.
* aarch64-newlib-tdep.c: New file.
        * configure.tgt: Add aarch64-newlib-tdep.o to gdb_target_obs of
        aarch64*-*-elf.
        * defs.h (enum gdb_osabi): Add GDB_OSABI_NEWLIB.
        * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-newlib-tdep.o.
        (ALLDEPFILES): Add aarch64-newlib-tdep.c.
        * osabi.c (gdb_osabi_names): Add "Newlib".
2013-02-04 12:57:44 +00:00
Marcus Shawcroft 1ae3db1961 Adding aarch64-linux-tdep support.
2013-02-04  Jim MacArthur  <jim.macarthur@arm.com>
            Marcus Shawcroft  <marcus.shawcroft@arm.com>
            Nigel Stephens  <nigel.stephens@arm.com>
            Yufeng Zhang  <yufeng.zhang@arm.com>

        * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-linux-tdep.o.
        (ALLDEPFILES): Add aarch64-linux-tdep.c.
        * aarch64-linux-tdep.c: New file.
        * aarch64-linux-tdep.h: New file.
        * aarch64-tdep.h (gdbarch_tdep): Define gregset and fpregset.
        * configure.tgt: Add aarch64-none-linux-gnu.
2013-02-04 12:53:59 +00:00
Marcus Shawcroft 07b287a0d1 Add basic support for AArch64.
* Makefile.in (ALL_64_TARGET_OBS): Add arch64-tdep.o.
        (HFILES_NO_SRCDIR): Add aarch64-tdep.h.
        (ALLDEPFILES): Add aarch64-tdep.c.
        * aarch64-tdep.c: New file.
        * aarch64-tdep.h: New file.
        * configure.tgt: Add AArch64.
        * features/Makefile (WHICH): Add aarch64 and aarch64-without-fpu.
        (aarch64-expedite): New definition.
        * features/aarch64-core.xml: New file.
        * features/aarch64-fpu.xml: New file.
        * features/aarch64-without-fpu.c: New file (generated).
        * features/aarch64-without-fpu.xml: New file.
        * features/aarch64.c: New file (generated).
        * features/aarch64.xml: New file.
        * regformats/aarch64-without-fpu.dat: New file (generated).
        * regformats/aarch64.dat: New file (generated).
2013-02-04 12:48:37 +00:00
Andreas Tobler d78489bf60 2013-02-01 Andreas Tobler <andreast@fgznet.ch>
* Makefile.in (ALL_TARGET_OBS): Add ppc64-tdep.o.
	(HFILES_NO_SRCDIR): Add ppc64-tdep.h.
	(ALLDEPFILES): Add ppc64-tdep.c.
	* configure.tgt (powerpc-*-linux* | powerpc64-*-linux*): Add
	ppc64-tdep.o to gdb_target_obs.
	* ppc64-tdep.h: New file.
	* ppc64-tdep.c: New file.
	(insn_d, insn_ds, insn_xfx, ppc64_desc_entry_point): Move from
	ppc-linux-tdep.c to here.
	(PPC64_STANDARD_LINKAGE1_LEN, PPC64_STANDARD_LINKAGE2_LEN)
	(PPC64_STANDARD_LINKAGE2_LEN): Likewise and use ARRAY_SIZE macro.
	(ppc64_standard_linkage1_target, ppc64_standard_linkage2_target)
	(ppc64_standard_linkage3_target, ppc64_skip_trampoline_code): Move
	from ppc-linux-tdep.c to here.
	(ppc64_convert_from_func_ptr_addr): Rename from
	ppc64_linux_convert_from_func_ptr_addr to
	ppc64_convert_from_func_ptr_addr and move from ppc-linux-tdep.c to
	here.
	* rs6000-tdep.c:
	(read_insn): Move from ppc-linux-tdep.c to here.
	(insns_match_pattern, insn_d_field, insn_ds_field): Move
	from ppc-linux-tdep.c to here and rename them with the ppc_ prefix.
	* ppc-linux-tdep.c: Include ppc64-tdep.h.
	Removed above functions.
	(ppc_linux_init_abi): Adjust.
2013-02-01 20:54:18 +00:00
Siva Chandra Reddy bea883fd92 Add a new class gdb.Architecture which exposes GDB's
internal representation of architecture via GDB Python API.

	* Makefile.in: Add entries corresponding to the new file
	python/py-arch.c.
	* NEWS (Python Scripting): Add entries for the new class
	gdb.Architecture and the new method gdb.Frame.architecture.
	* python/py-arch.c: Implement gdb.Architecture class.
	* python/py-frame.c (frapy_arch): Implement the method
	gdb.Frame.architecture().
	(frame_object_methods): Add 'architecture' to the method table.
	* python/python-internal.h: Add declarations of new utility
	functions.
	* python/python.c (_initialize_python): Initialize
	gdb.Architecture class.

	* doc/gdb.texinfo (Architectures In Python): New sub-sub-section
	describing the gdb.Architecture class.
	(Frames In Python): Add description about the new method
	gdb.Frame.architecture().

	* testsuite/gdb.python/frame.exp: Add a test for
	gdb.Frame.architecture() method.
2013-01-23 19:59:13 +00:00
Tom Tromey d2afef13c2 * gdb_obstack.h (obconcat): Move declaration here, from...
* symfile.h (obconcat): ... here.
	* gdb_obstack.c: New file.
	(obconcat): Move from...
	* symfile.c (obconcat): ... here.
	* Makefile.in (SFILES): Add gdb_obstack.c.
	(COMMON_OBS): Add gdb_obstack.o.
2013-01-21 18:15:32 +00:00
Pedro Alves 7d928dac62 2013-01-17 Pedro Alves <palves@redhat.com>
* acinclude.m4: Include ../config/plugins.m4,
	../config/largefile.m4 and ../config/lead-dot.m4.  Add comments.
	* Makefile.in (aclocal_m4_deps): Update.
	* aclocal.m4: Renegerate.
2013-01-17 11:06:26 +00:00
Tom Tromey ab04a2af2b 2013-01-03 Pedro Alves <palves@redhat.com>
Tom Tromey  <tromey@redhat.com>
	PR cli/7221:
	* NEWS: Add "catch signal".
	* breakpoint.c (base_breakpoint_ops): No longer static.
	(bpstat_explains_signal): New function.
	(init_catchpoint): No longer static.
	(base_breakpoint_explains_signal): New function.
	(base_breakpoint_ops): Initialize new field.
	* breakpoint.h (enum bpstat_signal_value): New.
	(struct breakpoint_ops) <explains_signal>: New field.
	(bpstat_explains_signal): Remove macro, declare as function.
	(base_breakpoint_ops, init_catchpoint): Declare.
	* break-catch-sig.c: New file.
	* inferior.h (signal_catch_update): Declare.
	* infrun.c (signal_catch): New global.
	(handle_syscall_event): Update for change to
	bpstat_explains_signal.
	(handle_inferior_event): Likewise.  Always handle random signals
	via bpstats.
	(signal_cache_update): Check signal_catch.
	(signal_catch_update): New function.
	(_initialize_infrun): Initialize signal_catch.
	* Makefile.in (SFILES): Add break-catch-sig.c.
	(COMMON_OBS): Add break-catch-sig.o.
gdb/doc
	* gdb.texinfo (Set Catchpoints): Document "catch signal".
	(Signals): Likewise.
gdb/testsuite
	* gdb.base/catch-signal.c: New file.
	* gdb.base/catch-signal.exp: New file.
2013-01-16 17:31:40 +00:00
Joel Brobecker 28e7fd6234 Update years in copyright notice for the GDB files.
Two modifications:
  1. The addition of 2013 to the copyright year range for every file;
  2. The use of a single year range, instead of potentially multiple
     year ranges, as approved by the FSF.
2013-01-01 06:33:28 +00:00
Tom Tromey ca7b0bbcfa * Makefile.in (init.c): Declare initialize_all_files;
don't include call-cmds.h.
	* call-cmds.h: Remove.
	* symtab.c: Don't include call-cmds.h.
	* top.c: Don't include call-cmds.h.  Declare
	initialize_all_files.
2012-12-18 19:26:29 +00:00
Joel Brobecker d5367fe16e Port GDB to powerpc-lynx178.
gdb/ChangeLog:

        * defs.h (enum gdb_osabi): Add GDB_OSABI_LYNXOS178.
        * osabi.c (gdb_osabi_names): Add entry for GDB_OSABI_LYNXOS178.
        * xcoffread.c (xcoff_get_core_n_import_files): New function.
        (xcoff_get_n_import_files): New function.
        * xcoffread.h (xcoffread.h): Add declaration.
        * rs6000-aix-tdep.c: #include "xcoffread.h".
        (rs6000_aix_osabi_sniffer): Do not return GDB_OSABI_AIX for
        XCOFF executables that do not depend on any shared library.
        * rs6000-lynx178-tdep.c: New file.
        * configure.tgt: Add powerpc-*-lynx*178 handling.
        * Makefile.in (ALL_TARGET_OBS): Add rs6000-lynx178-tdep.o.
        (ALLDEPFILES): Add rs6000-lynx178-tdep.c.
2012-12-18 14:52:59 +00:00
Joel Brobecker 67c50e6ecc Makefile.in: Move ravenscar-thread.c from SFILES to ALLDEPFILES.
gdb/ChangeLog:

	* Makefile.in (SFILES): Move ravenscar-thread.c from here...
	(ALLDEPFILES): ... to there.
2012-12-16 04:46:40 +00:00
Joel Brobecker debb1f09a1 Add ravenscar-thread support for powerpc.
gdb/ChangeLog:

        * ppc-ravenscar-thread.h, ppc-ravenscar-thread.c: New files.
        * Makefile.in (ALL_TARGET_OBS): Add ppc-ravenscar-thread.o.
        (HFILES_NO_SRCDIR): Add ppc-ravenscar-thread.h.
        (ALLDEPFILES): Add ppc-ravenscar-thread.c.
        * configure.tgt: Add ravenscar-thread.o and ppc-ravenscar-thread.o
        to gdb_target_obs for every target that uses rs6000-tdep.o.
        * rs6000-tdep.c: #include "ppc-ravenscar-thread.h".
        (rs6000_gdbarch_init): Call register_e500_ravenscar_ops
        or register_ppc_ravenscar_ops.
2012-12-15 14:30:18 +00:00
Joel Brobecker e6f9c00b64 Rename ravenscar-sparc-thread.[hc] into sparc-ravenscar-thread.[hc].
gdb/ChangeLog:

        * sparc-ravenscar-thread.h: Renames ravenscar-sparc-thread.h.
        * sparc-ravenscar-thread.c: Renames ravenscar-sparc-thread.c.
        Adjust sparc-ravenscar-thread.h #include.
        * sparc-tdep.c: Adjust sparc-ravenscar-thread.h #include
        accordingly.
        * Makefile.in: Replace ravenscar-sparc-thread with
        sparc-ravenscar-thread throughout.
        * configure.tgt: Likewise.
2012-12-15 14:29:00 +00:00
Joel Brobecker 7e35103a30 gdbarch-ification of ravenscar-thread support.
gdb/ChangeLog:

        * gdbarch.sh: Add "struct ravenscar_arch_ops" advance
        declaration.
        (ravenscar_ops): New gdbarch variable.
        * gdbarch.h, gdbarch.c: Regenerate.
        * ravenscar-thread.h (ravenscar_register_arch_ops): Delete.
        * ravenscar-thread.c (current_arch_ops): Delete.
        (ravenscar_fetch_registers): Get the ravenscar_arch_ops
        from the gdbarch.
        (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
        (ravenscar_inferior_created): Add gdbarch_ravenscar_ops check.
        (ravenscar_register_arch_ops): Delete.
        * ravenscar-sparc-thread.h: New file.
        * ravenscar-sparc-thread.c: #include "ravenscar-sparc-thread.h".
        (ravenscar_sparc_ops): Define value statically.
        (_initialize_ravenscar_sparc): Delete.
        (register_sparc_ravenscar_ops): New function.
        * sparc-tdep.c: #include "ravenscar-sparc-thread.h".
        (sparc32_gdbarch_init): Add call to register_sparc_ravenscar_ops.
        * Makefile.in (ALL_TARGET_OBS): Add ravenscar-thread.o and
        ravenscar-sparc-thread.o.
        (SFILES): Add ravenscar-thread.c.
        (HFILES_NO_SRCDIR): Add ravenscar-sparc-thread.h.
        (ALLDEPFILES): ravenscar-sparc-thread.c.
        * configure.tgt: Add ravenscar-thread.o and ravenscar-sparc-thread.o
        to gdb_target_obs
        for all the targets that use sparc-tdep.o.
2012-12-15 14:27:56 +00:00
Yao Qi 722247f1cb gdb/
2012-12-15  Yao Qi  <yao@codesourcery.com>

	* Makefile.in (REMOTE_OBS): Add "remote-notif.o".
	(SFILES): Add "remote-notif.c".
	(HFILES_NO_SRCDIR): Add "remote-notif.h" and "common/queue.h".
	* remote-notif.c: New.  Factored out from remote.c.
	* remote-notif.h: New.
	* remote.c: Include "remote-notif.h".
	(stop_reply_xmalloc, do_stop_reply_xfree):
	(remote_parse_stop_reply, remote_get_pending_stop_replies):
	(remote_async_get_pending_events_handler): Remove declarations.
	(remote_parse_stop_reply): Declare.
	(pending_stop_reply): Remove.
	(remote_async_get_pending_events_token): Move to
	remote-notif.c.
	(remote_close): Replace 'delete_async_event_handler' with
	remote_notif_unregister_async_event_handler.
	Don't call discard_pending_stop_replies.
	(remote_start_remote): Replace code with remote_notif_parse
	and remote_notif_get_pending_replies.
	(remote_open_1): Replace 'create_async_event_handler' with
	remote_notif_register_async_event_handler.
	(extended_remote_attach_1): Call remote_notif_parse and
	notif_stop_reply_push.
	(struct stop_reply) <next>: Remove.
	<base>: New field.
	Callers update.
	(stop_reply_queue): Change its type.
	(stop_reply_xmalloc, do_stop_reply_xfree): Remove.
	(remote_notif_remove_all): New.
	(discard_pending_stop_replies): Update.
	(remote_notif_stop_ack, stop_reply_dtr): New.
	(remote_notif_stop_alloc_event): New.
	(notif_client_stop): New variable.
	(stop_reply_match_ptid, stop_reply_match_ptid_and_ws: New.
	(queued_stop_reply, peek_stop_reply): Adjust.
	(remote_get_pending_stop_replies): Rename to
	remote_notif_get_pending_events.
	(handle_notification): Move to remote-notif.c.
	(remote_async_get_pending_events_handler): Likewise.
	(remote_wait_as): Adjust to call remote_notif_parse.
	Call 'getpkt_or_notif_sane' instead of 'getpkt_sane'.
	Return minus_one_ptid early if gets a notification.
	(remote_wait): Call QUEUE_is_empty (notif_reply_p).
	(_initialize_remote): Call QUEUE_alloc.  Update caller.
	(remote_resume): Call 'remote_notif_process' in all-stop mode.
	* remote.h: Include "remote-notif.h".
	(remote_notif_get_pending_replies): Declare.
2012-12-15 03:50:22 +00:00
Mircea Gherzan 9198514297 MI: add the -catch-load and -catch-unload commands
They are equivalent to "catch load" and "catch unload" from CLI.

Rationale: GUIs might be interested in catching solib load or
unload events.

2012-11-16  Mircea Gherzan  <mircea.gherzan@intel.com>

	* Makefile.in (SUBDIR_MI_OBS): Add mi-cmd-catch.o.
	(SUBDIR_MI_SRCS): Add mi/mi-cmd-catch.c.
	* breakpoint.c (add_solib_catchpoint): New function that
	can be used by both CLI and MI, factored out from
	catch_load_or_unload.
	(catch_load_or_unload): Strip it down and make it use the
	new add_solib_catchpoint.
	* breakpoint.h (add_solib_catchpoint): Declare it.
	* mi/mi-cmd-break.h: New file.
	* mi/mi-cmd-break.c: Include mi-cmd-break.h.
	(setup_breakpoint_reporting): New function used for both
	catchpoints and breakpoints.
	(mi_cmd_break_insert): Use setup_breakpoint_reporting.
	* mi/mi-cmd-catch.c: New file.
	* mi/mi-cmds.c (mi_cmds): Add the handlers for -catch-load
	and -catch-unload.
	* mi/mi-cmds.h: Declare the handlers for -catch-load and
	-catch-unload.
2012-12-12 21:20:13 +00:00
Joel Brobecker 2cb50f9d6a Delete the gdb/osf-share directory.
These are old files that GDB does not use anymore, and probably has not
used for a long time.

gdb/ChangeLog:

        * osf-share/AT386/cma_thread_io.h: Delete.
        * osf-share/HP800/cma_thread_io.h: Delete.
        * osf-share/README: Delete.
        * osf-share/RIOS/cma_thread_io.h: Delete.
        * osf-share/cma_attr.h: Delete.
        * osf-share/cma_deb_core.h: Delete.
        * osf-share/cma_debug_client.h: Delete.
        * osf-share/cma_errors.h: Delete.
        * osf-share/cma_handle.h: Delete.
        * osf-share/cma_init.h: Delete.
        * osf-share/cma_list.h: Delete.
        * osf-share/cma_mutex.h: Delete.
        * osf-share/cma_sched.h: Delete.
        * osf-share/cma_semaphore_defs.h: Delete.
        * osf-share/cma_sequence.h: Delete.
        * osf-share/cma_stack.h: Delete.
        * osf-share/cma_stack_int.h: Delete.
        * osf-share/cma_tcb_defs.h: Delete.
        * osf-share/cma_util.h: Delete.
        * Makefile.in (HFILES_NO_SRCDIR): Remove entries for the files
        in osf-share.
        * config/djgpp/fnchange.lst: Remove osf-share/cma_stack_int.h entry.
        * contrib/ari/gdb_find.sh: Remove handling of osf-share.
        * copyright.sh (NOT_FSF_LIST): Remove "gdb/osf-share" entry.
2012-12-07 02:57:50 +00:00
Tom Tromey 608e2dbbfe 2012-11-26 Alexander Larsson <alexl@redhat.com>
Jan Kratochvil  <jan.kratochvil@redhat.com>
	    Tom Tromey  <tromey@redhat.com>

	* NEWS: Mention mini debuginfo feature.
	* minidebug.c: New file.
	* configure.ac: Check for lzma.
	* configure, config.in: Rebuild.
	* Makefile.in (LIBLZMA): New variable.
	(CLIBS): Include LIBLZMA.
	(SFILES): Mention minidebug.c.
	(COMMON_OBS): Mention minidebug.o.
	* symfile.c (read_symbols): New function.
	(syms_from_objfile, reread_symbols): Call it.
	* symfile.h (find_separate_debug_file_in_section): Declare.
doc
	* gdb.texinfo (MiniDebugInfo): New node.
	(GDB Files): Update.
testsuite
	* gdb.base/gnu-debugdata.exp: New file.
	* gdb.base/gnu-debugdata.c: New file.
	* lib/gdb.exp (gdb_file_cmd): Handle LZMA warning.
	(gdb_unload): Return 0 on success.
2012-11-26 19:23:56 +00:00
Pierre Muller 8bdce1ffdf 2012-11-15 Pierre Muller <muller@sourceware.org>
ARI fixes: move gdb_wait and gdb_stat headers to common subdirectory.
	* gdb_stat.h: Delete. Moved to common directory.
	* common/gdb_stat.h: New file.
	* gdb_wait.h: Delete. Moved to common directory.
	* common/gdb_wait.h: New file.
	* Makefile.in (H_FILES_NO_SRC): Adapt to new header
	location.
	* contrib/ari/gdb_ari.sh (wait.h rule): Adapt to new gdb_wait.h
	location.
	(stat.h rule): Adapt to new gdb_stat.h location.
	* common/linux-osdata.c: Include "gdb_stat.h" header instead of
	<sys/stat.h> header.
	* common/linux-ptrace.c: Include "gdb_wait.h" header instead of
	<sys/wait.h> header.


gdbserver ChangeLog entry:

2012-11-15  Pierre Muller  <muller@sourceware.org>

	* configure.ac (AC_CHECK_HEADERS): Add wait.h header.
	* config.in: Regenerate.
	* configure: Regenerate.
	* linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
	Use "gdb_wait.h" header instead of <sys/wait.h> header.
	* lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
	* remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
	header.
	* server.c: Remove HAVE_WAIT_H conditional.  Use "gdb_wait.h" header
	instead of <sys/wait.h> header.
	* spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
2012-11-15 16:12:19 +00:00
Pedro Alves aa0fbdd82c 2012-09-13 Pedro Alves <palves@redhat.com>
* Makefile.in (COMMON_OBS): Add registry.o.
	* registry.c: New file.
	* registry.h (struct registry_container): Declare.
	(registry_data_callback): New typedef.
	(struct registry_data, struct registry_data_registration, struct
	registry_data_registry): New type.
	(register_data_with_cleanup, registry_alloc_data)
	(registry_callback_adaptor, registry_clear_data)
	(registry_container_free_data, registry_set_data, registry_data):
	Declare.
	(DEFINE_REGISTRY): Refactor structures and functions as shims over
	the new common structures and functions.
	(DECLARE_REGISTRY): Declare struct TAG ## _data.  Use the tagged
	callback typedefs.
2012-09-13 14:35:16 +00:00
Yit Phang Khoo 037bbc8eea Enable readline in Python in a GDB-specific way and block the
standard Python readline module to prevent conflicts with GDB.
	* Makefile.in (SUBDIR_PYTHON_OBS): Add py-gdb-readline.o.
	(SUBDIR_PYTHON_SRCS): Add python/py-gdb-readline.c.
	(py-gdb-readline.o): Add rule to compile python/py-gdb-readline.c.
	* python/py-gdb-readline.c: New file.
	* python/python-internal.h (gdbpy_initialize_gdb_readline): New
	prototype.
	* python/python.c (_initialize_python): Call
	gdbpy_initialize_gdb_readline.
2012-08-22 21:04:55 +00:00
Eli Zaretskii 13c9750ebf Fix a typo that prevented "make TAGS" from working.
gdb/Makefile.in (HFILES_NO_SRCDIR): Fix a typo: golang.h -> go-lang.h.
 The typo broke "make TAGS".
2012-08-18 11:00:37 +00:00
Tom Tromey f2e8016f41 * Makefile.in (SFILES): Remove objc-exp.y.
(YYFILES): Remove objc-exp.c.
    	(YYOBJ): Remove objc-exp.o.
    	(local-maintainer-clean): Don't mention objc-exp.c.
    	* c-exp.y: Include objc-lang.h.
    	(%union) <class>: New field.
    	(NSSTRING, SELECTOR, CLASSNAME, OBJC_LBRAC): New tokens.
    	(exp): Clone subscript production for OBJC_LBRAC.  Add various
    	Objective C productions.
    	(msglist, msgarglist, msgarg): New productions.
    	(array_mod, func_mod, operator): Clone productions for
    	OBJC_LBRAC.
    	(parse_string_or_char): Handle '@' strings.
    	(lex_one_token): Return OBJC_LBRAC.  Recognize @selector.
    	(classify_name): Check la_name_of_this.  Recognize ObjC class
    	names.
    	* objc-exp.y: Remove.
    	* objc-lang.c (objc_language_defn): Use c_parse, c_error.
    	* objc-lang.h (objc_parse, objc_error): Don't declare.
gdb/testsuite
    	* gdb.objc/print.exp (test_float_accepted): Remove kfails.
2012-07-26 20:11:10 +00:00
Doug Evans 48faced0e5 * common/gdb_vecs.h: Moved here from ./gdb_vecs.h.
* common/gdb_vecs.c: New file, contents from utils.c.
	* common/host-defs.h: New file, contents from defs.h.
	* utils.h: New file, contents from defs.h.
	* defs.h: Move all declarations of objects defined in utils.c
	to utils.h (except QUIT() and related).
	#include "utils.h", "host-defs.h".
	* probe.h (probe_p): Move here from gdb_vecs.h.
	* symfile.c: #include "probe.h" instead of "gdb_vecs.h".
	* utils.c (free_char_ptr_vec): Moved to common/gdb_vecs.c.
	(dirnames_to_char_ptr_vec_append, dirnames_to_char_ptr_vec): Ditto.
	* Makefile.in (SFILES): Add common/gdb_vecs.c.
	(HFILES_NO_SRCDIR): Add common/gdb_vecs.h, common/host-defs.h, utils.h.
	(COMMON_OBS): Add gdb_vecs.o.
	(gdb_vecs.o): New rule.
2012-07-18 23:37:58 +00:00
Tom Tromey cbb099e886 * dwarf2read.c (try_open_dwo_file): Use gdb_bfd_ref and
gdb_bfd_unref.
	(free_dwo_file): Use gdb_bfd_unref.
	* cli/cli-dump.c: Include gdb_bfd.h.
	(bfd_openw_with_cleanup): Use gdb_bfd_ref.
	(bfd_openr_with_cleanup): Likewise.
	* windows-nat.c (windows_make_so): Use gdb_bfd_ref,
	gdb_bfd_unref.
	* utils.c: Include gdb_bfd.h.
	(do_bfd_close_cleanup): Use gdb_bfd_unref.
	* symfile.c: Include gdb_bfd.h.
	(separate_debug_file_exists): Use gdb_bfd_unref.
	(bfd_open_maybe_remote): Use gdb_bfd_ref.
	(symfile_bfd_open): Use gdb_bfd_ref, gdb_bfd_unref.
	(generic_load): Use gdb_bfd_ref.
	(reread_symbols): Use gdb_bfd_unref.
	* symfile-mem.c: Include gdb_bfd.h.
	(symbol_file_add_from_memory): Use make_cleanup_bfd_close.
	* spu-linux-nat.c (spu_bfd_open): Use gdb_bfd_ref, gdb_bfd_unref.
	* solib.c: Include gdb_bfd.h.
	(solib_bfd_fopen): Use gdb_bfd_ref.
	(solib_bfd_open): Use gdb_bfd_unref.
	(free_so_symbols): Use gdb_bfd_unref.
	(reload_shared_libraries_1): Use gdb_bfd_unref.
	* solib-spu.c: Include gdb_bfd.h.
	(spu_bfd_fopen): Use gdb_bfd_ref, gdb_bfd_unref.
	* solib-pa64.c (pa64_solib_create_inferior_hook): Use gdb_bfd_ref,
	gdb_bfd_unref.
	* solib-frv.c: Include gdb_bfd.h.
	(enable_break2): Use gdb_bfd_unref.
	* solib-dsbt.c: Include gdb_bfd.h.
	(enable_break2): Use gdb_bfd_unref.
	* solib-darwin.c: Include gdb_bfd.h.
	(darwin_solib_get_all_image_info_addr_at_init): Use gdb_bfd_ref,
	gdb_bfd_unref.
	(darwin_bfd_open): Use gdb_bfd_unref.
	* rs6000-nat.c (add_vmap): Use gdb_bfd_ref, gdb_bfd_unref.
	* remote-mips.c: Include gdb_bfd.h.
	(mips_load_srec): Use gdb_bfd_ref.
	(pmon_load_fast): Use gdb_bfd_ref.
	* remote-m32r-sdi.c: Include gdb_bfd.h.
	(m32r_load): Use gdb_bfd_ref.
	* record.c: Include gdb_bfd.h.
	(record_save_cleanups): Use gdb_bfd_unref.
	(cmd_record_save): Use gdb_bfd_unref.
	* procfs.c (insert_dbx_link_bpt_in_file): Use gdb_bfd_ref,
	gdb_bfd_unref.
	* objfiles.h (gdb_bfd_close_or_warn): Remove.
	(gdb_bfd_ref, gdb_bfd_unref): Move to gdb_bfd.h.
	* objfiles.c: Include gdb_bfd.h.
	(free_objfile): Use gdb_bfd_unref.
	(gdb_bfd_close_or_warn, gdb_bfd_ref, gdb_bfd_unref): Move to
	gdb_bfd.c.
	* machoread.c (macho_add_oso_symfile): Use gdb_bfd_unref.
	(macho_symfile_read_all_oso): Use gdb_bfd_ref, gdb_bfd_unref.
	(macho_check_dsym): Likewise.
	* m32r-rom.c: Include gdb_bfd.h.
	(m32r_load): Use gdb_bfd_ref.
	(m32r_upload_command): Use gdb_bfd_ref.
	* jit.c: Include gdb_bfd.h.
	(jit_bfd_try_read_symtab): Use gdb_bfd_ref, gdb_bfd_unref.
	* gdb_bfd.h: New file.
	* gdb_bfd.c: New file.
	* gcore.c: Include gdb_bfd.h.
	(create_gcore_bfd): Use gdb_bfd_ref.
	(do_bfd_delete_cleanup): Use gdb_bfd_unref.
	(gcore_command): Use gdb_bfd_unref.
	* exec.c: Include gdb_bfd.h.
	(exec_close): Use gdb_bfd_unref.
	(exec_close_1): Use gdb_bfd_unref.
	(exec_file_attach): Use gdb_bfd_ref.
	* elfread.c: Include gdb_bfd.h.
	(build_id_verify): Use gdb_bfd_unref.
	* dsrec.c: Include gdb_bfd.h.
	(load_srec): Use gdb_bfd_ref.
	* corelow.c: Include gdb_bfd.h.
	(core_close): Use gdb_bfd_unref.
	(core_open): Use gdb_bfd_ref.
	* bfd-target.c: Include gdb_bfd.h.
	(target_bfd_xclose): Use gdb_bfd_unref.
	(target_bfd_reopen): Use gdb_bfd_ref.
	* Makefile.in (SFILES): Add gdb_bfd.c.
	(HFILES_NO_SRCDIR): Add gdb_bfd.h.
	(COMMON_OBS): Add gdb_bfd.o.
2012-07-18 19:33:34 +00:00
Stan Shebs d3ce09f5bf Add target-side support for dynamic printf.
* NEWS: Mention the additional style.
	* breakpoint.h (struct bp_target_info): New fields tcommands, persist.
	(struct bp_location): New field cmd_bytecode.
	* breakpoint.c: Include format.h.
	(disconnected_dprintf): New global.
	(parse_cmd_to_aexpr): New function.
	(build_target_command_list): New function.
	(insert_bp_location): Call it.
	(remove_breakpoints_pid): Skip dprintf breakpoints.
	(print_one_breakpoint_location): Ditto.
	(dprintf_style_agent): New global.
	(dprintf_style_enums): Add dprintf_style_agent.
	(update_dprintf_command_list): Add agent case.
	(agent_printf_command): New function.
	(_initialize_breakpoint): Add new commands.
	* common/ax.def (printf): New bytecode.
	* ax.h (ax_string): Declare.
	* ax-gdb.h (gen_printf): Declare.
	* ax-gdb.c: Include cli-utils.h, format.h.
	(gen_printf): New function.
	(maint_agent_print_command): New function.
	(_initialize_ax_gdb): Add maint agent-printf command.
	* ax-general.c (ax_string): New function.
	(ax_print): Add printf disassembly.
	* Makefile.in (SFILES): Add format.c
	(COMMON_OBS): Add format.o.
	* common/format.h: New file.
	* common/format.c: New file.
	* printcmd.c: Include format.h.
	(ui_printf): Call parse_format_string.
	* remote.c (remote_state): New field breakpoint_commands.
	(PACKET_BreakpointCommands): New enum.
	(remote_breakpoint_commands_feature): New function.
	(remote_protocol_features): Add new BreakpointCommands entry.
	(remote_can_run_breakpoint_commands): New function.
	(remote_add_target_side_commands): New function.
	(remote_insert_breakpoint): Call it.
	(remote_insert_hw_breakpoint): Ditto.
	(_initialize_remote): Add new packet configuration for
	target-side breakpoint commands.
	* target.h (struct target_ops): New field
	to_can_run_breakpoint_commands.
	(target_can_run_breakpoint_commands): New macro.
	* target.c (update_current_target): Handle
	to_can_run_breakpoint_commands.

	[gdbserver]
	* Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
	(ax.o): Add it to build rule.
	(ax-ipa.o): Ditto.
	(OBS): Add format.o.
	(IPA_OBS): Add format.o.
	* server.c (handle_query): Claim support for breakpoint commands.
	(process_point_options): Add command case.
	(process_serial_event): Leave running if there are printfs in
	effect.
	* mem-break.h (any_persistent_commands): Declare.
	(add_breakpoint_commands): Declare.
	(gdb_no_commands_at_breakpoint): Declare.
	(run_breakpoint_commands): Declare.
	* mem-break.c (struct point_command_list): New struct.
	(struct breakpoint): New field command_list.
	(any_persistent_commands): New function.
	(add_commands_to_breakpoint): New function.
	(add_breakpoint_commands): New function.
	(gdb_no_commands_at_breakpoint): New function.
	(run_breakpoint_commands): New function.
	* linux-low.c (linux_wait_1): Test for and run breakpoint commands
	locally.
	* ax.c: Include format.h.
	(ax_printf): New function.
	(gdb_eval_agent_expr): Add printf opcode.

	[doc]
	* gdb.texinfo (Dynamic Printf): Mention agent style and
	disconnected dprintf.
	(Maintenance Commands): Describe maint agent-printf.
	(General Query Packets): Mention BreakpointCommands feature.
	(Packets): Document commands extension to Z0 packet.
	* agentexpr.texi (Bytecode Descriptions): Document printf
	bytecode.

	[testsuite]
	* gdb.base/dprintf.exp: Add agent style tests.
2012-07-02 15:29:39 +00:00
Pedro Alves ade64f0e04 2012-05-30 Jeff Kenton <jkenton@tilera.com>
* Makefile.in (ALL_TARGET_OBJS): Add tilegx-tdep.o and
	tilegx-linux-tdep.o.
	(ALLDEPFILES): Add tilegx-linux-nat.c, tilegx-tdep.c and
	tilegx-linux-tdep.c.
	* configure.tgt: Handle tilegx-*-linux*.
	* tilegx-tdep.h: New file.
	* tilegx-tdep.c: New file.
	* tilegx-linux-tdep.c: New file.
	* regformats/reg-tilegx.dat: New file.
2012-05-30 19:31:44 +00:00
Stan Shebs f3e0e9604d 2012-05-23 Stan Shebs <stan@codesourcery.com>
Kwok Cheung Yeung  <kcy@codesourcery.com>

	* Makefile.in (SUBDIR_MI_OBS): Add mi-cmd-info.o.
	(SUBDIR_MI_SRCS): Add mi-cmd-info.c.
	(mi-cmd-info.o): New rule.
	* osdata.h (info_osdata_command): New declaration.
	* osdata.c (info_osdata_command): Change to non-static.
	* mi/mi-cmds.h (mi_cmd_info_os): New declaration.
	* mi/mi-cmds.c (mi_cmds): Add -info-os MI command.
	* mi/mi-cmd-info.c: New file.

	* gdb.texinfo (Miscellaneous GDB/MI Commands): Document -info-os.

	* gdb.mi/mi-info-os.exp: New file.
2012-05-24 00:33:47 +00:00
Sergio Durigan Junior 55aa24fb2e 2012-04-27 Sergio Durigan Junior <sergiodj@redhat.com>
Tom Tromey  <tromey@redhat.com>
	    Jan Kratochvil  <jan.kratochvil@redhat.com>

	* Makefile.in (SFILES): Add `probe' and `stap-probe'.
	(COMMON_OBS): Likewise.
	(HFILES_NO_SRCDIR): Add `probe'.
	* NEWS: Mention support for static and SystemTap probes.
	* amd64-tdep.c (amd64_init_abi): Initializing proper fields used by
	SystemTap probes' arguments parser.
	* arm-linux-tdep.c: Including headers needed to perform the parsing
	of SystemTap probes' arguments.
	(arm_stap_is_single_operand): New function.
	(arm_stap_parse_special_token): Likewise.
	(arm_linux_init_abi): Initializing proper fields used by SystemTap
	probes' arguments parser.
	* ax-gdb.c (require_rvalue): Removing static declaration.
	(gen_expr): Likewise.
	* ax-gdb.h (gen_expr): Declaring function.
	(require_rvalue): Likewise.
	* breakpoint.c: Include `gdb_regex.h' and `probe.h'.
	(bkpt_probe_breakpoint_ops): New variable.
	(momentary_breakpoint_from_master): Set the `probe' value.
	(add_location_to_breakpoint): Likewise.
	(break_command_1): Using proper breakpoint_ops according to the
	argument passed by the user in the command line.
	(bkpt_probe_insert_location): New function.
	(bkpt_probe_remove_location): Likewise.
	(bkpt_probe_create_sals_from_address): Likewise.
	(bkpt_probe_decode_linespec): Likewise.
	(tracepoint_probe_create_sals_from_address): Likewise.
	(tracepoint_probe_decode_linespec): Likewise.
	(tracepoint_probe_breakpoint_ops): New variable.
	(trace_command): Using proper breakpoint_ops according to the
	argument passed by the user in the command line.
	(initialize_breakpoint_ops): Initializing breakpoint_ops for
	static probes on breakpoints and tracepoints.
	* breakpoint.h (struct bp_location) <probe>: New field.
	* cli-utils.c (skip_spaces_const): New function.
	(extract_arg): Likewise.
	* cli-utils.h (skip_spaces_const): Likewise.
	(extract_arg): Likewise.
	* coffread.c (coff_sym_fns): Add `sym_probe_fns' value.
	* configure.ac: Append `stap-probe.o' to be generated when ELF
	support is present.
	* configure: Regenerate.
	* dbxread.c (aout_sym_fns): Add `sym_probe_fns' value.
	* elfread.c: Include `probe.h' and `arch-utils.h'.
	(probe_key): New variable.
	(elf_get_probes): New function.
	(elf_get_probe_argument_count): Likewise.
	(elf_evaluate_probe_argument): Likewise.
	(elf_compile_to_ax): Likewise.
	(elf_symfile_relocate_probe): Likewise.
	(stap_probe_key_free): Likewise.
	(elf_probe_fns): New variable.
	(elf_sym_fns): Add `sym_probe_fns' value.
	(elf_sym_fns_lazy_psyms): Likewise.
	(elf_sym_fns_gdb_index): Likewise.
	(_initialize_elfread): Initialize objfile cache for static
	probes.
	* gdb_vecs.h (struct probe): New forward declaration.
	(probe_p): New VEC declaration.
	* gdbarch.c: Regenerate.
	* gdbarch.h: Regenerate.
	* gdbarch.sh (stap_integer_prefix): New variable.
	(stap_integer_suffix): Likewise.
	(stap_register_prefix): Likewise.
	(stap_register_suffix): Likewise.
	(stap_register_indirection_prefix): Likewise.
	(stap_register_indirection_suffix): Likewise.
	(stap_gdb_register_prefix): Likewise.
	(stap_gdb_register_suffix): Likewise.
	(stap_is_single_operand): New function.
	(stap_parse_special_token): Likewise.
	(struct stap_parse_info): Forward declaration.
	* i386-tdep.c: Including headers needed to perform the parsing
	of SystemTap probes' arguments.
	(i386_stap_is_single_operand): New function.
	(i386_stap_parse_special_token): Likewise.
	(i386_elf_init_abi): Initializing proper fields used by SystemTap
	probes' arguments parser.
	* i386-tdep.h (i386_stap_is_single_operand): New function.
	(i386_stap_parse_special_token): Likewise.
	* machoread.c (macho_sym_fns): Add `sym_probe_fns' value.
	* mipsread.c (ecoff_sym_fns): Likewise.
	* objfiles.c (objfile_relocate1): Support relocation for static
	probes.
	* parse.c (prefixify_expression): Remove static declaration.
	(initialize_expout): Likewise.
	(reallocate_expout): Likewise.
	* parser-defs.h (initialize_expout): Declare function.
	(reallocate_expout): Likewise.
	(prefixify_expression): Likewise.
	* ppc-linux-tdep.c: Including headers needed to perform the parsing
	of SystemTap probes' arguments.
	(ppc_stap_is_single_operand): New function.
	(ppc_stap_parse_special_token): Likewise.
	(ppc_linux_init_abi): Initializing proper fields used by SystemTap
	probes' arguments parser.
	* probe.c: New file, for generic statically defined probe support.
	* probe.h: Likewise.
	* s390-tdep.c: Including headers needed to perform the parsing of
	SystemTap probes' arguments.
	(s390_stap_is_single_operand): New function.
	(s390_gdbarch_init): Initializing proper fields used by SystemTap
	probes' arguments parser.
	* somread.c (som_sym_fns): Add `sym_probe_fns' value.
	* stap-probe.c: New file, for SystemTap probe support.
	* stap-probe.h: Likewise.
	* symfile.h: Include `gdb_vecs.h'.
	(struct sym_probe_fns): New struct.
	(struct sym_fns) <sym_probe_fns>: New field.
	* symtab.c (init_sal): Initialize `probe' field.
	* symtab.h (struct probe): Forward declaration.
	(struct symtab_and_line) <probe>: New field.
	* tracepoint.c (start_tracing): Adjust semaphore on breakpoints
	locations.
	(stop_tracing): Likewise.
	* xcoffread.c (xcoff_sym_fns): Add `sym_probe_fns' value.
2012-04-27 20:47:57 +00:00
Doug Evans a766d390bb Initial pass at Go language support.
* NEWS: Mention Go.
	* Makefile.in (SFILES): Add go-exp.y, go-lang.c, go-typeprint.c,
	go-valprint.c.
	(COMMON_OBS): Add go-lang.o, go-val.print.o, go-typeprint.o.
	(YYFILES): Add go-exp.c.
	(YYOBJ): Add go-exp.o.
	(local-maintainer-clean): Delete go-exp.c.
	* defs.h (enum language): Add language_go.
	* dwarf2read.c: #include "go-lang.h".
	(fixup_go_packaging): New function.
	(process_full_comp_unit): Call it when processing Go CUs.
	(dwarf2_physname): Add Go support.
	(read_file_scope): Handle missing language spec for GNU Go.
	(set_cu_language): Handle DW_LANG_Go.
	* go-exp.y: New file.
	* go-lang.h: New file.
	* go-lang.c: New file.
	* go-typeprint.c: New file.
	* go-valprint.c: New file.
	* symtab.c: #include "go-lang.h".
	(symbol_set_language): Handle language_go.
	(symbol_find_demangled_name, symbol_set_names): Ditto.
	(symbol_natural_name, demangle_for_lookup, find_main_name): Ditto.

	testsuite/
	* configure.ac: Create gdb.go/Makefile.
	* configure: Regenerate.
	* gdb.base/default.exp: Add "go" to "set language" testing.
	* gdb.go/Makefile.in: New file.
	* gdb.go/basic-types.exp: New file.
	* gdb.go/chan.exp: New file.
	* gdb.go/chan.go: New file.
	* gdb.go/handcall.exp: New file.
	* gdb.go/handcall.go: New file.
	* gdb.go/hello.exp: New file.
	* gdb.go/hello.go: New file.
	* gdb.go/integers.exp: New file.
	* gdb.go/integers.go: New file.
	* gdb.go/methods.exp: New file.
	* gdb.go/methods.go: New file.
	* gdb.go/package.exp: New file.
	* gdb.go/package1.go: New file.
	* gdb.go/package2.go: New file.
	* gdb.go/print.exp: New file.
	* gdb.go/strings.exp: New file.
	* gdb.go/strings.go: New file.
	* gdb.go/types.exp: New file.
	* gdb.go/types.go: New file.
	* gdb.go/unsafe.exp: New file.
	* gdb.go/unsafe.go: New file.
	* lib/future.exp: Add Go support.
	(gdb_find_go, gdb_find_go_linker): New procs.
	(gdb_default_target_compile): Add Go support.
	* lib/gdb.exp (skip_go_tests): New proc.
	* lib/go.exp: New file.

	doc/
	* gdb.texinfo (Supported Languages): Add Go.
	(Go): New node.
2012-04-25 14:07:23 +00:00
Pedro Alves c971b7fa72 2012-04-19 Pedro Alves <palves@redhat.com>
gdb/
	* Makefile.in (GNULIB_BUILDDIR): New.
	(LIBGNU, INCGNU, GNULIB_H): Adjust.
	(SUBDIRS): Add $(GNULIB_BUILDDIR).
	(CLEANDIRS). Remove gnulib/import.
	(REQUIRED_SUBDIRS): Replace gnulib/import with $(GNULIB_BUILDDIR).
	(all-lib): Ditto.
	(distclean): Remove the $(GNULIB_BUILDDIR) directory.
	(gnulib/import/Makefile): Replace gnulib/import with
	$(GNULIB_BUILDDIR).  Set CONFIG_FILES to just Makefile.
	(ACLOCAL_AMFLAGS): Remove '-I gnulib/import/m4'.
	(aclocal_m4_deps): Remove the gnulib dependencies.  Add
	acx_configure_dir.m4.
	* acinclude.m4: Include acx_configure_dir.m4.
	* acx_configure_dir.m4: New file.
	* aclocal.m4: Regenerate.
        * configure.ac: Remove gl_EARLY, gl_INIT and AM_INIT_AUTOMAKE
        calls.  Configure gnulib using ACX_CONFIGURE_DIR.
        (GNULIB): New variable.
        (GNULIB_STDINT_H): Adjust.
        (AC_OUTPUT): Don't output gnulib/Makefile.
        * gdb/defs.h: Include build-gnulib/config.h.
        * aclocal.m4: Regenerate.
        * config.in: Regenerate.
        * configure: Regenerate.

        * gnulib/Makefile.in: New file.
        * gnulib/configure.ac: New file.
        * gnulib/aclocal.m4: New file.
        * gnulib/config.in: New file.
        * gnulib/configure: New file.
	* gnulib/: Re-run gnulib-tool to adjust.

        gdb/gdbserver/
        * Makefile.in (GNULIB_BUILDDIR): New.
	(LIBGNU, INCGNU, GNULIB_H): Adjust.
        (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
        (all, install-only, uninstall, clean-info, all-lib, clean): No
        longer pass GNULIB_FLAGS_TO_PASS.  Use subdir_do.
        (maintainer-clean realclean distclean): Use subdir_do.
        (subdir_do): New.
        (gnulib/import/Makefile): Adjust.  Replace gnulib/import with
	$(GNULIB_BUILDDIR).  Don't pass argument to config.status.
        * acinclude.m4: Include acx_configure_dir.m4.
        * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
        calls.  Call AC_PROG_RANLIB.  Configure gnulib using
        ACX_CONFIGURE_DIR.
        (GNULIB): New.
        (GNULIB_STDINT_H): Adjust.
        (AC_OUTPUT): Don't output gnulib/Makefile anymore.
        * gdbreplay.c: Include build-gnulib/config.h.
        * server.h: Likewise.
        * aclocal.m4: Regenerate.
        * config.in: Regenerate.
        * configure: Regenerate.
2012-04-19 19:34:52 +00:00
Pedro Alves e22314be6a 2012-04-19 Pedro Alves <palves@redhat.com>
* Makefile.in (HFILES_NO_SRCDIR): Remove gnulib/wchar.in.h.
	Adjust paths to gnulib imported files.
C
2012-04-19 17:15:07 +00:00
Pedro Alves 809277f8ce 2012-04-19 Pedro Alves <palves@redhat.com>
gdb/
	* gnulib/: Move whole directory ...
	* gnulib/import/: ... here, and re-rerun gnulib-tool to adjust.
	* Makefile.in (LIBGNU, INCGNU, GNULIB_H, CLEANDIRS)
	(REQUIRED_SUBDIRS, all-lib, gnulib/Makefile, ACLOCAL_AMFLAGS)
	(aclocal_m4_deps): Adjust.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* configure.ac: Adjust AC_OUTPUT output.

	gdbserver/
	* Makefile.in (LIBGNU, INCGNU): Adjust.
	(GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
	(all, install-only, uninstall, clean-info, all-lib, clean)
	(maintainer-clean, Makefile, gnulib/Makefile): Adjust.
	* configure.ac: Adjust AC_OUTPUT output.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
2012-04-19 15:27:52 +00:00
Yao Qi aad9eab9f2 gdb:
* Makefile.in (SFILES): Add common/vec.c and remove vec.c.
        (vec.o): New rule.
        * vec.c: Move it ...
        * common/vec.c: ... here.
        * vec.h: Move it ...
        * common/vec.h: ... here.

gdb/gdbserver:

        * Makefile.in (SFILES): Add common/vec.c.
        (OBS): Add vec.o.
        (vec.o): New rule.
2012-04-19 05:58:52 +00:00
Doug Evans c27f573840 * cleanups.h: New file.
* cleanups.c: New file.
	* Makefile.in (SFILES): Add cleanups.c.
	(HFILES_NO_SRCDIR): Add cleanups.h.
	(COMMON_OBS): Add cleanups.o.
	* defs.h (struct cleanup): Moved to cleanups.h.
	(do_cleanups,do_final_cleanups): Ditto.
	(discard_cleanups,discard_final_cleanups): Ditto
	(make_cleanup,make_cleanup_dtor,make_final_cleanup): Ditto.
	(save_cleanups,save_final_cleanups): Ditto.
	(restore_cleanups,restore_final_cleanups): Ditto.
	(null_cleanup): Ditto.
	(make_my_cleanup,make_my_cleanup2): Ditto.
	(discard_my_cleanups,save_my_cleanups,restore_my_cleanups): Ditto.
	* utils.c (cleanup_chain,final_cleanup_chain): Moved to cleanups.c.
	(do_cleanups,do_final_cleanups): Ditto.
	(discard_cleanups,discard_final_cleanups): Ditto
	(make_cleanup,make_cleanup_dtor,make_final_cleanup): Ditto.
	(save_cleanups,save_final_cleanups): Ditto.
	(restore_cleanups,restore_final_cleanups): Ditto.
	(null_cleanup): Ditto.
	(make_my_cleanup,make_my_cleanup2): Ditto.
	(discard_my_cleanups,save_my_cleanups,restore_my_cleanups): Ditto.
2012-04-17 21:13:20 +00:00
Jan Kratochvil e2207b9a28 gdb/
auto-load: Move files.
	* Makefile.in (SFILES): Add auto-load.c.
	(HFILES_NO_SRCDIR): Add auto-load.h.
	(COMMON_OBS): Add auto-load.o.
	(distclean): Change .gdbinit for gdb-gdb.gdb.
	* auto-load.c: New file, with parts from python/py-auto-load.c.
	* auto-load.h: New file, with parts from python/python.h.
	* configure: Regenerate.
	* configure.ac (AC_OUTPUT): Change .gdbinit for gdb-gdb.gdb.
	* gdb-gdb.gdb.in: New file, renamed from gdbinit.in.
	* gdbinit.in: Remove file, rename it to gdb-gdb.gdb.in.
	* main.c: Include auto-load.h.
	* python/py-auto-load.c: Move include filenames.h, gdb_regex.h,
	command.h, observer.h and progspace.h to auto-load.c.  Add include
	auto-load.h.
	(gdbpy_global_auto_load, struct auto_load_pspace_info)
	(struct loaded_script, auto_load_pspace_data)
	(auto_load_pspace_data_cleanup, get_auto_load_pspace_data)
	(hash_loaded_script_entry, eq_loaded_script_entry)
	(init_loaded_scripts_info, get_auto_load_pspace_data_for_loading)
	(maybe_add_script): Move to auto-load.c.
	(source_section_scripts): Change maybe_add_script parameters passing,
	use script_not_found_warning_print.
	(clear_section_scripts, auto_load_objfile_script)
	(auto_load_new_objfile, loaded_script_ptr)
	(DEF_VEC_P (loaded_script_ptr), collect_matching_scripts, print_script)
	(sort_scripts_by_name, info_auto_load_scripts): Move to auto-load.c.
	(gdbpy_initialize_auto_load): Move auto_load_pspace_data,
	auto_load_new_objfile and info_auto_load_scripts initizations to
	auto-load.c.
	* python/python.h (gdbpy_global_auto_load): Move to auto-load.h.
2012-04-17 15:49:16 +00:00
Yao Qi 55a8c0761d gdb/
Import gnulib module inttypes from git
	(250b80067c1e1d8faa0c42fb572f721975b929c5)
	* Makefile.in (HFILES_NO_SRCDIR): Add gnulib/inttypes.in.h.
	(aclocal_m4_deps): Add gnulib/m4/inttypes.m4 and gnulib/m4/inttypes-pri.m4
	* aclocal.m4, config.in, configure: Regenerated.
	* gnulib/Makefile.am: Update.
	* gnulib/Makefile.in: Update.
	* gnulib/m4/gnulib-cache.m4: Update.
	* gnulib/m4/gnulib-comp.m4: Update.
	* gnulib/inttypes.in.h: New.
	* gnulib/m4/inttypes-pri.m4: New.
 	* gnulib/m4/inttypes.m4: New.

gdb/gdbserver/
	Import gnulib module inttypes.
	* aclocal.m4, config.in, configure: Regenerated.
2012-04-14 05:24:57 +00:00
Yao Qi 2f26ef89d8 gdb/
* Makefile.in (gnulib/Makefile): Remove duplicated dependency.
2012-04-10 22:48:41 +00:00
Yao Qi 2e505b667d gdb/
* Makefile.in (aclocal_m4_deps): Add gnulib/m4/gnulib-cache.m4
	and gnulib/m4/gnulib-tool.m4.
2012-04-10 22:46:13 +00:00
Joel Brobecker 181875a4ab Varobj support for Ada.
This patch adds varobj support for Ada variables.  Most of the code
is implemented in a separate Ada-specific file called ada-varobj.c.
The only bits in varobj.c are the functions used as the hooks in
the language-specific varobj's vector.

gdb/ChangeLog:

        * ada-varobj.h, ada-varobj.c: New files.
        * Makefile.in (SFILES): Add ada-varobj.c.
        (HFILES_NO_SRCDIR): Add ada-varobj.h.
        (COMMON_OBS): Add ada-varobj.o.
2012-03-28 21:31:18 +00:00
Jan Kratochvil 5f572decf9 gdb/
* Makefile.in (linux-ptrace.o): New.
	* common/linux-procfs.c (linux_proc_pid_is_zombie): New,
	from linux-nat.c.
	* common/linux-procfs.h (linux_proc_pid_is_zombie): New declaration.
	* common/linux-ptrace.c: New file.
	* config/alpha/alpha-linux.mh (NATDEPFILES): Add linux-ptrace.o.
	* 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/powerpc/spu-linux.mh: Likewise.
	* config/s390/s390.mh: Likewise.
	* config/sparc/linux.mh: Likewise.
	* config/sparc/linux64.mh: Likewise.
	* config/xtensa/linux.mh: Likewise.
	* linux-nat.c (linux_lwp_is_zombie): Remove, move it to
	common/linux-procfs.c.
	(wait_lwp): Rename linux_lwp_is_zombie to linux_proc_pid_is_zombie.

gdb/gdbserver/
	* Makefile.in (linux-ptrace.o): New.
	* configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
	(cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
	(m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
	(s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
	(x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
	of these targets.
	* linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
2012-03-13 15:00:37 +00:00
Jan Kratochvil 05e7c24434 gdb/
* libunwind-frame.c: Rename to ...
	* ia64-libunwind-tdep.c: ... here.
	* libunwind-frame.h: Rename to ...
	* ia64-libunwind-tdep.h: ... here.
	* Makefile.in (HFILES_NO_SRCDIR): Rename libunwind-frame.h to
	ia64-libunwind-tdep.h.
	(ALLDEPFILES): Rename libunwind-frame.c to ia64-libunwind-tdep.c.
	* README (--with-libunwind): Rename to ...
	(--with-libunwind-ia64): ... here, note it is ia64 specific now.
	* config.in: Regenerate.
	* configure: Regenerate.
	* configure.ac: New option --with-libunwind-ia64, make the
	AS_HELP_STRING ia64 specific.  Deprecate option --with-libunwind.
	Remove AC_DEFINE for HAVE_LIBUNWIND.
	* ia64-libunwind-tdep.c: Make the file top comment ia64 specific.
	Rename libunwind-frame.h #include to ia64-libunwind-tdep.h.
	Rename libunwind-frame in the general comment.
	* ia64-libunwind-tdep.h: Make the file top comment ia64 specific.
	Rename symbol LIBUNWIND_FRAME_H to IA64_TDEP_LIBUNWIND_FRAME_H.
	Move forward declarations inside #ifndef.  Rename libunwind-frame in
	the general comment.
	* ia64-tdep.c: Rename libunwind-frame.h #include to
	ia64-libunwind-tdep.h.
	(ia64_gdb2uw_regnum, ia64_uw2gdb_regnum, ia64_is_fpreg)
	(ia64_libunwind_descr): Rename libunwind-frame to
	ia64-libunwind-tdep in these function comments.
	* ia64-tdep.h: Rename libunwind-frame.h #include to
	ia64-libunwind-tdep.h.
	* ia64-vms-tdep.c (ia64_vms_libunwind_descr): Rename libunwind-frame to
	ia64-libunwind-tdep in that data comment.
2012-03-08 19:08:11 +00:00
Tristan Gingold 696759ad10 2012-03-05 Tristan Gingold <gingold@adacore.com>
* ia64-tdep.h: Include libunwind-frame.h and libunwind-ia64.h.
	(ia64_unw_accessors, ia64_unw_rse_accessors)
	(ia64_libunwind_descr): Declare.
	* ia64-vms-tdep.c: New file.
	* ia64-tdep.c (ia64_unw_accessors, ia64_unw_rse_accessors)
	(ia64_libunwind_descr): Make them public.
	* configure.tgt: Add ia64-*-*vms*.
	* Makefile.in (ALL_64_TARGET_OBS): Add ia64-vms-tdep.o
	(ALLDEPFILES): Add ia64-vms-tdep.c
2012-03-05 11:41:51 +00:00
Yao Qi d1feda864e gdb:
* target.h (struct target_ops) <to_use_agent>: New field.
	(struct target_ops) <to_can_use_agent>: New field.
	(target_use_agent, target_can_use_agent): New macro.
	* target.c (update_current_target): Update.
	* remote.c: New enum `PACKET_QAgent'.
	(remote_protocol_features): Add a new element.
	(remote_use_agent, remote_can_use_agent): New.
	(init_remote_ops): Initialize field `can_use_agent' with
	remote_can_use_agent.  Intiailize field `use_agent' with
	remote_use_agent.
	* common/agent.c (use_agent): New global.
	* common/agent.h: Declare it.
	* tracepoint.c (info_static_tracepoint_markers_command): Add
	comment.
	* Makefile.in (SFILES): Add common/agent.c and agent.c.
	(COMMON_OBS): Add common/agent.o and agent.o
	(common-agent.o): New rule.
	* agent.c: New.

gdb/doc:
	* gdb.texinfo (In-Process Agent): New node.
	Document new commands.
	(General Query Packets): Add packet `QAgent'.

gdb/gdbserver:
	* linux-low.c (linux_supports_agent): New.
	(linux_target_ops): Initialize field `supports_agent' with
	linux_supports_agent.
	* target.h (struct target_ops) <supports_agent>: New.
	(target_supports_agent): New macro.
	* server.c (handle_general_set): Handle packet 'QAgent'.
	(handle_query): Send `QAgent+'.
	* Makefile.in (server.o): Depends on agent.h.
2012-03-03 03:32:46 +00:00
Jan Kratochvil 04dcf5fa36 gdb/
Fix -Wmissing-prototypes build.
	* Makefile.in (HFILES_NO_SRCDIR): Add sh64-tdep.h.
	* sh-tdep.c: Include sh64-tdep.h.
	* sh-tdep.h (sh64_gdbarch_init, sh64_show_regs): Remove declarations.
	* sh64-tdep.c: Include sh64-tdep.h.
	* sh64-tdep.h: New file.
2012-03-01 23:55:40 +00:00
Kevin Buettner e558618318 * MAINTAINERS: Add rx to target ISA section.
* Makefile.in (ALL_TARGET_OBS): Add rx-tdep.o.
	(ALLDEPFILES): Add rx-tdep.c.
2012-02-16 23:39:37 +00:00
Kevin Buettner a58b110ab4 * MAINTAINERS: Add rl78 to target ISA section.
* Makefile.in (ALL_TARGET_OBS): Add rl78-tdep.o.
	(ALLDEPFILES): Add rl78-tdep.c.
	* NEWS: Mention rl78 as a new target.
2012-02-15 22:17:02 +00:00
Pedro Alves 1916efaf84 2012-02-09 Valery Khromov <valery.khromov@gmail.com>
PR gdb/12953
	* Makefile.in (HFILES_NO_SRCDIR): Add amd64bsd-nat.h.
	* amd64bsd-nat.c: Add support for debug registers (adapted from
	i386bsd-nat.c).
	[HAVE_PT_GETDBREGS] (amd64bsd_dr_get, amd64bsd_dr_set)
	(amd64bsd_dr_set_control, amd64bsd_dr_set_addr)
	(amd64bsd_dr_get_addr, amd64bsd_dr_get_status)
	(amd64bsd_dr_get_control): New functions.
	* amd64bsd-nat.h: New file (adapted from i386bsd-nat.h).
	* amd64fbsd-nat.c: Include "amd64bsd-nat.h", "i386-nat.h".
	[HAVE_PT_GETDBREGS] (_initialize_amd64fbsd_nat): Add hardware
	watchpoints initialization.
	* config/i386/fbsd64.mh (NATDEPFILES): Add i386-nat.o.
2012-02-09 16:06:44 +00:00
Doug Evans f83d8a90ae * Makefile.in (TARGET_SYSTEM_ROOT, TARGET_SYSTEM_ROOT_DEFINE): Delete.
(main.o): Remove rule.
	* configure.ac (BINDIR): Define with AC_DEFINE_DIR.
	(--with-sysroot): Rewrite.
	* configure: Regenerate.
	* config.in: Regenerate.
2012-01-18 18:35:43 +00:00
Jan Kratochvil 06b9f45fe4 gdb/
Fix duplicate .o files after omitting libbfd.a.
	* Makefile.in (ALL_TARGET_OBS): Remove corelow.o.
	(SFILES): Add corelow.c.
	(COMMON_OBS): Add corelow.o.
	(ALLDEPFILES): Remove corelow.c.
	* config/alpha/alpha-linux.mh (NATDEPFILES): Remove corelow.o.
	* config/alpha/alpha-osf3.mh: Likewise.
	* config/alpha/fbsd.mh: Likewise.
	* config/arm/nbsdaout.mh: Likewise.
	* config/arm/nbsdelf.mh: Likewise.
	* config/i386/i386gnu.mh: Likewise.
	* config/ia64/hpux.mh: Likewise.
	* config/ia64/linux.mh: Likewise.
	* config/m32r/linux.mh: Likewise.
	* config/m68k/linux.mh: Likewise.
	* config/mips/irix5.mh: Likewise.
	* config/mips/irix6.mh: Likewise.
	* config/pa/hpux.mh: Likewise.
	* config/pa/linux.mh: Likewise.
	* config/powerpc/aix.mh: Likewise.
	* config/sparc/linux.mh: Likewise.
	* config/sparc/linux64.mh: Likewise.
	* config/sparc/sol2.mh: Likewise.
	* config/vax/vax.mh: Likewise.
	* configure.tgt (alpha*-*-freebsd* alpha*-*-kfreebsd*-gnu)
	(alpha*-*-netbsd*, alpha*-*-knetbsd*-gnu, alpha*-*-openbsd*)
	(am33_2.0*-*-linux*, arm*-wince-pe, arm*-*-mingw32ce*, arm*-*-linux*)
	(arm*-*-openbsd*, cris*, frv-*-*, hppa*-*-hpux*, hppa*-*-netbsd*)
	(hppa*-*-openbsd*, i[34567]86-*-dicos*, i[34567]86-*-freebsd*)
	(i[34567]86-*-kfreebsd*-gnu, i[34567]86-*-netbsd*)
	(i[34567]86-*-knetbsd*-gnu, i[34567]86-*-openbsd*, i[34567]86-*-nto*)
	(i[34567]86-*-solaris2.1[0-9]*, x86_64-*-solaris2.1[0-9]*)
	(i[34567]86-*-solaris*, i[34567]86-*-linux*, i[34567]86-*-cygwin*)
	(i[34567]86-*-mingw32*, m68*-*-netbsd*, m68*-*-knetbsd*-gnu)
	(m68*-*-openbsd*, m88*-*-openbsd*, microblaze*-linux-*)
	(microblaze*-*-linux*, mips*-*-linux*, mips*-*-netbsd*)
	(mips*-*-knetbsd*-gnu, mips64*-*-openbsd*, powerpc-*-netbsd*)
	(powerpc-*-knetbsd*-gnu, powerpc-*-openbsd*, powerpc-*-linux*)
	(powerpc64-*-linux*, s390*-*-*, score-*-*, sh*-*-linux*)
	(sh*-*-netbsdelf*, sh*-*-knetbsd*-gnu, sh*-*-openbsd*)
	(sparc*-*-freebsd*, sparc*-*-kfreebsd*-gnu, sparc-*-netbsd*)
	(sparc-*-knetbsd*-gnu, sparc64-*-netbsd*, sparc64-*-knetbsd*-gnu)
	(sparc-*-openbsd*, sparc64-*-openbsd*, tic6x-*-*linux, vax-*-netbsd*)
	(vax-*-knetbsd*-gnu, vax-*-openbsd*, x86_64-*-dicos*, x86_64-*-linux*)
	(x86_64-*-freebsd*, x86_64-*-kfreebsd*-gnu, x86_64-*-netbsd*)
	(x86_64-*-knetbsd*-gnu, x86_64-*-openbsd*, xtensa*-*-linux*): Remove
	corelow.o from gdb_target_obs.
	* corefile.c (core_target): Update the comment on NULL value.
	(core_file_command): Replace error by gdb_assert on CORE_TARGET.
	* corelow.c (sniff_core_bfd): Call error instead of warning on zero
	MATCHES.  Drop YUMMY set on NULL.
	(core_close): Do not call exit_inferior_silent on zero PID.  Do not
	reclaim CORE_DATA if it is already NULL.
2012-01-10 16:30:49 +00:00
Keith Seitz 8e7b59a53f * Makefile.in (SFILES): Remove wrapper.c.
(HFILES_NO_SRCDIR): Remove wrapper.h.
	(COMMON_OBS): Remove wrapper.o.
	* cli/cli-interp.c: Don't inlude wrapper.h.
	* corelow.c: Likewise.
	(core_open): Replace gdb_target_find_new_threads with
	TRY_CATCH around target_find_new_threads.
	* eval.c (fetch_subexp_value): Likewise for value_fetch_lazy.
	* gdbtypes.c (safe_parse_type): Likewise for parse_and_eval_type.
	* varobj.c (varobj_create): Likewise for parse_exp_1 and
	evaluate_expression.
	(varobj_set_value): Likewise for evaluate_expression and
	value_assign.
	(install_new_variable): Likewise for value_fetch_lazy.
	(adjust_value_for_child_access): Likewise for value_ind.
	(c_describe_child): Likewise for value_subscript and
	value_ind.
	(c_value_of_root): Likewise for evaluate_expression.
	* wrapper.c: Remove.
	* wrapper.h: Remove.
2012-01-09 20:27:49 +00:00
Joel Brobecker 0b30217134 Copyright year update in most files of the GDB Project.
gdb/ChangeLog:

        Copyright year update in most files of the GDB Project.
2012-01-04 08:17:56 +00:00
Jan Kratochvil 0cd09acb33 gdb/
* Makefile.in (ALL_TARGET_OBS): Remove solib-target.o.
	* configure.tgt (arm*-wince-pe, arm*-*-mingw32ce*, arm*-*-symbianelf*)
	(i[34567]86-*-dicos*, i[34567]86-*-cygwin*, i[34567]86-*-mingw32*)
	(x86_64-*-dicos*, x86_64-*-mingw*): Remove solib-target.o.
	Revert this part of:
	2012-01-02  Jan Kratochvil  <jan.kratochvil@redhat.com>
	Build gdb directly from *.o files not using libgdb.a.
	* Makefile.in (COMMON_OBS): Remove solib-target.o.
2012-01-02 17:18:46 +00:00
Jan Kratochvil 8574e74b2b gdb/
Build gdb directly from *.o files not using libgdb.a.
	* Makefile.in (SUBDIR_TUI_OBS): Remove duplicate tui.o.
	(COMMON_OBS): Remove solib-target.o.
	(LIBGDB_OBS, libgdb.a): Move it before the gdb$(EXEEXT) rule.
	(gdb$(EXEEXT)): Replace libgdb.a with $(LIBGDB_OBS).
	(LIBGDB_OBS, libgdb.a): Move it above.
	* configure.tgt (alpha*-*-linux*, alpha*-*-freebsd*)
	(alpha*-*-kfreebsd*-gnu, alpha*-*-netbsd*, alpha*-*-knetbsd*-gnu)
	(alpha*-*-openbsd*, am33_2.0*-*-linux*, arm*-wince-pe)
	(arm*-*-mingw32ce*, arm*-*-linux*, arm*-*-netbsd*, arm*-*-knetbsd*-gnu)
	(arm*-*-openbsd*, cris*, frv-*-*, hppa*-*-hpux*, hppa*-*-linux*)
	(hppa*-*-netbsd*, hppa*-*-openbsd*, i[34567]86-*-darwin*)
	(i[34567]86-*-dicos*, i[34567]86-*-freebsd*, i[34567]86-*-kfreebsd*-gnu)
	(i[34567]86-*-netbsd*, i[34567]86-*-knetbsd*-gnu, i[34567]86-*-openbsd*)
	(i[34567]86-*-nto*, i[34567]86-*-solaris2.1[0-9]*)
	(x86_64-*-solaris2.1[0-9]*, i[34567]86-*-solaris*, i[34567]86-*-linux*)
	(i[34567]86-*-gnu*, ia64-*-linux*, m32r*-*-linux*, m68*-*-linux*)
	(m68*-*-netbsd*, m68*-*-knetbsd*-gnu, m68*-*-openbsd*)
	(microblaze*-linux-*, microblaze*-*-linux*, mips*-sgi-irix5*)
	(mips*-sgi-irix6*, mips*-*-linux*, mips*-*-netbsd*)
	(mips*-*-knetbsd*-gnu, mips64*-*-openbsd*, powerpc-*-netbsd*)
	(powerpc-*-knetbsd*-gnu, powerpc-*-openbsd*, powerpc-*-aix*, rs6000-*-*)
	(powerpc-*-linux*, powerpc64-*-linux*, powerpc*-*-*, s390*-*-*)
	(sh*-*-linux*, sh*-*-netbsdelf*, sh*-*-knetbsd*-gnu, sh*-*-openbsd*)
	(sparc-*-linux*, sparc64-*-linux*, sparc*-*-freebsd*)
	(sparc*-*-kfreebsd*-gnu, sparc-*-netbsd*, sparc-*-knetbsd*-gnu)
	(sparc64-*-netbsd*, sparc64-*-knetbsd*-gnu, sparc-*-openbsd*)
	(sparc64-*-openbsd*, sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*)
	(sparc-*-solaris2*, sparcv9-*-solaris2*, sparc64-*-solaris2*)
	(vax-*-netbsd*, vax-*-knetbsd*-gnu, x86_64-*-darwin*, x86_64-*-dicos*)
	(x86_64-*-linux*, x86_64-*-freebsd*, x86_64-*-kfreebsd*-gnu)
	(x86_64-*-netbsd*, x86_64-*-knetbsd*-gnu, x86_64-*-openbsd*)
	(xtensa*-*-linux*, xtensa*): Remove solib.o from gdb_target_obs.
2012-01-02 02:31:18 +00:00
Jan Kratochvil 217bff3e3f gdb/
Remove the gdbtui binary.
	* .gitignore (/gdbtui): Remove.
	* Makefile.in (TUI): Remove.
	(SUBDIR_TUI_OBS): Remove tui-main.o.
	(SUBDIR_TUI_SRCS): Remove tui/tui-main.c.
	(all-tui, install-tui, uninstall-tui, $(TUI)$(EXEEXT), clean-tui)
	(tui-main.o): Remove.
	(all_object_files): Remove tui-main.o.
	* NEWS: New note for the gdbtui removal.
	* configure: Rebuilt.
	* configure.ac: No longer add all-tui, clean-tui, install-tui and
	uninstall-tui to CONFIG_ALL, CONFIG_CLEAN, CONFIG_INSTALL and
	CONFIG_UNINSTALL respectively.
	* gdb.c (main): Remove args.interpreter_p initialization.
	* main.c (captured_main): Set INTERPRETER_P directly by INTERP_CONSOLE.
	* main.h (struct captured_main_args): Remove interpreter_p.
	* tui/tui-main.c: Remove.

gdb/doc/
	Remove the gdbtui binary.
	* all-cfg.texi (GDBTUI): Remove.
	* gdb.texinfo (Mode Options): Remove the GDBTUI reference.
	(TUI): Remove GDBTUI pindex.  Remove the GDBTUI reference.
	* gdbint.texinfo (Testsuite): Replace `gdbtui' by `gdb -tui'.
2012-01-02 02:28:59 +00:00
Kevin Pouget cc72b2a2da Introduce gdb.FinishBreakpoint in Python
* Makefile.in (SUBDIR_PYTHON_OBS): Add py-finishbreakpoint.o.
	(SUBDIR_PYTHON_SRCS): Add python/py-finishbreakpoint.c.
	Add build rule for this file.
	* infcmd.c (print_return_value): Split to create get_return_value.
	(get_return_value): New function based on print_return_value. Handle
	case where stop_registers are not set.
	* inferior.h (get_return_value): New prototype.
	* python/py-breakpoint.c (bppy_pending_object): Make non-static.
	(gdbpy_breakpoint_created): Set is_py_finish_bp is necessary.
	(struct breakpoint_object): Move to python-internal.h
	(BPPY_REQUIRE_VALID): Likewise.
	(BPPY_SET_REQUIRE_VALID): Likewise.
	(gdbpy_breakpoint_created): Initialize is_finish_bp.
	(gdbpy_should_stop): Add  pre/post hooks before/after calling stop
	method.
	* python/python-internal.h (breakpoint_object_type): Add as extern.
	(bppy_pending_object): Likewise.
	(typedef struct breakpoint_object) Removed.
	(struct breakpoint_object): Moved from py-breakpoint.c.
	Add field is_finish_bp.
	(BPPY_REQUIRE_VALID): Moved from py-breakpoint.c.
	(BPPY_SET_REQUIRE_VALID): Likewise.
	(frame_object_to_frame_info): New prototype.
	(gdbpy_initialize_finishbreakpoints): New prototype.
	(bpfinishpy_is_finish_bp): Likewise.
	(bpfinishpy_pre_stop_hook): Likewise.
	(bpfinishpy_post_stop_hook): Likewise.
	* python/py-finishbreakpoint.c: New file.
	* python/py-frame.c(frame_object_to_frame_info): Make non-static and
	accept PyObject instead of frame_object.
	(frapy_is_valid): Don't cast to frame_object.
	(frapy_name): Likewise.
	(frapy_type): Likewise.
	(frapy_unwind_stop_reason): Likewise.
	(frapy_pc): Likewise.
	(frapy_block): Likewise.
	(frapy_function): Likewise.
	(frapy_older): Likewise.
	(frapy_newer): Likewise.
	(frapy_find_sal): Likewise.
	(frapy_read_var): Likewise.
	(frapy_select): Likewise.
	* python/python.c (gdbpy_is_stopped_at_finish_bp): New noop function.
	(_initialize_python): Add gdbpy_initialize_finishbreakpoints.
	* python/python.h: Include breakpoint.h
	(gdbpy_is_stopped_at_finish_bp): New prototype.

doc/
	* gdb.texinfo (Finish Breakpoints in Python): New subsection.
	(Python API): Add menu entry for Finish Breakpoints.

testsuite/
	* Makefile.in (EXECUTABLES): Add py-finish-breakpoint and
	py-finish-breakpoint2
	(MISCALLANEOUS): Add py-events-shlib.so and py-events-shlib-nodebug.so
	* gdb.python/py-breakpoint.exp (mult_line): Define and use variable
	instead of line number.
	* gdb.python/py-finish-breakpoint.c: New file.
	* gdb.python/py-finish-breakpoint.exp: New file.
	* gdb.python/py-finish-breakpoint.py: New file.
	* gdb.python/py-finish-breakpoint2.cc: New file.
	* gdb.python/py-finish-breakpoint2.exp: New file.
	* gdb.python/py-finish-breakpoint2.py: New file.
2011-12-23 17:06:16 +00:00
Jan Kratochvil 2268b414f4 gdb/
* Makefile.in (XMLFILES): Add library-list-svr4.dtd.
	* features/library-list-svr4.dtd: New file.
	* remote.c (PACKET_qXfer_libraries_svr4): New.
	(remote_protocol_features): new entry for PACKET_qXfer_libraries_svr4.
	(remote_xfer_partial): Handle TARGET_OBJECT_LIBRARIES_SVR4.
	* solib-svr4.c (struct svr4_library_list): New.
	[HAVE_LIBEXPAT]: Include xml-support.h.
	[HAVE_LIBEXPAT] (svr4_library_list_start_library)
	[HAVE_LIBEXPAT] (svr4_library_list_start_list, svr4_library_attributes)
	[HAVE_LIBEXPAT] (svr4_library_list_children)
	[HAVE_LIBEXPAT] (svr4_library_list_attributes)
	[HAVE_LIBEXPAT] (svr4_library_list_elements, svr4_parse_libraries)
	[HAVE_LIBEXPAT] (svr4_current_sos_via_xfer_libraries)
	[!HAVE_LIBEXPAT] (svr4_current_sos_via_xfer_libraries): New.
	(svr4_read_so_list): Extend the corruption message by addresses.
	(svr4_current_sos): New variable library_list, call
	svr4_current_sos_via_xfer_libraries.
	* target.h (enum target_object): New TARGET_OBJECT_LIBRARIES_SVR4.

gdb/gdbserver/
	* linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
	(read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
	New.
	(struct linux_target_ops): Install linux_qxfer_libraries_svr4.
	* linux-low.h (struct process_info_private): New member r_debug.
	* server.c (handle_qxfer_libraries): Call
	the_target->qxfer_libraries_svr4.
	(handle_qxfer_libraries_svr4): New function.
	(qxfer_packets): New entry "libraries-svr4".
	(handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
	* target.h (struct target_ops): New member qxfer_libraries_svr4.
	* remote.c (remote_xfer_partial): Call add_packet_config_cmd for
	PACKET_qXfer_libraries_svr4.

gdb/doc/
	* gdb.texinfo (Requirements, Remote Protocol): Reference also `Library
	List Format for SVR4 Targets'.
	(General Query Packets): New item qXfer:libraries-svr4:read.
	(Library List Format for SVR4 Targets): New node.

gdb/testsuite/
	* gdb.base/solib-corrupted.exp: Suppress test on is_remote target.
	(corrupted list): Adjust the expectation.
2011-12-02 22:26:54 +00:00
Sanjoy Das a2d08b9eeb gdb/
* Makefile.in: Add gdb-dlfcn.c and gdb-dlfcn.h to build system.
	* config.in: Add new #define HAVE_LIBDL.
	* configure.ac: Add check for -ldl.
	* configure: Re-generated by autoconf.
	* gdb-dlfcn.c: New file.
	* gdb-dlfcn.h: New file.
2011-11-20 08:59:56 +00:00
Sanjoy Das f997c38354 gdb/
* Makefile.in: Add jit-reader.h as a header.  Have it installed in
	$(includedir)/gdb.
	* configure.ac: Generate a correct value for TARGET_PTR for
	jit-reader.h.  Tell configure to generate jit-reader.h from
	jit-reader.in.
	* configure: Re-generated by autoconf.
	* jit-reader.in: New file.
	* jit.c: Include jit-reader.h.
2011-11-20 08:30:59 +00:00
Justin Lebar 1bfeeb0f75 2011-10-06 Justin Lebar <justin.lebar@gmail.com>
* Makefile.in: (SFILES): Add skip.c.
	(HFILES_NO_SRCDIR): Add skip.h.
	(COMMON_OBS): Add skip.o.
	* skip.h, skip.c: New.
	* breakpoint.h (set_default_breakpoint): Remove.
	(get_sal_arch): Declare.
	* breakpoint.c: Remove default_breakpoint_valid,
	default_breakpoint_address, default_breakpoint_symtab,
	default_breakpoint_line, default_breakpoint_pspace variables.
	(get_sal_arch): Make public.
	(set_default_breakpoint): Remove.
	(parse_breakpoint_sals, create_breakpoint, clear_command,
	decode_line_spec_1): Remove uses of default_breakpoint variables;
	replaced with function calls into stack.c.
	* cli/cli-cmds.h: Add cmd_list_element *skiplist.
	* cli/cli-cmds.c: Add skiplist.
	(init_cmd_lists): Initialize skiplist.
	(init_cli_cmds): Fix comment (classes of commands appear in
	alphabetical order).
	* infrun.c (handle_inferior_event): Add check that we don't step into
	a function whose pc is marked for skip.
	* stack.c: Declare last_displayed_sal_valid, last_displayed_pspace,
	last_displayed_addr, last_displayed_symtab, last_displayed_line
	variables.
	(set_last_displayed_sal): New static function.
	(print_frame_info): Switch call to set_default_breakpoint to call to
	set_last_displayed_sal.
	(clear_last_displayed_sal, last_displayed_sal_is_valid,
	get_last_displayed_pspace, get_last_displayed_addr,
	get_last_displayed_symtab, get_last_displayed_line,
	get_last_displayed_sal): New public functions.
	* stack.h (clear_last_displayed_sal, last_displayed_sal_is_valid,
	get_last_displayed_pspace, get_last_displayed_addr,
	get_last_displayed_symtab, get_last_displayed_line,
	get_last_displayed_sal): Declare.

2011-10-06  Justin Lebar <justin.lebar@gmail.com>

	Add tests for skip command.
	* testsuite/gdb.base/skip-solib-lib.c: New
	* testsuite/gdb.base/skip-solib-main.c: New
	* testsuite/gdb.base/skip-solib.exp: New
	* testsuite/gdb.base/skip.c: New
	* testsuite/gdb.base/skip.exp: New
	* testsuite/gdb.base/skip1.c: New
	* testsuite/gdb.base/Makefile.in: Adding new files.
2011-11-01 14:51:25 +00:00
Jan Kratochvil 5048e51677 gdb/
Fix compatibility with texinfo versions older than 4.12.
	* Makefile.in (MAKEINFO): Set to @MAKEINFO@.
	(MAKEINFOFLAGS, MAKEINFO_EXTRA_FLAGS, MAKEINFO_CMD): New.
	(MAKEHTMLFLAGS): Use MAKEINFO_CMD.
	(FLAGS_TO_PASS): Add MAKEINFOFLAGS and MAKEINFO_EXTRA_FLAGS.
	* configure: Regenerate.
	* configure.ac (MAKEINFO): Find it, from libiberty/configure.ac.
	(MAKEINFOFLAGS): Pre-set it to --split-size=5000000.
	(MAKEINFO_EXTRA_FLAGS): New test for -DHAVE_MAKEINFO_CLICK.

gdb/doc/
	Fix compatibility with texinfo versions older than 4.12.
	* Makefile.in (MAKEINFO): Set to @MAKEINFO@.
	(MAKEINFOFLAGS, MAKEINFO_EXTRA_FLAGS, MAKEINFO_CMD): New.
	(MAKEHTMLFLAGS): Use MAKEINFO_CMD.
	(gdb.info, gdbint.info, stabs.info, annotate.info): Use MAKEINFO_CMD.
	* gdb.texinfo (Tail Call Frames): Convert @arrow{} to @click, when possible.
	Make the conversion conditional on HAVE_MAKEINFO_CLICK, using variables
	CALLSEQ1A, CALLSEQ1B, CALLSEQ2A and CALLSEQ2B.
2011-10-12 15:55:04 +00:00
Jan Kratochvil 111c64899c gdb/
Recognize virtual tail call frames.
	* Makefile.in (SFILES): Add dwarf2-frame-tailcall.c.
	(HFILES_NO_SRCDIR): Add dwarf2-frame-tailcall.h.
	(COMMON_OBS): Add dwarf2-frame-tailcall.o.
	* dwarf2-frame-tailcall.c: New file.
	* dwarf2-frame-tailcall.h: New file.
	* dwarf2-frame.c: Include dwarf2-frame-tailcall.h.
	(execute_cfa_program): New function comment.  Return INSN_PTR.  Reset
	REGS.PREV only after CIE execution.
	(struct dwarf2_frame_cache): New field tailcall_cache.
	(dwarf2_frame_cache): New variables entry_pc, entry_cfa_sp_offset,
	entry_cfa_sp_offset_p and instr.  Execute FDE instructions in two
	parts, try to find entry_cfa_sp_offset.  Call
	dwarf2_tailcall_sniffer_first.
	(dwarf2_frame_prev_register): Call dwarf2_tailcall_prev_register_first
	when appropriate.
	(dwarf2_frame_dealloc_cache): New function.
	(dwarf2_frame_sniffer): Preinitialize cache by dwarf2_frame_cache.
	(dwarf2_frame_unwind): Install dwarf2_frame_dealloc_cache.
	(dwarf2_signal_frame_unwind): Do not install dwarf2_frame_dealloc_cache.
	(dwarf2_append_unwinders): Add dwarf2_tailcall_frame_unwind.
	(dwarf2_frame_cfa): Support also dwarf2_tailcall_frame_unwind.
	* dwarf2loc.c (func_addr_to_tail_call_list)
	(tailcall_dump, call_sitep, VEC (call_sitep), chain_candidate)
	(call_site_find_chain_1, call_site_find_chain): New.
	* dwarf2loc.h (struct call_site_chain): New.
	(call_site_find_chain): New declaration.
	* frame.c (get_frame_address_in_block): Support also TAILCALL_FRAME.
	* frame.h (enum frame_type): New entry TAILCALL_FRAME.
	* python/py-frame.c (gdbpy_initialize_frames): Add TAILCALL_FRAME.
	* stack.c (frame_info): Support also TAILCALL_FRAME.

gdb/doc/
	Recognize virtual tail call frames.
	* gdb.texinfo (Optimized Code): Add reference to Tail Call Frames.
	(Tail Call Frames): New node.
	(Frames In Python): Add gdb.TAILCALL_FRAME.

gdb/testsuite/
	Recognize virtual tail call frames.
	* gdb.arch/amd64-entry-value.cc (c, a, b, amb_z, amb_y, amb_x, amb)
	(amb_b, amb_a): New.
	(main): Call a and b.
	* gdb.arch/amd64-entry-value.exp (tailcall: breakhere, tailcall: bt)
	(tailcall: p i, tailcall: p j, set $sp0=$sp, up, p $sp0 == $sp, frame 3)
	(p $sp0 + sizeof (void *) == $sp, ambiguous: breakhere, ambiguous: bt):
	New tests.
2011-10-09 19:26:44 +00:00
Kevin Pouget 20c168b519 Allow Python notification of new object-file loadings.
* Makefile.in (SUBDIR_PYTHON_SRCS): Add py-newobjfilevent.c.
	(SUBDIR_PYTHON_OBS): Add py-newobjfileevent.o.
	Add build rule for this file.
	* python/py-event.h (emit_new_objfile_event): New prototype.
	(newobjfile): New Python event emitter.
	* python/py-evts.c (gdbpy_initialize_py_events): Add new_objfile to
	Python event registry.
	* python/py-inferior.c: Include objfiles.h
	(python_new_objfile): New function.
	(gdbpy_initialize_inferior): Add python_new_objfile to the new objfile
	observers.
	* python/py-newobjfileevent.c: New file.
	* python-internal.h (gdbpy_initialize_new_objfile_event): New
	prototype.
	* python/python.c (_initialize_python): Add
	gdbpy_initialize_new_objfile_event call.
	* NEWS: Add item for new Python event "gdb.newobjfile"

2011-10-06  Kevin Pouget  <kevin.pouget@st.com>

	Allow Python notification of new object-file loadings.
	* gdb.texinfo (Events In Python): Document `gdb.NewObjFileEvent'
	event type.

2011-10-06  Kevin Pouget  <kevin.pouget@st.com>

	Allow Python notification of new object-file loadings.
	* gdb.python/py-events.exp: Test newobjfile event.
	* gdb.python/py-events.py: Register newobjfile callback.
	* gdb.python/py-events.c: Add call to shared library
	* gdb.python/py-events-shlib.c: New file.
2011-10-07 07:38:30 +00:00
Yao Qi 83d1a36ae4 gdb/
* Makefile.in (ALL_TARGET_OBS): Add tic6x-tdep.o tic6x-linux-tdep.o
	and solib-dsbt.o.
2011-08-30 02:09:05 +00:00
Luis Machado 13da1c9782 Move common linux procfs code to common/ 2011-08-24 12:07:28 +00:00
Tom Tromey 2d5213f8bc * Makefile.in (HFILES_NO_SRCDIR): Add 'common' prefix for
gdb_assert.h, gdb_locale.h, gdb_dirent.h.
2011-07-27 18:25:26 +00:00
Kwok Yeung d26e3629bb 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
gdb/
	* defs.h: Add guard against inclusion in gdbserver.
	(struct ptid, ptid_t): Move to common/ptid.h.
	(xfree, xzalloc, xasprintf, xvasprintf, xstrprintf, xstrvprintf,
	xsnprintf, internal_error): Move to common/common-utils.h.
	(nomem): Delete.
	* gdb_assert.h: Move into common/ sub-directory.
	* gdb_locale.h: Ditto.
	* gdb_dirent.h: Ditto.
	* inferior.h (minus_one_ptid, null_ptid, ptid_build, pid_to_ptid,
	ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid):
	Move into common/ptid.h.
	* xml-support.c (xml_escape_text): Move into common/xml-utils.c.
	(gdb_xml_create_parser_and_cleanup_1, xml_fetch_context_from_file):
	Change nomem to malloc_failure.
	* xml-support.h (xml_escape_text): Move into common/xml-utils.h.
	* utils.c (nomem): Rename to malloc_failure.
	(xmalloc, xzalloc, xrealloc, xcalloc, xfree, xstrprintf, xasprintf,
	xvasprintf, xstrvprintf, xsnprintf): Move to common/common-utils.c.
	(gdb_buildargv): Change nomem to malloc_failure.
	* infrun.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
	ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
	ptid_is_pid): Move into common/ptid.c.
	(initialize_infrun): Delete initialization of null_ptid and
	minus_one_ptid.
	* linux-nat.c (linux_nat_xfer_osdata): Defer to
	linux_common_xfer_osdata.
	* Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
	common/ptid.c and common/buffer.c.
	(HFILES_NO_SRCDIR): Add common/common-utils.h, common/xml-utils.h,
	common/ptid.h, common/buffer.h and common/linux-osdata.h.
	(COMMON_OBS): Add xml-utils.o, common-utils.o, buffer.o and ptid.o.
	(common-utils.o, xml-utils.o, ptid.o, buffer.o, linux-osdata.o): New
	rules.
	* common/gdb_assert.h: New.
	* common/gdb_dirent.h: New.
	* common/gdb_locale.h: New.
	* common/buffer.c: New.
	* common/buffer.h: New.
	* common/ptid.c: New.
	* common/ptid.h: New.
	* common/xml-utils.c: New.
	* common/xml-utils.h: New.
	* common/common-utils.c: New.
	* common/common-utils.h: New.
	* common/linux-osdata.c: New.
	* common/linux-osdata.h: New.
	* config/alpha/alpha-linux.mh (NATDEPFILES): Add linux-osdata.o.
	* config/arm/linux.mh (NATDEPFILES): Ditto.
	* config/i386/linux.mh (NATDEPFILES): Ditto.
	* config/i386/linux64.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/linux.mh (NATDEPFILES): Ditto.
	* config/sparc/linux64.mh (NATDEPFILES): Ditto.
	* config/xtensa/linux.mh (NATDEPFILES): Ditto.

gdbserver/
	* linux-low.c (compare_ints, unique, list_threads, show_process,
	linux_core_of_thread): Delete.
	(linux_target_ops): Change linux_core_of_thread to
	linux_common_core_of_thread.
	(linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
	* utils.c (malloc_failure): Change type of argument.
	(xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
	* Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
	common/linux-osdata.c, common/ptid.c and common/buffer.c.
	(OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
	(IPA_OBJS): Add common-utils-ipa.o.
	(ptid_h, linux_osdata_h): New macros.
	(server_h): Add common/common-utils.h, common/xml-utils.h,
	common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
	common/ptid.h.
	(common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
	ptid.o, buffer.o): New rules.
	(linux-low.o): Add common/linux-osdata.h as a dependency.
	* configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
	* configure.ac: Add AC_HEADER_DIRENT check.
	* config.in: Regenerate.
	* configure: Regenerate.
	* remote-utils.c (xml_escape_text): Delete.
	(buffer_grow, buffer_free, buffer_init, buffer_finish,
	buffer_xml_printf): Move to common/buffer.c.
	* server.c (main): Remove call to initialize_inferiors.
	* server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
	ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
	ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
	internal_error, gdb_assert, gdb_assert_fail): Delete.
	(struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
	buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
	common/buffer.h.
	* inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
	ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
	initialize_inferiors): Delete.
2011-07-21 23:46:12 +00:00
Tom Tromey 4727bad393 * Makefile.in (SUBDIR_MI_CFLAGS): Don't add -DMI_OUT=1. 2011-06-30 17:01:29 +00:00
Tom Tromey 5998129b54 * Makefile.in (HFILES_NO_SRCDIR): Add "common/" to
gdb_thread_db.h.  Move all common/ entries to be together.
	(TAGS): Don't depend on DEPFILES.
2011-06-24 19:29:49 +00:00
Pedro Alves 50c0c01734 2011-05-27 Pedro Alves <pedro@codesourcery.com>
gdb/
	* utils.c (struct continuation, add_continuation)
	(add_inferior_continuation)
	(do_all_inferior_continuations, discard_all_inferior_continuations)
	(restore_thread_cleanup, do_all_continuations_ptid)
	(do_all_continuations_thread_callback)
	(do_all_continuations_thread, do_all_continuations)
	(discard_all_continuations_thread_callback)
	(discard_all_continuations_thread, discard_all_continuations)
	(add_intermediate_continuation)
	(do_all_intermediate_continuations_thread_callback)
	(do_all_intermediate_continuations_thread)
	(do_all_intermediate_continuations)
	(discard_all_intermediate_continuations_thread_callback)
	(discard_all_intermediate_continuations_thread)
	(discard_all_intermediate_continuations): Move to ...
	* continuations.c: ... this new file, and adjust to no longer
	implement continuations on top of cleanups.
	* Makefile.in (SFILES): Add continuations.c.
	(COMMON_OBS): Add continuations.o.
2011-05-27 14:00:25 +00:00
Gary Benson 7782b183cb 2011-04-11 Gary Benson <gbenson@redhat.com>
Fix failure with --enable-maintainer-mode.
        * Makefile.in (aclocal_m4_deps): Updated gnulib dependencies.
2011-04-11 13:23:08 +00:00
Pierre Muller 311e6ab300 * Makefile.in (SFILES): Add missing C sources.
(HFILES_NO_SRCDIR): Remove gdbserver subdirectory headers.
	Add missing headers.
2011-03-30 06:55:39 +00:00
Yao Qi e637a4f593 gdb/
2011-03-09  Yao Qi  <yao@codesourcery.com>

	Revert:
	2011-02-11  Yao Qi  <yao@codesourcery.com>

	* common/Makefile.in: Add copyright header.

	2011-02-11  Yao Qi  <yao@codesourcery.com>

	* Makefile.in: Remove signals.o from COMMON_OBS.  Link
	libcommon.a.
	* configure.ac: Add common to sub dir.
	* configure: Regenerate.

gdb/gdbserver/
2011-03-09  Yao Qi  <yao@codesourcery.com>

	Revert:
	2011-03-04  Yao Qi  <yao@codesourcery.com>

	* Makefile.in: Remove GNU make feature --directory.

	2011-03-05  Yao Qi  <yao@codesourcery.com>

	* Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
	(subdir_do): New make target.  Copied from gdb/Makefile.
	(maintainer-clean, realclean, distclean, clean): Call corresponding
	make targets in common/Makefile.

	2011-02-11  Yao Qi  <yao@codesourcery.com>

	* configure.ac: Call AC_PROG_RANLIB.
	* Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
	* configure: Regenerate.
2011-03-09 06:10:40 +00:00
Yao Qi 08e1408309 2011-03-07 Yao Qi <yao@codesourcery.com>
* Makefile.in (aclocal_m4_deps): Remove gnulib/m4/memcmp.m4.
2011-03-07 11:42:54 +00:00
Yao Qi ced54c8ff8 2011-03-03 Yao Qi <yao@codesourcery.com>
* Makefile.in (configure-common): Remove.  Let Makefile
	in dir common to rebuild itself.
	(common/Makefile): Likewise.
2011-03-03 04:16:33 +00:00
Michael Snyder 2c9de9123d 2011-02-24 Michael Snyder <msnyder@vmware.com>
* Makefile.in (clean): Make clean should remove generated files
	observer.h and observer.inc.
2011-02-24 18:09:51 +00:00
Joel Brobecker a04b0428ab Revert the following change (not approved yet):
2011-02-21  Hui Zhu  <teawater@gmail.com>
	* Makefile.in (HFILES_NO_SRCDIR): Add printcmd.h.
	* ax-gdb.c (gen_printf_expr_callback): New function.
	* ax-gdb.h (gen_printf_expr_callback): Forward declare.
	* ax-general.c (ax_memcpy): New function.
	(ax_print): Handle "printf".
	(ax_reqs): Ditto.
	* ax.h (ax_memcpy): Forward declare.
	* common/ax.def (invalid2): Removed.
	(printf): New entry.
	* printcmd.c (printcmd.h): New include.
	(string_printf): New function.
	(ui_printf): Removed.
	(printf_command): Remove static.  Call string_printf.
	(eval_command): Call string_printf.
	* printcmd.h: New file.
	* tracepoint.c (validate_actionline,
	encode_actions_1): handle printf_command.
2011-02-24 07:39:48 +00:00
Joel Brobecker 36238dbca5 Delete Makefile.in:INSTALLED_LIBS (unused)
gdb/ChangeLog:

        * Makefile.in (INSTALLED_LIBS): Delete.  Update comment.
2011-02-22 08:00:25 +00:00
Tom Tromey e9cafbccd2 * reverse.c: Include cli-utils.h.
* printcmd.c: Include cli-utils.h.
	(string_printf): Use skip_spaces.
	* cli/cli-utils.h: New file.
	* cli/cli-utils.c: New file.
	* cli/cli-dump.h (skip_spaces): Move to cli-utils.h.
	* cli/cli-dump.c (skip_spaces): Move to cli-utils.c.
	* breakpoint.h (get_number, get_number_or_range): Move to
	cli-utils.h.
	* breakpoint.c: Include cli-utils.h.
	(get_number_trailer, get_number, get_number_or_range)
	(ep_skip_leading_whitespace): Move to cli-utils.c.
	(create_breakpoint_sal, find_condition_and_thread)
	(decode_static_tracepoint_spec, watch_command_1)
	(watch_maybe_just_location, ep_parse_optional_if_clause)
	(catch_fork_command_1, catch_exec_command_1)
	(catch_syscall_command_1): Use skip_spaces, skip_to_space.
	* Makefile.in (SUBDIR_CLI_OBS): Add cli-utils.o.
	(SUBDIR_CLI_SRCS): Add cli-utils.c.
	(HFILES_NO_SRCDIR): Add cli-utils.h.
	(cli-utils.o): New target.
2011-02-21 18:13:17 +00:00
Hui Zhu d0e92d82d8 2011-02-21 Hui Zhu <teawater@gmail.com>
* Makefile.in (HFILES_NO_SRCDIR): Add printcmd.h.
	* ax-gdb.c (gen_printf_expr_callback): New function.
	* ax-gdb.h (gen_printf_expr_callback): Forward declare.
	* ax-general.c (ax_memcpy): New function.
	(ax_print): Handle "printf".
	(ax_reqs): Ditto.
	* ax.h (ax_memcpy): Forward declare.
	* common/ax.def (invalid2): Removed.
	(printf): New entry.
	* printcmd.c (printcmd.h): New include.
	(string_printf): New function.
	(ui_printf): Removed.
	(printf_command): Remove static.  Call string_printf.
	(eval_command): Call string_printf.
	* printcmd.h: New file.
	* tracepoint.c (validate_actionline,
	encode_actions_1): handle printf_command.
2011-02-21 08:38:14 +00:00
Tom Tromey 66694b75a4 * Makefile.in (HFILES_NO_SRCDIR): Don't mention ada-operator.inc. 2011-02-18 20:31:18 +00:00
Jan Kratochvil 0feedb2cc8 gdb/
* Makefile.in (ACLOCAL_AMFLAGS): Add `-I ../config'.
	* aclocal.m4: Regenerated with aclocal-1.11.1.
	* common/configure: Regenerate with autoconf-2.64.

gdb/gdbserver/
	* aclocal.m4: Regenerated with aclocal-1.11.1.
2011-02-15 21:05:54 +00:00
Pedro Alves 2a7498d819 2011-02-14 Pedro Alves <pedro@codesourcery.com>
gdb/
	* Makefile.in (SFILES): Add memrange.c.
	(HFILES_NO_SRCDIR): Add memrange.h.
	(COMMON_OBS): Add memrange.o.
	* memrange.c: New file.
	* memrange.h: New file.
	* tracepoint.c: Include memrange.h.
	(struct mem_range): Delete.
	(mem_range_s): Delete.
	(traceframe_available_memory): New function.
	* tracepoint.h (traceframe_available_memory): Declare.
2011-02-14 11:20:27 +00:00
Pedro Alves b3b9301ef4 gdb/
* target.h (struct traceframe_info): Forward declare.
	(enum target_object): Add TARGET_OBJECT_TRACEFRAME_INFO.
	(struct target_ops) <to_traceframe_info>: New field.
	(target_traceframe_info): New.
	* target.c (update_current_target): Inherit and default
	to_traceframe_info.
	* remote.c (PACKET_qXfer_traceframe_info): New.
	(remote_protocol_features): Register qXfer:traceframe-info:read.
	(remote_xfer_partial): Handle TARGET_OBJECT_TRACEFRAME_INFO.
	(remote_traceframe_info): New.
	(init_remote_ops): Install it.
	(_initialize_remote): Install "set/show remote traceframe-info"
	commands.
	* tracepoint.h (parse_traceframe_info): Declare.
	* tracepoint.c (struct mem_range): New.
	(mem_range_s): New typedef.
	(struct traceframe_info): New.
	(traceframe_info): New global.
	(free_traceframe_info): New function.
	(clear_traceframe_info): New function.
	(start_tracing, tfind_1, set_traceframe_number): Clear traceframe
	info.
	(build_traceframe_info): New function.
	(tfile_traceframe_info): New function.
	(init_tfile_ops): Install tfile_traceframe_info.
	(traceframe_info_start_memory, free_result): New functions.
	(memory_attributes, traceframe_info_elements): New globals.
	(parse_traceframe_info, get_traceframe_info): New functions.
	* features/traceframe-info.dtd: New file.
	* Makefile.in (XMLFILES): Add traceframe-info.dtd.

	gdb/gdbserver/
	* server.c (handle_qxfer_traceframe_info): New.
	(qxfer_packets): Register "traceframe-info".
	(handle_query): Report support for qXfer:traceframe-info:read+.
	* tracepoint.c (match_blocktype): New.
	(traceframe_find_block_type): Rename to ...
	(traceframe_walk_blocks): ... this.  Add callback filter argument,
	and use it.
	(traceframe_find_block_type): New, reimplemented on top of
	traceframe_walk_blocks.
	(build_traceframe_info_xml): New.
	(traceframe_read_info): New.
	* server.h (traceframe_read_info): Declare.

	gdb/doc/
	* gdb.texinfo (Remote Configuration): Mention set/show remote
	traceframe-info.
	(Tools/Packages Optional for Building GDB): Mention that expat is
	used for traceframe info.
	(Remote Protocol) <Menu>: Add "Traceframe Info Format".
	(General Query Packets) <qSupported>: Describe the
	qXfer:traceframe-info:read feature.
	(qXfer::read): Describe qXfer:traceframe-info:read.
	(Traceframe Info Format): New section.
2011-02-14 11:13:12 +00:00
Yao Qi 181d9476d8 2011-02-12 Yao Qi <yao@codesourcery.com>
* Makefile.in (CLEANDIRS): Remove duplicated common dir.
2011-02-12 13:07:39 +00:00
Yao Qi 4f3e6fb7a0 2011-02-11 Yao Qi <yao@codesourcery.com>
* Makefile.in: Remove signals.o from COMMON_OBS.  Link
	libcommon.a.
	* configure.ac: Add common to sub dir.
	* configure: Regenerate.

common/
2011-02-11  Yao Qi  <yao@codesourcery.com>

	Build libcommon.a.

	* Makefile.in: New.
	* configure.ac: New.
	* aclocal.m4: New.
	* configure: Generate.

gdbserver/
2011-02-11  Yao Qi  <yao@codesourcery.com>

	* configure.ac: Call AC_PROG_RANLIB.
	* Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
	* configure: Regenerate.
2011-02-11 09:57:25 +00:00
Sami Wagiaalla 505500db28 Add Python support for GDB events.
2011-02-04  Sami Wagiaalla  <swagiaal@redhat.com>

	* gdb.python/py-evthreads.c: New file.
	* gdb.python/py-evthreads.exp: New file.
	* gdb.python/py-events.py: New file.
	* gdb.python/py-events.exp: New file.
	* gdb.python/py-events.c: New file.

2011-02-04  Sami Wagiaalla  <swagiaal@redhat.com>
                Oguz Kayral <oguzkayral@gmail.com>

	* python/py-inferior.c (python_on_normal_stop): New function.
	(python_on_resume): New function.
	(python_inferior_exit): New function.
	(gdbpy_initialize_inferior): Add normal_stop, target_resumed, and
	inferior_exit observers.
	* python/py-evtregistry.c: New file.
	* python/py-threadevent.c : New file.
	* python/py-event.c: New file.
	* python/py-evts.c: New file.
	* python/py-continueevent.c: New file.
	* python/py-bpevent.c: New file.
	* python/py-signalevent.c: New file.
	* python/py-exetiedevent.c: New file.
	* python/py-breakpoint.c (gdbpy_breakpoint_from_bpstats): New function.
	Move struct breakpoint_object from here...
	* python/python-internal.h: ... to here.
	* python/py-event.h: New file.
	* python/py-events.h: New file.
	* Makefile.in (SUBDIR_PYTHON_OBS): Add py-breakpointstopevent.o,
	py-continueevent.o, py-event.o, py-eventregistry.o, py-events.o,
	py-exitedevent.o, py-signalstopevent.o, and py-stopevent.o.
	(SUBDIR_PYTHON_SRCS): Add py-breakpointstopevent.c,
	py-continueevent.c, py-event.c, py-eventregistry.c, py-events.c,
	py-exitedevent.c, py-signalstopevent.c, and py-stopevent.c.
	Add build rules for all the above.
2011-02-04 21:54:16 +00:00
Joel Brobecker ac534cba29 do not use python<version> subdir when including Python .h file
This is preparation work for being able to build GDB with Python
support on MinGW.

So far, the "python<version>" subdirectory needs to be specified
when including a Python header file.  In order to do that, we have
some special configury that tweaks the include path returned by
python-config.py such that the use of the subdirectory in the include
is necessary.  This was done in order to protect ourselves from
possible filename conflicts, since some of the filenames chosen by
Python were a little generic.

The problem is that this cannot work with a standard Python install
on MinGW systems.  On such systems, the .h files are located in
<python_prefix>/include.  So, in preparation for allowing us to build
GDB on MinGW with Python support enabled, this patch changes the
requirement to provide the "python<version>" subdirectory in the
include directive.

The positive consequence is that we no longer need to have a set
of #include directives for each version of Python, since the include
directive is now the same for all versions of Python.  However, the
downside is that we are losing the level of protection we were trying
to achieve by forcing the subdirectory in the include directive.
In order to reduce a bit the consequences of a possible conflict,
this patch also changes the location where the -I/path/to/python
switch goes, to be last in the list (suggested by Doug Evans).

One last change is the fact that we are now including Python.h
and all other Python include headers using angle brackets rather
than double-quotes.  This fixes a problem on case-insensitive
systems where #include "Python.h" causes our gdb/python/python.h
header to be included instead of Python's <Python.h> header.

gdb/ChangeLog:

	* configure.ac: Remove fallback behavior for building
	against Python.  Remove tweaking of Python include path.
	Add PYTHON_CPPFLAGS and PYTHON_LIBS substitution.
	(AC_TRY_LIBPYTHON):  Adjust program used in linking test.
	If link is successful, set PYTHON_CPPFLAGS and PYTHON_LIBS.
	Always restore CPPFLAGS and LIBS after linking test.
	* configure: Regenerated.
	* Makefile.in (INTERNAL_CPPFLAGS): Add @PYTHON_CPPFLAGS@.
	(INSTALLED_LIBS, CLIBS): Add @PYTHON_LIBS@.
	* python/python-internal.h: Adjust includes of Python .h files.
2011-01-31 04:41:27 +00:00
Kevin Buettner 314d366acd * configure.tgt (mips*-*-elf): New; just like mips*-*-*, but
with remote-mips.o added to gdb_target_obs.
	* Makefile.in (ALL_TARGET_OBS): Add remote-mips.o.
2011-01-24 21:34:19 +00:00
Pedro Alves 76adfcaec1 * Makefile.in (hpux-thread.o): Delete rule.
* configure.ac: Don't check for HPUX DCE threads support.
	* configure, config.in: Regenerate.
	* hppa-hpux-nat.c (child_suppress_run): Delete.
	(hppa_hpux_child_can_run): Delete.
	(_initialize_hppa_hpux_nat): Don't override to_can_run.
	* hpux-thread.c: Delete.
2011-01-14 13:38:24 +00:00
Joel Brobecker 92c9a4639b port GDB to ia64-hpux (native).
ChangeLog:

        * configure.ac: Remove readline, mmalloc, and gdb from noconfigdirs
        for ia64-hpux.
        * configure: Regenerate.

gdb/ChangeLog:

        * config/ia64/hpux.mh, ia64-hpux-nat.c, ia64-hpux-tdep.c,
        ia64-hpux-tdep.h, solib-ia64-hpux.c, solib-ia64-hpux.h: New files.

        * configure.host: Add handling for ia64-hpux hosts.  Add associated
        floatformats.
        * configure.tgt: Add handling for ia64-hpux targets.
        * Makefile.in (ALL_64_TARGET_OBS): Add ia64-hpux-tdep.o.
        (HFILES_NO_SRCDIR): Add ia64-hpux-tdep.h.
        (ALLDEPFILES): Add ia64-hpux-nat.c ia64-hpux-tdep.c.
2011-01-13 16:24:13 +00:00
Joel Brobecker 7b6bb8daac run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
Mike Frysinger 9102122396 gdb: bfin: new port
Initial support for Blackfin processors.  This supports the standard ABI.

Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-12-29 16:11:49 +00:00