Commit Graph

614 Commits

Author SHA1 Message Date
Yao Qi 8de0566d7a gdb:
* breakpoint.c (invalidate_bp_value_on_memory_change): Add one
	more parameter 'inferior'.
	* corefile.c (write_memory_with_notification): Caller update.

	* mi/mi-cmd-var.c: Include "mi-main.h".
	(mi_cmd_var_assign): Set mi_suppress_notification.data_write_memory
	to 1 and restore it later.
	* mi/mi-cmds.c (mi_cmd mi_cmds): Update for "data-write-memory"
	and "data-write-memory-bytes.
	* mi/mi-interp.c: Include objfiles.h.
	(mi_interpreter_init): Call observer_attach_memory_changed.
	(mi_memory_changed): New.
	* mi/mi-main.h (struct mi_suppress_notification) <memory>:
	New field.

	* NEWS: Mention new MI notification "memory-changed".

gdb/doc:

	* observer.texi (GDB Observers): Update observer
	'memory_changed'.
	* gdb.texinfo (GDB/MI Async Records): Document for
	"memory-changed" notification.

gdb/testsuite:

	* gdb.mi/mi-memory-changed.exp: New.
2012-10-17 00:53:24 +00:00
Doug Evans 07540c156d New option -nh: inhibit loading of ~/.gdbinit.
* NEWS: Mention -nh.
	* main.c (captured_main): Recognize and process -nh.
	(print_gdb_help): Mention -nh.
	* gdb.1: Mention -nh.  Remove erroneous docs on -nx behavior.

	doc/
	* gdb.texinfo (Mode Options): Document -nh.
	Elaborate on docs for -nx.
2012-10-15 21:45:04 +00:00
Yao Qi 82a90ccf2a gdb/doc:
2012-09-21  Yao Qi  <yao@codesourcery.com>
	    Pedro Alves  <palves@redhat.com>

	* gdb.texinfo (GDB/MI Async Records): Document notification
	'record-started' and 'record-stopped'.
	* observer.texi (GDB Observers): New observer 'record-changed'.
gdb:
2012-09-21  Yao Qi  <yao@codesourcery.com>

	* mi/mi-interp.c: Declare mi_record_changed.
	(mi_interpreter_init): Call observer_attach_record_changed.
	(mi_record_changed): New.
	* record.c (record_open): Call observer_notify_record_changed.
	(cmd_record_stop): Call observer_notify_record_changed.
	* NEWS: Mention it.

gdb/testsuite:
2012-09-21  Yao Qi  <yao@codesourcery.com>

	* gdb.mi/mi-record-changed.exp: New.
	* gdb.mi/mi-reverse.exp: Adjust expected output.
2012-09-21 01:46:46 +00:00
Tom Tromey d7de8e3ce9 * NEWS: Update.
* python/python.c (finalize_python): New function.
	(_initialize_python): Make a final cleanup.
testsuite
	* gdb.python/python.exp: Test atexit.register.
2012-09-20 20:54:11 +00:00
Thomas Schwinge aa9259cc84 gdb/
* NEWS: Document the removal of SH's 'regs' command.
	* sh-tdep.c (_initialize_sh_tdep): Remove the deprecated 'regs'
	command.

gdb/doc/
	* gdb.texinfo: Document the removal of SH's 'regs' command.
2012-09-19 11:07:01 +00:00
Yao Qi bb25a15c8f gdb/doc:
* gdb.texinfo (GDB/MI Async Records): Document new MI
	notifications '=tsv-created' and '=tsv-deleted'.
	* observer.texi (GDB Observers): New observer tsv_created and
	tsv_deleted.

gdb:

	* mi/mi-interp.c: Declare mi_tsv_created and mi_tsv_deleted.
	(mi_interpreter_init): Call observer_attach_tsv_created and
	observer_attach_tsv_deleted.
	(mi_tsv_created, mi_tsv_deleted): New.
	* tracepoint.c (delete_trace_state_variable): Call
	observer_notify_tsv_deleted.
	(trace_variable_command): Call observer_notify_tsv_created.
	(delete_trace_variable_command): Call
	observer_notify_tsv_deleted.
	(create_tsv_from_upload): Call observer_notify_tsv_created.
	* NEWS: Mention it.

gdb/testsuite:

	gdb.trace/mi-tsv-changed.exp: New.
2012-09-18 12:09:28 +00:00
Yao Qi 201b4506b3 gdb/doc:
* observer.texi (GDB Observers): New observer 'traceframe_changed'.
	* gdb.texinfo (GDB/MI Async Records): Mention new MI notification
	'=traceframe-changed'.

gdb:

	* tracepoint.c (tfind_1): Call observer_notify_traceframe_changed
	if traceframe changed.

	* mi/mi-cmds.c (mi_cmd mi_cmds): Adjust for command
	"trace-find".
	* mi/mi-interp.c: Declare 'mi_traceframe_changed'.
	(mi_interpreter_init): Hook mi_traceframe_changed to observer
	'traceframe_changed'.
	(mi_traceframe_changed): New.
	* mi/mi-main.h (struct mi_suppress_notification) <traceframe>:
	New field.

	* NEWS: Mention the new MI notification.

gdb/testsuite:

	* gdb.trace/mi-traceframe-changed.exp: New.
2012-09-18 11:33:43 +00:00
Yit Phang Khoo 8315665ec1 Add a new "python-interactive" command that starts a standard
Python interactive prompt with "pi" as alias, and add "py" as
	an alias to "python".
	* NEWS: Mention the new commands.
	* doc/gdb.texinfo (Python Commands): Document the new
	commands.
	* python/python.c (eval_python_command): New function.
	(python_interactive_command): For "python-interactive" with
	arguments, call eval_python_command.  For "python-interactive"
	without arguments, call PyRun_InteractiveLoop.
	(_initialize_python): Add "python-interactive" command with
	"pi" as alias, and add "py" as an alias to "python".
2012-08-22 19:15:15 +00:00
Doug Evans a72c32530e Add $_memeq, $_regex, $_streq, $_strlen convenience functions.
* NEWS: Document them.
	* data-directory/Makefile.in (PYTHON_FILES): Add function/__init__.py,
	function/strfns.py.
	* python/py-type.c (typy_array_1): New function.
	(typy_array): Call it.
	(typy_vector): New function.
	(type_object_methods): Add "vector".
	* python/lib/gdb/function/__init__.py: New file.
	* python/lib/gdb/function/strfns.py: New file.

	doc/
	* gdb.texinfo (Convenience Funs): New node.
	(Types In Python): Document Type.vector.

	testsuite/
	* gdb.python/py-strfns.c: New file.
	* gdb.python/py-strfns.exp: New file.
	* gdb.python/py-type.exp (test_fields): Add vector tests.
