Commit Graph

30986 Commits

Author SHA1 Message Date
gdbadmin 316f74070b *** empty log message *** 2012-07-06 00:00:33 +00:00
Hui Zhu f77cc5f048 2012-07-05 Hui Zhu <hui_zhu@mentor.com>
* gdb.texinfo (Maintenance Commands): Change help for "maint agent"
	and "maint agent-eval".
2012-07-05 01:08:24 +00:00
Hui Zhu 34b536a803 2012-07-05 Hui Zhu <hui_zhu@mentor.com>
* ax-gdb.c (cli/cli-utils.h): New include.
	(linespec.h): Ditto.
	(agent_eval_command_one): New function.
	(agent_command_1): Ditto.
	(agent_command): Call function agent_command_1.
	(agent_eval_command): Ditto.
	(_initialize_ax_gdb): Change help for "maint agent"
	and "maint agent-eval".
2012-07-05 01:03:01 +00:00
Hui Zhu e6f0bce70d 2012-07-05 Hui Zhu <hui_zhu@mentor.com>
* breakpoint.c (check_for_argument): Move to file cli/cli-utils.c.
	* cli/cli-utils.c (check_for_argument): New function.
	* cli/cli-utils.h (check_for_argument): Ditto.
2012-07-05 01:00:43 +00:00
gdbadmin 38401e4002 *** empty log message *** 2012-07-05 00:00:32 +00:00
H.J. Lu 1b3371b136 Mention x32 ABI support in NEWS
* NEWS: Mention x32 ABI support.
2012-07-04 20:49:56 +00:00
H.J. Lu 23e2d720d1 Add sp_regnum_from_eax/pc_regnum_from_eax to i386 gdbarch_tdep
* amd64-tdep.c (amd64_x32_init_abi): Set sp_regnum_from_eax to
	AMD64_RSP_REGNUM and pc_regnum_from_eax to AMD64_RIP_REGNUM.

	* i386-tdep.c (i386_gdbarch_init): Initialize sp_regnum_from_eax
	and pc_regnum_from_eax to -1.  Update SP regnum from
	sp_regnum_from_eax and PC regnum from pc_regnum_from_eax if
	needed.

	* i386-tdep.h (gdbarch_tdep): Add sp_regnum_from_eax and
	pc_regnum_from_eax.
2012-07-04 20:46:20 +00:00
Jan Kratochvil f9cf0f4ab2 gdb/testsuite/
PR 12649
	* gdb.base/dprintf.exp (Set dprintf style to agent): Add missing
	gdb_test_multiple $gdb_prompt terminator.
2012-07-04 14:57:23 +00:00
Pedro Alves 979ade8b16 2012-07-04 Pedro Alves <palves@redhat.com>
* gdb.mi/mi-reverse.exp: Use supports_reverse and
	supports_process_record.
2012-07-04 11:28:04 +00:00
Pedro Alves 8a980b44d0 2012-07-04 Pedro Alves <palves@redhat.com>
* gdb.ada/packed_tagged/comp_bug.adb: Convert to unix text line
	endings.
	* gdb.mi/mi-reverse.exp: Convert to unix text line endings.
2012-07-04 10:48:32 +00:00
gdbadmin 93a0472204 *** empty log message *** 2012-07-04 00:00:33 +00:00
Stan Shebs 855ba978e4 * gdb.base/info-os.c (main): Retry resource acquisition until an
available one is found.
	* gdb.base/info-os.exp: Collect resource keys from the program
	and use them in matching.
2012-07-03 23:17:13 +00:00
Jan Kratochvil 836bf45453 gdb/
Fix 'warning: parameter has incomplete type' with gcc-3.4.6.
	* dwarf2expr.h: Include gdbtypes.h.
	(enum call_site_parameter_kind, union call_site_parameter_u): Remove
	these forward declarations.
	(cu_offset, sect_offset): Move these ...
	* gdbtypes.h: Remove include dwarf2expr.h.
	(cu_offset, sect_offset): ... here.
2012-07-03 20:09:49 +00:00
Eli Zaretskii 00595b5e79 gdb.texinfo: Separate the index into 2 indices, cp and fn, to
avoid file-name clashes between Index.html and index.html on
 case-insensitive filesystems.  See the discussion starting in
 http://sourceware.org/ml/gdb-patches/2012-06/msg00457.html for the
 details of the problem.
 (Top): Update the master menu for the above.
 (Concept Index, Command and Variable Index): New nodes, instead of
 the old "Index" node that was deleted.  All cross-references
 updated.
2012-07-03 16:22:42 +00:00
H.J. Lu 1e55e04f56 Support x32 sigtramp
* amd64-linux-tdep.c (linux_sigtramp_code): Renamed to ...
	(amd64_linux_sigtramp_code): This.
	(amd64_x32_linux_sigtramp_code): New.
	(LINUX_SIGTRAMP_LEN): Updated.
	(amd64_linux_sigtramp_start): Check x32 sigtramp.
2012-07-03 14:53:56 +00:00
gdbadmin 282dfc2920 *** empty log message *** 2012-07-03 00:00:02 +00:00
Jan Kratochvil 7d0e21ad84 gdb/
* linux-thread-db.c (thread_db_new_objfile): Fix comment typos.

Plus add in an already checked in file:
	(thread_db_new_objfile): Exclude debug files.
2012-07-02 20:39:13 +00:00
Jan Kratochvil 8775fd2d8d gdb/
* config.in: Regenerate.
	* configure: Regenerate.
	* configure.ac: Remove check for gnu/libc-version.h.
	* linux-thread-db.c <HAVE_GNU_LIBC_VERSION_H>: Remove include of
	gnu/libc-version.h.
	(enable_thread_event_reporting) <HAVE_GNU_LIBC_VERSION_H>: Remove
	variables libc_version, libc_major and libc_minor.  Replace sscanf by
	inferior_has_bug.  Extend the comment.
2012-07-02 20:31:09 +00:00
Jan Kratochvil fcb4437118 gdb/
* linux-thread-db.c (inferior_has_bug): New function.
	(thread_db_find_new_threads_silently): Return boolean as checked by
	inferior_has_bug, describe it in the comments.
	(try_thread_db_load_1): Move call to thread_db_find_new_threads_silently
	earlier.  Abort the initialization if it returned non-zero.
	(thread_db_find_new_threads_2): Preinitialize ERR.  Check errors also
	if UNTIL_NO_NEW,

gdb/testsuite/
	* gdb.threads/gcore-thread.exp: Remove variable libthread_db_seen.
	Wrap the test into loop for corefile and core0file.
2012-07-02 20:28:38 +00:00
Jan Kratochvil 0f3c2347e6 gdb/testsuite/
* gdb.dwarf2/fission-reread.S: Change # comments to /* */ comments.
2012-07-02 20:10:48 +00:00
Jan Kratochvil 08a67be67e gdb/testsuite/
* gdb.dwarf2/fission-reread.S: Remove .section attributes.
	Change CU pointer size to 4 bytes, adjust .8byte to .4byte.  Remove
	.note.GNU-stack.
2012-07-02 20:09:26 +00:00
Doug Evans 0907af0ceb * dwarf2read.c (maybe_queue_comp_unit): Move definition next to others
related to queue management.
2012-07-02 20:02:39 +00:00
Doug Evans 0940620755 * dwarf2read.c (create_debug_types_hash_table): Use "debug dwarf2-read"
instead of "debug dwarf2-die" in debugging printfs.
	(create_debug_info_hash_table_reader): Ditto.
	(create_debug_info_hash_table): Ditto.
	(init_dwo_file): Ditto.
	(init_cutu_and_read_dies): Add debugging printf.
	(init_cutu_and_read_dies_no_follow): Ditto.
	(process_psymtab_comp_unit_reader): Ditto.
2012-07-02 18:13:41 +00:00
Sergio Durigan Junior ff4a45007a gdb/testsuite:
2012-07-02  Sergio Durigan Junior  <sergiodj@redhat.com>

	* gdb.base/help.exp (help b, help br, help bre, help brea, help
	break): Include help message for the new `-probe' and `-probe-stap'
	options.
2012-07-02 17:53:19 +00:00
Doug Evans 657c4e8cc6 (gdb_no_commands_at_breakpoint): Tweak previous patch for win64 where
sizeof (long) < sizeof (void*).
2012-07-02 17:37:35 +00:00
Doug Evans 7f216e7c7c * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
pointer to int.
2012-07-02 17:11:36 +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
Jan Kratochvil a16242411f gdb/testsuite/
* gdb.base/stale-infcall.c (infcall): New label test-next.
	(main): New labels test-pass and test-fail.
	* gdb.base/stale-infcall.exp: Continue to test-next.  Put breakpoint
	$test_fail_bpnum to test-fail.
	(test system longjmp tracking support): New test.
	Delete $test_fail_bpnum.
	* lib/gdb.exp (gdb_continue_to_breakpoint): Accept also Temporary
	breakpoint.
2012-07-02 12:06:56 +00:00
Jan Kratochvil 2d7b58e8d6 gdb/
Execute -ix and -iex only after system and user gdbinit files.
	* main.c (captured_main): Move CMDARG_INIT_FILE and CMDARG_INIT_COMMAND
	processing down after gdbinit files.

gdb/doc/
	* gdb.texinfo (File Options): Change -ix and -iex commands that apply
	only after gdbinit files.
	(Startup): Move -iex and -iex commands down after gdbinit files.
2012-07-02 12:05:01 +00:00
Jan Kratochvil 8690e6342c gdb/
Add fnmatch-gnu module.
	* gnulib/Makefile.in (aclocal_m4_deps): Add new files and remove one.
	* gnulib/configure.ac (AC_INIT): Use now import/memmem.c.
	* gnulib/aclocal.m4: Regenerate.
	* gnulib/config.in: Regenerate.
	* gnulib/configure: Regenerate.
	* gnulib/import/dummy.c: Remove.
	* gnulib/import/Makefile.am: Regenerate.
	* gnulib/import/Makefile.in: Likewise.
	* gnulib/import/m4/gnulib-cache.m4: Likewise.
	* gnulib/import/m4/gnulib-comp.m4: Likewise.
	* gnulib/import/alloca.c: New file.
	* gnulib/import/alloca.in.h: Likewise.
	* gnulib/import/config.charset: Likewise.
	* gnulib/import/fnmatch.c: Likewise.
	* gnulib/import/fnmatch.in.h: Likewise.
	* gnulib/import/fnmatch_loop.c: Likewise.
	* gnulib/import/localcharset.c: Likewise.
	* gnulib/import/localcharset.h: Likewise.
	* gnulib/import/m4/alloca.m4: Likewise.
	* gnulib/import/m4/codeset.m4: Likewise.
	* gnulib/import/m4/configmake.m4: Likewise.
	* gnulib/import/m4/fcntl-o.m4: Likewise.
	* gnulib/import/m4/fnmatch.m4: Likewise.
	* gnulib/import/m4/glibc21.m4: Likewise.
	* gnulib/import/m4/localcharset.m4: Likewise.
	* gnulib/import/m4/locale-fr.m4: Likewise.
	* gnulib/import/m4/locale-ja.m4: Likewise.
	* gnulib/import/m4/locale-zh.m4: Likewise.
	* gnulib/import/m4/mbrtowc.m4: Likewise.
	* gnulib/import/m4/mbsinit.m4: Likewise.
	* gnulib/import/m4/mbsrtowcs.m4: Likewise.
	* gnulib/import/m4/mbstate_t.m4: Likewise.
	* gnulib/import/m4/stdbool.m4: Likewise.
	* gnulib/import/m4/wchar_h.m4: Likewise.
	* gnulib/import/m4/wctype_h.m4: Likewise.
	* gnulib/import/m4/wint_t.m4: Likewise.
	* gnulib/import/mbrtowc.c: Likewise.
	* gnulib/import/mbsinit.c: Likewise.
	* gnulib/import/mbsrtowcs-impl.h: Likewise.
	* gnulib/import/mbsrtowcs-state.c: Likewise.
	* gnulib/import/mbsrtowcs.c: Likewise.
	* gnulib/import/ref-add.sin: Likewise.
	* gnulib/import/ref-del.sin: Likewise.
	* gnulib/import/stdbool.in.h: Likewise.
	* gnulib/import/streq.h: Likewise.
	* gnulib/import/strnlen1.c: Likewise.
	* gnulib/import/strnlen1.h: Likewise.
	* gnulib/import/verify.h: Likewise.
	* gnulib/import/wchar.in.h: Likewise.
	* gnulib/import/wctype.in.h: Likewise.
2012-07-02 11:52:39 +00:00
Jan Kratochvil 202cbf1c52 gdb/
Support shell wildcards for 'set auto-load safe-path'.
	* auto-load.c: Include fnmatch.h.
	(filename_is_in_dir): Rename to ...
	(filename_is_in_pattern_1, filename_is_in_pattern): ... here and split
	it.  Update function comment.  Rename dir_len to pattern_len.  New
	variables filename_len, pattern and filename.  Add more DEBUG_AUTO_LOAD
	messages.  Use gdb_filename_fnmatch.
	(filename_is_in_auto_load_safe_path_vec): Rename variable dir to
	pattern.
	(_initialize_auto_load): Extend the "set auto-load safe-path" help text.
	* defs.h (gdb_filename_fnmatch): New declaration.
	* utils.c: Include fnmatch.h.
	(gdb_filename_fnmatch): New function.

gdb/doc/
	* gdb.texinfo (Auto-loading safe path): Note the shell wildcard
	possibility.
2012-07-02 10:57:34 +00:00
Sergio Durigan Junior fb7b5af43f 2012-07-02 Sergio Durigan Junior <sergiodj@redhat.com>
* breakpoint.c (BREAK_ARGS_HELP): Include help message for the new
	`-probe' and `-probe-stap' options.
2012-07-02 03:36:04 +00:00
gdbadmin 5b0a443ab9 *** empty log message *** 2012-07-02 00:00:33 +00:00
Yao Qi 72d0e2c5df gdb:
* breakpoint.c: Removed always_inserted_auto, always_inserted_on,
	always_inserted_off, and always_inserted_enums.
	Change always_inserted_mode's type to 'enum auto_boolean'.
	(show_always_inserted_mode, breakpoint_always_inserted_mode): Update
	callers.
	(_initialize_breakpoint): Call add_setshow_auto_boolean_cmd instead
	of add_setshow_enum_cmd.
	* infrun.c: Remove can_use_displaced_stepping_auto,
	can_use_displaced_stepping_on, can_use_displaced_stepping_off, and
	can_use_displaced_stepping_enum.
	Change can_use_displaced_stepping's type to 'enum auto_boolean'.
	(show_can_use_displaced_stepping, use_displaced_stepping): Update callers.
	(_initialize_infrun): Call add_setshow_auto_boolean_cmd instead of
	add_setshow_enum_cmd.
