Commit Graph

1563 Commits

Author SHA1 Message Date
Sergio Durigan Junior 62e5f89c34 gdb/doc/ChangeLog:
2012-04-27  Sergio Durigan Junior  <sergiodj@redhat.com>
	    Tom Tromey  <tromey@redhat.com>

	* gdb.texinfo (Static Probe Points): New entry, explaining SystemTap
	and generic static probe support on GDB.

gdb/testsuite/ChangeLog:
2012-04-27  Sergio Durigan Junior  <sergiodj@redhat.com>
	    Tom Tromey  <tromey@redhat.com>

	* gdb.base/default.exp: Add `$_probe_arg*' convenience
	variables.
	* gdb.base/stap-probe.c: New file.
	* gdb.base/stap-probe.exp: New file.
	* gdb.trace/stap-trace.c: New file.
	* gdb.trace/stap-trace.exp: New file.
	* gdb.cp/nextoverthrow.exp: Add check for SystemTap probe in
	libgcc's unwinder.
2012-04-27 20:52:06 +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
Jan Kratochvil efd4ebc341 Forgotten commit for:
gdb/testsuite/
	PR symtab/7259:
	* gdb.base/enumval.c: New test case.
	* gdb.base/enumval.exp: New test case.
2012-04-18 06:51:05 +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
Mark Kettenis a82da7dde5 * gdb.base/funcargs.exp (complex_args): Fix typo. 2012-04-07 20:01:59 +00:00
Keith Seitz 40e084e177 linespec rewrite:
* linespec.c (decode_compound): Remove.
	(enum offset_relative_sign): New enum.
	(struct line_offset): New struct.
	(struct linespec): New struct.
	(struct linespec_state): Move file_symtabs,
	user_filename, and user_function into struct linespec.
	Make result an anonymous struct holding vectors of
	symbolp and minsym_and_objfile_d.
	Add language member.
	(enum ls_token_type): New enum.
	(linespec_keywords): New array.
	(struct ls_token): New struct.
	(struct ls_parser): New struct.
	(linespec_lexer_lex_number): New function.
	(linespec_lexer_lex_keyword): New function.
	(is_ada_operator): New function.
	(skip_quote_char): New function.
	(copy_token_string): New function.
	(is_closing_quote_enclosed): New function.
	(find_parameter_list_end): New function.
	(linespec_lexer_lex_string): New function.
	(linespec_lexer_lex_one): New function.
	(linespec_lexer_consume_token): New function.
	(linespec_lexer_peek_token): New function.
	(cplusplus_error): Remove unused function.
	(find_methods): Update comment.
	(find_toplevel_char): Return const.
	(is_objc_method_format): Remove unused function.
	(find_toplevel_string): New function.
	(is_linespec_boundary): Remove.
	(symbol_not_found_error): New function.
	(find_method_overload_end): Remove function.
	(unexpected_linespec_error): New function.
	(keep_name_info): Remove.
	(linespec_parse_line_offset): New function.
	(linespec_parse_basic): New function.
	(canonicalize_linespec): New function.
	(decode_line_internal): Remove.
	(create_sals_line_offset): New function adapted from
	decode_all_digits.
	(convert_linespec_to_sals): New function.
	(parse_linespec): New function.
	(linespec_parser_new): New function.
	(linespec_state_destructor): Change parameter type to
	struct linespec_state *.
	Add language parameter.
	Remove freeing of moved members.
	(linespec_parser_delete): New function.
	(decode_line_full): Use parse_linespec and linespec_parser_new.
	(decode_line_1): Likewise.
	(decode_indirect): Rename to ...
	(linespec_expression_to_pc): ... this and rewrite
	to simply find CORE_ADDR, storing this result for later
	conversion to SALs.
	(locate_first_half): Remove.
	(deocde_objc): Add parameter LS.
	Initialize new struct collect_info members.
	Handle minimal symbols, too.
	(decode_compound): Delete.
	(lookup_prefix_sym): Rewrite.
	(compare_msymbols): New function.
	(find_method): Rewrite.
	Do not call cplusplus_error.
	(symtabs_from_filename): Rewrite.
	(collect_function_symbols): Delete.
	(find_function_symbols): Rewrite without ARGPTR-style
	processing.
	(decode_all_digits): Delete. (Rewritten as create_sals_line_offset.)
	(decode_dollar): Adapted and renamed to ...
	(linespec_parse_variable): ... this.
	(find_linespec_symbols): New function.
	(decode_label): Adapted and renamed to ...
	(find_label_symbols): ... this.
	(decode_digits_list_mode): Add and use LS argument.
	(decode_digits_ordinary): Likewise.
	(collect_symbols): Do not collect SALs, just symbols and msymbols.
	If in list mode, allow any symbol class.  Otherwise, only
	permit LOC_BLOCK symbols.
	(minsym_found): Update comments.
	(search_minsyms_for_name): Do not convert the matching symbol
	into a SAL.  Simply push the symbol and objfile into the
	result vector.
	(decode_variable): Delete. Contents adapted into
	find_linespec_symbols.

	* cp-support.c (SKIP_SPACE): Remove.
	(operator_tokens): Remove unused global.
	(cp_validate_operator): Remove.
	* cp-support.h (cp_validate_operator): Remove declaration.

	* gdb.base/advance.exp: Update error message for
	"advance malformed" test.
	* gdb.base/break.exp: Likewise for "breakpoint with
	trailing garbage" test.
	* gdb.base/hbreak2.exp: Likewise for "hardware breakpoint
	with trailing garbage" test.
	* gdb.base/jump.exp: Likewise for "jump with trailing
	argument junk" test.
	* gdb.base/sepdebug.exp: Likewise for "breakpoint with
	trailng garbage" test.
	* gdb.base/until.exp: Likewise for "malformed until" test.
	* gdb.cp/ovldbreak.exp: Create the breakpoint table
	for "breakpoint info (after setting on all)".
	* gdb.cp/userdef.exp: Remove quoting for "break A2::operator+"
	tests.
	* gdb.cp/cplabel.cc: New file.
	* gdb.cp/cplabel.exp: New test.
	* gdb.linespec/ls-errs.c: New file.
	* gdb.linespec/ls-errs.exp: New test.
2012-04-05 18:50:29 +00:00
Jan Kratochvil 2e98ca5343 gdb/testsuite/
* gdb.base/auxv.c (func2): setrlimit to infinity to enable core dumps.
	* gdb.base/auxv.exp: Try to compile it with -DUSE_RLIMIT first.
	(generate native core dump): Make the test unsupported if core cannot
	be generated.
2012-03-19 18:38:56 +00:00
Jan Kratochvil 3a69ffb280 gdb/testsuite/
* gdb.base/cond-eval-mode.exp: Fix the anticipated warning string.
2012-03-19 09:34:13 +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
Joel Brobecker ccbb4f28f0 Testcase for: "ax-gdb: Do not treat enums and bools as integers".
gdb/testsuite/ChangeLog:

        * gdb.base/enum_cond.c, gdb.base/enum_cond.exp: New testcase.
2012-03-14 01:39:12 +00:00
Doug Evans 168997566e * NEWS: Mention symbol-reloading has been deleted.
* symfile.c (symbol_reloading): Delete.
	(show_symbol_reloading): Delete.
	(_initialize_symfile): Delete set/show symbol-reloading.

	doc/
	* gdb.texinfo (Help): Change apropos example to use "alias" instead
	of "reload".
	(Symbols): Delete docs for set/show symbol-reloading.
	* gdbint.texinfo (Defining Other Architecture Features): Delete
	SYMBOL_RELOADING_DEFAULT.
	* refcard.tex: Delete reference to symbol-reloading.

	testsuite/
	* gdb.base/default.exp: Delete tests for symbol-reloading.
	* gdb.base/help.exp: Ditto.
	* gdb.base/setshow.exp: Ditto.
	* gdb.base/gdb_history: Delete references to symbol-reloading.
2012-03-13 21:02:40 +00:00
Jan Kratochvil 87b0bb13cb gdb/
* common/linux-procfs.c (linux_proc_get_int): New, from
	linux_proc_get_tgid, change its LWPID type to pid_t, add parameter
	field.
	(linux_proc_get_tgid): Only call linux_proc_get_int.
	(linux_proc_get_tracerpid): New.
	(linux_proc_pid_has_state): New, from linux_proc_pid_is_zombie.
	(linux_proc_pid_is_stopped, linux_proc_pid_is_zombie): Only call
	linux_proc_pid_has_state.
	* common/linux-procfs.h (linux_proc_get_tracerpid): New declaration.
	* common/linux-ptrace.c: Include linux-procfs.h and buffer.h.
	(linux_ptrace_attach_warnings): New.
	* common/linux-ptrace.h (struct buffer, linux_ptrace_attach_warnings):
	New declaration.
	* linux-nat.c: Include exceptions.h, linux-ptrace.h and buffer.h.
	(linux_nat_attach): New variables ex, buffer, message and message_s.
	Wrap to_attach by TRY_CATCH and call linux_ptrace_attach_warnings.

gdb/gdbserver/
	* linux-low.c (linux_attach_lwp_1): New variable buffer.  Call
	linux_ptrace_attach_warnings.

gdb/testsuite/
	* gdb.base/attach-twice.c: New files.
	* gdb.base/attach-twice.exp: New files.
2012-03-13 15:02:25 +00:00
Keith Seitz 0d7941a9be * lib/gdb.exp (gdb_get_line_number): Throw an
error instead of returning -1.
	* gdb.base/break.exp: Remove unused variable
	bp_location5.
	* gdb.base/hbreak2.exp: Likewise.
	* gdb.base/sepdebug.exp: Likewise.
2012-03-09 04:38:53 +00:00
Yao Qi 69dc1c4dd3 gdb/testsuite/
* gdb.base/disp-step-syscall.exp (disp_step_cross_syscall): Catch error
	messages for KFAIL.
2012-03-04 02:36:38 +00:00
Jan Kratochvil dfe2ac1496 gdb/testsuite/
Setup KFAIL for PR server/13796.
	* gdb.base/disp-step-syscall.exp (single step over vfork): Setup KFAIL.
2012-03-03 06:58:16 +00:00
Tom Tromey 4f42c881de * gdb.base/nextoverexit.c: New file.
* gdb.base/nextoverexit.exp: New file.
2012-03-02 19:29:57 +00:00
Maciej W. Rozycki 320b6f49d3 * gdb.base/hbreak2.exp: New test for "hbreak" and "thbreak". 2012-03-01 21:01:11 +00:00
Keith Seitz 7949c2a0b4 * gdb.base/help.exp (help show user): Update expected result
for new doc string changes (add "non-python").
2012-03-01 20:25:50 +00:00
Jan Kratochvil 9a7f938f93 gdb/
Fix disp-step-syscall.exp: fork: single step over fork.
	* i386-linux-tdep.c (-i386_linux_get_syscall_number): Rename to ...
	(i386_linux_get_syscall_number_from_regcache): ... here, new function
	comment, change parameters gdbarch and ptid to regcache.  Remove
	parameter regcache, initialize gdbarch from regcache here.
	(i386_linux_get_syscall_number, i386_linux_displaced_step_copy_insn):
	New functions.
	(i386_linux_init_abi): Install i386_linux_displaced_step_copy_insn
	instead.
	* i386-tdep.c (i386_syscall_p): Check also for 'sysenter' and
	'syscall'.  Make the 'int' check more strict.

gdb/testsuite/
	Fix disp-step-syscall.exp: fork: single step over fork.
	* gdb.base/disp-step-syscall.exp (syscall_insn): Anchor it by
	whitespaces.
	(single step over $syscall): Remove its check.
	(single step over $syscall final pc): New check.
2012-02-29 14:59:41 +00:00
Thomas Schwinge 2c8910ba4a gdb/testsuite/
* gdb.base/annota1.exp: Use gdb_get_line_number for retrieving line
	numbers instead of hardcoding them.
	* gdb.base/annota1.c: Provide suitable markers.
	* gdb.base/annota3.exp: Use gdb_get_line_number for retrieving line
	numbers instead of hardcoding them.
	* gdb.base/annota3.c: Provide suitable markers.
2012-02-28 22:40:48 +00:00
Thomas Schwinge 7964b62a37 gdb/testsuite/
* gdb.base/annota1.c [__sh__]: Remove any special-casing.
        * gdb.base/annota3.c: Likewise.
        * gdb.base/sigall.c: Likewise.
        * gdb.base/signals.c: Likewise.
        * gdb.reverse/sigall-reverse.c: Likewise.
2012-02-28 10:24:15 +00:00
Luis Machado ebbbe5c5ed 2012-02-27 Luis Machado <lgustavo@codesourcery.com>
* gdb.base/save-bp.exp: Account for new condition evaluator output.
2012-02-27 13:22:59 +00:00
Luis Machado 8d126d8a7a 2012-02-24 Luis Machado <lgustavo@codesourcery.com>
* gdb.base/cond-eval-mode.exp: New file.
2012-02-24 15:17:41 +00:00
Pedro Alves 11337c2fed 2012-02-24 Pedro Alves <palves@redhat.com>
* gdb.base/break-interp.exp (test_ld): Use with_test_prefix.
	(top level): Use with_test_prefix.
2012-02-24 14:09:08 +00:00
Sterling Augustine aeaa24743c ChangeLog
2012-02-22  Sterling Augustine  <saugustine@google.com>

	PR 13689:
	* breakpoint.c (watchpoint_exp_is_constant): Add UNOP_CAST to switch.

testsuite/ChangeLog
2012-02-22  Sterling Augustine  <saugustine@google.com>

	* gdb.base/watchpoint.exp (test_constant_watchpoint): Add test for
	constant with cast.
2012-02-22 18:20:38 +00:00
Pedro Alves 78afebb483 2012-02-21 Pedro Alves <palves@redhat.com>
* gdb.base/return-nodebug.exp (do_test): Use with_test_prefix.
2012-02-22 00:04:58 +00:00
Pedro Alves 0f4d39d53d 2012-02-21 Pedro Alves <palves@redhat.com>
* gdb.arch/altivec-abi.exp (altivec_abi_tests): Don't do
	with_test_prefix here.
	(top level): Do it here instead.  Remove `:' from the
	with_test_prefix string.
	* gdb.base/attach-pie-misread.exp: Remove the leading space the
	the suffix `:' from the with_test_prefix prefix string.
	* gdb.base/break-interp.exp: Ditto.
	* gdb.base/catch-load.exp: Ditto.
	* gdb.base/disp-step-syscall.exp: Ditto.
	* gdb.base/jit-so.exp: Ditto.
	* gdb.base/jit.exp: Ditto.
	* gdb.base/sepdebug.exp: Ditto.
	* gdb.base/solib-display.exp: Ditto.
	* gdb.base/solib-overlap.exp: Ditto.
	* gdb.base/watch-cond-infcall.exp: Ditto.
	* gdb.base/watchpoint.exp: Ditto.
	* gdb.dwarf2/dw2-noloc.exp: Ditto.
	* gdb.mi/mi-watch.exp: Ditto.
	* gdb.mi/mi2-watch.exp: Ditto.
	* gdb.threads/non-ldr-exc-1.exp: Ditto.
	* gdb.threads/non-ldr-exc-2.exp: Ditto.
	* gdb.threads/non-ldr-exc-3.exp: Ditto.
	* gdb.threads/non-ldr-exc-4.exp: Ditto.
	* gdb.threads/watchpoint-fork.exp: Ditto.
	* gdb.threads/watchthreads-reorder.exp: Ditto.
	* gdb.trace/change-loc.exp: Ditto.
	* gdb.trace/pending.exp: Ditto.
	* gdb.trace/status-stop.exp: Ditto.
	* gdb.trace/strace.exp: Ditto.
	* gdb.trace/trace-break.exp: Ditto.
	* gdb.trace/unavailable.exp: Ditto.
	* lib/gdb.exp (with_test_prefix): Always prefix with space and
	suffix with colon.  Adjust leading comments.
2012-02-21 22:01:10 +00:00
Pedro Alves 6a5870cea1 2012-02-21 Pedro Alves <palves@redhat.com>
Tom Tromey  <tromey@redhat.com>

	* lib/gdb.exp: Add description of test prefixes.
	(with_test_prefix): New procedure.
	* gdb.arch/altivec-abi.exp: Use with_test_prefix.
	* gdb.base/attach-pie-misread.exp: Use with_test_prefix.
	* gdb.base/break-interp.exp: Use with_test_prefix.  Use append
	instead of lappend to append to pf_prefix.
	* gdb.base/catch-load.exp: Use with_test_prefix.
	* gdb.base/disp-step-syscall.exp: Use with_test_prefix.
	* gdb.base/jit-so.exp: Use with_test_prefix.
	* gdb.base/jit.exp: Use with_test_prefix.
	* gdb.base/return-nodebug.exp (do_test): Use append instead of
	lappend to append to pf_prefix.
	* gdb.base/sepdebug.exp: Use with_test_prefix.
	* gdb.base/solib-display.exp: Use with_test_prefix.
	* gdb.base/solib-overlap.exp: Use with_test_prefix.
	* gdb.base/watch-cond-infcall.exp: Use with_test_prefix.
	* gdb.base/watchpoint.exp: Use with_test_prefix.
	* gdb.dwarf2/dw2-noloc.exp: Use with_test_prefix.
	* gdb.mi/mi-watch.exp: Use with_test_prefix.
	* gdb.mi/mi2-watch.exp: Use with_test_prefix.
	* gdb.threads/non-ldr-exc-1.exp: Use with_test_prefix.
	* gdb.threads/non-ldr-exc-2.exp: Use with_test_prefix.
	* gdb.threads/non-ldr-exc-3.exp: Use with_test_prefix.
	* gdb.threads/non-ldr-exc-4.exp: Use with_test_prefix.
	* gdb.threads/watchpoint-fork.exp: Use with_test_prefix.  Use
	append instead of lappend to append to pf_prefix.
	* gdb.threads/watchthreads-reorder.exp: Use with_test_prefix.
	* gdb.trace/change-loc.exp: Use with_test_prefix.
	* gdb.trace/pending.exp: Use with_test_prefix.
	* gdb.trace/status-stop.exp: Use with_test_prefix.
	* gdb.trace/strace.exp: Use with_test_prefix.
	* gdb.trace/trace-break.exp: Use with_test_prefix.
	* gdb.trace/unavailable.exp: Use with_test_prefix.  Use append
	instead of lappend to append to pf_prefix.
2012-02-21 21:55:39 +00:00
Jan Kratochvil 35dc4a6b96 gdb/testsuite/
Fix racy FAILs.
	* gdb.base/inferior-died.c (main): Add return of 0.
	* gdb.base/inferior-died.exp (continue): Fix expectation of
	asynchronous events.
	(p 1): New test.
2012-02-20 21:03:05 +00:00
Jan Kratochvil c755f03d06 gdb/testsuite/
Fix racy FAILs.
	* gdb.base/catch-load.exp (one_catch_load_test): Remove duplicate
	"continue" command.
2012-02-20 06:20:28 +00:00
Jan Kratochvil 6bec5e0a45 gdb/testsuite/
Fix for gdbserver non-extended mode.
	* gdb.base/break-inline.exp (start): Replace "start" by gdb_breakpoint
	and gdb_run_cmd.
2012-02-19 13:05:28 +00:00
Tom Tromey 32d22ab151 * gdb.base/inferior-died.c: Don't include stdio.h. 2012-02-16 14:42:51 +00:00
Tom Tromey 9addecb9fb PR c++/13653:
* thread.c (struct current_thread_cleanup) <was_removable>: New
	field.
	(do_restore_current_thread_cleanup): Restore 'removable' field.
	(restore_current_thread_cleanup_dtor): Likewise.
	(make_cleanup_restore_current_thread): Initialize new field.
testsuite/gdb
	* gdb.base/inferior-died.c: New file.
	* gdb.base/inferior-died.exp: New file.
2012-02-16 14:35:00 +00:00
Aleksandar Ristovski 4cb6da1cdd * frame.c (find_frame_sal): Initialize sal->pspace field from frame
data.
	* stack.c (set_last_displayed_sal): Validate that PSPACE is not NULL.

testuite:
	* gdb.base/break-inline.exp: New file.
	* gdb.base/break-inline.c: New file.
2012-02-15 19:27:59 +00:00
Tom Tromey 3af2590d3e PR gdb/12659:
* infcmd.c (registers_info): Print just the current register's
	name.
gdb/testsuite
	* gdb.base/pc-fp.exp: Add "info register" tests.
2012-02-15 19:13:14 +00:00
Tom Tromey 29988831db * gdb.base/regs.exp: Remove. 2012-02-15 18:49:27 +00:00
Pedro Alves 7cee1e5405 gdb/
2012-02-15  Pedro Alves  <palves@redhat.com>

	* remote.c (remote_detach_1, extended_remote_attach_1): Tweak
	output to be like native targets'.
	(remote_pid_to_str): Special case the null ptid.

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

	Support extended-remote.  Avoid cascading timeouts.

	* gdb.base/attach.exp (do_attach_tests): Add expected output for
	the extended-remote target.  If attaching with no file fails, load
	the file manually.
	* gdb.server/ext-attach.exp: Adjust expected attach/detach output.
2012-02-15 12:48:55 +00:00
Stan Shebs 816338b563 2012-02-14 Stan Shebs <stan@codesourcery.com>
* NEWS: Mention enable count command.
	* breakpoint.h (struct breakpoint): New field enable_count.
	* breakpoint.c (enable_breakpoint_disp): Add count argument.
	(enable_breakpoint): Add arg to call.
	(struct disp_data): New struct.
	(do_enable_breakpoint_disp): Interp arg as disp_data and unpack.
	(do_map_enable_once_breakpoint): Create a struct and pass it.
	(do_map_enable_delete_breakpoint): Ditto.
	(do_map_enable_count_breakpoint): New function.
	(enable_count_command): New function.
	(bpstat_stop_status): Decrement enable_count.
	(print_one_breakpoint_location): Report enable count.
	(_initialize_breakpoint): Add enable count command.

	* gdb.texinfo (Disabling Breakpoints): Document enable count.

	* gdb.base/ena-dis-br.exp: Add enable count test.
2012-02-14 23:28:15 +00:00
Pedro Alves cc30c4bd19 gdb/doc/
2012-02-13  Pedro Alves  <palves@redhat.com>

	* gdb.texinfo (MIPS boards): Refer to mips-elf instead of
	mips-idt-ecoff.

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

	* config/mips-idt.exp: Delete.
	* gdb.base/a2-run.exp: Remove mips-idt xfails.
	* gdb.base/bitfields.exp: Remove mips-idt restarts.
	* gdb.base/break.exp: Remove mips-idt references.
	* gdb.base/chng-syms.exp: Ditto.
	* gdb.base/default.exp: Ditto.
	* gdb.base/funcargs.exp (funcargs_reload): Delete.
	(top level): Don't call it.
	* gdb.base/opaque.exp: Remove mips-idt restarts.
	* gdb.base/ptype.exp: Remove mips-idt xfails.
	* gdb.base/scope.exp: Remove mips-idt restarts.
	* gdb.base/sepdebug.exp: Remove mips-idt references.
	* gdb.base/watchpoint.exp (maybe_clean_restart)
	(maybe_reinitialize): Delete.
	(test_disabling_watchpoints, test_disabling_watchpoints)
	(test_watchpoint_triggered_in_syscall)
	(test_watchpoint_and_breakpoint, test_inaccessible_watchpoint):
	Don't call them.
2012-02-13 18:09:59 +00:00
Pedro Alves 4a2d9c0801 2012-02-10 Pedro Alves <palves@redhat.com>
* gdb.base/break-interp.exp (test_attach_gdb): Assume $file is
	always non-empty.
	(test_attach): Always pass $exec to test_attach_gdb.
2012-02-10 16:06:50 +00:00
Pedro Alves 5f8cefd757 2012-02-02 Pedro Alves <palves@redhat.com>
* gdb.base/term.exp: Rewrite.
	* gdb.base/term.c: New.
2012-02-02 18:07:58 +00:00
Pedro Alves 2f3a2569b8 2012-02-02 Pedro Alves <palves@redhat.com>
* gdb.base/default.exp (run "r" abbreviation, run): Add
	extended-remote expected output.
2012-02-02 18:05:35 +00:00
Tom Tromey 03bef283c2 PR gdb/13431:
* jit.c (struct jit_inferior_data): Rewrite.
	(struct jit_objfile_data): New.
	(get_jit_objfile_data): New function.
	(add_objfile_entry): Update.
	(jit_read_descriptor): Return int.  Replace descriptor_addr
	argument with inf_data.  Update.  Don't call error.
	(jit_breakpoint_re_set_internal): Reorder logic.  Update.  Look up
	descriptor here.
	(jit_inferior_init): Don't look up descriptor.  Don't call error.
	(jit_reset_inferior_data_and_breakpoints)
	(jit_inferior_created_observer): Remove.
	(jit_inferior_exit_hook): Update.
	(jit_executable_changed_observer): Remove.
	(jit_event_handler): Update.
	(free_objfile_data): Reset inferior data if needed.
	(_initialize_jit): Update.
gdb/testsuite
	* gdb.base/jit-simple.exp: New file.
	* gdb.base/jit-simple.c: New file.
2012-02-01 20:21:22 +00:00
Yao Qi a79b18b537 gdb/testsuite/
* gdb.base/skip.exp: Make test result unique.
2012-01-31 00:10:58 +00:00
Jan Kratochvil f0d1a53ee3 gdb/testsuite/
* gdb.base/valgrind-db-attach.exp (attach to debugger): Fix
	compatibility with valgrind-3.7.0.
2012-01-30 06:48:08 +00:00
Pedro Alves 4b3c9f41b6 2012-01-27 Pedro Alves <palves@redhat.com>
* gdb.base/watchpoint.exp (no_hw): New global.
	(maybe_clean_restart, maybe_reinitialize): If no_hw is set,
	disable hw watchpoints.
	(test_wide_location_1, test_wide_location_2): If no_hw is set,
	don't expect hw watchpoints.
	(no_hw_watchpoints): Always clean restart.
	(do_tests): New procedure, factored out from the top level.
	(top level): Run tests twice.  Once with hw watchpoints enabled,
	another time with hw watchpoints disabled.
2012-01-27 14:01:23 +00:00
Pedro Alves a13491c8b5 2012-01-27 Pedro Alves <palves@redhat.com>
* gdb.base/watchpoint.exp (test_no_hw_watchpoints): New, factored
	out from the top level.
	(top level): Call it instead.
2012-01-27 14:00:41 +00:00
Pedro Alves f2c8a05131 2012-01-27 Pedro Alves <palves@redhat.com>
* gdb.base/watchpoint.exp (top level): Re-enable hardware
	watchpoints sooner.
2012-01-27 13:59:57 +00:00
Pedro Alves 654d7a9e20 2012-01-27 Pedro Alves <palves@redhat.com>
* gdb.base/watchpoint.exp (top level): Delete watch ival3.
2012-01-27 13:59:21 +00:00
Pedro Alves 274f47f34a 2012-01-27 Pedro Alves <palves@redhat.com>
* gdb.base/watchpoint.exp (test_watchpoint_in_big_blob): Expect
	"You may have requested too many hardware
	breakpoints/watchpoints".
2012-01-27 13:58:46 +00:00