2012-08-10 20:26:00 +00:00
Yao Qi 5b9afe8a35 gdb/
* cli/cli-decode.c (set_cmd_prefix): New.
	(lookup_cmd_for_prefixlist): New.
	(add_prefix_cmd): Call set_cmd_prefix and update field 'prefix'
	of each cmd_list_element in *prefixlist.
	(add_setshow_cmd_full): set_cmd_prefix.
	(add_alias_cmd): Likewise.
	* cli/cli-decode.h (struct cmd_list_element) <prefix>: New field.
	Declare 'auto_boolean_enums'.
	* cli/cli-setshow.c: Include "observer.h".
	(notify_command_param_changed_p): New.
	(add_setshow_auto_boolean_cmd): Move auto_boolean_enums out.
	Remove 'static'.
	(do_setshow_command): Split it to ...
	(do_set_command, do_show_command): ... them.  New.
	(do_set_command): Call observer_notify_command_param_changed if
	notify_command_param_changed_p returns true.
	(cmd_show_list): Caller update.
	* auto-load.c (set_auto_load_cmd): Likewise.
	* remote.c (show_remote_cmd): Likewise.
	* cli/cli-setshow.h: Update declarations.
	* top.c (execute_command): Call do_set_command and do_show_command.

	* NEWS: Mention new MI notification.
	* mi/mi-interp.c: Declare mi_command_param_changed.
	(mi_interpreter_init): Attach mi_command_param_changed to
	observer command_param_changed.
	(mi_command_param_changed): New.
	Remove mi_suppress_breakpoint_notifications.
	Define global variable mi_suppress_notification.
	(mi_breakpoint_created): Update.
	(mi_breakpoint_deleted): Likewise.
	(mi_breakpoint_modified): Likewise.
	* mi/mi-main.c (mi_cmd_execute): Likewise.  Check command
	'gdb-set' and set mi_suppress_notification.
	* mi/mi-main.h: (mi_suppress_notification): New struct.

gdb/doc/

	* observer.texi: New observer command_param_changed.
	* gdb.texinfo (GDB/MI Async Records): Doc for '=cmd-param-changed'.

gdb/testsuite/

	* gdb.mi/mi-cmd-param-changed.exp: New.
	* gdb.mi/mi-cli.exp: Update for MI notification "=cmd-param-changed".
	* gdb.mi/mi-var-rtti.exp, gdb.mi/mi2-cli.exp: Likewise.
	* gdb.mi/mi2-prompt.exp: Likewise.
2012-08-09 12:53:46 +00:00
Jan Kratochvil f3c8a52ace gdb/
2012-08-06  Nathaniel Flath  <flat0103@gmail.com>
	* NEWS: New entry for 'cd' default parameters.
	* cli/cli-cmds.c (cd_command): Replace error_no_arg by DIR assignment.

gdb/doc/
2012-08-06  Nathaniel Flath  <flat0103@gmail.com>
	* gdb.texinfo (Working Directory): Added information about new
	default argument for 'cd' command.
2012-08-06 17:13:27 +00:00
Joel Brobecker 23a806894c [NEWS] Document --enable-libmcheck/--disable-libmcheck
gdb/ChangeLog:

        * NEWS: Document new --enable-libmcheck/--disable-libmcheck
        configure options.
2012-07-26 15:28:21 +00:00
Tom Tromey d6b289409b * NEWS: Mention maint info bfds.
* gdb_bfd.c (all_bfds): New global.
    	(gdb_bfd_ref, gdb_bfd_unref): Update all_bfds.
    	(print_one_bfd, maintenance_info_bfds, _initialize_gdb_bfd):
    	New functions.
gdb/doc
    	* gdb.texinfo (Maintenance Commands): Document maint info bfds.
2012-07-25 15:47:09 +00:00
Doug Evans e615022aba * NEWS: Document new options "set/show use-deprecated-index-sections",
and delete reference to --use-deprecated-index-sections.
	* symfile.h (use_deprecated_index_sections): Delete.
	* dwarf2read.c (use_deprecated_index_sections): Make static.
	(read_index_from_section): Update wording of how to load
	deprecated index sections.
	(_initialize_dwarf2_read): New options
	"set/show use-deprecated-index-sections".
	* main.c (captured_main): Delete --use-deprecated-index-sections.

	doc/
	* gdb.texinfo (Mode Options): Delete --use-deprecated-index-sections.
	(Index Files): Document how to control the use of deprecated index
	sections.
	(Index Section Format): Replace --use-deprecated-index-sections with
	"set use-deprecated-index-sections on".
2012-07-20 17:38:05 +00:00
Joel Brobecker 80c8d3230e Update the NEWS file following the creation of the GDB 7.5 branch.
gdb/ChangeLog:

        * NEWS: Create a new section for the next release branch.
        Rename the section of the current branch, now that it has
        been cut.
2012-07-18 04:02:10 +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
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
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
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
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 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
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
Stan Shebs f3e0e9604d 2012-05-23 Stan Shebs <stan@codesourcery.com>
Kwok Cheung Yeung  <kcy@codesourcery.com>

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

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

	* gdb.mi/mi-info-os.exp: New file.
2012-05-24 00:33:47 +00:00
Maciej W. Rozycki d0e643928f * NEWS: Add MIPS/Linux DSP support.
* mips-linux-tdep.c: Document post-2.6.12 o32 sigcontext layout.
	(SIGCONTEXT_DSPCTL): New macro.
	(SIGCONTEXT_HI1, SIGCONTEXT_LO1): Likewise.
	(SIGCONTEXT_HI2, SIGCONTEXT_LO2): Likewise.
	(SIGCONTEXT_HI3, SIGCONTEXT_LO3): Likewise.
	(N64_SIGCONTEXT_HI1, N64_SIGCONTEXT_HI2): Likewise.
	(N64_SIGCONTEXT_HI3): Likewise.
	(N64_SIGCONTEXT_LO1, N64_SIGCONTEXT_LO2): Likewise.
	(N64_SIGCONTEXT_LO3): Likewise.
	(N64_SIGCONTEXT_DSPCTL): Likewise.
	(N64_SIGCONTEXT_FPCSR): Clarify definition.
	(mips_linux_o32_sigframe_init): Handle DSP registers.
	(mips_linux_n32n64_sigframe_init): Likewise.