2012-07-01 10:37:04 +00:00
Doug Evans 42e7ad6c73 * dwarf2read.c (signatured_type): Make "per_cu" member first.
(init_cutu_and_read_dies): Handle rereading a DWO CU while it's
	currently being read.  Propagate DW_AT_comp_dir to DWO DIE.

	testsuite/
	* gdb.dwarf2/fission-reread.S: New file.
	* gdb.dwarf2/fission-reread.exp: New file.
2012-07-01 02:05:13 +00:00
gdbadmin fe7785c611 *** empty log message *** 2012-07-01 00:00:33 +00:00
gdbadmin 4bec9bf157 *** empty log message *** 2012-06-30 00:00:32 +00:00
Doug Evans 39cf75f7e0 * linespec.c: #include "stack.h".
(decode_line_with_current_source): Moved here from symtab.c and
	renamed from decode_line_spec.  All callers updated.
	(decode_line_with_last_displayed): Moved here from breakpoint.c and
	renamed from decode_line_spec_1.  All callers updated.
	* linespec.h (decode_line_with_current_source): Move declaration here
	from symtab.h and renamed from decode_line_spec.
	(decode_line_with_last_displayed): Move declaration here from symtab.h
	and renamed from decode_line_spec_1.
	* macrocmd.c: #include "linespec.h".
	* symtab.c: Remove #include "linespec.h".
2012-06-29 22:46:46 +00:00
Tom Tromey b6ba681cda * gdb.texinfo (Index Section Format): Update for version 7. 2012-06-29 13:39:02 +00:00
Doug Evans 1ce1cefd3d * dwarf2read.c (get_cu_length): New function.
(offset_in_cu_p, error_check_comp_unit_head): Call it.
	(create_debug_types_hash_table): Ditto.
	(init_cutu_and_read_dies): Ditto.
	(init_cutu_and_read_dies_no_follow): Ditto.
2012-06-29 00:52:41 +00:00
Doug Evans 3b80fe9b75 * dwarf2read.c (dwarf2_find_base_address): Move definition. 2012-06-29 00:28:23 +00:00
Doug Evans 7f4c1aab46 remove extraneous blank line 2012-06-29 00:20:37 +00:00
Doug Evans 433df2d4d0 * dwarf2read.c (ABBREV_HASH_SIZE): Remove enclosing #ifndef/#endif.
(struct abbrev_table): Define.
	(dwarf2_cu): Replace members dwarf2_abbrevs, abbrev_obstack with
	abbrev_table.
	(init_cutu_and_read_dies): Update.
	(abbrev_table_alloc_abbrev): New function.  Replaces
	dwarf_alloc_abbrev.  All callers updated.
	(abbrev_table_add_abbrev): New function.
	(abbrev_table_lookup_abbrev): New function.  Replaces
	dwarf2_lookup_abbrev.  All callers updated.
	(abbrev_table_read_table): New function.  Contents moved here from
	dwarf2_read_abbrevs.
	(dwarf2_read_abbrevs): Call it.
	(abbrev_table_free): New function.
	(dwarf2_free_abbrev_table): Call it.
2012-06-29 00:06:18 +00:00
gdbadmin 81998ce2f6 *** empty log message *** 2012-06-29 00:00:03 +00:00
Stan Shebs 71caed8383 * osdata.c (info_osdata_command): Filter out "Title" columns
from non-MI uses.
	* common/linux-osdata.c (struct osdata_type): Add title field.
	(osdata_table): Add titles to each entry.
	(linux_command_xfer_osdata): Add a column for title data.

	* gdb.texinfo (Miscellaneous GDB/MI Commands): Update -info-os
	example, add note about title column.
2012-06-28 23:44:26 +00:00
Stan Shebs 37ce89ebb2 Make logging work for MI.
* NEWS: Mention it.
	* interps.h (interp_set_logging_ftype): New typedef.
	(struct interp_procs): New field set_logging_proc.
	(current_interp_set_logging): Declare.
	* interps.c (current_interp_set_logging): New function.
	* cli/cli-logging.c: Include interps.h.
	(set_logging_redirect): Call current_interp_set_logging.
	(pop_output_files): Ditto.
	(handle_redirections): Ditto, plus skip ui-out redirect if MI.
	* mi/mi-console.h (mi_console_set_raw): Declare.
	* mi/mi-console.c (mi_console_set_raw): New function.
	* mi/mi-interp.c (saved_raw_stdout): New global.
	(mi_set_logging): New function.
	(_initialize_mi_interp): Add it to interp procs.

	* gdb.mi/mi-logging.exp: New file.
2012-06-28 22:11:23 +00:00
Doug Evans a743abeb90 * symtab.c (lookup_symbol_aux_objfile): Use
ALL_OBJFILE_PRIMARY_SYMTABS.
2012-06-28 18:56:52 +00:00
Doug Evans 659c9f3a0f * gdbtypes.c (lookup_typename): Rename local variable "tmp" to "type". 2012-06-28 17:13:18 +00:00
Jan Kratochvil da2d6d3da4 gdb/
* common/buffer.c: Include inttypes.h and stdint.h.
	(buffer_xml_printf): Use PRId64, PRIu64, PRIx64 and PRIo64.
2012-06-28 17:07:34 +00:00
Pedro Alves e5ef252af0 gdb/
2012-06-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
	    Pedro Alves  <palves@redhat.com>

	* gdbthread.h (ALL_THREADS): New macro.
	(thread_list): Declare.
	* infrun.c (handle_inferior_event) <spurious signal>: Don't keep
	going, but instead fall through to the stepping handling.
	* linux-nat.c (resume_lwp): New parameter 'signo'.  Resume with
	the passed in signal.  Adjust debug output.
	(resume_callback): Rename to ...
	(linux_nat_resume_callback): ... this.  Pass the thread's last
	stop signal, if in "pass" state.
	(linux_nat_resume): Adjust to rename.
	(stop_wait_callback): New assertion.  Don't respawn signals;
	instead let the LWP remain with SIGNALLED set.
	(linux_nat_wait_1): Remove flushing of pending SIGSTOPs.
	* remote.c (append_pending_thread_resumptions): New.
	(remote_vcont_resume): Call it.
	* target.h (target_resume): Extend comment.

gdb/testsuite/
2012-06-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
	    Pedro Alves  <palves@redhat.com>

	* gdb.threads/siginfo-threads.exp: New file.
	* gdb.threads/siginfo-threads.c: New file.
	* gdb.threads/sigstep-threads.exp: New file.
	* gdb.threads/sigstep-threads.c: New file.
2012-06-28 16:34:04 +00:00
Tom Tromey 22f1fbaefa * gdb.go/package.exp: Partially revert earlier patch; use
gdb_compile again.  Use standard_output_file.
2012-06-28 13:52:51 +00:00
Iain Sandoe 1d7975eb53 * auxv.c (fprint_target_auxv): Handle extended cache data tags. 2012-06-28 09:13:22 +00:00
Doug Evans 2e3cf129e6 * dwarf2read.c (dwarf2_cu): Add ranges_base.
Delete have_addr_base, unused.  All uses updated.
	(init_cutu_and_read_dies): Process DW_AT_GNU_ranges_base.
	(dwarf2_get_pc_bounds): Add ranges_base.
	(dwarf2_record_block_ranges): Ditto.

	testsuite/
	* gdb.dwarf2/fission-base.c: New file.
	* gdb.dwarf2/fission-base.S: New file.
	* gdb.dwarf2/fission-base.exp: New file.
2012-06-28 01:10:38 +00:00
gdbadmin 1dfa629077 *** empty log message *** 2012-06-28 00:00:03 +00:00
Jan Kratochvil 785fd3038e gdb/testsuite/
* gdb.dwarf2/callframecfa.exp: Replace $testname by $testfile.
2012-06-27 23:37:03 +00:00
Tom Tromey 1bb9788dbb PR macros/7961:
* varobj.c (varobj_create): Update.
	(varobj_set_value): Update.
	* tracepoint.c (validate_actionline): Update.
	(encode_actions_1): Update.
	* parse.c (parse_exp_1): Add 'pc' argument.
	(parse_exp_in_context): Add 'pc' argument.  Change how
	expression_context_pc is set.
	(parse_expression): Update.
	(parse_field_expression): Update.
	* expression.h (parse_exp_1): Update.
	* eval.c (parse_to_comma_and_eval): Update.
	* breakpoint.c (set_breakpoint_condition): Update.
	(update_watchpoint): Update.
	(init_breakpoint_sal): Update
	(find_condition_and_thread): Update.
	(watch_command_1): Update.
	(update_breakpoint_locations): Update.
	* ada-lang.c (ada_read_renaming_var_value): Update.
	(create_excep_cond_exprs): Update.
testsuite
	* gdb.base/macscp1.c (macscp_expr): Add breakpoint comment.
	* gdb.base/macscp.exp (maybe_kfail): Add test for macro scope.
2012-06-27 18:08:41 +00:00
Tom Tromey c83ee9021b * gdb.dwarf2/pr10770.exp: Use standard_testfile.
* gdb.dwarf2/dw2-var-zero-addr.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-param-error.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-op-call.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-inline-param.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.dwarf2/dw2-inline-break.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-ifort-parameter.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-cp-infcall-ref-static.exp: Use
	standard_testfile.
	* gdb.dwarf2/dw2-case-insensitive.exp: Use standard_testfile.
	* gdb.dwarf2/dw4-sig-types.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-objfile-overlap.exp: Use standard_testfile.
	* gdb.dwarf2/callframecfa.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.dwarf2/dup-psym.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-ada-ffffffff.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-anonymous-func.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-bad-parameter-type.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-basic.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-compressed.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-const.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-cu-size.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-double-set-die-type.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-empty-namespace.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-empty-pc-range.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-filename.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-icc-opaque.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-inheritance.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-intercu.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-intermix.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-linkage-name-trust.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-modula2-self-type.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-namespaceless-anonymous.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-op-stack-value.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-producer.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-ranges.exp: Use standard_testfile,
	standard_output_file.
	* gdb.dwarf2/dw2-ref-missing-frame.exp: Use standard_testfile,
	standard_output_file.
	* gdb.dwarf2/dw2-restore.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-simple-locdesc.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-skip-prologue.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-stack-boundary.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-strp.exp: Use standard_testfile.
	* gdb.dwarf2/dw4-sig-type-unused.exp: Use standard_testfile.
	* gdb.dwarf2/implptr-64bit.exp: Use standard_testfile.
	* gdb.dwarf2/implptr-optimized-out.exp: Use standard_testfile.
	* gdb.dwarf2/implptr.exp: Use standard_testfile.
	* gdb.dwarf2/mac-fileno.exp: Use standard_testfile.
	* gdb.dwarf2/member-ptr-forwardref.exp: Use standard_testfile.
	* gdb.dwarf2/pieces.exp: Use standard_testfile.
	* gdb.dwarf2/pr11465.exp: Use standard_testfile.
	* gdb.dwarf2/pr13961.exp: Use standard_testfile.
	* gdb.dwarf2/valop.exp: Use standard_testfile,
	prepare_for_testing.
2012-06-27 17:00:09 +00:00
Doug Evans 0bc3a05c52 * dwarf2read.c (per_cu_header_read_in): Simplify, and handle
type units.
2012-06-27 14:26:09 +00:00
Tom Tromey 5204774b6f * gdb.python/python.exp: Fix regexps in pagination tests. 2012-06-27 13:37:26 +00:00
Doug Evans 4bdcc0c114 * dwarf2read.c (read_and_check_comp_unit_head): Delete unnecessary
prototype.
	(error_check_comp_unit_head): New arg abbrev_section.  All callers
	updated.
	(read_and_check_comp_unit_head): Ditto.
	(read_and_check_type_unit_head): Ditto.
2012-06-27 00:35:33 +00:00
Siva Chandra Reddy ee0bf529c3 2012-06-26 Siva Chandra Reddy <sivachandra@google.com>
New attribute 'last' for gdb.Symtab_and_line.
        * NEWS (Python Scripting): Add entry about the new attribute.
        * python/py-symtab.c (salpy_get_last): New function which
        implements the get method for the 'last' attribute of
        gdb.Symtab_and_line.
        (sal_object_getset): Add entry for the 'last' attribute.

        doc/
        * gdb.texinfo (Symbol Tables In Python): Add description about
        the new 'last' attribute of gdb.Symtab_and line.

        testsuite/
        * gdb.python/py-symtab.exp: Add tests to test the new attribute
        'last' of gdb.Symtab_and_line.
        * gdb.python/py-symbol.c: Move break point comment to enable
        testing of gdb.Symtab_and_line.last.
2012-06-27 00:21:21 +00:00
gdbadmin 255235af53 *** empty log message *** 2012-06-27 00:00:03 +00:00
Siva Chandra Reddy 3c15d56597 2012-06-26 Siva Chandra Reddy <sivachandra@google.com>
* gdb.texinfo (Symbol Tables In Python): Correct the description
	of the 'pc' attribute of gdb.Symtab_and_line.
2012-06-26 23:51:32 +00:00
Doug Evans 09262596f2 * dwarf2read.c (dwo_section_names): Add macinfo_dwo, macro_dwo.
(dwo_sections): Add macinfo, macro.
	(dwarf2_locate_dwo_sections): Watch for macro sections.
	(dwarf_decode_macros): Remove args lh, abfd, section, section_name.
	All callers updated.  Handle DWO files.
2012-06-26 21:56:46 +00:00
Doug Evans 45cfd46896 * NEWS: Mention new options "set debug dwarf2-read" and
"set debug symtab-create".
	* dwarf2read.c (dwarf2_read_debug): New static global.
	(dwarf2_build_psymtabs_hard): Add debugging printfs.
	(process_queue): Ditto.
	(process_full_comp_unit): Ditto.
	(_initialize_dwarf2_read): Add new option "set debug dwarf2-read".
	* elfread.c (elf_symfile_read): Add debugging printf.
	* minsyms.c (install_minimal_symbols): Ditto.
	* psymtab.c (allocate_psymtab): Ditto.
	* symfile.c (allocate_symtab): Ditto.
	* symtab.c (symtab_create_debug): New global.
	(_initialize_symtab): Add new option "set debug symtab-create".
	* symtab.h (symtab_create_debug): Declare.

	doc/
	* gdb.texinfo (Debugging Output): Document debug options dwarf2-read
	and symtab-create.
