Commit Graph

31698 Commits

Author SHA1 Message Date
Joel Brobecker 7785b8804f update copyright notices in various GDB files.
Update some files in GDB that were accidently left with a GPL v2
copyright header.

Update some files where the copyright notice still provides the
old contact info, using the approach for providing the FSF's contact
info.

gdb/ChangeLog:

        * acinclude.m4: Update contact info in copyright notice.

gdb/doc/ChangeLog:

        * refcard.tex: Update copyright notice to GPL v3 or later.
        Update contact info.

gdb/testsuite/ChangeLog:

        * dg-extract-results.sh: Update contact info in copyright notice.
        * gdb.arch/mips-octeon-bbit.exp: Update copyright notice to
        GPL v3 or later.  Update contact info.
        * gdb.fortran/logical.f90, gdb.threads/watchpoint-fork-child.c,
        gdb.threads/watchpoint-fork-mt.c,
        gdb.threads/watchpoint-fork-parent.c,
        gdb.threads/watchpoint-fork-st.c,
        gdb.threads/watchpoint-fork.h: Likewise.
2012-12-19 08:19:59 +00:00
Yao Qi 025cfdb2f7 gdb/
2012-12-19  Yao Qi  <yao@codesourcery.com>

	* maint.c (maintenance_print_statistics): Make it static.
	* symtab.h (maintenance_print_statistics): Remove declaration.
2012-12-19 07:51:50 +00:00
Joel Brobecker 249729c4e9 NEWS: Announce ppc-lynx178 support.
gdb/ChangeLog:

        * NEWS: Add entry announcing ppc-lynx178 support.
2012-12-19 04:28:53 +00:00
Joel Brobecker a143c6dee4 Revert "Import gnulib's errno module."
There are some compatibility concerns with libiconv to be
discussed first.

gdb/ChangeLog:

        Revert the following change:
        * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add errno.
        * gnulib/import/errno.in.h: Import.
        * gnulib/import/m4/errno_h.m4: Import.
        * gnulib/aclocal.m4: Regenerate.
        * gnulib/configure: Regenerate.
        * gnulib/import/Makefile.am: Update.
        * gnulib/import/Makefile.in: Update.
        * gnulib/import/m4/gnulib-cache.m4: Update.
        * gnulib/import/m4/gnulib-comp.m4: Update.
2012-12-19 04:13:54 +00:00
gdbadmin e0e51b2391 *** empty log message *** 2012-12-19 00:00:32 +00:00
Tom Tromey d8a4f9280a fix some bad ChangeLog dates from today 2012-12-18 19:33:44 +00:00
Tom Tromey 28da164739 * defs.h (directory_command): Don't declare.
* source.c (directory_command): Now static.
2012-12-18 19:32:41 +00:00
Tom Tromey 1dd5fedcf5 * infcmd.c (all_registers_info, nexti_command, stepi_command)
(continue_command, interrupt_target_command): Now static.
	(registers_info): Remove declaration.
	* inferior.h (all_registers_info, nexti_command, stepi_command)
	(continue_command, interrupt_target_command): Don't declare.
2012-12-18 19:31:17 +00:00
Tom Tromey c419cfba93 * cli/cli-cmds.c (apropos_command): Now static. 2012-12-18 19:27:35 +00:00
Tom Tromey da821c7be2 * breakpoint.c (dprintf_command): Now static. 2012-12-18 19:27:00 +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
Tom Tromey 5d3055ad4f * symfile.c (list_overlays_command, map_overlay_command)
(unmap_overlay_command): Now static.
2012-12-18 19:25:24 +00:00
Tom Tromey 2370e8539c * cli/cli-cmds.c (_initialize_cli_cmds): Remove "document",
"define", "while", and "if" commands.
	* cli/cli-script.c (while_command, if_command, define_command)
	(document_command): Now static.
	(_initialize_cli_script): New function.
	* cli/cli-script.h (while_command, if_command, define_command)
	(document_command): Don't declare.
2012-12-18 19:24:40 +00:00
Tom Tromey 43e4916ffe * cli/cli-cmds.c (_initialize_cli_cmds): New function.
(init_cli_cmds): Move most code into new function.
2012-12-18 19:23:33 +00:00
Tom Tromey c9630d9c13 * minsyms.c (lookup_solib_trampoline_symbol_by_pc): Now static.
* minsyms.h (lookup_solib_trampoline_symbol_by_pc): Don't
	declare.
2012-12-18 19:21:53 +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
Markus Metzger 02d403bfba Fix ChangeLog format. 2012-12-18 08:01:42 +00:00
Hui Zhu 2a9d5ccf79 2012-12-18 Hui Zhu <hui_zhu@mentor.com>
* ui-file.c (ui_file): Add to_fseek.
	(ui_file_new): Call set_ui_file_fseek.
	(null_file_fseek, ui_file_fseek, set_ui_file_fseek,
	 stdio_file_fseek): New functions.
	(stdio_file_new): Call set_ui_file_fseek.
	* ui-file.h (ui_file_fseek_ftype): New typedef.
	(set_ui_file_fseek, ui_file_fseek): New externs.
2012-12-18 07:01:58 +00:00
Hui Zhu 3f453875a4 2012-12-18 Hui Zhu <hui_zhu@mentor.com>
* ui-file.c (set_ui_file_flush): Change flush to flush_ptr.
	(set_ui_file_isatty): Change isatty to isatty_ptr.
	(set_ui_file_rewind): Change rewind to rewind_ptr.
	(set_ui_file_put): Change put to put_ptr.
	(set_ui_file_write): Change write to write_ptr.
	(set_ui_file_write_async_safe): Change write_async_safe to
	write_async_safe_ptr.
	(set_ui_file_read): Change read to read_ptr.
	(set_ui_file_fputs): Change fputs to fputs_ptr.
	(set_ui_file_data): Change delete to delete_ptr.
2012-12-18 06:39:37 +00:00
Joel Brobecker 4141a416dd solib-darwin.c: handle PIE when attaching processes.
gdb/ChangeLog:

        * solib-darwin.c (darwin_current_sos): Fix indentation.
        (darwin_read_exec_load_addr): New function.
        (darwin_solib_create_inferior_hook): Rebase executable.
        * objfiles.c (objfile_rebase1, objfile_rebase): New functions.
        * objfiles.h (objfile_rebase1, objfile_rebase): Add prototypes.