2012-05-22 17:12:07 +00:00
Jan Kratochvil 1564a2618d gdb/
* NEWS (--with-auto-load-dir): Prepend $debugdir to the default path.
	Describe it.
	* auto-load.c (auto_load_expand_dir_vars): New function.
	(auto_load_safe_path_vec_update): Use it, remove the
	substitute_path_component call thanks to it.
	(auto_load_objfile_script): Remove the debug_file_directory processing.
	Use auto_load_expand_dir_vars, remove the substitute_path_component
	call thanks to it.
	* configure: Regenerate.
	* configure.ac (--with-auto-load-dir): Prepend $debugdir to the default
	path.  Escape $ also for $debugdir.
	(--with_auto_load_safe_path): Escape $ also for $debugdir.
	* utils.c (substitute_path_component): Accept also DIRNAME_SEPARATOR.

gdb/doc/
	* gdb.texinfo (Separate Debug Files): New anchor debug-file-directory.
	Mention also --with-separate-debug-dir.
	(Auto-loading): Prepend $debugdir in the sample output.
	(Auto-loading safe path): Likewise.  Mention also $debugdir for the
	auto-load safe-path variable.
	(objfile-gdb.py file): Remove the extra debug-file-directory paragraph.
	Mention also $debugdir for 'set auto-load scripts-directory'.
2012-05-20 20:35:19 +00:00
Maciej W. Rozycki 4cc0665f24 gdb/
* NEWS: Add microMIPS support and "set mips compression",
	"show mips compression" commands.
	* mips-tdep.h (mips_isa): New enum.
	(gdbarch_tdep): Add mips_isa.
	(mips_pc_is_mips16): Update prototype.
	(mips_pc_is_mips, mips_pc_is_micromips): New prototypes.
	* mips-tdep.c (mips_compression_mips16): New variable.
	(mips_compression_micromips): Likewise.
	(mips_compression_strings): Likewise.
	(mips_compression_string): Likewise.
	(is_mips16_isa, is_micromips_isa): New functions.
	(is_mips16_addr): Rename to...
	(is_compact_addr): ... this.
	(unmake_mips16_addr): Likewise to...
	(unmake_compact_addr): ... this.
	(make_mips16_addr): Likewise to...
	(make_compact_addr): ... this.
	(is_mips_addr, is_mips16_addr, is_micromips_addr): New
	functions.
	(mips_elf_make_msymbol_special): Handle microMIPS code.
	(msymbol_is_special): Rename to...
	(msymbol_is_mips16): ... this.
	(mips_make_symbol_special, mips_pc_is_mips16): Update
	accordingly.
	(msymbol_is_mips, msymbol_is_micromips): New functions.
	(mips16_to_32_reg): Rename to...
	(mips_reg3_to_reg): ... this.
	(mips_pc_is_mips, mips_pc_is_micromips): New functions.
	(mips_pc_isa): Likewise.
	(mips_read_pc, mips_unwind_pc, mips_write_pc): Handle microMIPS
	code.
	(mips_fetch_instruction): Pass return status instead of printing
	an error message if requested.  Handle microMIPS code.  Bail out
	on an invalid ISA.
	(micromips_op): New macro.
	(b0s4_imm, b0s5_imm, b0s5_reg, b0s7_imm, b0s10_imm): Likewise.
	(b1s9_imm, b2s3_cc, b4s2_regl, b5s5_op, b5s5_reg): Likewise.
	(b6s4_op, b7s3_reg): Likewise.
	(b0s6_op, b0s11_op, b0s12_imm, b0s16_imm, b0s26_imm): Likewise.
	(b6s10_ext, b11s5_reg, b12s4_op): Likewise.
	(mips_insn_size): New function.
	(mips32_next_pc): Update mips_fetch_instruction call.
	(micromips_relative_offset7): New function.
	(micromips_relative_offset10): Likewise.
	(micromips_relative_offset16): Likewise.
	(micromips_pc_insn_size): Likewise.
	(micromips_bc1_pc): Likewise.
	(micromips_next_pc): Likewise.
	(unpack_mips16): Update mips_fetch_instruction call.
	(extended_mips16_next_pc): Update according to change to
	mips16_to_32_reg.
	(mips_next_pc): Update mips_pc_is_mips16 call.  Handle microMIPS
	code.
	(mips16_scan_prologue): Update mips_fetch_instruction call.
	Update according to change to mips16_to_32_reg.
	(mips_insn16_frame_sniffer): Update mips_pc_is_mips16 call.
	(mips_insn16_frame_base_sniffer): Likewise.
	(micromips_decode_imm9): New function.
	(micromips_scan_prologue): Likewise.
	(mips_micro_frame_cache): Likewise.
	(mips_micro_frame_this_id): Likewise.
	(mips_micro_frame_prev_register): Likewise.
	(mips_micro_frame_sniffer): Likewise.
	(mips_micro_frame_unwind): New variable.
	(mips_micro_frame_base_address): New function.
	(mips_micro_frame_base): New variable.
	(mips_micro_frame_base_sniffer): New function.
	(mips32_scan_prologue): Update mips_fetch_instruction call.
	(mips_insn32_frame_sniffer): Check for the standard MIPS ISA
	rather than for MIPS16.
	(mips_insn32_frame_base_sniffer): Likewise.
	(mips_addr_bits_remove): Handle microMIPS code.
	(deal_with_atomic_sequence): Rename to...
	(mips_deal_with_atomic_sequence): ... this.  Update the type
	of the variable used to hold an instruction.  Remove the ISA bit
	check.  Update mips_fetch_instruction call.
	(micromips_deal_with_atomic_sequence): New function.
	(deal_with_atomic_sequence): Likewise.
	(mips_about_to_return): Handle microMIPS code.  Update
	mips_fetch_instruction call.
	(heuristic_proc_start): Check for the standard MIPS ISA rather
	than for MIPS16.  Update mips_pc_is_mips16 and
	mips_fetch_instruction calls.  Handle microMIPS code.
	(mips_push_dummy_code): Handle microMIPS code.
	(mips_eabi_push_dummy_call): Likewise.
	(mips_o32_return_value): Update mips_pc_is_mips16 call.
	(mips_o64_push_dummy_call): Handle microMIPS code.
	(mips_o64_return_value): Update mips_pc_is_mips16 call.
	(is_delayed): Remove function.
	(mips_single_step_through_delay): Replace the call to is_delayed
	with mips32_instruction_has_delay_slot.  Correct MIPS16 handling.
	Handle microMIPS code.
	(mips_skip_prologue): Update mips_pc_is_mips16 call.  Handle
	microMIPS code.
	(mips32_in_function_epilogue_p): Update mips_fetch_instruction
	call.
	(micromips_in_function_epilogue_p): New function.
	(mips16_in_function_epilogue_p): Update mips_fetch_instruction
	call.
	(mips_in_function_epilogue_p): Update mips_pc_is_mips16 call.
	Handle microMIPS.
	(gdb_print_insn_mips): Likewise.
	(mips_breakpoint_from_pc): Likewise.
	(mips_remote_breakpoint_from_pc): New function.
	(mips32_instruction_has_delay_slot): Simplify making use of the
	updated mips_fetch_instruction interface.
	(micromips_instruction_has_delay_slot): New function.
	(mips16_instruction_has_delay_slot): Simplify making use of the
	updated mips_fetch_instruction interface.
	(mips_adjust_breakpoint_address): Check for the standard MIPS
	ISA rather than for MIPS16 ISA.  Update for unmake_compact_addr
	calls.  Handle microMIPS code.
	(mips_get_mips16_fn_stub_pc): Update mips_fetch_instruction call.
	(mips_skip_trampoline_code): Handle microMIPS code.
	(global_mips_compression): New function.
	(mips_gdbarch_init): Handle the compressed ISA setting from ELF
	file flags.  Register the microMIPS remote breakpoint handler
	and heuristic frame unwinder.
	(show_mips_compression): New function.
	(_initialize_mips_tdep): Add the "set mips compression" and
	"show mips compression" commands.

	gdb/doc/
	* gdb.texinfo (MIPS): Document "set mips compression" and "show
	mips compression".
	(MIPS Breakpoint Kinds): New subsubsection.