2012-06-26 20:14:03 +00:00
Doug Evans 1c658ad5fa * dwarf2read.c (lookup_dwo_comp_unit): Enhance comment.
(lookup_dwo_type_unit): Ditto.
2012-06-26 19:48:13 +00:00
Tom Tromey 14fcc022f2 * gdb.threads/step.c: Remove.
* gdb.threads/step.exp: Remove.
	* gdb.threads/step2.exp: Remove.
2012-06-26 19:46:30 +00:00
Tom Tromey 0efbbabc9c * gdb.threads/watchpoint-fork.exp (test): Use
standard_output_file.  Don't declare objdir.
	* gdb.threads/attach-into-signal.exp: Use standard_testfile,
	standard_output_file.
	* gdb.threads/attach-stopped.exp: Use standard_testfile.
	* gdb.threads/bp_in_thread.exp: Use standard_testfile,
	clean_restart.  Remove incdir.
	* gdb.threads/corethreads.exp: Use standard_testfile.
	* gdb.threads/execl.exp: Use standard_testfile,
	standard_output_file, clean_restart.
	* gdb.threads/fork-child-threads.exp: Use standard_testfile,
	clean_restart.
	* gdb.threads/fork-thread-pending.exp: Use standard_testfile,
	clean_restart.
	* gdb.threads/gcore-thread.exp: Use standard_testfile.  Remove
	incdir.
	* gdb.threads/hand-call-in-threads.exp: Use standard_testfile,
	clean_restart.  Remove incdir.
	* gdb.threads/ia64-sigill.exp: Use standard_testfile.
	* gdb.threads/interrupted-hand-call.exp: Use standard_testfile,
	clean_restart.  Remove incdir.
	* gdb.threads/killed.exp: Use standard_testfile, clean_restart.
	Remove incdir.
	* gdb.threads/leader-exit.exp: Use standard_testfile.
	* gdb.threads/linux-dp.exp: Use standard_testfile, clean_restart.
	* gdb.threads/local-watch-wrong-thread.exp: Use standard_testfile,
	clean_restart.
	* gdb.threads/manythreads.exp: Use standard_testfile,
	clean_restart.  Remove incdir.
	* gdb.threads/multi-create.exp: Use standard_testfile,
	clean_restart.
	* gdb.threads/no-unwaited-for-left.exp: Use standard_testfile.
	* gdb.threads/non-ldr-exc-1.exp: Use standard_testfile.
	* gdb.threads/non-ldr-exc-2.exp: Use standard_testfile.
	* gdb.threads/non-ldr-exc-3.exp: Use standard_testfile.
	* gdb.threads/non-ldr-exc-4.exp: Use standard_testfile.
	* gdb.threads/pending-step.exp: Use standard_testfile,
	clean_restart.  Remove incdir.
	* gdb.threads/print-threads.exp: Use standard_testfile,
	clean_restart.  Remove incdir.
	* gdb.threads/pthread_cond_wait.exp: Use standard_testfile,
	clean_restart.  Remove incdir.
	* gdb.threads/pthreads.exp: Use standard_testfile, clean_restart.
	Remove incdir.
	* gdb.threads/schedlock.exp: Use standard_testfile.  Remove
	incdir.
	* gdb.threads/sigthread.exp: Use standard_testfile,
	clean_restart.
	* gdb.threads/staticthreads.exp: Use standard_testfile,
	clean_restart.  Remove incdir.
	* gdb.threads/switch-threads.exp: Use standard_testfile,
	clean_restart.  Remove incdir.
	* gdb.threads/thread-execl.exp: Use standard_testfile,
	clean_restart.  Remove incdir.
	* gdb.threads/thread-find.exp: Use standard_testfile,
	clean_restart.
	* gdb.threads/thread-specific.exp: Use standard_testfile,
	clean_restart.  Remove incdir.
	* gdb.threads/thread-unwindonsignal.exp: Use standard_testfile,
	clean_restart.  Remove incdir.
	* gdb.threads/thread_check.exp: Use standard_testfile,
	clean_restart.  Remove incdir.
	* gdb.threads/thread_events.exp: Use standard_testfile.  Remove
	incdir.
	* gdb.threads/threadapply.exp: Use standard_testfile,
	clean_restart.  Remove incdir.
	* gdb.threads/threxit-hop-specific.exp: Use standard_testfile,
	clean_restart.  Remove incdir.
	* gdb.threads/tls-nodebug.exp: Use standard_testfile,
	clean_restart.
	* gdb.threads/tls-shared.exp: Use standard_testfile,
	clean_restart, standard_output_file.
	* gdb.threads/tls-var.exp: Use standard_testfile,
	standard_output_file.
	* gdb.threads/tls.exp: Use standard_testfile, clean_restart.
	Remove incdir.
	* gdb.threads/watchthreads-reorder.exp: Use standard_testfile.
	* gdb.threads/watchthreads.exp: Use standard_testfile.  Remove
	incdir.
	* gdb.threads/watchthreads2.exp: Use standard_testfile,
	clean_restart.  Remove incdir.
2012-06-26 19:23:20 +00:00
Tom Tromey 497a5eb039 * gdb.trace/actions.exp: Use standard_testfile.
* gdb.trace/ax.exp: Use standard_testfile.
	* gdb.trace/backtrace.exp: Use standard_testfile.
	* gdb.trace/change-loc.exp: Use standard_testfile.
	* gdb.trace/circ.exp: Use standard_testfile, prepare_for_testing.
	* gdb.trace/collection.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.trace/deltrace.exp: Use standard_testfile.
	* gdb.trace/disconnected-tracing.exp: Use standard_testfile.
	* gdb.trace/ftrace.exp: Use standard_testfile.
	* gdb.trace/infotrace.exp: Use standard_testfile.
	* gdb.trace/packetlen.exp: Use standard_testfile.
	* gdb.trace/passc-dyn.exp: Use standard_testfile.
	* gdb.trace/passcount.exp: Use standard_testfile.
	* gdb.trace/pending.exp: Use standard_testfile.
	* gdb.trace/report.exp: Use standard_testfile.
	* gdb.trace/save-trace.exp: Use standard_testfile.
	* gdb.trace/stap-trace.exp: Use standard_testfile.
	* gdb.trace/status-stop.exp: Use standard_testfile.
	* gdb.trace/strace.exp: Use standard_testfile.
	* gdb.trace/tfile.exp: Use standard_testfile.
	* gdb.trace/tfind.exp: Use standard_testfile.
	* gdb.trace/trace-break.exp: Use standard_testfile.
	* gdb.trace/trace-mt.exp: Use standard_testfile.
	* gdb.trace/tracecmd.exp: Use standard_testfile.
	* gdb.trace/tspeed.exp: Use standard_testfile.
	* gdb.trace/tstatus.exp: Use standard_testfile.
	* gdb.trace/tsv.exp: Use standard_testfile.
	* gdb.trace/unavailable.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.trace/while-dyn.exp: Use standard_testfile.
	* gdb.trace/while-stepping.exp: Use standard_testfile.
2012-06-26 18:25:19 +00:00
Tom Tromey 7686c07459 * gdb.reverse/break-precsave.exp: Use standard_testfile.
* gdb.reverse/break-reverse.exp: Use standard_testfile.
	* gdb.reverse/consecutive-precsave.exp: Use standard_testfile.
	* gdb.reverse/consecutive-reverse.exp: Use standard_testfile.
	* gdb.reverse/finish-precsave.exp: Use standard_testfile.
	* gdb.reverse/finish-reverse-bkpt.exp: Use standard_testfile.
	* gdb.reverse/finish-reverse.exp: Use standard_testfile.
	* gdb.reverse/i386-precsave.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.reverse/i386-reverse.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.reverse/i386-sse-reverse.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.reverse/i387-env-reverse.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.reverse/i387-stack-reverse.exp: Use standard_testfile,
	prepare_for_testing
	* gdb.reverse/machinestate-precsave.exp: Use standard_testfile.
	* gdb.reverse/machinestate.exp: Use standard_testfile.
	* gdb.reverse/next-reverse-bkpt-over-sr.exp: Use standard_testfile.
	* gdb.reverse/sigall-precsave.exp: Use standard_testfile,
	build_executable.
	* gdb.reverse/sigall-reverse.exp: Use standard_testfile,
	build_executable.
	* gdb.reverse/solib-precsave.exp: Use standard_testfile,
	standard_output_file.
	* gdb.reverse/solib-reverse.exp: Use standard_testfile,
	standard_output_file.
	* gdb.reverse/step-precsave.exp: Use standard_testfile.
	* gdb.reverse/step-reverse.exp: Use standard_testfile.
	* gdb.reverse/until-precsave.exp: Use standard_testfile.
	* gdb.reverse/until-reverse.exp: Use standard_testfile.
	* gdb.reverse/watch-precsave.exp: Use standard_testfile.
	* gdb.reverse/watch-reverse.exp: Use standard_testfile.
2012-06-26 17:54:59 +00:00
Tom Tromey 481fc10041 * gdb.stabs/weird.exp: Remove directory-checking code. Use
standard_output_file.
	* gdb.stabs/exclfwd.exp: Use standard_testfile,
	prepare_for_testing.  Remove directory-checking code.