2012-12-18 06:19:54 +00:00
Joel Brobecker c0fc7f8be2 Import gnulib's errno module.
gdb/ChangeLog:

        * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add errno.
        * gnulib/import/errno.in.h: Import.
        * gnulib/import/m4/errno_h.m4: Import.
        * gnulib/aclocal.m4: Regenerate.
        * gnulib/configure: Regenerate.
        * gnulib/import/Makefile.am: Update.
        * gnulib/import/Makefile.in: Update.
        * gnulib/import/m4/gnulib-cache.m4: Update.
        * gnulib/import/m4/gnulib-comp.m4: Update.
2012-12-18 06:02:32 +00:00
Joel Brobecker a512b37576 Update gnulib to current HEAD.
gdb/ChangeLog:

        * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
        8d5bd1402003bd0153984b138735adf537d960b0.
        * gnulib/aclocal.m4, configure, config.in: Regenerate.
        * gnulib/import/m4/extern-inline.m4: Import.
        * gnulib/import/wctype-h.c: Import.
        * gnulib/import/Makefile.am: Update.
        * gnulib/import/Makefile.in: Update.
        * gnulib/import/alloca.in.h: Update.
        * gnulib/import/extra/snippet/warn-on-use.h: Update.
        * gnulib/import/localcharset.c: Update.
        * gnulib/import/m4/fcntl-o.m4: Update.
        * gnulib/import/m4/gnulib-cache.m4: Update.
        * gnulib/import/m4/gnulib-comp.m4: Update.
        * gnulib/import/m4/wctype_h.m4: Update.
        * gnulib/import/stdbool.in.h: Update.
        * gnulib/import/verify.h: Update.
        * gnulib/import/wctype.in.h: Update.
2012-12-18 06:00:55 +00:00
Joel Brobecker cc0f061802 Fix author in last ChangeLog entry. 2012-12-18 04:41:41 +00:00
Joel Brobecker 48c95e5fda Add call to autoheader in update-gnulib.sh.
gdb/ChangeLog:

        * gnulib/update-gnulib.sh: Add call to autoheader.
2012-12-18 04:40:25 +00:00
gdbadmin 4c06243903 *** empty log message *** 2012-12-18 00:00:03 +00:00
Doug Evans 4e3f5ae6b7 Enable accidentally commented out code. 2012-12-17 19:40:24 +00:00
Tom Tromey e4acb24c9d * top.c (xgdb_verbose): Remove. 2012-12-17 15:11:56 +00:00
Joel Brobecker 8b93d60f22 lynx-low: Add debug trace when new thread is discovered.
gdb/gdbserver/ChangeLog:

        * lynx-low.c (lynx_wait_1): Add debug trace before adding
        new thread.