2012-05-18 23:46:40 +00:00
Jan Kratochvil aff139ffa6 gdb/
Rename $ddir to $datadir.
	* NEWS (--with-auto-load-dir): Rename $ddir to $datadir.
	* auto-load.c (auto_load_safe_path_vec_update)
	(auto_load_gdb_datadir_changed, auto_load_objfile_script): Likewise.
	* configure: Regenerate.
	* configure.ac (--with-auto-load-dir, --with-auto-load-safe-path):
	Likewise.  Remove the 'use $ddir' help string.

gdb/doc/
	Rename $ddir to $datadir.
	* gdb.texinfo (Auto-loading, Auto-loading safe path)
	(objfile-gdb.py file): Rename $ddir to $datadir.
2012-05-18 17:47:31 +00:00
Tom Tromey 9cb709b6ba PR exp/13907:
* valprint.h (struct value_print_options) <symbol_print>: New
	field.
	* valprint.c (user_print_options): Add default for symbol_print.
	(show_symbol_print): New function.
	(generic_val_print): Respect symbol_print.
	(_initialize_valprint): Add "print symbol" setting.
	* f-valprint.c (f_val_print): Respect symbol_print.
	* c-valprint.c (c_val_print): Respect symbol_print.
	* NEWS: Update.
	* printcmd.c (print_address_symbolic): Return int.  Ignore some
	zero-size symbols.
	(print_address_demangle): Return int.
	* defs.h: (print_address_symbolic): Return int.
	* value.h (print_address_demangle): Return int.
doc
	* gdb.texinfo (Print Settings): Document 'set print symbol'.
testsuite
	* gdb.mi/mi-var-cmd.exp: Update.
	* gdb.objc/basicclass.exp (do_objc_tests): Update.
	* gdb.cp/virtbase.exp: Update.
	* gdb.cp/classes.exp (test_static_members): Update.
	* gdb.cp/casts.exp: Update.
	* gdb.base/pointers.exp: Update.
	* gdb.base/funcargs.exp (pointer_args): Update.
	(structs_by_reference): Update.
	* gdb.base/find.exp: Update.
	* gdb.base/call-strs.exp: Send "set print symbol off".
	* gdb.base/call-ar-st.exp: Update.
	* gdb.ada/fun_addr.exp: Update.
	* gdb.base/printcmds.exp (test_print_symbol): New proc.
	Call it.
	(test_print_repeats_10, test_print_strings)
	(test_print_char_arrays): Update.
2012-05-18 15:31:42 +00:00
Jan Kratochvil 9cc815f56d gdb/
* NEWS (show auto-load scripts-directory): Add forgotten command.
2012-05-15 04:12:17 +00:00
Stan Shebs e7e0cddfb0 2012-05-14 Stan Shebs <stan@codesourcery.com>
Add dynamic printf.
	* breakpoint.h (enum bptype): New type bp_dprintf.
	(struct breakpoint): New field extra_string.
	(struct breakpoint_ops): Add arg to create_breakpoints_sal.
	(create_breakpoint): Add extra_string arg.
	* breakpoint.c (dprintf_breakpoint_ops): New.
	(is_breakpoint): Add bp_dprintf.
	(bpstat_what): Add dprintf case.
	(bptype_string): Ditto.
	(print_one_breakpoint_location): Ditto.
	(init_bp_location): Ditto.
	(bkpt_print_mention): Ditto.
	(dprintf_style_enums): New array.
	(dprintf_style): New global.
	(dprintf_function): New global.
	(dprintf_channel): New global.
	(update_dprintf_command_list): New function.
	(update_dprintf_commands): New function.
	(init_breakpoint_sal): Add extra_string argument, handle it.
	(create_breakpoint_sal): Add extra_string argument.
	(create_breakpoints_sal): Add extra_string argument, update callers.
	(find_condition_and_thread): Add extra argument.
	(create_breakpoint): Add extra_string argument, record it.
	(dprintf_command): New function.
	(break_command_1): Add arg to create_breakpoint call.
	(handle_gnu_v3_exceptions): Ditto.
	(trace_command): Ditto.
	(ftrace_command): Ditto.
	(strace_command): Ditto.
	(bkpt_print_mention): Add dprintf case.
	(create_breakpoint_sal_default): Add extra_string argument.
	(_initialize_breakpoint): Add new commands.
	* mi/mi-cmd-break.c (mi_cmd_break_insert): Add arg to call.
	* python/py-breakpoint.c (bppy_init): Ditto.
	* python/py-finishbreakpoint.c (bpfinishpy_init): Ditto.

	* gdb.texinfo (Dynamic Printf): New subsection.

	* gdb.base/dprintf.c: New file.
	* gdb.base/dprintf.exp: New file.
2012-05-14 15:38:41 +00:00
Siva Chandra Reddy 7efc75aaf9 2012-05-13 Siva Chandra Reddy <sivachandra@google.com>
Add a new function gdb.find_pc_line to the Python API.
	* NEWS (Python Scripting): Add entry about the new function.
	* python/python.c (gdbpy_find_pc_line): New function which
	implements gdb.find_pc_line.
	(GdbMethods): Add entry for the new function.

	doc/
	* gdb.texinfo (Basic Python): Add description about the function
	gdb.find_pc_line

	testsuite/
	* gdb.python/python.c: Add a new breakpoint comment.
	* gdb.python/python.exp: Add tests to test gdb.find_pc_line.