2012-06-26 17:32:44 +00:00
H.J. Lu 6fea9e186c Use PTRACE_PEEKUSER to get fs_base/gs_base
* amd64-linux-nat.c: Include <sys/user.h>.
	(ps_get_thread_area): Use PTRACE_PEEKUSER to get fs_base/gs_base
	if HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE or
	HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE is defined.

	* configure.ac: Check if the fs_base and gs_base members of
	`struct user_regs_struct' exist.
	* config.in: Regenerated.
	* configure: Likewise.
2012-06-26 14:43:01 +00:00
gdbadmin df59f78182 *** empty log message *** 2012-06-26 00:00:03 +00:00
Tom Tromey 7bb18ae2ad * gdb.multi/watchpoint-multi.exp: Use standard_testfile.
* gdb.multi/bkpt-multi-exec.exp: Use standard_output_file.  Use
	build_executable, not prepare_for_testing.
	* gdb.multi/base.exp: Use standard_output_file.  Use
	build_executable,  not prepare_for_testing.
2012-06-25 21:07:32 +00:00
Tom Tromey cf09b3e42c * gdb.fortran/subarray.exp: Use standard_testfile,
prepare_for_testing.
	* gdb.fortran/multi-dim.exp: Use standard_testfile.
	* gdb.fortran/module.exp: Use standard_testfile.
	* gdb.fortran/logical.exp: Use standard_testfile.
	* gdb.fortran/library-module.exp: Use standard_testfile,
	standard_output_file.
	* gdb.fortran/derived-type.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.fortran/complex.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.fortran/charset.exp: Use standard_testfile.
	* gdb.fortran/array-element.exp: Use standard_testfile,
	prepare_for_testing.
2012-06-25 20:51:35 +00:00
Keith Seitz 496ee73e83 * gdb.texinfo (GDB/MI Breakpoint Commands): Remove "-r" option
from example.  Remove "rbreak" from list of corresponding
	gdb commands.
2012-06-25 20:51:30 +00:00
Keith Seitz 18b5ff1b53 * gdb.mi/mi-break.exp (test_rbreak_creation_and_listing):
Change rbreak-related tests to KFAIL and add bugzilla numbers.
2012-06-25 20:49:47 +00:00
Tom Tromey 17b776263f * gdb.pascal/integers.exp: Use standard_testfile, clean_restart.
* gdb.pascal/hello.exp: Use standard_testfile, clean_restart.
	* gdb.pascal/gdb11492.exp: Use standard_testfile, clean_restart.
	* gdb.pascal/floats.exp: Use standard_testfile, clean_restart.
2012-06-25 20:43:40 +00:00
Tom Tromey f91e3dc1b6 * gdb.linespec/ls-errs.exp: Use standard_testfile.
* gdb.linespec/ls-dollar.exp: Use standard_testfile.
	* gdb.linespec/linespec.exp: Use standard_testfile.
2012-06-25 20:31:21 +00:00
Tom Tromey a884434d19 * gdb.modula2/unbounded-array.exp: Use standard_testfile,
prepare_for_testing.
2012-06-25 20:28:23 +00:00
Tom Tromey efc9d70a28 * gdb.opt/clobbered-registers-O2.exp: Use standard_testfile,
prepare_for_testing.
	* gdb.opt/inline-break.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.opt/inline-bt.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.opt/inline-cmds.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.opt/inline-locals.exp: Use standard_testfile,
	prepare_for_testing.
2012-06-25 20:24:57 +00:00
Tom Tromey e2fc92c6c7 * gdb.asm/asm-source.exp: Use standard_output_file,
standard_testfile.  Construct .o files in proper subdir.
2012-06-25 20:11:43 +00:00
Tom Tromey b0963d7350 * gdb.server/ext-attach.exp: Use standard_testfile,
prepare_for_testing.
	* gdb.server/ext-run.exp: Use standard_testfile,
	build_executable.
	* gdb.server/file-transfer.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.server/server-exec-info.exp: Use standard_testfile.
	* gdb.server/server-mon.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.server/server-run.exp: Use standard_testfile,
	build_executable.
	* gdb.server/solib-list.exp: Use standard_testfile,
	standard_output_file.
2012-06-25 19:46:26 +00:00
Tom Tromey 8a3e1f8d52 * lib/gdb.exp (standard_output_file): Use "file join".
* gdb.go/chan.exp: Use standard_testfile.
	* gdb.go/handcall.exp: Use standard_testfile.
	* gdb.go/hello.exp: Use standard_testfile.
	* gdb.integers/chan.exp: Use standard_testfile.
	* gdb.go/methods.exp: Use standard_testfile.
	* gdb.go/package.exp: Use standard_testfile.
	* gdb.go/strings.exp: Use standard_testfile.
	* gdb.go/types.exp: Use standard_testfile.
	* gdb.go/unsafe.exp: Use standard_testfile.
2012-06-25 19:13:25 +00:00
Michael Eager adb4fe3b30 PR14291: KeyboardInterrupt not caught for Python output 2012-06-25 16:53:20 +00:00
Matthew Gretton-Dann 944a90619c 2012-06-25 Greta Yorsh <greta.yorsh@arm.com>
* gdb/testsuite/gdb.arch/arm-disp-step.S: Fix use of .global directives.
2012-06-25 12:56:18 +00:00
Matthew Gretton-Dann fc51cce108 2012-06-25 Greta Yorsh <greta.yorsh@arm.com>
* gdb/arm-tdep.c (arm_in_function_epilogue_p): Recognize POP with a single
	register as a stack alignment in ARM mode.
2012-06-25 12:32:45 +00:00
gdbadmin edcc0ccdfc *** empty log message *** 2012-06-25 00:00:32 +00:00
Jan Kratochvil 40a733915f gdb/
Update gnulib to GIT commit a39f53ccb70a613e647e1019fb4c63645220267e.
	* gnulib/config.in: Regenerate.
	* gnulib/configure: Likewise.
	* gnulib/import/m4/extensions.m4: Update it.
	* gnulib/import/m4/gnulib-common.m4: Likewise.
	* gnulib/import/m4/memmem.m4: Likewise.
	* gnulib/import/m4/mmap-anon.m4: Likewise.
	* gnulib/import/m4/multiarch.m4: Likewise.
	* gnulib/import/stdint.in.h: Likewise.
2012-06-24 09:12:33 +00:00
Yao Qi 972daa01e2 gdb:
* corefile.c (write_memory_with_notification): New.
	* gdbcore.h: Declare write_memory_with_notification.
	* ada-lang.c (ada_value_assign): Replace 'write_memory' and
	'observer_notify_memory_changed' with 'write_memory_with_notification'.
	* valops.c (value_assign): Likewise.
	* python/py-inferior.c (infpy_write_memory): Call
	'write_memory_with_notification'.
2012-06-24 07:28:10 +00:00
Jan Kratochvil 8d6e0714b7 gdb/
* cc-with-index.sh: Use also -ex "set auto-load no".
2012-06-24 06:58:11 +00:00
Jan Kratochvil 1c06bd587e gdb/testsuite/
Fix regression by the previous commit.
	* gdb.python/lib-types.exp: Add c++ to the compilation flags.
2012-06-24 06:36:27 +00:00
gdbadmin d3e9f07561 *** empty log message *** 2012-06-24 00:00:32 +00:00
Doug Evans 156942c7d1 PR 14125
* NEWS: Document additions to .gdb_index.
	* dwarf2read.c: #include "gdb/gdb-index.h".
	(DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): New macro.
	(DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): New macro.
	(DW2_GDB_INDEX_CU_SET_VALUE): New macro.
	(dwarf2_read_index): Recognize version 7.
	(dw2_do_expand_symtabs_matching): New args want_specific_block,
	block_kind, domain): All callers updated.
	(dw2_find_symbol_file): Handle new index CU values.
	(dw2_expand_symtabs_matching): Match symbol kind if requested.
	(add_index_entry): New args is_static, kind.  All callers updated.
	(offset_type_compare, uniquify_cu_indices): New functions
	(symbol_kind): New function.
	(write_psymtabs_to_index): Remove duplicate CU values.
	(write_psymtabs_to_index): Write .gdb_index version 7.

	doc/
	* gdb.texinfo (Index Section Format): Document version 7 format.

	include/gdb/
	* gdb-index.h: New file.
2012-06-23 22:23:47 +00:00
gdbadmin 0d8b534dde *** empty log message *** 2012-06-23 00:00:33 +00:00
Joel Brobecker 352b3eda56 Add -Wdeclaration-after-statement to list of compiler warnings
gdb/ChangeLog:

        * configure.ac (build_warnings): Add -Wdeclaration-after-statement.
        * configure: Regenerate.
2012-06-22 18:59:04 +00:00
Tom Tromey b4a58790db * gdb.python/lib-types.exp: Use standard_testfile,
prepare_for_testing.
	* gdb.python/py-block.exp: Use standard_testfile.
	* gdb.python/py-breakpoint.exp: Use standard_testfile.
	* gdb.python/py-events.exp: Use standard_testfile,
	standard_output_file.
	* gdb.python/py-evsignal.exp: Use standard_testfile.
	* gdb.python/py-evethreads.exp: Use standard_testfile.
	* gdb.python/py-explore-cc.exp: Use standard_testfile.
	* gdb.python/py-explore.exp: Use standard_testfile.
	* gdb.python/py-finish-breakpoint.exp: Use standard_testfile,
	standard_output_file.
	* gdb.python/py-finish-breakpoint2.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.python/py-frame-inline.exp: Use standard_testfile.
	* gdb.python/py-frame.exp: Use standard_testfile.
	* gdb.python/py-inferior.exp: Use standard_testfile.
	* gdb.python/py-infthread.exp: Use standard_testfile.
	* gdb.python/py-mi.exp: Use standard_testfile.
	* gdb.python/py-objfile-script.exp: Use standard_testfile,
	build_executable.
	* gdb.python/py-objfile.exp: Use standard_testfile.
	* gdb.python/py-pp-maint.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.python/py-prettyprint.exp: Use standard_testfile.
	* gdb.python/py-progspace.exp: Use standard_testfile,
	build_executable.
	* gdb.python/py-prompt.exp: Use standard_testfile,
	build_executable.
	* gdb.python/py-section-script.exp: Use standard_testfile,
	build_executable.
	* gdb.python/py-shared.exp: Use standard_testfile,
	standard_output_file, clean_restart.
	* gdb.python/py-symbol.exp: Use standard_output_file,
	prepare_for_testing.
	* gdb.python/py-symtab.exp: Use standard_output_file,
	prepare_for_testing
	* gdb.python/py-template.exp: Use standard_testfile.
	* gdb.python/py-type.exp: Use standard_testfile.
	* gdb.python/py-value-cc.exp: Use standard_testfile.
	* gdb.python/py-value.exp: Use standard_testfile.
	* gdb.python/python.exp: Use standard_testfile, build_executable.
2012-06-22 17:59:33 +00:00
Tom Tromey 2c44deac31 * gdb.objc/basicclass.exp: Use standard_testfile.
(do_objc_tests): Don't declare objdir.
	* gdb.objc/nondebug.exp: Use standard_testfile.
	(do_objc_tests): Don't declare objdir.
	* gdb.objc/objcdecode.exp: Use standard_testfile.
	(do_objc_tests): Don't declare objdir.
2012-06-22 17:15:22 +00:00
Tom Tromey c24ccbcea9 * gdb.java/jmain.exp: Use standard_testfile.
* gdb.java/jmisc.exp: Use standard_testfile.
	* gdb.java/jnpe.exp: Use standard_testfile.
	* gdb.java/jprint.exp: Use standard_testfile.
2012-06-22 16:44:15 +00:00
Tom Tromey 0a6d030604 * lib/gdb.exp (default_gdb_init): Set gdb_test_file_name.
(standard_output_file, standard_testfile): New procs.
	(build_executable, clean_restart): Use standard_output_file.
2012-06-22 16:39:11 +00:00
Yao Qi c614397c62 gdb/doc:
* gdb.texinfo: Add missing cindex for some packets.
2012-06-22 08:37:49 +00:00
Yao Qi 6ea815ef85 gdb/testsuite:
* boards/native-gdbserver.exp: New proc ${board}_exec.
	* boards/native-stdio-gdbserver.exp: Likewise.
2012-06-22 07:45:57 +00:00
gdbadmin 3cfa09946b *** empty log message *** 2012-06-22 00:00:32 +00:00
Tom Tromey 4c93b1dbf4 * lib/gdb.exp (skip_altivec_tests, skip_vsx_tests)
(build_executable): Update.
	(get_compiler_info): Remove 'binfile' argument.
	* gdb.ada/arrayidx.exp: Update.
	* gdb.ada/null_array.exp: Update.
	* gdb.arch/altivec-abi.exp: Update.
	* gdb.arch/altivec-regs.exp: Update.
	* gdb.arch/amd64-byte.exp: Update.
	* gdb.arch/amd64-dword.exp: Update.
	* gdb.arch/amd64-word.exp: Update.
	* gdb.arch/i386-avx.exp: Update.
	* gdb.arch/i386-byte.exp: Update.
	* gdb.arch/i386-sse.exp: Update.
	* gdb.arch/i386-word.exp: Update.
	* gdb.arch/ppc-dfp.exp: Update.
	* gdb.arch/ppc-fp.exp: Update.
	* gdb.arch/vsx-regs.exp: Update.
	* gdb.base/all-bin.exp: Update.
	* gdb.base/annota1.exp: Update.
	* gdb.base/async.exp: Update.
	* gdb.base/attach.exp: Update.
	* gdb.base/break-interp.exp: Update.
	* gdb.base/call-ar-st.exp: Update.
	* gdb.base/call-rt-st.exp: Update.
	* gdb.base/call-sc.exp: Update.
	* gdb.base/callfuncs.exp: Update.
	* gdb.base/catch-load.exp: Update.
	* gdb.base/completion.exp: Update.
	* gdb.base/complex.exp: Update.
	* gdb.base/condbreak.exp: Update.
	* gdb.base/consecutive.exp: Update.
	* gdb.base/constvars.exp: Update.
	* gdb.base/corefile.exp: Update.
	* gdb.base/eval-skip.exp: Update.
	* gdb.base/expand-psymtabs.exp: Update.
	* gdb.base/exprs.exp: Update.
	* gdb.base/fileio.exp: Update.
	* gdb.base/fixsection.exp: Update.
	* gdb.base/funcargs.exp: Update.
	* gdb.base/gdb11530.exp: Update.
	* gdb.base/gdb1555.exp: Update.
	* gdb.base/gnu-ifunc.exp: Update.
	* gdb.base/gnu_vector.exp: Update.
	* gdb.base/info-macros.exp: Update.
	* gdb.base/jit-simple.exp: Update.
	* gdb.base/jit-so.exp: Update.
	* gdb.base/jit.exp: Update.
	* gdb.base/langs.exp: Update.
	* gdb.base/list.exp: Update.
	* gdb.base/logical.exp: Update.
	* gdb.base/long_long.exp: Update.
	* gdb.base/longjmp.exp: Update.
	* gdb.base/macscp.exp: Update.
	* gdb.base/mips_pro.exp: Update.
	* gdb.base/miscexprs.exp: Update.
	* gdb.base/morestack.exp: Update.
	* gdb.base/nodebug.exp: Update.
	* gdb.base/opaque.exp: Update.
	* gdb.base/pc-fp.exp: Update.
	* gdb.base/pending.exp: Update.
	* gdb.base/permissions.exp: Update.
	* gdb.base/pointers.exp: Update.
	* gdb.base/prelink.exp: Update.
	* gdb.base/printcmds.exp: Update.
	* gdb.base/psymtab.exp: Update.
	* gdb.base/ptype.exp: Update.
	* gdb.base/relational.exp: Update.
	* gdb.base/scope.exp: Update.
	* gdb.base/setvar.exp: Update.
	* gdb.base/shlib-call.exp: Update.
	* gdb.base/shreloc.exp: Update.
	* gdb.base/signals.exp: Update.
	* gdb.base/sizeof.exp: Update.
	* gdb.base/so-impl-ld.exp: Update.
	* gdb.base/so-indr-cl.exp: Update.
	* gdb.base/solib-disc.exp: Update.
	* gdb.base/solib-display.exp: Update.
	* gdb.base/solib-nodir.exp: Update.
	* gdb.base/solib-overlap.exp: Update.
	* gdb.base/solib-symbol.exp: Update.
	* gdb.base/solib-weak.exp: Update.
	* gdb.base/solib.exp: Update.
	* gdb.base/store.exp: Update.
	* gdb.base/structs.exp: Update.
	* gdb.base/structs2.exp: Update.
	* gdb.base/type-opaque.exp: Update.
	* gdb.base/unload.exp: Update.
	* gdb.base/varargs.exp: Update.
	* gdb.base/volatile.exp: Update.
	* gdb.base/watch_thread_num.exp: Update.
	* gdb.base/watchpoint-solib.exp: Update.
	* gdb.base/watchpoint.exp: Update.
	* gdb.base/watchpoints.exp: Update.
	* gdb.base/whatis.exp: Update.
	* gdb.cell/arch.exp: Update.
	* gdb.cell/break.exp: Update.
	* gdb.cell/bt.exp: Update.
	* gdb.cell/core.exp: Update.
	* gdb.cell/data.exp: Update.
	* gdb.cell/ea-cache.exp: Update.
	* gdb.cell/f-regs.exp: Update.
	* gdb.cell/fork.exp: Update.
	* gdb.cell/gcore.exp: Update.
	* gdb.cell/mem-access.exp: Update.
	* gdb.cell/ptype.exp: Update.
	* gdb.cell/registers.exp: Update.
	* gdb.cell/sizeof.exp: Update.
	* gdb.cell/solib-symbol.exp: Update.
	* gdb.cell/solib.exp: Update.
	* gdb.cp/ambiguous.exp: Update.
	* gdb.cp/breakpoint.exp: Update.
	* gdb.cp/bs15503.exp: Update.
	* gdb.cp/casts.exp: Update.
	* gdb.cp/class2.exp: Update.
	* gdb.cp/cpexprs.exp: Update.
	* gdb.cp/cplusfuncs.exp: Update.
	* gdb.cp/ctti.exp: Update.
	* gdb.cp/dispcxx.exp: Update.
	* gdb.cp/gdb1355.exp: Update.
	* gdb.cp/gdb2384.exp: Update.
	* gdb.cp/gdb2495.exp: Update.
	* gdb.cp/infcall-dlopen.exp: Update.
	* gdb.cp/local.exp: Update.
	* gdb.cp/m-data.exp: Update.
	* gdb.cp/m-static.exp: Update.
	* gdb.cp/mb-ctor.exp: Update.
	* gdb.cp/mb-inline.exp: Update.
	* gdb.cp/mb-templates.exp: Update.
	* gdb.cp/member-ptr.exp: Update.
	* gdb.cp/method.exp: Update.
	* gdb.cp/namespace.exp: Update.
	* gdb.cp/nextoverthrow.exp: Update.
	* gdb.cp/nsdecl.exp: Update.
	* gdb.cp/nsrecurs.exp: Update.
	* gdb.cp/nsstress.exp: Update.
	* gdb.cp/nsusing.exp: Update.
	* gdb.cp/pr-1023.exp: Update.
	* gdb.cp/pr-1210.exp: Update.
	* gdb.cp/pr-574.exp: Update.
	* gdb.cp/pr9631.exp: Update.
	* gdb.cp/printmethod.exp: Update.
	* gdb.cp/psmang.exp: Update.
	* gdb.cp/re-set-overloaded.exp: Update.
	* gdb.cp/rtti.exp: Update.
	* gdb.cp/shadow.exp: Update.
	* gdb.cp/templates.exp: Update.
	* gdb.cp/try_catch.exp: Update.
	* gdb.dwarf2/dw2-ranges.exp: Update.
	* gdb.dwarf2/pr10770.exp: Update.
	* gdb.fortran/library-module.exp: Update.
	* gdb.hp/gdb.aCC/optimize.exp: Update.
	* gdb.hp/gdb.aCC/watch-cmd.exp: Update.
	* gdb.hp/gdb.base-hp/callfwmall.exp: Update.
	* gdb.hp/gdb.base-hp/hwwatchbus.exp: Update.
	* gdb.hp/gdb.base-hp/pxdb.exp: Update.
	* gdb.hp/gdb.base-hp/sized-enum.exp: Update.
	* gdb.hp/gdb.base-hp/so-thresh.exp: Update.
	* gdb.hp/gdb.compat/xdb1.exp: Update.
	* gdb.hp/gdb.compat/xdb2.exp: Update.
	* gdb.hp/gdb.compat/xdb3.exp: Update.
	* gdb.hp/gdb.defects/bs14602.exp: Update.
	* gdb.hp/gdb.defects/solib-d.exp: Update.
	* gdb.hp/gdb.objdbg/objdbg01.exp: Update.
	* gdb.hp/gdb.objdbg/objdbg02.exp: Update.
	* gdb.hp/gdb.objdbg/objdbg03.exp: Update.
	* gdb.hp/gdb.objdbg/objdbg04.exp: Update.
	* gdb.mi/gdb792.exp: Update.
	* gdb.mi/mi-pending.exp: Update.
	* gdb.mi/mi-solib.exp: Update.
	* gdb.mi/mi-var-cp.exp: Update.
	* gdb.opt/clobbered-registers-O2.exp: Update.
	* gdb.opt/inline-bt.exp: Update.
	* gdb.opt/inline-cmds.exp: Update.
	* gdb.opt/inline-locals.exp: Update.
	* gdb.python/py-events.exp: Update.
	* gdb.python/py-finish-breakpoint.exp: Update.
	* gdb.python/py-type.exp: Update.
	* gdb.reverse/solib-precsave.exp: Update.
	* gdb.reverse/solib-reverse.exp: Update.
	* gdb.server/solib-list.exp: Update.
	* gdb.stabs/weird.exp: Update.
	* gdb.threads/attach-into-signal.exp: Update.
	* gdb.threads/attach-stopped.exp: Update.
	* gdb.threads/tls-shared.exp: Update.
	* gdb.trace/change-loc.exp: Update.
	* gdb.trace/strace.exp: Update.
2012-06-21 20:46:25 +00:00
gdbadmin 19e676eb2c *** empty log message *** 2012-06-21 00:00:33 +00:00
Keith Seitz 472a237988 * gdb.texinfo (GDB/MI Breakpoint Commands): Re-order options
for -break-insert and document -p.
2012-06-20 20:11:06 +00:00
Yao Qi 2678e2af1f * python/py-inferior.c: Update comments of infpy_read_memory
and infpy_write_memory.

gdb/doc:

        * gdb.texinfo (Inferiors In Python): Replace "gdb.read_memory"
        and "gdb.write_memory" with "Inferior.read_memory" and
        "Inferior.write_memory".
2012-06-20 04:02:22 +00:00
gdbadmin a62e34ed5c *** empty log message *** 2012-06-20 00:00:33 +00:00
Tom Tromey 95c391b64a PR exp/9514:
* parser-defs.h (insert_type, insert_type_address_space): Declare.
	(push_type_address_space): Remove.
	* parse.c (insert_into_type_stack): New function.
	(insert_type): Likewise.
	(insert_type_address_space): Rename from push_type_address_space.
	Insert tp_space_identifier.
	* c-exp.y (ptr_operator): New production.
	(abs_decl): Use ptr_operator.
	(space_identifier): Call insert_type_address_space.
	(ptype): Don't use const_or_volatile_or_space_identifier.
	(const_or_volatile_noopt): Call insert_type.
	(conversion_type_id, conversion_declarator): New productions.
	(operator): Use conversion_type_id.
testsuite
	* gdb.base/whatis.exp: Add tests.
2012-06-19 19:49:42 +00:00
Tom Tromey e910f0b61f * gdb.cp/m-static.cc (keepalive): New function.
(gnu_obj_1::method): Use it.
2012-06-19 15:47:02 +00:00
Doug Evans 422d65e705 * symtab.h (minimal_symbol): New member created_by_gdb.
* elfread.c (elf_symtab_read): Set created_by_gdb for @plt minsym
	created by gdb.
	* symtab.c (lookup_symbol_in_objfile_from_linkage_name): New function.
	(search_symbols): Call it instead of lookup_symbol.
	Skip symbols created by gdb.  Only scan minsyms if nfiles == 0.

	testsuite:
	* gdb.base/info-fun.exp: New file.
	* gdb.base/info-fun.c: New file.
	* gdb.base/info-fun-solib.c: New file.
2012-06-19 00:53:35 +00:00
Doug Evans 49f6c8397d * dwarf2expr.c (execute_stack_op): Handle DW_OP_GNU_const_index.
Adjust address for DW_OP_GNU_addr_index.
	* dwarf2expr.h (dwarf_expr_context): Update comment.
	* dwarf2loc.c (locexpr_describe_location_piece): New arg per_cu,
	all callers updated.  Handle TLS vars described with
	DW_OP_GNU_const_index.
	(disassemble_dwarf_expression): Handle DW_OP_GNU_addr_index
	and DW_OP_GNU_const_index.
	* dwarf2read.c (decode_locdesc): Handle DW_OP_GNU_addr_index.
2012-06-19 00:37:18 +00:00
gdbadmin a9463f3a15 *** empty log message *** 2012-06-19 00:00:03 +00:00
Doug Evans 6ac9ef80f5 * block.c (find_block_in_blockvector): Make explicit the fact that we
ignore GLOBAL_BLOCK.
2012-06-18 20:31:26 +00:00
Tom Tromey 4cd182151a * c-exp.y (operator): Remove trailing space after "delete" and
"delete[]".
2012-06-18 20:23:38 +00:00
Jan Kratochvil a9b8d892d6 gdb/
Switch i386 and derived targets to ON_STACK.
	* amd64-dicos-tdep.c (amd64_dicos_push_dummy_code): Remove.
	(amd64_dicos_init_abi): Remove its installment.
	* dicos-tdep.c (dicos_init_abi): Remove the
	set_gdbarch_call_dummy_location call.  Update the comment here.
	* i386-dicos-tdep.c (i386_dicos_push_dummy_code): Remove.
	(i386_dicos_init_abi): Remove its installment.
	* i386-tdep.c (i386_push_dummy_code): New function.
	(i386_gdbarch_init): Call set_gdbarch_call_dummy_location, install
	i386_push_dummy_code.
2012-06-18 17:31:34 +00:00
Jan Kratochvil e2e4d78b22 gdb/
Remove stale dummy frames.
	* breakpoint.c: Include dummy-frame.h.
	(longjmp_breakpoint_ops): New variable.
	(update_breakpoints_after_exec, breakpoint_init_inferior): Delete also
	bp_longjmp_call_dummy.
	(bpstat_what, bptype_string, print_one_breakpoint_location)
	(init_bp_location): Support bp_longjmp_call_dummy.
	(set_longjmp_breakpoint): Use longjmp_breakpoint_ops.  Comment why.
	(set_longjmp_breakpoint_for_call_dummy)
	(check_longjmp_breakpoint_for_call_dummy, longjmp_bkpt_dtor): New
	functions.
	(initialize_breakpoint_ops): Initialize longjmp_breakpoint_ops.
	* breakpoint.h (enum bptype): New item bp_longjmp_call_dummy.  Delete
	FIXME comment and extend the other comment for bp_call_dummy.
	(set_longjmp_breakpoint_for_call_dummy)
	(check_longjmp_breakpoint_for_call_dummy): New declarations.
	* dummy-frame.c: Include gdbthread.h.
	(pop_dummy_frame_bpt): New function.
	(pop_dummy_frame): Call pop_dummy_frame_bpt.
	(dummy_frame_discard): New function.
	(cleanup_dummy_frames): Update the comment about longjmps.
	* dummy-frame.h (dummy_frame_discard): New declaration.
	* gdbthread.h (struct thread_info): Extend initiating_frame comment.
	* infcall.c (call_function_by_hand): New variable longjmp_b.  Call
	set_longjmp_breakpoint_for_call_dummy.  Chain its breakpoints with BPT.
	* infrun.c (handle_inferior_event) <BPSTAT_WHAT_CLEAR_LONGJMP_RESUME>:
	Add case 4 comment.  Call check_longjmp_breakpoint_for_call_dummy and
	keep_going if IS_LONGJMP and there is no other reason to stop.

gdb/testsuite/
	Remove stale dummy frames.
	* gdb.base/call-signal-resume.exp (maintenance print dummy-frames)
	(maintenance info breakpoints): New tests.
	* gdb.base/stale-infcall.c: New file.
	* gdb.base/stale-infcall.exp: New file.
2012-06-18 17:28:38 +00:00
Tom Tromey 09d5912c6f 2012-06-18 Greta Yorsh <Greta.Yorsh@arm.com>
* remote-sim.c (sim_command_completer): Initialize
	variable 'result'.
2012-06-18 15:36:09 +00:00
gdbadmin 0962ddd7cc *** empty log message *** 2012-06-18 00:00:32 +00:00
Jan Kratochvil 1788b2d3be gdb/
* dwarf2expr.c (execute_stack_op): Support DW_OP_GNU_parameter_ref.
	* dwarf2loc.c (call_site_parameter_matches): Support
	CALL_SITE_PARAMETER_PARAM_OFFSET.
	(needs_dwarf_reg_entry_value): Push stub value.
	* dwarf2read.c (read_call_site_scope): New variable origin.  Support
	CALL_SITE_PARAMETER_PARAM_OFFSET and its DW_AT_abstract_origin.
	* gdbtypes.h (enum call_site_parameter_kind): New item
	CALL_SITE_PARAMETER_PARAM_OFFSET.
	(struct call_site.parameter.u): New field param_offset.

gdb/testsuite/
	* gdb.arch/amd64-entry-value-param.S: New file.
	* gdb.arch/amd64-entry-value-param.c: New file.
	* gdb.arch/amd64-entry-value-param.exp: New file.
2012-06-17 19:53:52 +00:00
Jan Kratochvil 24c5c679cb gdb/
Code cleanup: Generalize call_site.parameter key.
	* dwarf2expr.c (execute_stack_op) <DW_OP_GNU_entry_value>: Remove
	variable dwarf_reg.  New variable kind_u.  Update parameters to
	push_dwarf_reg_entry_value.
	(ctx_no_push_dwarf_reg_entry_value): Update parameters.
	* dwarf2expr.h (enum call_site_parameter_kind)
	(union call_site_parameter_u): Forward declarations.
	(struct dwarf_expr_context_funcs): Update parameters and their
	description for push_dwarf_reg_entry_value.
	(ctx_no_push_dwarf_reg_entry_value): Update parameters.
	* dwarf2loc.c (call_site_parameter_matches): New function.
	(dwarf_expr_reg_to_entry_parameter): Update parameters and their
	description.  Use call_site_parameter_matches.
	(dwarf_expr_push_dwarf_reg_entry_value, value_of_dwarf_reg_entry):
	Update parameters and their description.
	(value_of_dwarf_block_entry): Remove variables dwarf_reg and fb_offset.
	New variable kind_u.  Adjust the caller for updated parameters.
	(needs_dwarf_reg_entry_value): Update parameters.
	* dwarf2read.c (read_call_site_scope): New variable loc.  Use it
	instead of attr.  Update for the changed fields of struct
	call_site_parameter.
	* gdbtypes.h: Include dwarf2expr.h.
	(enum call_site_parameter_kind): New.
	(struct call_site.parameter): New field kind.  Wrap dwarf_reg and
	fb_offset into new union u.
2012-06-17 19:50:53 +00:00
gdbadmin c5753f6406 *** empty log message *** 2012-06-17 00:00:32 +00:00
H.J. Lu ac142d9655 Add and use amd64_x32_analyze_stack_align
* amd64-tdep.c (amd64_x32_analyze_stack_align): New function.
	(amd64_analyze_prologue): Call amd64_x32_analyze_stack_align
	for x32.
2012-06-16 15:20:22 +00:00
H.J. Lu ba224c70dd Support x32 siginfo
* amd64-linux-nat.c (compat_x32_clock_t): New.
	(compat_x32_siginfo_t): Likewise.
	(compat_x32_siginfo_from_siginfo): Likewise.
	(siginfo_from_compat_x32_siginfo): Likewise.
	(amd64_linux_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
	and siginfo_from_compat_x32_siginfo for x32.
2012-06-16 15:18:18 +00:00
Hui Zhu 7ecbc8255e 2012-06-15 Hui Zhu <hui_zhu@mentor.com>
* tracepoint.c (tfile_xfer_partial): Add a lseek.
2012-06-16 15:07:35 +00:00
H.J. Lu 233dfcf06d Check bits_per_word instead of gdbarch_ptr_bit
* amd64-linux-nat.c (ps_get_thread_area): Check bits_per_word
	instead of gdbarch_ptr_bit.
	* amd64-nat.c (amd64_native_gregset_reg_offset): Likewise.
	(amd64_supply_native_gregset): Likewise.
	(amd64_collect_native_gregset): Likewise.
	* amd64-tdep.c (amd64_supply_fxsave): Likewise.
	(amd64_supply_xsave): Likewise.
	(amd64_collect_fxsave): Likewise.
	(amd64_collect_xsave): Likewise.
2012-06-16 13:28:06 +00:00
H.J. Lu 6da38f42ff Check DS segment register for x32 process
* amd64-linux-nat.c (AMD64_LINUX_X32_DS): New.
	(amd64_linux_read_description): Check DS segment register for
	x32 process.
2012-06-16 13:26:37 +00:00
gdbadmin 8469f797b7 *** empty log message *** 2012-06-16 00:00:33 +00:00
Tom Tromey 663b969e68 * dwarf2read.c (dw2_find_symbol_file): Unconditionally use
init_cutu_and_read_dies.
testsuite
	* gdb.cp/namespace.exp: Add "show lang" test.
2012-06-15 16:19:02 +00:00
Iain Sandoe 8e09ad05ed gdb/testsuite:
* gdb.base/list.exp (test_listsize): Remove $use_gdb_stub special
	case. (top level): Use gdb_file_cmd instead of gdb_load.
2012-06-15 14:43:00 +00:00
Iain Sandoe d6f0502793 * MAINTAINERS (Write After Approval): Add myself to the list. 2012-06-15 14:41:26 +00:00
Tom Tromey 6598ed07eb * valops.c (value_find_oload_method_list): Now static.
* value.h (value_find_oload_method_list): Don't declare.
2012-06-15 14:38:30 +00:00
Tom Tromey 2b214ea697 * valops.c (find_overload_match): Use value_ind. 2012-06-15 14:35:33 +00:00
Eli Zaretskii 984359d2e1 Fix Texinfo usage issues. From Patrice Dumas <pertusus@free.fr>.
* gdb.texinfo (Summary): Add a link to "Free Documentation".
	(Free Documentation): Add @node line.
	(Continuing and Stepping) <advance location>: Use @item instead of
	@itemx.
	(Reverse Execution) <set exec-direction reverse>: Use @item instead of
	@itemx.
	(Embedded Processors): Put the link to "PA" to its correct place,
	according to document structure.
	(Python API): Put the link to "Lazy Strings In Python" to its
	correct place.
	(Index): Use @@ in @tex block to get a literal @.

	* gdbint.texinfo: Fix the @subtitle line.

	* stabs.texinfo (Top): Put the link to "Symbol Types Index" to its
	correct place.
2012-06-15 09:21:37 +00:00
Maciej W. Rozycki a210c23822 * infrun.c (handle_inferior_event): Correct indentation. 2012-06-15 08:50:29 +00:00
gdbadmin 7bf8492a84 *** empty log message *** 2012-06-15 00:00:02 +00:00
Doug Evans 3771a44cf0 * dwarf2loc.c (debug_loc_kind): Add DEBUG_LOC_START_LENGTH.
(DEBUG_LOC_START_END): Renamed from DEBUG_LOC_NORMAL.
	All uses updated.
	(decode_debug_loc_dwo_addresses): New arg "byte_order".  All callers
	updated.  Handle DEBUG_LOC_START_LENGTH.
	(dwarf2_find_location_expression): Handle DEBUG_LOC_START_LENGTH.
	(loclist_describe_location): Ditto.
2012-06-14 22:56:47 +00:00
Maciej W. Rozycki 1c5a993ebd PR backtrace/13866
* infrun.c (handle_inferior_event): Re-fetch frame and gdbarch
	after hiding inline functions.
2012-06-14 21:15:19 +00:00
Joel Brobecker 0b1554650e Fix copy/paste error in _initialize_inf_ttrace's advance declaration.
gdb/ChangeLog:

        * inf-ttrace.c (_initialize_hppa_hpux_nat): Rename into
        _initialize_inf_ttrace.
2012-06-14 18:21:31 +00:00
Joel Brobecker 45717bacbd Rename ia64-hpux-nat.c:_initialize_hppa_hpux_nat...
... into _initialize_ia64_hpux_nat. Looks like a harmless but
unfortunate copy/paste error.

gdb/ChangeLog:

        * ia64-hpux-nat.c (_initialize_ia64_hpux_nat): Renames
        _initialize_hppa_hpux_nat.
2012-06-14 18:19:40 +00:00
Joel Brobecker 3437086597 Fix invalid profile for command-completer in remote-sim.c
The profile of command completers has been change to returna VEC
of char_ptr.  Most completers were updated, except the one in
remote-sim.c.

Unfortunately, to make things a little more difficult, the meat of
the completer is actually implemented in the sim, were VECs are not
available.  This patch thus translates the returned array into a VEC,
and then returns that VEC.

gdb/ChangeLog:

        * remote-sim.c (sim_command_completer): Change type of return
        value to "VEC (char_ptr) *".  Adjust implementation accordingly.
2012-06-14 18:17:37 +00:00
gdbadmin dc408eb31d *** empty log message *** 2012-06-14 00:00:03 +00:00
Jan Kratochvil f85e18ee6c gdb/testsuite/
PR tdep/14222
	* gdb.arch/i386-sse-stack-align.S: New file.
	* gdb.arch/i386-sse-stack-align.c: New file.
	* gdb.arch/i386-sse-stack-align.exp: New file.
2012-06-13 21:31:06 +00:00
Mark Kettenis 284c5a60c3 PR tdep/14222
* i386-tdep.c (i386_push_dummy_call): Unconditionally align the
        stack on a 16-byte boundary.
2012-06-13 21:21:25 +00:00
Tom Tromey 2535757a2b 2012-06-13 Kaushik Srenevasan <kaushik@twitter.com>
* jit.c (finalize_symtab): Set function's return type to 'void' by
	default.
2012-06-13 21:16:49 +00:00
Mark Kettenis 5a83521a3c * amd64-linux-tdep.c (amd64_linux_init_abi_common): New function.
Move bits common to both the classic LP64 and the new x32 ILP32
        ABI here.
        (amd64_linux_init_abi): Call amd64_linux_init_abi_common.
        (amd64_x32_linux_init_abi): New function.
        (_initialize_amd64_linux_tdep): Register osabi for bfd_mach_x64_32
        subtype.
2012-06-13 20:36:48 +00:00
Mark Kettenis fff4548bff H.J. Lu <hongjiu.lu@intel.com>
* i386-tdep.h (i386_pseudo_register_name): New prototype.
* i386-tdep.c (i386_pseudo_register_name): Make public.
* amd64-tdep.h (amd64_x32_init_abi): New prototype.
* amd64-tdep.c (amd64_dword_names): Add "eip".
(amd64_x32_pseudo_register_type): New function
(amd64_x32_init_abi): New function.
2012-06-13 20:29:15 +00:00
Jan Kratochvil dd80ea3c31 gdb/
PR build/14003
	* inferior.h (struct inferior_suspend_state): Comment out.
	(struct inferior): Comment out the field suspend.
	* infrun.c (struct infcall_suspend_state): Comment out the field
	inferior_suspend.
	(save_infcall_suspend_state, restore_infcall_suspend_state): Comment
	out its assignment.
2012-06-13 18:15:05 +00:00
Keith Seitz f3b5e28044 PR breakpoints/13798 and mi/11541
* gdb.linespec/ls-errs.exp: Add a few more tests for
	filenames with spaces and colons.
2012-06-13 18:06:07 +00:00
Jan Kratochvil 50af5481d5 gdb/
PR c++/14177 - Fix parsing TYPENAME:: in parentheses.
	* c-exp.y (classify_inner_name): Remove caller assumptions in the
	function comment.  Return ERROR for unresolved cases.  Implement
	returning proper NAME.
	(yylex): Accept also NAME from classify_inner_name.
	* cp-namespace.c (cp_lookup_nested_type): Rename to ...
	(cp_lookup_nested_symbol): ... here.  Return any found symbol, not just
	LOC_TYPEDEF type.
	* cp-support.h (cp_lookup_nested_type): Update its declaration.

gdb/testsuite/
	PR c++/14177 - Fix parsing TYPENAME:: in parentheses.
	* gdb.cp/cpexprs.cc (class CV, CV::i, ATTRIBUTE_USED, CV_f): New.
	(test_function): Call CV_f.
	* gdb.cp/cpexprs.exp (p 'CV::m(int)', p CV::m(int))
	(p 'CV::m(int) const', p CV::m(int) const, p 'CV::m(int) volatile')
	(p CV::m(int) volatile, p 'CV::m(int) const volatile')
	(p CV::m(int) const volatile, p CV_f(int), p CV_f(CV::t))
	(p CV_f(CV::i)): New tests.
2012-06-13 16:10:10 +00:00
Tom Tromey d55637df69 * breakpoint.c (condition_completer): New function.
(_initialize_breakpoint): Use it.
	* value.c (complete_internalvar): New function.
	* value.h (complete_internalvar): Declare.
testsuite
	* gdb.base/condbreak.exp: Add tests for "condition" completion.
2012-06-13 15:50:22 +00:00
Tom Tromey 49c4e619f8 * ada-lang.c (ada_make_symbol_completion_list): Return a VEC.
* breakpoint.c (catch_syscall_completer): Return a VEC.
	* cli/cli-cmds.c (complete_command): Update.
	* cli/cli-decode.c (complete_on_cmdlist): Return a VEC.
	(complete_on_enum): Likewise.
	* command.h: Include gdb_vecs.h.
	(completer_ftype): Change return type.
	(complete_on_cmdlist, complete_on_enum): Likewise.
	* completer.c (noop_completer, filename_completer)
	(location_completer): Return a VEC.
	(add_struct_fields): Remove 'nextp' argument.  Change 'output'
	to a VEC.
	(expression_completer, complete_line_internal, complete_line)
	(command_completer): Return a VEC.
	(gdb_completion_word_break_characters, line_completion_function):
	Update.
	* completer.h: Include gdb_vecs.h.
	(complete_line, noop_completer, filename_completer)
	(expression_completer, location_completer, command_completer):
	Update.
	* f-lang.c (f_word_break_characters): Return a VEC.
	* interps.c (interpreter_completer): Return a VEC.
	* language.h (struct language_defn)
	<la_make_symbol_completion_list>: Return a VEC.
	* python/py-cmd.c (cmdpy_completer): Return a VEC.
	* symtab.c (free_completion_list): Take a VEC.
	(return_val_size, return_val_index): Remove.
	(return_val): Now a VEC.
	(completion_list_add_name): Update.
	(default_make_symbol_completion_list_break_on)
	(default_make_symbol_completion_list, make_symbol_completion_list)
	(make_symbol_completion_list_fn, make_file_symbol_completion_list):
	Return a VEC.
	(add_filename_to_list): Update.
	(struct add_partial_filename_data) <list_used, list_alloced>: Remove.
	<list>: Now a VEC.
	(maybe_add_partial_symtab_filename): Update.
	(make_source_files_completion_list): Return a VEC.
	* symtab.h (default_make_symbol_completion_list_break_on)
	(default_make_symbol_completion_list, make_symbol_completion_list)
	(make_symbol_completion_list_fn, make_file_symbol_completion_list)
	(make_source_files_completion_list): Update.
2012-06-13 15:47:16 +00:00
Tom Tromey 625e8578d7 * breakpoint.c (add_catch_command): Use completer_ftype.
* breakpoint.h: Include command.h.
	(add_catch_command): Use completer_ftype.
	* cli/cli-decode.c (set_cmd_completer): Use completer_ftype.
	* cli/cli-decode.h (struct cmd_list_element) <completer>:
	Use completer_ftype.
	* command.h (completer_ftype): New typedef.
	(set_cmd_completer): Use it.
	* python/py-cmd.c (struct cmdpy_completer) <completer>: Use
	completer_ftype.
2012-06-13 15:41:24 +00:00
Pedro Alves 5eb3b0622d 2012-06-13 Pedro Alves <palves@redhat.com>
Partial revert of previous change.

	* serial.c (scb_base): New global.
	(serial_for_fd): New.
	(serial_open, serial_fdopen_ops): Link new serial in open serials
	chain.
	(do_serial_close): Unlink serial from the open serials chain.
2012-06-13 11:06:52 +00:00
Yao Qi 2f8f6aed0e gdb/gdbserver:
* server.c (start_inferior): Remove duplicated writes to fields
	'last_resume_kind' and 'last_status' of 'current_inferior'.
2012-06-13 02:35:01 +00:00
gdbadmin 22cdfed9c1 *** empty log message *** 2012-06-13 00:00:33 +00:00
Pedro Alves 8b3ee56d30 2012-06-12 Pedro Alves <palves@redhat.com>
* infrun.c (infrun_thread_stop_requested_callback): Don't switch
	threads here.
	(prepare_for_detach): No longer context switch here in non-stop
	mode.
	(fetch_inferior_event): Ditto.
	(handle_inferior_event) <STOP_QUIETLY || NO_STOP_QUIETLY>: Switch
	to the event thread before removing breakpoints.  Switch to the
	event thread before inserting breakpoints and resuming.
	(handle_inferior_event) <TARGET_WAITKIND_SPURIOUS>: Switch to the
	event thread before resuming.
	(handle_inferior_event) <stepping_past_singlestep_breakpoint>:
	Switch to the event thread before removing breakpoints.
2012-06-12 18:30:26 +00:00
Eli Zaretskii 5d60742e2d Fix quoting of special characters for the MinGW build.
infcmd.c (construct_inferior_arguments) [__MINGW32__]: Quote
 special characters correctly for the Windows shells.  See
 http://sourceware.org/ml/gdb/2012-06/msg00047.html for the bug
 report.
 [!__MINGW32__]: Remove extra double quote character from special
 characters.
2012-06-12 16:36:42 +00:00
Yao Qi 0c9070b30a gdb/gdbserver:
* linux-low.c (linux_set_resume_request): Simplify predicate.  Add
        comment.
        * server.c (handle_v_cont): Extend comment.
2012-06-12 14:02:15 +00:00
Stan Shebs a6feecf744 * ui-out.h: Remove #if 0 declarations.
* ui-out.c: Remove #if 0 functions.
2012-06-12 00:58:56 +00:00
gdbadmin 83b18be2fd *** empty log message *** 2012-06-12 00:00:33 +00:00
Pedro Alves ddefb60ff8 2012-06-11 Pedro Alves <palves@redhat.com>
* ser-base.c (run_async_handler_and_reschedule): New.
	(fd_event, push_event): Use it.
	* serial.c (serial_open, serial_fdopen_ops): Set the initial
	reference count to 1.
	(do_serial_close): Set the bufp field to NULL.  Use serial_unref
	instead of xfree.
	(serial_is_open, serial_ref, serial_unref): New.
	* serial.h (serial_open): Adjust comment.
	(serial_is_open): Declare.
	(serial_close): Adjust comment.
	(serial_ref, serial_unref) Declare.
	(struct serial): New field 'refcnt'.
2012-06-11 20:36:53 +00:00
Pedro Alves d5ad6aa5ce 2012-06-11 Pedro Alves <palves@redhat.com>
Remove #if 0'd "connect" command, and unnecessary associated
	refcounting and serial reuse bits.

	* serial.h (struct serial): Remove fields 'next' and 'refcnt'.
	* serial.c (last_serial_opened): Delete.
	(scb_base): Delete.
	(serial_open): Adjust.
	(serial_for_fd): Delete.
	(serial_fdopen_ops, do_serial_close): Adjust.
	(serial_fdopen_ops): Adjust.
2012-06-11 20:33:56 +00:00
Pedro Alves 318aa544a8 2012-06-11 Pedro Alves <palves@redhat.com>
* serial.c (do_serial_close): Remove early return when SCB is
	null.
2012-06-11 20:32:29 +00:00
Tom Tromey 0726159622 * dwarf2read.c (dw2_get_file_names_reader): Ignore partial units. 2012-06-11 20:19:22 +00:00
Jan Kratochvil cc80f26716 gdb/
Fix regression by the "ambiguous linespec" series.
	* breakpoint.c (parse_breakpoint_sals): New variable cursal.  Use
	get_last_displayed_symtab and get_last_displayed_line and depending
	on CURSAL.

gdb/testsuite/
	Fix regression by the "ambiguous linespec" series.
	* gdb.base/break.exp (list marker1, break lineno, delete $bpnum): New
	tests.
2012-06-11 19:16:24 +00:00
Tom Tromey 356d9f9d9e * dwarf2read.c (dw2_get_primary_filename_reader): New function.
(dw2_find_symbol_file): Use it.
2012-06-11 18:45:01 +00:00
Jan Kratochvil bb2af9ccc5 gdb/testsuite/
* lib/future.exp: Set $use_gdb_compile even if only find_go_linker is
	missing.
2012-06-11 17:44:07 +00:00
Michael Eager 232b87049a *** empty log message *** 2012-06-11 16:08:21 +00:00
Tom Tromey e81a37f7ed * infrun.c (handle_inferior_event)
<BPSTAT_WHAT_SET_LONGJMP_RESUME>: Don't delete the step-resume
	breakpoint.
	<BPSTAT_WHAT_CLEAR_LONGJMP_RESUME>: Remove longjmp logic; use
	exception logic in all cases.  Update comments.
	(insert_longjmp_resume_breakpoint): Set the exception resume
	breakpoint.
testsuite
	* gdb.base/longjmp.c (hidden_longjmp): Move expected catch
	location...
	(main): ...here.
2012-06-11 15:15:06 +00:00
Maciej W. Rozycki 2e81047f91 * mips-tdep.c (mips_push_dummy_code): Handle microMIPS code. 2012-06-11 10:11:14 +00:00
Yao Qi c52daf705d gdb/gdbserver:
* linux-low.c (linux_attach): Add 'static'.
2012-06-11 07:24:15 +00:00
gdbadmin 35bf4b57ae *** empty log message *** 2012-06-11 00:00:02 +00:00
gdbadmin 4edd7033e2 *** empty log message *** 2012-06-10 00:00:02 +00:00
Siva Chandra Reddy 4e32eda7cb 2012-06-09 Siva Chandra Reddy <sivachandra@google.com>
* valarith.c (binop_types_user_defined_p): Fix a typo.
2012-06-09 07:36:43 +00:00
gdbadmin d2e1b1b7a8 *** empty log message *** 2012-06-09 00:00:33 +00:00
Yao Qi 18648a3749 gdb/
* arch-utils.c (default_return_in_first_hidden_param_p): New.
	* arch-utils.h: Declare.
	* gdbarch.sh: Add return_in_first_hidden_param_p.
	* gdbarch.c, gdbarch.h: Regenerated.
	* infcall.c (call_function_by_hand): Call
	gdbarch_return_in_first_hidden_param_p instead of
	language_pass_by_reference.

	* m68k-tdep.c (m68k_return_in_first_hidden_param_p): New.
	(m68k_gdbarch_init): Install m68k_return_in_first_hidden_param_p.
	* sh-tdep.c (sh_return_in_first_hidden_param_p): New.
	(sh_gdbarch_init): Install sh_return_in_first_hidden_param_p.
	* tic6x-tdep.c (tic6x_push_dummy_call): Remove local variable
	`cplus_return_struct_by_reference'.
	(tic6x_return_value): Handle language cplusplus.
	(tic6x_return_in_first_hidden_param_p): New.
	(tic6x_gdbarch_init): Install tic6x_return_in_first_hidden_param_p.