2012-12-17 11:17:12 +00:00
Joel Brobecker 037335a7a8 Add PTRACE_GETTRACESIG handling in ptrace_request_to_str
We use this ptrace request when handling SIGTRAP signals,
and without this change, the debug trances show:

    PTRACE (<unknown-request>, ...

This patch fixes this.

gdb/gdbserver/ChangeLog:

        * lynx-low.c (ptrace_request_to_str): Add handling for
        PTRACE_GETTRACESIG.
2012-12-17 11:13:52 +00:00
Joel Brobecker 52d4cbd805 Delete unused variable in lynx_attach.
gdb/gdbserver/ChangeLog:

        * lynx-low.c (lynx_attach): Delete variable new_process.
2012-12-17 11:03:00 +00:00
Joel Brobecker ab8f6ca9c6 remove unused variable in lynx_create_inferior.
gdb/gdbserver/ChangeLog:

        * lynx-low.c (lynx_create_inferior): Delete variable new_process.
2012-12-17 11:02:47 +00:00
Joel Brobecker 78cbc0240c lynx-low.c: PTRACE_GETTHREADLIST may not be defined.
LynxOS 178 does not define this macro.

gdb/gdbserver/ChangeLog:

        * lynx-low.c (ptrace_request_to_str): Do not handle
        PTRACE_GETTHREADLIST if this macro does not exist.
2012-12-17 10:51:29 +00:00
gdbadmin faa7371af5 *** empty log message *** 2012-12-17 00:00:33 +00:00
Jan Kratochvil 3d745be3fc gdb/
Code cleanup.
	* skip.c (skip_function_command, skip_file_command, skip_info): Remove
	unused forward declarations.
	(skip_file_command): Make variables symtab and filename targets const.
	Use proper 0 vs. NULL constant everywhere.
	(skip_function_command): Use proper 0 vs. NULL constant everywhere.
	Include empty line after declarations.  Use GNU spacing in a comment.
	Do not use strlen for end of string check.
	(skip_info): Use proper 0 vs. NULL constant everywhere.  Add column 5
	comments.
	(skip_enable_command, skip_disable_command, skip_delete_command)
	(add_skiplist_entry): Use proper 0 vs. NULL constant everywhere.
	(function_pc_is_marked_for_skip): Make variable filename target const.
	Use proper 0 vs. NULL constant everywhere.  Fix GNU non-compliant
	comment formatting.
	(skip_re_set): Add empty line after function comment.  Use proper 0 vs.
	NULL constant everywhere.  Include empty line after declarations.  Make
	variable symtab target const.  Do not use strlen for end of string
	check.

gdb/doc/
	* gdbint.texinfo (Coding Standards) (C Usage): New rule for 0 vs. NULL.
2012-12-16 19:00:04 +00:00
Jan Kratochvil b57a636e4b gdb/
Code cleanup.
	* breakpoint.c (clear_command): Remove variable sal_name_len and its
	initialization, remove it from the compare_filenames_for_search call.
	* dwarf2read.c (dw2_map_symtabs_matching_filename): Remove variable
	name_len and its initialization, remove it from the
	compare_filenames_for_search calls.
	* psymtab.c (partial_map_symtabs_matching_filename): Likewise.
	* symtab.c (compare_filenames_for_search): Remove the search_len
	parameter, update the function comment, new variable search_len
	initialized from SEARCH_NAME.
	(iterate_over_some_symtabs): Remove variable name_len and its
	initialization, remove it from the compare_filenames_for_search calls.
	* symtab.h (compare_filenames_for_search): Remove the search_len
	parameter,
2012-12-16 18:57:16 +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
gdbadmin 0c7eb43794 *** empty log message *** 2012-12-16 00:00:33 +00:00
Joel Brobecker e924e903c6 Minor ChangeLog fix. 2012-12-15 14:44:56 +00:00
Joel Brobecker 5d21469858 Add missing backslash in configure.tgt gdb_target_ops (sparc-*-*)
I forgot to put a '\' when splitting the line in two.

gdb/ChangeLog:

        * configure.tgt (sparc-*-*): Add missing '\' in gdb_target_ops.
2012-12-15 14:34:20 +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 c16998a76c change ravenscar_sparc prefixes into sparc_ravenscar...
... following the file renaming in the previous commit.

gdb/ChangeLog:

        * sparc-ravenscar-thread.h: SPARC_RAVENSCAR_THREAD_H renames
        RAVENSCAR_SPARC_THREAD_H.
        * sparc-ravenscar-thread.c: Rename all global entities
        whose name is uses "ravenscar_sparc" as the prefix to use
        "sparc_ravenscar" instead.
2012-12-15 14:29:31 +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
Joel Brobecker 25abf4decf minor ravenscar-thread cleanup
The use of the ravenscar_open static global is unnecessary.
This patch removes it. It also removes some routines that
were created in association with the management of this global.

gdb/ChangeLog:

        * ravenscar-thread.c (ravenscar_is_open): Delete.
        (ravenscar_initialize): Move most of the code from here...
        (ravenscar_inferior_created): ... to there.  Invert logic.
        (ravenscar_close): Delete.
        (init_ravenscar_thread_ops): Remove setting of
        ravenscar_ops.to_close.
2012-12-15 14:27:13 +00:00
Joel Brobecker 3d6e24f050 Move init_entry_point_info to symfile.c and make it static.
gdb/ChangeLog:

        * objfiles.c (init_entry_point_info): Move function from here...
        * symfile.c (init_entry_point_info): ... to there.  Make static.
        * objfiles.h (objfiles.h): Delete declaration.
2012-12-15 13:11:18 +00:00
Joel Brobecker 36e4d0683b Fix NULL objfile's section_offsets dereference during symbol load.
gdb/ChangeLog:

        * symfile.c (syms_from_objfile_1): Renames syms_from_objfile.
        Remove call to init_entry_point_info.  Add OBJFILE's
        section_offsets and num_sections initialization.  Add note
        about entry info in the function documentation.
        (syms_from_objfile): New function.
        * coffread.c (coff_symfile_init): Remove call to
        init_entry_point_info.
        * machoread.c (macho_symfile_init): Likewise.
        * xcoffread.c(xcoff_symfile_init): Likewise.
2012-12-15 13:10:50 +00:00
Yao Qi c9b6281a36 gdb/
2012-12-15  Yao Qi  <yao@codesourcery.com>

	* remote-notif.c (_initialize_notif): Add new commands
	'set debug notification' and 'show debug notification'.
	* NEWS: Mention these new commands.
gdb/doc/
2012-12-15 Yao Qi  <yao@codesourcery.com>

	* gdb.texinfo (Debugging Output): Document 'set debug
	notification' and 'show debug notification'.
2012-12-15 04:06:40 +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
Yao Qi 5f4cf0bb27 gdb/
2012-12-15  Yao Qi  <yao@codesourcery.com>

	* remote.c (discard_pending_stop_replies): Update declaration.
	(remote_detach_1, extended_remote_mourn_1): Likewise.
	(discard_pending_stop_replies): Change parameter from PID to
	INF.
	(remote_close): Update caller.
	(_initialize_remote): Attach discard_pending_stop_replies to
	inferior_exit observer.
2012-12-15 03:34:03 +00:00
Yao Qi fee9eda9ee gdb/
2012-12-15  Yao Qi  <yao@codesourcery.com>

	* remote.c (getpkt_or_notif_sane): Add one more argument in
	its declaration.
	(getpkt_or_notif_sane_1): Add one more argument.
	(getpkt_sane): Update caller.
	(getpkt_or_notif_sane): Likewise.  Update call
	togetpkt_or_notif_sane_1.
	(remote_wait_ns): Update caller.
2012-12-15 03:14:22 +00:00
Yao Qi 14a0047001 gdb/gdbserver/
2012-12-15  Yao Qi  <yao@codesourcery.com>

	* Makefile.in (OBS): Add notif.o.
	* notif.c, notif.h: New.
	* server.c: Include "notif.h".
	(struct vstop_notif) <next>: Remove.
	<base>: New field.
	(queue_stop_reply): Update.
	(push_event, send_next_stop_reply): Remove.
	(discard_queued_stop_replies): Update.
	(notif_stop): New variable.
	(handle_v_stopped): Remove.
	(handle_v_requests): Don't call handle_v_stopped.  Call
	handle_ack_notif instead.
	(queue_stop_reply_callback): Call notif_event_enque instead
	of queue_stop_reply.
	(handle_status): Don't call send_next_stop_reply, call
	notif_write_event instead.
	(kill_inferior_callback): Likewise.
	(detach_or_kill_inferior_callback): Likewise.
	(main): Call initialize_notif.
	(process_serial_event): Call QUEUE_is_empty.
	(handle_target_event): Call notif_push instead of push event.
	* server.h (push_event): Remove declaration.
2012-12-15 02:48:18 +00:00
Yao Qi dbb0cf06a3 gdb/
2012-12-15  Yao Qi  <yao@codesourcery.com>
	    Doug Evans  <dje@google.com>

	* common/queue.h: New.
2012-12-15 02:25:34 +00:00
Yao Qi f2a8bc8a74 2012-12-15 Yao Qi <yao@codesourcery.com>
* breakpoint.c (print_one_breakpoint_location): Display the
	state of 'installed' of each non-pending location of a tracepoint
	in both CLI and MI.
	(download_tracepoint_locations): Notify 'breakpoint-modified'
	observer if any tracepoint location is downloaded.
	* tracepoint.c (start_tracing): Likewise.
	(merge_uploaded_tracepoints): Record all modified
	tracepoints and notify 'breakpoint-modified' observer for them.

	* NEWS: Mention the change for CLI and MI.

gdb/doc:
2012-12-15  Yao Qi  <yao@codesourcery.com>

	* gdb.texinfo (Listing Tracepoints): New item and example about
	'installed on target' output.
	Add more in the example about 'installed on target'.
	(GDB/MI Breakpoint Commands): Doc about 'installed field.

gdb/testsuite:
2012-12-15  Yao Qi  <yao@codesourcery.com>

	* gdb.trace/mi-tracepoint-changed.exp (test_pending_resolved): Check
	'installed' field in '=breakpoint-modified'.
	(test_reconnect): Check 'installed' field in
	'=breakpoint-modified' and '=breakpoint-created'.

	* gdb.trace/actions.exp: Update test for 'installed' field.
	* gdb.trace/change-loc.exp (tracepoint_change_loc_1):
	(tracepoint_change_loc_2): Likewise.
	Check 'info tracepoint' display nothing else.
	* gdb.trace/deltrace.exp: Likewise.
	* gdb.trace/infotrace.exp: Likewise.
	* gdb.trace/mi-traceframe-changed.exp (test_tfind_remote):
	Likewise.
	* gdb.trace/passcount.exp: Likewise.
	* gdb.trace/tracecmd.exp: Likewise.
	* gdb.trace/while-stepping.exp: Likewise.
2012-12-15 02:19:21 +00:00
Yao Qi 7ed2c99418 gdb/
2012-12-15  Yao Qi  <yao@codesourcery.com>

	* breakpoint.c (download_tracepoint_locations): Iterate over
	ALL_TRACEPOINTS first and then iterate over locations of
	each tracepoint.
2012-12-15 01:37:03 +00:00
gdbadmin fcb94e69be *** empty log message *** 2012-12-15 00:00:39 +00:00
Pierre Muller b25d79d436 * solib-target.c (solib_target_current_sos): Remove 'const'
qualifier from type of library_document local variable to be
	able to free it and avoid a memory leak.
	Use cleanup chain to avoid leak even if exceptino is generated.
2012-12-14 23:27:13 +00:00
Tom Tromey 6592e36f33 PR c++/8888:
* symtab.c (lookup_symbol_aux): If constructor is found, consider
	returning the type instead.
	* c-exp.y (classify_name): Check STRUCT_DOMAIN if a constructor is
	found.
testsuite
	* gdb.cp/member-name.exp: New file.
	* gdb.cp/member-name.cc: New file.
2012-12-14 21:19:11 +00:00
Tom Tromey 7d27a96df4 Partial fix for PR c++/14160:
* c-typeprint.c (c_type_print_base): Use TYPE_FN_FIELD_CONSTRUCTOR.
	* dwarf2read.c (dwarf2_is_constructor): New function.
	(dwarf2_add_member_fn): Use it.
	* gnu-v3-abi.c (gnuv3_pass_by_reference): Use
	TYPE_FN_FIELD_CONSTRUCTOR.
	* jv-typeprint.c (java_type_print_base): Use
	TYPE_FN_FIELD_CONSTRUCTOR.
	* gdbtypes.h (struct fn_field) <is_constructor>: New field.
	<dummy>: Shrink.
	(TYPE_FN_FIELD_CONSTRUCTOR): New macro.
testsuite
	* gdb.cp/templates.exp (test_ptype_of_templates): Update kfails.
2012-12-14 20:33:29 +00:00
Doug Evans f8c05d0d19 * gdb.dwarf2/implptr-optimized-out.S: DIE offset for
DW_OP_GNU_implicit_pointer is section-relative.
2012-12-14 18:26:00 +00:00
Tom Tromey 1993b71979 * c-exp.y (block, variable, name_not_typename, lex_one_token,
classify_name): Update.
	* c-valprint.c (c_val_print): Update.
	* f-exp.y (yylex): Update.
	* go-exp.y (package_name_p, classify_packaged_name)
	(classify_name): Update.
	* jv-exp.y (push_variable): Update.
	* m2-exp.y (variable): Update.
	* mi/mi-cmd-stack.c (list_args_or_locals): Update.
	* p-exp.y (block, variable, yylex): Update.
	* p-valprint.c (pascal_val_print): Update.
	* parse.c (write_dollar_variable): Update.
	* printcmd.c (address_info): Update.
	* python/py-symbol.c (gdbpy_lookup_symbol): Update.
	* symtab.c (lookup_symbol_aux, lookup_symbol_in_language)
	(lookup_symbol): Change type of 'is_a_field_of_this'.
	(check_field): Add 'is_a_field_of_this' argument.
	* symtab.h (struct field_of_this_result): New.
	(lookup_symbol, lookup_symbol_in_language): Update.
2012-12-14 17:47:40 +00:00
Tom Tromey 2dc3df72a7 * symtab.c (check_field): Now static. Move from...
* valops.c (check_field): ... here.  Remove.
	* value.h (check_field): Don't declare.
2012-12-14 17:16:16 +00:00
Tom Tromey 451b7c33cb gdb
* NEWS: Mention "info proc" and core files.
        * corelow.c (core_info_proc): New function.
        (init_core_ops): Set to_info_proc.
        * gdbarch.c, gdbarch.h: Rebuild.
        * gdbarch.sh (core_info_proc): New method.
        * infcmd.c (info_proc_cmd_1): Invoke target_info_proc first.
        * linux-tdep.c (linux_core_info_proc_mappings)
        (linux_core_info_proc): New functions.
        (linux_find_memory_region_ftype): New typedef.
        (linux_find_memory_regions_full): New function, from
        linux_find_memory_regions.
        (struct linux_find_memory_regions_data): New.
        (linux_find_memory_regions_thunk): New function.
        (linux_find_memory_regions): Rewrite.
        (struct linux_make_mappings_data): New.
        (linux_make_mappings_callback)
        (linux_make_mappings_corefile_notes): New functions.
        (linux_make_corefile_notes): Call linux_make_mappings_corefile_notes.
        (linux_init_abi): Call set_gdbarch_core_info_proc.
        * target.c (target_info_proc): Return 'int'.
        * target.h (target_info_proc): Update.
gdb/doc
        * gdb.texinfo (SVR4 Process Information): Mention core files.
gdb/testsuite
        * gdb.base/info-proc.exp: Add core file tests.
bfd
        * elf.c (elfcore_grok_note) <NT_FILE>: New case.
2012-12-14 15:30:38 +00:00
Pedro Alves 6fdff2c5e5 Fix whitespace. 2012-12-14 11:31:47 +00:00
Pedro Alves 10e339df5d 2012-12-14 Yufeng Zhang <yufeng.zhang@arm.com>
* gdb.base/kill-after-signal.exp: Disable if gdb,nosignals.
2012-12-14 11:24:26 +00:00
Pierre Muller 49dc7f4b47 * windows-nat.c (windows_xfer_shared_libraries): Avoid
memory leak when OFFSET >= LEN_AVAIL.
2012-12-14 07:50:02 +00:00
gdbadmin b0da32df04 *** empty log message *** 2012-12-14 00:00:34 +00:00
Tom Tromey e03e627963 * solib-svr4.c (enable_break): Use SECT_OFF_TEXT. 2012-12-13 21:29:50 +00:00
Doug Evans e780d813de * gdb.multi/multi-arch-exec.exp: Skip for i*86-linux.
* gdb.multi/multi-arch.exp: Ditto.
2012-12-13 20:40:33 +00:00
Tom Tromey 7b9c0bfbfd * acinclude.m4 (CY_AC_C_WORKS): Remove. 2012-12-13 19:46:15 +00:00
Pierre Muller d8f4a83e6a * coff-pe-read.c (pe_text_section_offset): Increase size of sname
local variable and zero terminate it to avoid possible problems
	in strcmp.
2012-12-13 17:08:07 +00:00
Pedro Alves aab2f00472 2012-12-13 Pedro Alves <palves@redhat.com>
* coff-pe-read.c: Include coff/internal.h.
	(read_pe_exported_syms): Use SCNNMLEN instead of hardcoded 8.
	Null terminate buffer explicitly instead of memset the whole
	buffer.
2012-12-13 15:11:36 +00:00
Pierre Muller 78ea0eca85 * coff-pe-read.c (IMAGE_SCN_CNT_TEXT, IMAGE_SCN_CNT_INITIALIZED_DATA)
(IMAGE_SCN_CNT_UNINITIALIZED_DATA): Remove useless checks
	for already defined macros.
2012-12-13 14:58:26 +00:00
Pierre Muller 3999122f0c * coff-pe-read.h (pe_text_section_offset): Declare new function.
* coff-pe-read.c (debug_coff_pe_read): New static variable.
	(struct read_pe_section_data): Add section_name field.
	(IMAGE_SCN_CNT_CODE): New macro, if not already defined.
	(IMAGE_SCN_CNT_INITIALIZED_DATA): Ditto.
	(IMAGE_SCN_CNT_UNINITIALIZED_DATA): Ditto.
	(get_pe_section_index): New function.
	(struct pe_sections_info): New type.
	(get_section_vmas): Use new struct pe_sections_info.
	(add_pe_exported_sym): Handle unnamed exported function.
	(add_pe_forwarded_sym): New function.
	(read_pe_truncate_name): Truncate at last dot.
	(pe_as16): New function.
	(read_pe_exported_syms): Use ordinal of function to
	retrieve correct RVA address of function and handle
	forwarded symbol.
	(pe_text_section_offset): New function.
	(show_debug_coff_pe_read): New function.
	(_initialize_coff_pe_read): New function adding
	'set/show debug coff_pe_read' commands.

	* windows-tdep.c (windows_xfer_shared_library): Use
	pe_text_section_offset function instead of possibly wrong
	0x1000 constant for .text sextion offset.
2012-12-13 10:44:45 +00:00
Pedro Alves f87e3f15bf Formatting fixes. 2012-12-13 10:06:05 +00:00
Pedro Alves c9023fb3ce 2012-12-13 Pedro Alves <palves@redhat.com>
* gdbarch.sh (do_read): Set IFS to blank.
2012-12-13 10:00:51 +00:00
gdbadmin c20223a2e9 *** empty log message *** 2012-12-13 00:00:37 +00:00
Mircea Gherzan ca3dbcc867 MI: tests for -catch-load/-catch-unload
Added basic MI tests for the -catch-load and
-catch-unload MI commands.

2012-11-19 Keven Boell <keven.boell@intel.com>

gdb/testsuite:
	* gdb.mi/mi-catch-load-so.c: New. Clone of the
	catch load test library source file.
	* gdb.mi/mi-catch-load.c: New. Clone of the catch
	load test source file.
	* gdb.mi/mi-catch-load.exp: New. Test file for
	basic MI -catch-load and -catch-unload tests.
2012-12-12 21:25:09 +00:00
Mircea Gherzan 3fa7bf0692 MI: document the -catch-load/-unload commands
2012-11-16 Mircea Gherzan <mircea.gherzan@intel.com>

gdb/doc:
	* gdb.texinfo (GDB/MI Catchpoint Commands): New section.

gdb/:
	* NEWS: mention the -catch-load/-catch-unload MI commands.
2012-12-12 21:23:29 +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
Mircea Gherzan afedb563c6 MAINTAINERS: add myself to the write-after-approval list
2012-12-12  Mircea Gherzan  <mircea.gherzan@intel.com>

	* MAINTAINERS (Write After Approval): Add "Mircea Gherzan".
2012-12-12 20:19:28 +00:00
Tom Tromey 5c80ed9d1e * dbxread.c (read_dbx_symtab): Update.
(end_psymtab, dbx_psymtab_to_symtab_1, dbx_psymtab_to_symtab)
	(read_ofile_symtab): Add 'objfile' argument.
	* dwarf2read.c (process_psymtab_comp_unit_reader)
	(build_type_psymtabs_reader): Update.
	(dwarf2_psymtab_to_symtab): Add 'objfile' argument.
	* mdebugread.c (mdebug_psymtab_to_symtab): Add 'objfile'
	argument.
	(parse_procedure, parse_partial_symbols): Update.
	(psymtab_to_symtab_1): Add 'objfile' argument.
	* psympriv.h (struct partial_symtab) <objfile>: Remove.
	<read_symtab>: Add 'objfile' argument.
	(sort_pst_symbols, discard_psymtab): Update.
	* psymtab.c (partial_map_expand_apply): Update.
	(find_pc_sect_psymtab_closer): Add 'objfile' argument.
	(find_pc_sect_psymtab, find_pc_sect_symtab_from_partial): Update.
	(find_pc_sect_psymbol): Add 'objfile' argument.
	(lookup_symbol_aux_psymtabs): Update.
	(match_partial_symbol, lookup_partial_symbol, psymtab_to_symtab):
	Add 'objfile' argument.
	(find_last_source_symtab_from_partial, dump_psymtab)
	(dump_psymtabs_for_objfile, read_symtabs_for_function)
	(expand_partial_symbol_tables, read_psymtabs_with_filename)
	(find_symbol_file_from_partial, map_matching_symbols_psymtab)
	(expand_symtabs_matching_via_partial): Update.
	(sort_pst_symbols): Add 'objfile' argument.
	(allocate_psymtab): Update.
	(discard_psymtab): Add 'objfile' argument.
	(maintenance_info_psymtabs, maintenance_check_symtabs): Update.
	* stabsread.h (end_psymtab): Update.
	* xcoffread.c (this_symtab_objfile): New global.
	(process_linenos, enter_line_range, xcoff_next_symbol_text):
	Update.
	(read_xcoff_symtab): Add 'objfile' argument.
	(read_symbol, read_symbol_lineno): Update.
	(xcoff_psymtab_to_symtab_1, xcoff_psymtab_to_symtab)
	(xcoff_end_psymtab): Add 'objfile' argument.
	(scan_xcoff_symtab): Update.
2012-12-12 17:03:03 +00:00
Paul Koning 9a27f2c60d Add support for Python 3.
* NEWS: Mention Python 3 support.
* varobj.c (value_get_print_value): Use
python_string_to_target_string.
* python/py-block.c: Use PyVarObject_HEAD_INIT in initialization
of type objects.
* python/py-breakpoint.c: Ditto.
* python/py-cmd.c:  Ditto.
* python/py-event.c: Ditto.
* python/py-event.h: Ditto.
* python/py-evtregistry.c: Ditto.
* python/py-finishbreakpoint.c: Ditto.
* python/py-frame.c: Ditto.
* python/py-function.c: Ditto.
* python/py-infthread.c: Ditto.
* python/py-lazy-string.c: Ditto.
* python/py-progspace.c: Ditto.
* /python/py-symbol.c: Ditto.
* python/py-evts.c:  (gdbpy_initialize_py_events): Add module
initialization for Python 3.
* python/py-inferior.c: Use PyVarObject_HEAD_INIT in initialization
of type objects.
(infpy_read_memory): Return memoryview object if Python 3.
(infpy_write_memory): Use "s*" operand parsing code for Python 3.
(infpy_search_memory): Ditto.
(get_buffer): New function for Python 3.
* python/py-objfile.c: Use PyVarObject_HEAD_INIT in initialization
of type objects.
(objfpy_dealloc): Use Py_TYPE to call tp_free.
* python/py-param.c: Use PyVarObject_HEAD_INIT in initialization
of type objects.
(get_attr): Use PyUnicode_CompareWithASCIIString if Python 3.
(set_attr): Ditto.
* python/py-prettyprint.c (print_string_repr): use PyBytes methods
instead of PyString methods if Python 3.
(print_children): Skip push_dummy_python_frame call if Python 3.
* python/py-symtab.c: Use PyVarObject_HEAD_INIT in initialization
of type objects.
(salpy_dealloc): Use Py_TYPE to call tp_free.
* python/py-type.c: Use PyVarObject_HEAD_INIT in initialization
of type objects.
(field_dealloc): Use Py_TYPE to call tp_free.
(typy_dealloc): Ditto.
(type_object_as_number): Adjust struct initializations for
differences in layout for Python 2 vs. Python 3.
* python/py-utils.c (python_string_to_unicode): Omit non-Unicode
string case for Python 3.
(unicode_to_encoded_python_string): Shorten code (no functional
change).
(python_string_to_target_python_string): Comment that in Python 3
returned value is a Python "bytes" type.
(gdbpy_is_string): Omit non-Unicode string check in Python 3.
(gdb_py_object_from_longest): Omit non-long integer case in Python
3.
(gdb_py_object_from_ulongest): Ditto.
* python/py-value.c: Use PyVarObject_HEAD_INIT in initialization
of type objects.
(valpy_dealloc): Use Py_TYPE to call tp_free.
(valpy_int): Omit function if Python 3.
(convert_value_from_python): Use "%S" format (Python object as a
string) if Python 3.
(value_object_as_number): Adjust struct initializations for
differences in layout for Python 2 vs. Python 3.
* python/python-config.py: Adjust syntax for Python 3
compatibility.
Include "sys.abiflags" string as part of python library name, if
that attribute exists (Python 3).
* python/python-internal.h (IS_PY3): Define if Python 3.
(Py_TPFLAGS_HAVE_ITER, Py_TPFLAGS_CHECKTYPES): Define with
placeholder value if Python 3.
(PyInt_Check, PyInt_FromLong, PyInt_AsLong, PyString_FromString,
PyString_Decode, PyString_FromFormat, PyString_Check): Define as
analogous Python 3 API function if Python 3.
(PyVarObject_HEAD_INIT): Define if not already defined.
(Py_TYPE): Ditto.
* python/python.c (eval_python_command): Omit Py_FlushLine call if
Python 3.
Check return values of all Python API calls for error.
Supply dummy "python" and "python-interactive" commands if Python
initialization failed.
(_initialize_python): Convert argc to wchar_t** if Python 3.
Add module initialization for Python 3.
(finish_python_initialization): Pass wchar_t * argument to
PySys_SetPath if Python 3.
* python/lib/gdb/__init__.py: Define "reload" if Python 3.
(_GdbFile): New class for common output file behavior.
(GdbOutFile): Subclass from _GdbFile.
(GdbOutputErrorFile): Ditto.
(auto_load_packages): Adjust syntax for Python 3 compatibility.
* python/lib/gdb/printing.py: Define basestr and int if Python 3.
* python/lib/gdb/prompt.py: Use sorted() function rather than
sort() method.
* python/lib/gdb/command/explore.py: Define raw_input if Python 3.
Adjust syntax for Python 3 compatibility.
* python/lib/gdb/command/pretty_printers.py: Use sorted() function
rather than sort() method.
Adjust syntax for Python 3 compatibility.
* python/lib/gdb/command/type_printers.py: Ditto.
* doc/gdb.texinfo (Inferior.read_memory): Mention that the return
value is a memoryview object if Python 3.
2012-12-12 16:47:30 +00:00
Tom Tromey b8b98ad1fc * coffread.c (coff_objfile_data_key): New global.
(coff_symfile_init): Use set_objfile_data.
	(coff_symfile_read): Use objfile_data.
	(coff_symfile_finish): Don't free deprecated_sym_private.
	(coff_free_info): New function.
	(_initialize_coffread): Initialize coff_objfile_data_key.
	* mdebugread.c (pending_list): Update comment.
	* objfiles.h (struct objfile) <deprecated_sym_private>: Remove.
	* symfile.c (reread_symbols): Don't mention
	deprecated_sym_private.
	* xcoffread.c (xcoff_objfile_data_key): New global.
	(XCOFF_DATA): New macro.
	(process_linenos, enter_line_range, xcoff_next_symbol_text)
	(read_xcoff_symtab, coff_getfilename, read_symbol_lineno): Use
	XCOFF_DATA.
	(xcoff_new_init) Use set_objfile_data.
	(xcoff_symfile_finish): Don't free deprecated_sym_private.
	(init_stringtab, swap_sym, scan_xcoff_symtab)
	(xcoff_get_toc_offset, xcoff_initial_scan): Use XCOFF_DATA.
	(xcoff_free_info): New function.
	(_initialize_xcoffread): Initialize xcoff_objfile_data_key.
2012-12-12 16:22:33 +00:00
Tom Tromey d2f4b8feb9 * coffread.c (coff_symfile_init): Use set_objfile_data.
(coff_symfile_read): Use DBX_SYMFILE_INFO.
	* dbxread.c (dbx_objfile_data_key): New global.
	(dbx_symfile_init): Use set_objfile_data.
	(dbx_symfile_finish): Don't free deprecated_sym_stab_info.
	(dbx_free_symfile_info): New function.
	(coffstab_build_psymtabs, elfstab_build_psymtabs): Use
	DBX_SYMFILE_INFO.
	(stabsect_build_psymtabs): Use set_objfile_data.
	(_initialize_dbxreadb): Initialize dbx_objfile_data_key.
	* elfread.c (elf_symtab_read): Use DBX_SYMFILE_INFO,
	set_objfile_data.
	(free_elfinfo): Use DBX_SYMFILE_INFO.
	(elf_symfile_finish): Don't free deprecated_sym_stab_info.
	(elfstab_offset_sections): Use DBX_SYMFILE_INFO.
	* gdb-stabs.h (dbx_objfile_data_key): Declare.
	(DBX_SYMFILE_INFO): Rewrite to use objfile_data.
	* objfiles.h (struct objfile) <deprecated_sym_stab_info>: Remove.
	* somread.c (som_symfile_finish): Don't free
	deprecated_sym_stab_info.
2012-12-12 15:57:01 +00:00
Joel Brobecker 6f112b1867 Remove trailing space in gdbarch.sh.
gdb/ChangeLog:

        * gdbarch.sh (software_single_step): Remove trailing space in
        comment (gdbarch.h is already correct).
2012-12-12 13:53:49 +00:00
gdbadmin 6b467df6a5 *** empty log message *** 2012-12-12 00:00:34 +00:00
Paul Koning 2960a434c3 * gdb.python/py-prettyprint.py (_iterator): Remove exception_flag
exception.
	(_iterator_except): New function.
	(ArrayPrinter): Use _iterator function instead of local _iterator
	class for Python 3 compatibility.
	(NoStringContainerPrinter): Use _iterator_except instead of
	_iterator.
	* gdb.python/py-typeprint.exp: Use exec(open(...).read()) instead of
	execfile for Python 3 compatibility.
	* gdb.python/python.exp: Handle Python 2.4 exception traceback
	format in error_prompt test.
2012-12-11 20:54:52 +00:00
Tom Tromey 8d2cc612e5 * dwarf2read.c (dwarf2_get_dwz_file): Set 'dwz_file'. 2012-12-11 19:50:53 +00:00
Tom Tromey 735522c243 * dsrec.c (report_transfer_performance): Don't declare.
(load_srec): Use gettimeofday, print_transfer_performance.
	* symfile.c (report_transfer_performance): Remove.
2012-12-11 18:45:24 +00:00
Pedro Alves 3e3420f6a1 2012-12-11 Pedro Alves <pedro@codesourcery.com>
Pedro Alves  <palves@redhat.com>

	* procfs.c (procfs_make_note_section) [NEW_PROC_API]: Output a
	NT_PSTATUS note.
	* sol2-tdep.c (sol2_core_pid_to_str): Print process IDs
	differently from LWP IDs.
2012-12-11 15:23:15 +00:00
Pedro Alves 05b4bd799a gdb/
2012-12-11  Pedro Alves  <palves@redhat.com>

	* configure.ac (detect type of /proc): Remove Unixware handling.
	* configure: Regenerate.
	* proc-api.c (ioctl_table) [PIOCLSTATUS]: Don't mention Unixware.
	(ioctl_table) [PCRESET]: Remove entry.
	* proc-events.c (SYS_lwp_create, SYS_lwp_exit, SYS_lwp_wait)
	(SYS_lwp_self, SYS_lwp_info, SYS_lwp_private, SYS_lwp_kill)
	(SYS_lwp_suspend, SYS_lwp_continue): Don't define.
	* proc-why.c (pr_why_table) [PR_SUSPENDED]: Don't mention Unixware.
	* procfs.c: Remove all UNIXWARE guarded code, and all traces of
	Unixware in comments throughout.
	* i386-tdep.c (i386_svr4_sigtramp_p): Don't match _sigacthandler,
	and remove mention of Unixware.

gdb/doc/
2012-12-11  Pedro Alves  <palves@redhat.com>

	* gdb.texinfo: Remove all mentions of Unixware throughout.
2012-12-11 11:32:39 +00:00
gdbadmin 49d41c1c52 *** empty log message *** 2012-12-11 00:00:03 +00:00
Doug Evans ab4352599f * dwarf2read.c (dwarf2_cu): Enhance comment.
(dwarf2_get_pc_bounds): Only add ranges_base for DIEs that live in
	the DWO file.
	(dwarf2_record_block_ranges): Ditto.
2012-12-10 22:02:34 +00:00
Paul Koning 9325cb04b5 2012-12-10 Paul Koning <paul_koning@dell.com>
* gdb.base/charset.exp: Change print syntax for Python 3
	compatibility.
	* gdb.python/py-block.exp: Ditto.
	* gdb.python/py-breakpoint.exp: Ditto.
	* gdb.python/py-cmd.exp: Ditto.
	* gdb.python/py-events.py: Ditto.
	* gdb.python/py-finish-breakpoint.py: Ditto.
	* gdb.python/py-finish-breakpoint2.exp: Ditto.
	* gdb.python/py-finish-breakpoint2.py: Ditto.
	* gdb.python/py-frame-inline.exp: Ditto.
	* gdb.python/py-frame.exp: Ditto.
	* gdb.python/py-infthread.exp: Ditto.
	* gdb.python/py-objfile.exp: Ditto.
	* gdb.python/py-parameter.exp: Ditto.
	* gdb.python/py-progspace.exp: Ditto.
	* gdb.python/py-prompt.exp: Ditto.
	* gdb.python/py-symbol.exp: Ditto.
	* gdb.python/py-symtab.exp: Ditto.
	* gdb.python/py-template.exp: Ditto.
	* gdb.python/py-value-cc.exp: Ditto.
	* gdb.python/python.exp: Ditto.
	* gdb.python/source2.py: Ditto.
	* gdb.python/lib-types.exp: Change print syntax for Python 3
	compatibility.
	Use sorted() function rather than sort() method.
	Accept either int or long values for enum values.
	* gdb.python/py-events.exp: Use exec(open(...).read()) instead of
	execfile for Python 3 compatibility.
	* gdb.python/py-evsignal.exp: Ditto.
	* gdb.python/py-evthreads.exp: Ditto.
	* gdb.python/py-mi.exp: Ditto.
	* gdb.python/py-pp-maint.exp: Ditto.
	* gdb.python/py-prettyprint.exp: Ditto.
	* gdb.python/py-finish-breakpoint.exp: Change print syntax for
	Python 3 compatibility.
	Skip tests for Python 2.4.
	* gdb.python/py-inferior.exp: Change print syntax for
	Python 3 compatibility.
	Use byte string rather than character string in memory write test
	if Python 3.
	* gdb.python/py-pp-maint.py: Change class declarations to "new
	class" syntax.
	* gdb.python/py-prettyprint.py: Change iterator class to generator
	function for Python 3 compatibility.
	Make all classes "new style".
	Fix indentation issue and stray semicolon.
	* gdb.python/py-shared.expChange print syntax for Python 3
	compatibility.
	Define "long" if Python 3.
	* gdb.python/py-type.exp: Change print syntax for Python 3
	compatibility.
	Accept either int or long values for enum values.
	* gdb.python/py-value.exp: Change print syntax for Python 3
	compatibility.
	Skip "long" and "unicode" tests if Python 3.
	Accept either "type" or "class" in type checks.
	* lib/gdb.exp (gdb_py_is_py3k): New flag set if Python 3.
	(gdb_py_is_py24): New flag set if Python 2.4 or 2.5.
2012-12-10 21:22:21 +00:00
Doug Evans c766f7ecdd * dwarf2read.c (create_dwo_in_dwp): Tweak comment. 2012-12-10 21:06:00 +00:00
Doug Evans 072cabfebd * symtab.c (find_pc_sect_symtab): Add comment. 2012-12-10 20:30:05 +00:00
Tom Tromey 61c125b91f * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
(COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
	macros.
	(.c.o): Rewrite.
	(ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
	(common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
	(i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
	(amd64-linux-ipa.o, ax.o): Rewrite.
	(event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
	(proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
	(thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
	(signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
	(gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
	(format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
	(i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
	(linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
	(linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
	(linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
	(linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
	(linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
	(nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
	(win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
	(arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
	(reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
	(i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
	(reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
	(mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
	(powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
	(powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
	(powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
	(powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
	(powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
	(powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
	(s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
	(s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
	(s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
	(tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
	(amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
	(x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
	(reg-tilegx.o): Remove.
	(all_object_files): New macro.
	Include .deps files.
	* aclocal.m4, configure: Rebuild.
	* acinclude.m4: Include depstand.m4, lead-dot.m4.
	* configure.ac: Invoke ZW_CREATE_DEPDIR,
	ZW_PROG_COMPILER_DEPENDENCIES.  Compute GMAKE condition.
2012-12-10 20:16:14 +00:00
Tom Tromey 660ff10643 * defs.h: Don't check for definition of LONGEST.
(min, max): Remove duplicates.
2012-12-10 20:06:24 +00:00
Tom Tromey 8b9737bf8c * dwarf2read.c (dwarf2_fetch_die_loc_sect_off): New function.
(dwarf2_fetch_die_loc_cu_off): Rename from
	dwarf2_fetch_die_location_block.  Rewrite to use
	dwarf2_fetch_die_loc_sect_off.
	* dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Declare.
	(dwarf2_fetch_die_loc_cu_off): Rename.
	* dwarf2loc.c (indirect_pieced_value): Use
	dwarf2_fetch_die_loc_sect_off.
	* dwarf2expr.h (struct dwarf_expr_context) <len, data>: Update
	comment.
	(struct dwarf_expr_piece) <v.ptr.die>: Now a sect_offset.
	* dwarf2expr.c (add_piece): Update.
	(execute_stack_op) <DW_OP_GNU_implicit_pointer>: Update comment.
testsuite
	* gdb.dwarf2/implptr-64bit.exp: Run tests with two CUs as well.
	(test): Add "two_cu" argument.
	* gdb.dwarf2/implptr-64bit.S: Move subprogram later; use ref_addr
	for types; allow two CUs.
2012-12-10 17:17:29 +00:00
Tom Tromey 93eed41f8e * buildsym.c (struct pending_block): Move from buildsym.h.
(pending_blocks): Likewise; now static.
	(pending_block_obstack): New global.
	(free_pending_blocks): Free blocks.
	(record_pending_block): Use pending_block_obstack.
	* buildsym.h (struct pending_block): Move definition to
	buildsym.c.
	(pending_blocks): Don't declare.
2012-12-10 17:09:29 +00:00