2012-05-13 11:33:44 +00:00
Stan Shebs 85d4a67695 2012-05-11 Stan Shebs <stan@codesourcery.com>
Kwok Cheung Yeung  <kcy@codesourcery.com>

	* NEWS: Describe new info os commands.
	* common/linux-osdata.c (PID_T, TIME_T): Define.
	(MAX_PID_T_STRLEN): New.
	(linux_common_core_of_thread): Add comment.  Change to use PID_T and
	MAX_PID_T_STRLEN.
	(command_from_pid): Add comment.  Change to use PID_T.
	(commandline_from_pid):  Change to use PID_T.
	(user_from_pid): Add comment.
	(get_process_owner): Add comment. Change to use PID_T and
	MAX_PID_T_STRLEN.
	(get_number_of_cpu_cores): Add comment.
	(get_cores_used_by_process): Add comment.  Change to use PID_T and
	MAX_PID_T_STRLEN.
	(linux_xfer_osdata_processes): Change to use PID_T and
	MAX_PID_T_STRLEN.
	(compare_processes): New function.
	(linux_xfer_osdata_processgroups): New function.
	(linux_xfer_osdata_threads): Change to use PID_T.
	(linux_xfer_osdata_fds): New function.
	(format_socket_state, print_sockets): New functions.
	(union socket_addr): New union.
	(linux_xfer_osdata_isockets): New function.
	(time_from_time_t, group_from_gid): New functions.
	(linux_xfer_osdata_shm): New function.
	(linux_xfer_osdata_sem): New function.
	(linux_xfer_osdata_msg): New function.
	(linux_xfer_osdata_modules): New function.
	(osdata_table): Add new entries.
	* common/buffer.c (buffer_xml_printf): Add support for long and
	long long format specifiers.

	* gdb.texinfo (Operating System Auxiliary Information): Document new
	'info os' subcommands.

	* gdb.base/info-os.exp: New file.
	* gdb.base/info-os.c: New file.
2012-05-11 22:24:24 +00:00
Jan Kratochvil 7349ff92c2 gdb/
Implement multi-component --with-auto-load-dir.
	* NEWS (set auto-load scripts-directory, --with-auto-load-dir): New
	entries.
	(--with-auto-load-safe-path): Update the default value description.
	* auto-load.c (auto_load_dir, set_auto_load_dir, show_auto_load_dir):
	New.
	(auto_load_objfile_script): Add DEBUG_AUTO_LOAD output.  Remove
	GDB_DATADIR NULL check.  Replace GDB_DATADIR/auto-load by
	AUTO_LOAD_DIR.  Support $ddir and multiple components in it.
	(_initialize_auto_load): Initialize also auto_load_dir.  Install new
	"set auto-load scripts-directory".
	* config.in: Regenerate.
	* configure: Regenerate.
	* configure.ac (--with-auto-load-dir): New configure option.
	(--auto-load-safe-path): Change the default to --with-auto-load-dir.

gdb/doc/
	Implement multi-component --with-auto-load-dir.
	* gdb.texinfo (Auto-loading): New references
	for 'set auto-load scripts-directory'
	and 'show auto-load scripts-directory'.
	(Auto-loading safe path): Describe the new default.  Move $ddir
	substituation reference to 'objfile-gdb.py file'.
	(objfile-gdb.py file): Describe script-name alias.  Change real-name to
	script-name.  Describe new 'set auto-load scripts-directory'
	and 'show auto-load scripts-directory'.
2012-05-11 18:20:26 +00:00
Jan Kratochvil 6dea1fbd79 gdb/
Provide $ddir substitution for --with-auto-load-safe-path.
	* NEWS (--with-auto-load-safe-path, --without-auto-load-safe-path): New
	entries.
	* auto-load.c: Include observer.h.
	(auto_load_safe_path_vec_update): Call substitute_path_component for
	each component.  New variable ddir_subst.
	(auto_load_gdb_datadir_changed): New function.
	(set_auto_load_safe_path): Rename DEFAULT_AUTO_LOAD_SAFE_PATH to
	AUTO_LOAD_SAFE_PATH.  New comment.
	(_initialize_auto_load): Rename DEFAULT_AUTO_LOAD_SAFE_PATH to
	AUTO_LOAD_SAFE_PATH.  Install auto_load_gdb_datadir_changed.
	* config.in: Regenerate.
	* configure: Regenerate.
	* configure.ac (--auto-load-safe-path): Rename
	DEFAULT_AUTO_LOAD_SAFE_PATH to AUTO_LOAD_SAFE_PATH.  Default to
	GDB_DATADIR/auto-load.
	* defs.h (substitute_path_component): New declaration.
	* top.c: Include observer.h.
	(set_gdb_datadir): New function.
	(init_main): Install it for "set data-directory".
	* utils.c (substitute_path_component): New function.

gdb/doc/
	Provide $ddir substitution for --with-auto-load-safe-path.
	* gdb.texinfo (Auto-loading): Replace /usr/local by $ddir/auto-load.
	(Auto-loading safe path): Likewise.  Mention the default value,
	$ddir substitution, --with-auto-load-safe-path and
	--without-auto-load-safe-path.
	* observer.texi (gdb_datadir_changed): New.
2012-05-11 18:13:26 +00:00
Siva Chandra Reddy a20ee7a4a9 2012-05-03 Siva Chandra Reddy <sivachandra@google.com>
Add two new methods global_block and static_block to gdb.Symtab
	objects.
	* NEWS (Python scripting): Add entry about the new methods.
	* python/py-symtab.c (stpy_global_block): New function which
	implements the gdb.Symtab.global_block() method.
	(stpy_static_block): New function which implements the
	gdb.Symtab.static_block() method.
	(symtab_object_methods): Add entries for the two new methods.

	* testsuite/gdb.python/py-symbol.exp: Add tests to test the new
	methods gdb.Symtab.global_block() and gdb.Symtab.static_block().
	* tessuite/gdb.python/py-symbol.c: Add new struct to help test
	gdb.Symtab.static_block().

	* doc/gdb.texinfo (Symbol Tables In Python): Add documentation
	about the new methods global_block and static_block on
	gdb.Symtab objects.
2012-05-03 07:07:26 +00:00
Sergio Durigan Junior 55aa24fb2e 2012-04-27 Sergio Durigan Junior <sergiodj@redhat.com>
Tom Tromey  <tromey@redhat.com>
	    Jan Kratochvil  <jan.kratochvil@redhat.com>

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

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

	doc/
	* gdb.texinfo (Supported Languages): Add Go.
	(Go): New node.