2012-06-08 14:24:57 +00:00
Yao Qi 16bdd41fc6 gdb/doc:
* gdb.texinfo (In-Process Agent): Add 'In-Process Agent
	Protocol'.
	(In-Process Agent Protocol, IPA Protocol Objects)
	(IPA Protocol Commands): New nodes.
	(Tracepoint Packets): Add anchors.
2012-06-08 13:05:55 +00:00
gdbadmin 75ecb895f0 *** empty log message *** 2012-06-08 00:01:03 +00:00
Doug Evans 034e5797f0 * dwarf2read.c (dwarf2_cu): Add comment. 2012-06-07 17:30:12 +00:00
Yao Qi 8efd7788e8 gdb/testsuite/
* gdb.trace/strace.exp: Shorten some too-long lines.
2012-06-07 15:07:03 +00:00
gdbadmin 8f68367581 *** empty log message *** 2012-06-07 00:00:32 +00:00
Maciej W. Rozycki 6a00aa1e22 * mips-tdep.c (mips_pseudo_register_type): Remove tdep local
variable.
	(mips_eabi_push_dummy_call): Likewise.
	(mips_n32n64_push_dummy_call): Likewise.
	(mips_o32_push_dummy_call): Likewise.
	(mips_o64_push_dummy_call): Likewise.
2012-06-06 21:34:12 +00:00
Maciej W. Rozycki eaa05d599e * mips-tdep.c (mips_convert_register_p): Correct coding style. 2012-06-06 21:27:37 +00:00
Maciej W. Rozycki de13fcf2f4 * mips-tdep.c (mips_pseudo_register_type): Use
mips_float_register_p.
2012-06-06 19:34:31 +00:00
Pedro Alves c3a01a2280 2012-06-06 Pedro Alves <palves@redhat.com>
* infrun.c (handle_inferior_event): Remove calls to
	reinit_frame_cache that follow a context_switch call.
2012-06-06 19:27:23 +00:00
Pedro Alves d25f45d93a 2012-06-06 Pedro Alves <palves@redhat.com>
* infrun.c (handle_inferior_event) <deferred_step_ptid>: Use
	context_switch and remove stale comment.
2012-06-06 18:40:06 +00:00
Pedro Alves 359f5fe60e gdb/
2012-06-06  Pedro Alves  <palves@redhat.com>

	* infrun.c (struct execution_control_state): Remove
	`new_thread_event' field.
	(handle_inferior_event): Simplify new threads handling; don't
	resume the inferior if we find a new thread.

gdb/testsuite/
2012-06-06  Pedro Alves  <palves@redhat.com>

	* gdb.threads/clone-new-thread-event.c: New file.
	* gdb.threads/clone-new-thread-event.exp: New file.
2012-06-06 18:10:17 +00:00
Thomas Schwinge 2d4c29c5e6 gdb/
* NEWS: Document the deprecation of SH's 'regs' command.
	* inferior.h (all_registers_info): Add function declaration.
	* sh-tdep.c (sh_show_regs): Remove variable.
	(sh_generic_show_regs, sh3_show_regs, sh2e_show_regs, sh2a_show_regs)
	(sh2a_nofpu_show_regs, sh3e_show_regs, sh3_dsp_show_regs)
	(sh4_show_regs, sh4_nofpu_show_regs, sh_dsp_show_regs)
	(sh_show_regs_command): Remove functions.
	(sh_gdbarch_init): Don't set sh_show_regs.
	(_initialize_sh_tdep): Make the 'regs' command an deprecated alias to
	'info all-registers'.
	* sh64-tdep.c (sh64_show_media_regs, sh64_show_compact_regs)
	(sh64_show_regs): Remove functions.
	* sh64-tdep.h (sh64_show_regs): Remove function declaration.

gdb/doc/
	* gdb.texinfo: Document the deprecation of SH's 'regs' command.
2012-06-06 18:03:54 +00:00
Jan Kratochvil f5f1cdb612 gdb/
* configure.ac: Move development=true below AC_INIT.
	* configure: Regenerate.
2012-06-06 16:57:38 +00:00
Yao Qi 7b2fe205fd gdb/testsuite/
* gdb.base/dprintf.c (main): Add extra parameter when calling
	printf and fprintf.
	(bar): New function.  It is a dead function, but to ensure
	'malloc' is linked explicitly.
2012-06-06 08:51:22 +00:00
Yao Qi 3eca55e89d gdb/testsuite/
* gdb.base/info-proc.exp: Return if target doesn't support
	'info proc'.
2012-06-06 08:47:04 +00:00
Yao Qi d38bbb0a50 gdb/gdbserver/
* ax.c (gdb_eval_agent_expr): Print `top' in hex.
2012-06-06 08:31:31 +00:00
Yao Qi 6bd110c5c1 gdb/doc/
* gdb.texinfo: Update copyright year.
2012-06-06 08:20:12 +00:00
Stan Shebs bf6309af86 * mi/mi-interp.c (mi_interpreter_init): Set raw_stdout from
gdb_stdout.
2012-06-06 06:04:46 +00:00
gdbadmin 479dd5e6fa *** empty log message *** 2012-06-06 00:00:32 +00:00
Jan Kratochvil 45aa465930 gdb/
* corefile.c (read_memory, read_stack, write_memory): Accept LEN
	argument as ssize_t.
	* gdbcore.h (read_memory, read_stack, write_memory): Likewise.
	* remote.c (remote_write_bytes_aux, remote_write_bytes): Likewise.
	* target.c (target_read_stack, target_write_memory)
	(target_write_raw_memory): Likewise.
	* target.h (target_read_stack, target_write_memory)
	(target_write_raw_memory): Likewise.