2012-04-25 14:07:23 +00:00
Yao Qi 20388dd6b6 gdb:
Revert this patch to allow breakpoint always-inserted
	in record target.
	2011-12-05  Pedro Alves  <pedro@codesourcery.com>
        * breakpoint.c: Include record.h.
        (breakpoints_always_inserted_mode): Return false when the record
        target is in use.

	* breakpoint.c (iterate_over_bp_locations): New.
	* breakpoint.h: Declare.
	New typedef walk_bp_location_callback.
	* record.c (record_open): Call record_init_record_breakpoints.
	(record_sync_record_breakpoints): New.
	(record_init_record_breakpoints): New.
	* NEWS: Mention supporting breakpoint always-inserted mode in
	record target.
2012-04-24 14:33:12 +00:00
Jan Kratochvil 4dc84fd109 gdb/
New option "set debug auto-load".
	* NEWS: New commands "set debug auto-load" and "show debug auto-load".
	* auto-load.c (debug_auto_load, show_debug_auto_load: New.
	(auto_load_safe_path_vec_update)
	(filename_is_in_auto_load_safe_path_vec): Call fprintf_unfiltered
	if DEBUG_AUTO_LOAD.
	(file_is_auto_load_safe): New parameters debug_fmt and ....
	Call fprintf_unfiltered if DEBUG_AUTO_LOAD.
	(source_gdb_script_for_objfile): Extend the file_is_auto_load_safe
	caller by explanatory string.
	(_initialize_auto_load): Register "set debug auto-load".
	* auto-load.h (file_is_auto_load_safe): New parameters debug_fmt
	and ....
	* linux-thread-db.c (try_thread_db_load_from_pdir_1)
	(try_thread_db_load_from_dir): Extend the file_is_auto_load_safe caller
	by explanatory string.
	* main.c (captured_main): Likewise.
	* python/py-auto-load.c (gdbpy_load_auto_script_for_objfile)
	(source_section_scripts): Likewise.

gdb/doc/
	New option "set debug auto-load".
	* gdb.texinfo (Auto-loading): New menu item for auto-load verbose mode.
	(auto-load verbose mode): New node.
2012-04-17 15:56:21 +00:00
Jan Kratochvil bccbefd2aa gdb/
New option "set auto-load safe-path".
	* NEWS: New commands "set auto-load safe-path"
	and "show auto-load safe-path".
	* auto-load.c: Include gdb_vecs.h, readline/tilde.h and completer.h.
	(auto_load_safe_path, auto_load_safe_path_vec)
	(auto_load_safe_path_vec_update, set_auto_load_safe_path)
	(show_auto_load_safe_path, add_auto_load_safe_path, filename_is_in_dir)
	(filename_is_in_auto_load_safe_path_vec, file_is_auto_load_safe): New.
	(source_gdb_script_for_objfile): New variable is_safe.  Call
	file_is_auto_load_safe.  Return if it is not.
	(struct loaded_script): New field loaded.
	(maybe_add_script): Add parameter loaded.  Initialize SLOT with it.
	(print_script): Use LOADED indicator instead of FULL_PATH.  Change
	output "Missing" to "No".
	(_initialize_auto_load): New variable cmd.  Initialize
	auto_load_safe_path.  Register "set auto-load safe-path",
	"show auto-load safe-path" and "add-auto-load-safe-path".
	* auto-load.h (maybe_add_script): Add parameter loaded.
	(file_is_auto_load_safe): New declaration.
	* config.in: Regenerate.
	* configure: Regenerate.
	* configure.ac: New parameters --with-auto-load-safe-path
	and --without-auto-load-safe-path.
	* linux-thread-db.c (try_thread_db_load_from_pdir_1)
	(try_thread_db_load_from_dir): Check file_is_auto_load_safe first.
	* main.c (captured_main): Check file_is_auto_load_safe for
	LOCAL_GDBINIT.
	* python/py-auto-load.c (gdbpy_load_auto_script_for_objfile): New
	variable is_safe.  Call file_is_auto_load_safe.  Return if it is not.
	(source_section_scripts): Call file_is_auto_load_safe.  Return if it is
	not.

gdb/doc/
	New option "set auto-load safe-path".
	* gdb.texinfo (Auto-loading): Extend the "show auto-load"
	and "info auto-load" examples for safe-path.  Put there also references
	for "set auto-load safe-path" and "show auto-load safe-path".
	New menu item for Auto-loading safe path.
	(Auto-loading safe path): New node.
	(Python Auto-loading): Update the expected output from "Missing"
	to "No".

gdb/testsuite/
	New option "set auto-load safe-path".
	* gdb.python/py-objfile-script.exp (set auto-load safe-path): New.
	* gdb.python/py-section-script.exp (set auto-load safe-path): New.
2012-04-17 15:54:35 +00:00
Jan Kratochvil bf88dd6849 gdb/
auto-load: Implementation.
	* NEWS: New descriptions for "info auto-load",
	"info auto-load gdb-scripts", "info auto-load python-scripts",
	"info auto-load local-gdbinit" and "info auto-load libthread-db".
	Deprecate "info auto-load-scripts", "set auto-load-scripts on|off"
	and "show auto-load-scripts".  New description for "set auto-load",
	"show auto-load", "set auto-load gdb-scripts",
	"show auto-load gdb-scripts", "set auto-load python-scripts",
	"show auto-load python-scripts", "set auto-load local-gdbinit",
	"show auto-load local-gdbinit", "set auto-load libthread-db" and
	"show auto-load libthread-db".
	* auto-load.c: Remove include python/python-internal.h.  Add includes
	exceptions.h, cli/cli-script.h, gdbcmd.h, cli/cli-decode.h and
	cli/cli-setshow.h.
	(GDB_AUTO_FILE_NAME, source_gdb_script_for_objfile)
	(auto_load_gdb_scripts, show_auto_load_gdb_scripts): New.
	(gdbpy_global_auto_load): Rename to ...
	(global_auto_load): ... here.
	(auto_load_local_gdbinit, auto_load_local_gdbinit_pathname)
	(auto_load_local_gdbinit_loaded, show_auto_load_local_gdbinit)
	(script_language_gdb, source_gdb_script_for_objfile): New.
	(struct loaded_script): New field language.
	(hash_loaded_script_entry, eq_loaded_script_entry): Calculate also
	LANGUAGE.
	(maybe_add_script): Add parameter language.  Drop redundant
	entry.full_path initialization.  Initialize entry.language and
	(*slot)->language.
	(auto_load_objfile_script): Change parameter suffix to language.
	Remove the call of maybe_add_script.
	Call language->source_script_for_objfile.
	(load_auto_scripts_for_objfile, struct collect_matching_scripts_data):
	New.
	(collect_matching_scripts): Adjust it for
	struct collect_matching_scripts_data.
	(auto_load_info_scripts_pattern_nl): New variable.
	(info_auto_load_scripts): Rename to ...
	(auto_load_info_scripts): ... here, add parameter language.  Adjust it
	for struct collect_matching_scripts_data.
	(info_auto_load_gdb_scripts, info_auto_load_local_gdbinit)
	(set_auto_load_cmd, auto_load_set_cmdlist_get, show_auto_load_cmd)
	(auto_load_show_cmdlist_get, info_auto_load_cmd)
	(auto_load_info_cmdlist_get): New.
	(_initialize_auto_load): Move add_info of "auto-load-scripts" to
	python/py-auto-load.c.  New installment for "set auto-load gdb-scripts",
	"info auto-load gdb-scripts", "set auto-load local-gdbinit" and
	"info auto-load local-gdbinit".
	* auto-load.h (struct script_language): New.
	(gdbpy_global_auto_load): Rename to ...
	(global_auto_load): ... here.
	(auto_load_local_gdbinit, auto_load_local_gdbinit_pathname)
	(auto_load_local_gdbinit_loaded): New declarations.
	(maybe_add_script): New parameter language.
	(auto_load_objfile_script): Change parameter suffix to language.
	(load_auto_scripts_for_objfile, auto_load_info_scripts_pattern_nl)
	(auto_load_info_scripts, auto_load_set_cmdlist_get)
	(auto_load_show_cmdlist_get, auto_load_info_cmdlist_get): New
	declarations.
	* linux-thread-db.c: Include auto-load.h and ctype.h.
	(auto_load_thread_db, show_auto_load_thread_db): New.
	(struct thread_db_info): New field filename.
	(delete_thread_db_info): Call xfree for FILENAME.
	(try_thread_db_load): Initialize FILENAME.
	(try_thread_db_load_from_pdir, try_thread_db_load_from_dir): Return
	if !AUTO_LOAD_THREAD_DB.
	(info_auto_load_libthread_db_compare, info_auto_load_libthread_db): New.
	(_initialize_thread_db): Install auto_load_thread_db
	as "set auto-load libthread-db" and install info_auto_load_libthread_db
	as "info auto-load libthread-db".
	* main.c (captured_main): Rename gdbpy_global_auto_load to
	global_auto_load.  Initialize AUTO_LOAD_LOCAL_GDBINIT_PATHNAME and
	AUTO_LOAD_LOCAL_GDBINIT_LOADED.
	(print_gdb_help): Extend the help for 'local init file'.
	* python/py-auto-load.c: Remove a comment about gdb scripts extension.
	(GDBPY_AUTO_SECTION_NAME): Extend the comment it is Python specific.
	(auto_load_scripts): Rename to ...
	(auto_load_python_scripts): ... here, update the comment.
	(gdbpy_load_auto_script_for_objfile): New declaration.
	(show_auto_load_python_scripts, script_language_python)
	(gdbpy_load_auto_script_for_objfile): New.
	(source_section_scripts): Refactor the code.
	(load_auto_scripts_for_objfile): Rename to ...
	(gdbpy_load_auto_scripts_for_objfile): ... here, update the
	auto_load_objfile_script caller, drop GDBPY_GLOBAL_AUTO_LOAD checking.
	(info_auto_load_python_scripts): New.
	(gdbpy_initialize_auto_load): New variables cmd and cmd_name.
	Rename "set auto-load-scripts" to "set auto-load python-scripts".
	Register "set auto-load-scripts" as its deprecated alias.  Register
	"info auto-load python-scripts".  Register "info auto-load-scripts" as
	its deprecated alias.
	(load_auto_scripts_for_objfile): Rename to ...
	(gdbpy_load_auto_scripts_for_objfile): ... here.
	* python/python.h (load_auto_scripts_for_objfile): Rename to ...
	(gdbpy_load_auto_scripts_for_objfile): ... here.

gdb/doc/
	auto-load: Implementation.
	* gdb.texinfo (Mode Options): New anchor for -nx.
	(Startup): New anchors for Option -init-eval-command,
	Home Directory Init File
	and Init File in the Current Directory during Startup.
	Mention set auto-load local-gdbinit with a reference.
	Change the sample code to "set auto-load python-scripts".
	(Threads): New anchor set libthread-db-search-path.
	Provide references to libthread_db.so.1 file.
	(Controlling GDB): New menu item for Auto-loading.
	(Auto-loading, Init File in the Current Directory)
	(libthread_db.so.1 file, objfile-gdb.gdb file): New nodes.
	(Python): Rename the menu item Auto-loading to Python Auto-loading.
	(Writing a Pretty-Printer, Objfiles In Python): Update the renamed
	reference.
	(Auto-loading): Rename to ...
	(Python Auto-loading): ... here.  Change "set auto-load-scripts" to
	"set auto-load python-scripts", new anchor for it.  Change
	"show auto-load-scripts" to "show auto-load python-scripts", new anchor
	for it.  Change "info auto-load-scripts"
	to "info auto-load python-scripts", new anchor for it.  Change "scripts"
	to "Python scripts".

gdb/testsuite/
	auto-load: Implementation.
	* gdb.base/help.exp (test set height): Increase the height.
	* gdb.python/py-objfile-script.exp (info auto-load-scripts): Change
	to ...
	(info auto-load python-scripts): ... here.
	* gdb.python/py-section-script.exp (info auto-load-scripts *): Change
	to ...
	(info auto-load python-scripts *): ... here.
2012-04-17 15:51:48 +00:00
Siva Chandra Reddy 06fc020f10 2012-04-02 Siva Chandra Reddy <sivachandra@google.com>
New command 'explore' which helps explore values and types in
	scope.
	* NEWS: Add an entry about the new 'explore' command.
	* data-directory/Makefile.in: Add gdb/command/explore.py
	* python/lib/gdb/command/explore.py: Implemention of the 'explore'
	command using the GDB Python API.

	* doc/gdb.texinfo (Examining Data): Document the 'explore'
	command.

	* testsuite/gdb.python/Makefile.in: Add py-explore to EXECUTABLES.
	* testsuite/gdb.python/py-explore.c: C program used for testing
	the new 'explore' command on C constructs.
	* testsuite/gdb.python/py-explore.cc: C++ program used for testing
	the new 'explore' command on C++ constructs.
	* testsuite/gdb-python/py-explore.exp: Tests for the new 'explore'
	command on C constructs.
	* testsuite/gdb-python/py-explore-cc.exp: Tests for the new
	'explore' command on C++ constructs.
2012-04-11 05:50:44 +00:00
Jan Kratochvil cf65ecd3b9 gdb/
* NEWS (set breakpoint condition-evaluation): Use imperative mood.
2012-04-02 07:32:31 +00:00
Joel Brobecker 927fbba674 [NEWS] Announce support for Ada varobj support.
gdb/ChangeLog:

        * NEWS: Add entry for Ada varobj support.
2012-03-28 21:31:56 +00:00
Pawandeep Oza 72508ac0bf * arm-linux-tdep.c (arm_linux_init_abi): Call
set_gdbarch_process_record.
       Initialize `arm_swi_record' field.

       * arm-tdep.c (arm_process_record): New function.
       (deallocate_reg_mem): New function.
       (decode_insn): New function.
       (thumb_record_branch): New function.
       (thumb_record_ldm_stm_swi(): New function.
       (thumb_record_misc): New function.
       (thumb_record_ld_st_stack): New function.
       (thumb_record_ld_st_imm_offset): New function.
       (thumb_record_ld_st_reg_offset(): New function.
       (thumb_record_add_sub_cmp_mov): New function.
       (thumb_record_shift_add_sub): New function.
       (arm_record_coproc_data_proc): New function.
       (arm_record_coproc): New function.
       (arm_record_b_bl): New function.
       (arm_record_ld_st_multiple): New function.
       (arm_record_ld_st_reg_offset): New function.
       (arm_record_ld_st_imm_offset): New function.
       (arm_record_data_proc_imm): New function.
       (arm_record_data_proc_misc_ld_str): New function.
       (arm_record_extension_space): New function.
       (arm_record_strx): New function.
       (sbo_sbz): New function.
       (struct insn_decode_record): New structure for arm insn record.
       (REG_ALLOC): New macro for reg allocations.
       (MEM_ALLOC): New macro for memory allocations.

       * arm-tdep.h (struct gdbarch_tdep): New field 'arm_swi_record'
2012-03-27 15:46:33 +00:00
Jan Kratochvil 5b43fab2ea gdb/
* NEWS (set breakpoint condition-evaluation): Change "gdb" to "host".
	Describe also the option "auto".
2012-03-25 13:44:01 +00:00
Siva Chandra Reddy 7b282c5acc 2012-03-14 Siva Chandra <sivachandra@google.com>
Python scripting: Add new method Value.referenced_value to
        gdb.Value which can dereference pointer as well as reference
        values.
        * NEWS: Add entry under 'Python scripting' about the new method
        Value.referenced_value on gdb.Value objects.
        * python/py-value.c (valpy_referenced_value): New function
        defining a new method on gdb.Value objects which can dereference
        pointer and reference values.
        * testsuite/gdb.python/py-value.cc: Add test case for
        testing the methodology exposing C++ values to Python.
        * testsuite/gdb.python/py-value-cc.exp: Add tests testing the
        methodology exposing C++ values to Python.
        * testsuite/gdb.python/Makefile.in: Add py-value-cc to
        EXECUTABLES.
        * docs/gdb.texinfo (Python API/Values From Inferior): Add
        description about the new method Value.referenced_value.  Add
        description on how Value.dereference is different (and similar)
        to Value.referenced_value.
2012-03-22 08:10:44 +00:00
Jan Kratochvil 8320cc4fa3 gdb/
* NEWS: Describe new options --init-command=FILE, -ix and
	--init-eval-command=COMMAND, -iex.
	* main.c (struct cmdarg): New enum items CMDARG_INIT_FILE and
	CMDARG_INIT_COMMAND.
	(captured_main): New enum items OPT_IX and OPT_IEX.  Add
	"init-command", "init-eval-command", "ix" and "iex" to the variable
	long_options.  Handle OPT_IX and OPT_IEX.  Process them from CMDARG_VEC.
	New comment for CMDARG_FILE and CMDARG_COMMAND processing.
	(print_gdb_help): Describe --init-command=FILE, -ix and
	--init-eval-command=COMMAND, -iex.

gdb/doc/
	* gdb.texinfo (File Options): Describe --init-command=FILE, -ix and
	--init-eval-command=COMMAND, -iex.
	(Startup): Describe -iex and -ix.  Simplify the example
	for "set auto-load-scripts off".

gdb/testsuite/
	* gdb.gdb/selftest.exp (do_steps_and_nexts): New entry
	for cmdarg_vec = NULL.  Remove entries for cmdsize = 1, cmdarg = and
	ncmd = 0.  New entry for VEC_cleanup cmdarg_s.
2012-03-19 18:19:26 +00:00
Gary Benson 481860b396 gdb:
PR breakpoints/10738
	* dwarf2read.c (use_deprecated_index_sections): New global.
	(struct partial_die_info): New member may_be_inlined.
	(read_partial_die): Set may_be_inlined where appropriate.
	(add_partial_subprogram): Add partial symbols for partial
	DIEs that may be inlined.
	(new_symbol_full): Add inlined subroutines to the current
	scope.
	(write_psymtabs_to_index): Bump version number.
	(dwarf2_read_index): Read only version 6 indices unless
	use_deprecated_index_sections is set.
	* linespec.c (symbol_and_data_callback): New structure.
	(iterate_inline_only): New function.
	(iterate_over_all_matching_symtabs): New argument
	"include_inline".  If nonzero, also call the callback for
	symbols representing inlined subroutines.
	(lookup_prefix_sym): Pass extra argument to the above.
	(find_function_symbols): Likewise.
	(add_matching_symbols_to_info): Likewise.
	* NEWS: Mention that GDB can now set breakpoints on inlined
	functions.

gdb/doc:
	PR breakpoints/10738
	* gdb.texinfo (Inline Functions): Remove the now-unnecessary @item
	stating that GDB cannot set breakpoints on inlined functions.
	(Mode Options): Document --use-deprecated-index-sections.
	(Index Section Format): Document new index section version format.

gdb/testsuite:
	PR breakpoints/10738
	* gdb.opt/inline-break.exp: New file.
	* gdb.opt/inline-break.c: Likewise.
	* gdb.dwarf2/inline-break.exp: Likewise.
	* gdb.dwarf2/inline-break.S: Likewise.
	* gdb.base/annota1.exp: Cope with old .gdb_index warnings.
	* gdb.base/async-shell.exp: Likewise.
	* lib/mi-support.exp (library_loaded_re): Likewise.
2012-03-16 16:47:34 +00:00
Tom Tromey 57651221de * NEWS: Mention "info vtbl", not "info vtable".
* cp-support.c (info_vtbl_command): Fix comment.
	(_initialize_cp_support): Fix text.
2012-03-15 16:32:16 +00:00