2012-06-05 21:22:31 +00:00
Jan Kratochvil 1b162304d1 gdb/
* symfile-mem.c: Change gdb_static_assert to ssize_t.
	(target_read_memory_bfd): Cast gdb_assert LEN to ssize_t.
	* target.c (target_read_memory): Change LEN to ssize_t.
	* target.h (target_read_memory): Change LEN to ssize_t.
2012-06-05 21:18:05 +00:00
Pedro Alves 8556afb4f5 2012-06-05 Pedro Alves <palves@redhat.com>
PR backtrace/13866

	* breakpoint.c (until_break_command): Only fetch the selected
	frame after decode_line_1.
2012-06-05 19:50:50 +00:00
Jan Kratochvil 91cc9324e0 gdb/testsuite/
* gdb.base/freebpcmd.exp (set lines): Check valid range of I.
	(run program with breakpoint commands): XFAIl if it is not.
2012-06-05 19:06:20 +00:00
Pedro Alves fb139f3251 2012-06-05 Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
* solib-svr4.c (enable_break): Don't fallback to setting the solib
	event breakpoint at _start, __start or main if a program
	interpreter is not found.
2012-06-05 15:44:03 +00:00
Joel Brobecker a8e1bb344d Windows-specific iterate_over_objfiles_in_search_order
This patch sets the windows target to use their own version of
the iterate_over_objfiles_in_search_order gdbarch method, in
order to make global symbol searches sensitive to the current
objfile.

gdb/ChangeLog:

        * windows-tdep.h (windows_iterate_over_objfiles_in_search_order):
        Add declaration.
        * windows-tdep.c: #include "objfiles.h".
        (windows_iterate_over_objfiles_in_search_order): New function.
        * amd64-windows-tdep.c (amd64_windows_init_abi): Set
        iterate_over_objfiles_in_search_order gdbarch method to
        windows_iterate_over_objfiles_in_search_order.
        * i386-cygwin-tdep.c (i386_cygwin_init_abi): Likewise.
2012-06-05 13:50:57 +00:00
Joel Brobecker 19630284f5 New "iterate_over_objfiles_in_search_order" gdbarch method.
This patch introduces the "iterate_over_objfiles_in_search_order"
gdbarch method, as well as its default implementation, and converts
the areas where it will matter to using this gdbarch method.

The default method implementation is the only one installed, and
the changes should have no functional impact in terms of behavior.
This only paves the way for the architectures that will need their
own version.

gdb/ChangeLog:

        * gdbarch.sh: Add generation of
        "iterate_over_objfiles_in_search_order_cb_ftype" typedef in
        gdbarch.h.  Add include of "objfiles.h" in gdbarch.c.
        (iterate_over_objfiles_in_search_order): New gdbarch method.
        * gdbarch.h, gdbarch.c: Regenerate.
        * objfiles.h (default_iterate_over_objfiles_in_search_order):
        Add declaration.
        * objfiles.c (default_iterate_over_objfiles_in_search_order):
        New function.
        * symtab.c (lookup_symbol_aux_objfile): New function, extracted
        out of lookup_symbol_aux_symtabs.
        (lookup_symbol_aux_symtabs): Replace extracted-out code by
        call to lookup_symbol_aux_objfile.
        (struct global_sym_lookup_data): New type.
        (lookup_symbol_global_iterator_cb): New function.
        (lookup_symbol_global): Search for symbol using
        gdbarch_iterate_over_objfiles_in_search_order and
        lookup_symbol_global_iterator_cb.
        * findvar.c (struct minsym_lookup_data): New type.
        (minsym_lookup_iterator_cb): New function.
        (default_read_var_value) [case LOC_UNRESOLVED]: Resolve the
        symbol's address via gdbarch_iterate_over_objfiles_in_search_order
        and minsym_lookup_iterator_cb.
2012-06-05 13:50:50 +00:00
Joel Brobecker 67ff19f7de Revert "Search global symbols from the expression's block objfile first."
The search order used in this patch breaks global symbol lookups
for certain symbols when copy-relocation is used.  A slightly different
search order will be implemented later.

gdb/ChangeLog:

        Revert the following patch:
        * findvar.c (default_read_var_value): For LOC_UNRESOLVED symbols,
        try locating the symbol in the symbol's own objfile first, before
        extending the search to all objfiles.
        * symtab.c (lookup_symbol_aux_objfile): New function, extracted
        out of lookup_symbol_aux_symtabs.
        (lookup_symbol_aux_symtabs): Add new parameter "exclude_objfile".
        Replace extracted-out code by call to lookup_symbol_aux_objfile.
        Do not search EXCLUDE_OBJFILE.
        (lookup_static_symbol_aux): Update call to lookup_symbol_aux_symtabs.
        (lookup_symbol_global): Search for matches in the block's objfile
        first, before searching all other objfiles.
2012-06-05 13:50:40 +00:00
Joel Brobecker c56e7c4390 Make ctxobj.exp and print-file-var.exp work on all platforms.
This patch adjusts the testing strategy used in a couple of testcases
where we are trying to print the value of a global variable defined
at multiple locations.  The problem is that the actual value depends
on the platform.  So instead of hard-coding the expected value in
the testcase script, we use local variables (in the inferior) holding
the correct value, and we compare the global variable's value with
the local variable's value.

gdb/testsuite/ChangeLog:

        * gdb.base/ctxobj-f.c (GET_VERSION): Introduce local variable
        and add comment.
        * gdb.base/ctxobj-m.c (main): Rewrite, and add comment.
        * gdb.base/ctxobj.exp: Insert breakpoint in ctxobj-f.c using
        "STOP" marker.  Adjust testing strategy to make it work on
        all targets.

        * gdb.base/print-file-var-main.c (main): Rewrite using local
        variables and adjust get_version_2's return value check.
        Add small comment.
        * gdb.base/print-file-var.exp: Insert breakpoint using "STOP"
        marker.  Adjust testing strategy to make it work on all targets.
2012-06-05 13:50:31 +00:00
Joel Brobecker ccab2054e9 stop parsing breakpoint command if invalid keyword found
With an Ada program, trying to break on a specific Ada task, but
with the wrong capitalization of the `task' keyword, we currently
get only pieces of the "garbage" that caused the error:

    (gdb) b *rendez_vous'address TASK 2
    Garbage 2 at end of command

Pushing this a little further:

    (gdb) b *rendez_vous'address TASK Task TaSK 2
    Garbage 2 at end of command

Another interesting failure mode:

    (gdb) b *rendez_vous'address TASK if
    Argument required (expression to compute).

The parser skipped `TASK', then found the `if' keyword, and thus
started looking for a condition.

This patch fixes the problem by aborting the parsing as soon as
an invalid keyword is found.  This makes it consistent with the
case where the REST parameter is passed as NULL (where an error
is raised immediately after seeing the first invalid keyword).

It also introduces a new testcase that reproduces all above scenarios.

gdb/ChangeLog:

        * breakpoint.c (find_condition_and_thread): Stop parsing
        as soon as the first invalid keyword is found.

gdb/testsuite/ChangeLog:

        * gdb.ada/bad-task-bp-keyword: New testcase.
2012-06-05 13:50:13 +00:00
Joel Brobecker e23d4a9c47 copyright.py: Add gdb/CONTRIBUTE to EXCLUDE_LIST.
Normally, all files should have a copyright header, but gdb/CONTRIBUTE
currently doesn't, and it adding one at the top of the file would
probably be more pollution than information.  So don't require
a copyright header for now.

gdb/ChangeLog:

        * copyright.py (EXCLUDE_LIST): Add 'gdb/CONTRIBUTE' to list.
2012-06-05 13:29:29 +00:00
Joel Brobecker 70160166c3 Add copyright header to config/djgpp/djcheck.sh.
gdb/ChangeLog:

        * config/djgpp/djcheck.sh: Add copyright header.
2012-06-05 13:29:22 +00:00
Joel Brobecker 118b858c0a stubs/ia64vms-stub.c: Fix copyright header.
There is an extra coma after the copyright year which tricks
gnulib's update-copyright script.

gdb/stubs/ChangeLog:

        * ia64vms-stub.c: Adjust copyright header to follow convention
        expected by gnulib's update-copyright script.
2012-06-05 13:29:14 +00:00
Joel Brobecker 399501a53f copyright.py: Update path to gnulib import.
The location where we store the gnulib import has changed.
This patch updates accordingly the path to gnulib's update-copyright
script.

gdb/ChangeLog:

        * copyright.py (update_files, main): Fix path to update-copyright
        script.
2012-06-05 13:29:07 +00:00
Joel Brobecker 3770a1599e copyright.py: Tell user to update gdb.texinfo and refcard.tex by hand.
gdb/ChangeLog:

        * copyright.py (MULTIPLE_COPYRIGHT_HEADERS): New constant.
        (main): Add MULTIPLE_COPYRIGHT_HEADERS to the list of files
        for which a reminder to update by hand is printed.
2012-06-05 13:28:59 +00:00
Doug Evans 4aad0dfce5 * buildsym.c (make_blockvector): Add comment. 2012-06-05 01:17:55 +00:00
gdbadmin b741167bcb *** empty log message *** 2012-06-05 00:00:33 +00:00
Pedro Alves 1f8cf22072 2012-06-04 Pedro Alves <palves@redhat.com>
* arch-utils.c (default_gdb_signal_from_target): Delete.
	* arch-utils.h (default_gdb_signal_from_target): Delete.
	* corelow.c (core_open) <signal mapping>: Extended comment.  Check
	gdbarch_gdb_signal_from_target_p.
	* gdbarch.sh (gdb_signal_from_target): Make it an M method (with
	predicate).
	* gdbarch.h: Regenerate.
	* gdbarch.c: Regenerate.
2012-06-04 16:23:57 +00:00
Pedro Alves 86b4988036 2012-06-04 Pedro Alves <palves@redhat.com>
* gdbarch.sh (gdb_signal_from_target): Mention that the
	implementation of the method must be host independent.
	* gdbarch.h: Regenerate.
2012-06-04 16:23:16 +00:00
Jan Kratochvil fe78531dcf bfd/
* bfd-in.h (bfd_elf_bfd_from_remote_memory): Make LEN argument
	of target_read_memory as bfd_size_type.
	* bfd-in2.h: Regenerate.
	* elf-bfd.h (elf_backend_bfd_from_remote_memory): Make LEN
	argument of target_read_memory as bfd_size_type.
	(_bfd_elf32_bfd_from_remote_memory): Likewise.
	(_bfd_elf64_bfd_from_remote_memory): Likewise.
	* elf.c (bfd_elf_bfd_from_remote_memory): Likewise.
	* elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): Likewise.

gdb/
	* symfile-mem.c: 3 new gdb_static_assert for target_read_memory_bfd
	parameters.
	(target_read_memory_bfd): New function.
	(symbol_file_add_from_memory): Use it.
2012-06-04 14:35:25 +00:00
Doug Evans 78e5175a52 * symtab.c (lookup_global_symbol_from_objfile): Only scan blockvector
of primary symtab.
	(basic_lookup_transparent_type): Ditto.
2012-06-04 03:07:03 +00:00
Doug Evans d790cf0a9c * objfiles.h (ALL_OBJFILE_PRIMARY_SYMTABS): New macro.
(ALL_PRIMARY_SYMTABS): Use it.
	(ALL_PSPACE_PRIMARY_SYMTABS): Ditto.
	* dwarf2read.c (dw2_find_symbol_file): Ditto.
	* linespec.c (iterate_over_all_matching_symtabs): Ditto.
	* symtab.c (lookup_symbol_aux_objfile): Ditto.
	(basic_lookup_transparent_type): Ditto.
2012-06-04 02:57:28 +00:00
gdbadmin d2869f81cc *** empty log message *** 2012-06-04 00:00:02 +00:00
Jan Kratochvil 952cf74c00 gdb/testsuite/
* gdb.base/code_elim.exp
	(add-symbol-file ${testfile1} 0x100000)
	(add-symbol-file ${testfile2} 0x200000): Wrap them to 'order1' and
	'order2'.
	(order1: add-symbol-file ${testfile1} 0x100000)
	(order1: add-symbol-file ${testfile2} 0x200000)
	(order2: add-symbol-file ${testfile2} 0x200000)
	(order2: add-symbol-file ${testfile1} 0x100000): Add -s .data and -s
	.bss as appropriate.
2012-06-03 17:10:28 +00:00
Jan Kratochvil d0d8615806 gdb/testsuite/
* gdb.base/code_elim.exp (add-symbol-file ${testfile1} 0x100000):
	Simplify it to ...
	(symbol-file ${testfile1}): ... here.
	(test eliminated var my_global_symbol)
	(test eliminated var my_static_symbol)
	(test eliminated var my_global_func, get address of main): Wrap them to
	'single psymtabs' and 'single symtabs'
	(get address of my_global_symbol, get address of my_static_symbol)
	(get address of my_global_func, get address of main): Wrap them to
	'order1' and 'order2'.
2012-06-03 17:06:04 +00:00
gdbadmin 94bf648691 *** empty log message *** 2012-06-03 00:00:33 +00:00
Sergio Durigan Junior c6e5ee5efa 2012-06-02 Sergio Durigan Junior <sergiodj@redhat.com>
* symtab.c (symbol_demangled_name): New variable `dem_name'.  Use
	it to optimize resolution of demangled name.
2012-06-02 04:34:23 +00:00
gdbadmin 124d95f6ca *** empty log message *** 2012-06-02 00:00:32 +00:00
Jan Kratochvil a68ffae9e6 gdb/
* configure.ac (development): Define new variable.
	Call AC_CHECK_LIB for mcheck if $development.
	(ERROR_ON_WARNING): Enable it by default only if $development.
	* config.in: Regenerate.
	* configure: Regenerate.
2012-06-01 18:20:18 +00:00
Jan Kratochvil 89dc0afdc9 gdb/gdbserver/
Fix gcc -flto compilation warning.
	* server.c (main): Make variable multi_mode and attach volatile.
2012-06-01 16:50:11 +00:00
Jan Kratochvil 5299c1c488 bfd/
* bfd-in.h (bfd_elf_bfd_from_remote_memory): Make LEN argument
	of target_read_memory as size_t.
	* bfd-in2.h: Regenerate.
	* elf-bfd.h (elf_backend_bfd_from_remote_memory): Make LEN
	argument of target_read_memory as size_t.
	(_bfd_elf32_bfd_from_remote_memory): Likewise.
	(_bfd_elf64_bfd_from_remote_memory): Likewise.
	* elf.c (bfd_elf_bfd_from_remote_memory): Likewise.
	* elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): Likewise.

gdb/
	* target.c (target_read_memory): Make LEN argument as size_t.
	* target.h (target_read_memory): Likewise.
2012-06-01 16:37:59 +00:00
Jan Kratochvil 7c71816c64 gdb/
* tilegx-linux-tdep.c (tilegx_l): Use ULL for 64-bit values.
2012-06-01 14:43:30 +00:00
gdbadmin cb66d1c018 *** empty log message *** 2012-06-01 00:00:04 +00:00
Edjunior Barbosa Machado 0c56f59b40 * ppc-linux-nat.c (have_ptrace_booke_interface): Disable ptrace
BookE interface for PowerPC server processors if not available
in the Linux Kernel.
2012-05-31 22:07:31 +00:00
Keith Seitz 71bdabee21 * linespec.c (decode_objc): Add cleanup to free
INFO.FILE_SYMTABS.
	(find_linespec_symbols): Add cleanup to free CLASSES.
	* symfile.c (find_separate_debug_file_by_debuglink): Add
	cleanup to free DEBUGLINK.
	* ui-out.c (clear_header_list): No need to check if
	HEADER_NEXT.COLHDR is NULL.
	Free HEADER_NEXT.COL_NAME.
2012-05-31 18:44:50 +00:00
Matthew Gretton-Dann acbd605ddd * gdb/ada-lang.c (standard_lookup): Prevent uninitialized variable
warning.
2012-05-31 09:34:40 +00:00
gdbadmin f715a0fb03 *** empty log message *** 2012-05-31 00:00:33 +00:00
Thiago Jung Bauermann 75f62ce7b7 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
if the platform doesn't know about it.
2012-05-30 19:51:38 +00:00
Pedro Alves 65f479b6ef 2012-05-30 Jeff Kenton <jkenton@tilera.com>
* Makefile.in (SFILES): Add linux-tile-low.c.
	(linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
	* configure.srv: Handle tilegx-*-linux*.
	* linux-tile-low.c: New file.
2012-05-30 19:43:15 +00:00
Pedro Alves 65662cdeab 2012-05-30 Jeff Kenton <jkenton@tilera.com>
* configure.host (gdb_host_cpu): Handle tilegx*.
	(gdb_host): Handle tilegx-*-linux*.
	* tilegx-linux-nat.c: New file.
	* config/tilegx/linux.mh: New file.
2012-05-30 19:41:34 +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
Edjunior Barbosa Machado bb08bdbd81 * ppc-linux-nat.c (ppc_linux_can_use_hw_breakpoint): fix
accounting of hw watchpoints on ppc.
2012-05-30 13:37:17 +00:00
Thiago Jung Bauermann ebd86fb568 * source.c (openp): Expand tilde in path entries. 2012-05-30 03:42:21 +00:00
gdbadmin b887615911 *** empty log message *** 2012-05-30 00:00:33 +00:00
Doug Evans 98cc87bdf3 * buildsym.c (block_compar): Fix comment.
(end_symtab): Fix and clarify some comments.
2012-05-29 20:23:17 +00:00
Doug Evans 0a0edcd5c2 * stabsread.h (cleanup_undefined_stabs_types): Renamed from
cleanup_undefined_types.
	* stabsread.c (cleanup_undefined_stabs_types): Ditto.
	All callers updated.
2012-05-29 18:54:50 +00:00
Tom Tromey 6f0c7050fc bfd/
* opncls.c (bfd_fopen): Always close fd on failure.
	(bfd_fdopenr): Likewise.
gdb/
	* symfile.c (symfile_bfd_open): Don't close desc if bfd_fopen
	fails.
	* solib.c (solib_bfd_fopen): Don't close fd if bfd_fopen fails.
	* exec.c (exec_file_attach): Don't close scratch_chan if bfd_fopen
	fails.
	* dwarf2read.c (try_open_dwo_file): Don't close fd if bfd_fopen
	fails.
2012-05-29 14:23:40 +00:00
Tristan Gingold ec95993ca4 2012-05-29 Tristan Gingold <gingold@adacore.com>
* solib-darwin.c (dyld_all_image_addr, dyld_all_image): Move into...
	(struct darwin_info): ... New struct.
	(solib_darwin_pspace_data): New variable.
	(darwin_pspace_data_cleanup): New function.
	(get_darwin_info): Likewise.
	(darwin_dyld_version_ok, darwin_load_image_infos)
	(darwin_solib_get_all_image_info_addr_at_init)
	(darwin_solib_read_all_image_info_addr): Add info argument.
	Adjust code.
	(darwin_current_sos): Use per pspace structure.
	(darwin_solib_create_inferior_hook): Likewise.
	(darwin_clear_solib): Likewise.
	(_initialize_darwin_solib): Initialize solib_darwin_pspace_data.
2012-05-29 12:59:53 +00:00
gdbadmin 8bb3cf8bac *** empty log message *** 2012-05-29 00:00:04 +00:00
Pedro Alves ae25568b69 2012-05-28 Pedro Alves <palves@redhat.com>
* infrun.c (wait_for_inferior): Move ecss and ecs locals to the
	block that uses them.  Clear ecss before handling each event.
2012-05-28 20:43:26 +00:00
Jan Kratochvil 0c5bf5a97d gdb/
* solib-svr4.c (svr4_current_sos): New comment on
	svr4_current_sos_via_xfer_libraries fall back.

gdb/gdbserver/
	* linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.

gdb/testsuite/
	* gdb.server/solib-list-lib.c: New file.
	* gdb.server/solib-list-main.c: New file.
	* gdb.server/solib-list.exp: New file.
2012-05-28 20:37:29 +00:00
gdbadmin d55f95fab0 *** empty log message *** 2012-05-28 00:00:32 +00:00
gdbadmin 39dc1b2e6a *** empty log message *** 2012-05-27 00:00:32 +00:00
gdbadmin 6af28bcef9 *** empty log message *** 2012-05-26 00:00:02 +00:00