Commit Graph

3299 Commits

Author SHA1 Message Date
Chris Moller 191ca0a151 Fix for PR 9399 gdb can't call or print a const function that uses virtual inheritance 2009-12-10 20:57:10 +00:00
Michael Snyder 0fa6cf1b45 2009-12-10 Oza Pawandeep (paawan1982@yahoo.com
* gdb.reverse/i387-env-reverse.c: New file.
	* gdb.reverse/i387-env-reverse.exp: New file.
	* gdb.reverse/i387-stack-reverse.c: New file.
	* gdb.reverse/i387-stack-reverse.exp: New file.
2009-12-10 19:36:20 +00:00
Phil Muldoon 361ae04250 2009-12-08 Phil Muldoon <pmuldoon@redhat.com>
PR python/10804

	* python/py-type.c (typy_range): New Function.

2009-12-08  Phil Muldoon  <pmuldoon@redhat.com>

	* gdb.python/py-type.exp (test_range): New test.


2009-12-08  Phil Muldoon  <pmuldoon@redhat.com>

	* gdb.texinfo (Types In Python): Describe range function.
2009-12-08 14:06:04 +00:00
Phil Muldoon bfd31e7118 2009-12-03 Richard Ward <richard.j.ward1@googlemail.com>
* python/py-type.c (convert_field): New attribute "is_base_class".

doc/

2009-12-03  Richard Ward  <richard.j.ward1@googlemail.com>

	* gdb.texinfo (Types In Python): Describe "is_base_class".

testsuite/

2009-12-03  Phil Muldoon <pmuldoon@redhat.com>

	PR python/10805

	* gdb.python/py-type.exp: New file.
	* gdb.python/py-type.c: New file.
	* Makefile.in: Add py-type.
2009-12-03 21:19:49 +00:00
Tom Tromey 57a1d73695 gdb
* python/python.c (gdbpy_parse_and_eval): New function.
	(GdbMethods): Add "parse_and_eval".
gdb/testsuite
	* gdb.python/py-value.exp (test_parse_and_eval): New
	function.
gdb/doc
	* gdb.texinfo (Basic Python): Document gdb.parse_and_eval.
2009-12-03 18:30:02 +00:00
Paul Pluzhnikov 1f3b5d1baf ChangeLog:
2009-12-03  Paul Pluzhnikov  <ppluzhnikov@google.com>

	PR gdb/11022

	* breakpoint.c (invalidate_bp_value_on_memory_change):
	New function.
	(_initialize_breakpoint): Add it as memory change observer.

testsuite/ChangeLog:

2009-12-03  Paul Pluzhnikov  <ppluzhnikov@google.com>

       PR gdb/11022

       * gdb.base/pr11022.exp: New test.
       * gdb.base/pr11022.c: New test.
2009-12-03 17:47:08 +00:00
Jan Kratochvil 8b7dbdc923 gdb/testsuite/
Fix spurious false FAILs.
	* gdb.base/structs.c (chartest): New.
	(main): Fill-in chartest.
	* gdb.base/structs.exp (anychar_re, first): New.
	(start_structs_test): Import global anychar_re and first.
	New gdb_test call "set print elements 300; ${testfile}"
	(start_structs_test <$first>): New block.
	(any): Import global anychar_re.  New variable ac.  Use ${ac}.
2009-12-03 11:40:18 +00:00
Jan Kratochvil 6a53b2ec3d gdb/testsuite/
* gdb.base/bigcore.exp (extract_heap): Set $lim limit to 200.
2009-11-30 22:56:34 +00:00
Jan Kratochvil d7167b4c6a gdb/testsuite/
* gdb.base/foll-fork.exp (unpatch child, breakpoint at exit call):
	Force $srcfile file.
	* gdb.base/foll-fork.c (callee): Comment out the printf call.
2009-11-30 22:55:27 +00:00
Ulrich Weigand b179846202 gdb/
* s390-nat.c (s390_can_use_hw_breakpoint): Only support breakpoints
	of type bp_hardware_watchpoint.

gdb/testsuite/

	* gdb.base/hbreak.exp: Disable for s390*-*-* targets.
	* gdb.base/watchpoint-hw-hit-once.exp: Likewise.
	* gdb.threads/watchthreads-reorder.exp: Likewise.
2009-11-27 16:12:00 +00:00
Daniel Jacobowitz b6199126ee PR gdb/8704
* breakpoint.c (find_condition_and_thread): Correct task error message.
	* c-exp.y (yylex): Stop before "thread N", "task N", or abbreviations
	of those.

	doc/
	* gdb.texinfo (Thread-Specific Breakpoints): Thread specifiers
	are allowed after the breakpoint condition.

	testsuite/
	* gdb.base/condbreak.exp: Test combinations of "break *EXP",
	"if", and "thread".  Correct matching in the previous test.
2009-11-25 20:43:29 +00:00
Daniel Jacobowitz b22a051097 * gdb.cp/extern-c.cc, gdb.cp/extern-c.exp: New test. 2009-11-25 15:31:54 +00:00
Michael Snyder 930636d254 2009-11-23 Michael Snyder <msnyder@vmware.com>
* gdb.reverse/watch-reverse.exp: Extend test for hw watchpoints.
	* gdb.reverse-watch-precsave.exp: Ditto.
2009-11-23 20:11:42 +00:00
Paul Pluzhnikov 21a0512e53 gdb/ChangeLog:
2009-11-23  Paul Pluzhnikov  <ppluzhnikov@google.com>

	* cli/cli-cmds.c (disassemble_command): Split on comma.
	(init_cli_cmds): Update help.
	* NEWS: Mention incompatible change to 'disassemble'.

gdb/testsuite/ChangeLog:

2009-11-23  Paul Pluzhnikov  <ppluzhnikov@google.com>

	* gdb.asm/asm-source.exp: Adjust.
	* gdb.base/help.exp: Adjust.

gdb/doc/ChangeLog:

2009-11-23  Paul Pluzhnikov  <ppluzhnikov@google.com>

	* gdb.texinfo (Machine Code): Adjust.
2009-11-23 18:44:11 +00:00
Pedro Alves fc30d5e03f * gdb.base/catch-syscall.exp (test_catch_syscall_fail_nodatadir)
(do_syscall_tests_without_xml): Set data-directory to
	/the/path/to/nowhere.
2009-11-22 22:57:24 +00:00
Pedro Alves f6bc200880 gdb/
* breakpoint.h (struct breakpoint) <watchpoint_thread>: New field.
	* breakpoint.c (watchpoint_in_thread_scope): New.
	(update_watchpoint): Skip if the local watchpoint's thread doesn't
	match the current thread, or if the current thread is running.
	(watchpoint_check): Ditto.
	(watch_command_1): Set the watchpoint's watchpoint_thread field.

	gdb/testsuite/
	* gdb.threads/local-watch-wrong-thread.c,
	gdb.threads/local-watch-wrong-thread.exp: New files.
2009-11-21 21:17:17 +00:00
Pedro Alves 8c2fb5deb3 * gdb.cp/cplusfuncs.exp (info_func_regexp, print_addr): Don't
assume new `regsub' syntax available.
2009-11-21 05:17:41 +00:00
Jan Kratochvil a79d3c27d1 gdb/
Fix repeated rwatch output.
	* amd64-linux-nat.c (amd64_linux_dr_set, amd64_linux_dr_set_control)
	(amd64_linux_dr_set_addr, amd64_linux_dr_reset_addr)
	(amd64_linux_dr_get_status): New comments.
	(amd64_linux_dr_unset_status): New function.
	(_initialize_amd64_linux_nat): Install it.
	* i386-linux-nat.c (i386_linux_dr_get, i386_linux_dr_set)
	(i386_linux_dr_set_control, i386_linux_dr_set_addr)
	(i386_linux_dr_reset_addr, i386_linux_dr_get_status): New comments.
	(i386_linux_dr_unset_status): New function.
	(_initialize_i386_linux_nat): Install it.
	* i386-nat.c (I386_DR_WATCH_MASK): New macro.
	(I386_DR_WATCH_HIT): Use I386_DR_WATCH_MASK.
	(i386_insert_aligned_watchpoint): Call i386_dr_low.unset_status.
	* i386-nat.h (struct i386_dr_low_type): Extend comments for
	set_control, set_addr, reset_addr and get_status.  New unset_status.
	* breakpoint.c (update_watchpoint): Extend the comment.

gdb/testsuite/
	* gdb.base/watchpoint-hw-hit-once.exp,
	gdb.base/watchpoint-hw-hit-once.c: New.
2009-11-20 19:57:29 +00:00
Pedro Alves ebec9a0f77 gdb/
2009-11-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
	    Pedro Alves  <pedro@codesourcery.com>

	Fix reordered watchpoints triggered in other threads during all-stop.

	* linux-nat.c (resume_callback, linux_nat_resume): Clear
	stopped_by_watchpoint.
	(save_sigtrap, linux_nat_stopped_by_watchpoint)
	(linux_nat_stopped_data_address): New.
	(stop_wait_callback, linux_nat_filter_event): Call save_sigtrap.
	(linux_nat_add_target): Install linux_nat_stopped_by_watchpoint
	and linux_nat_stopped_data_address.
	* linux-nat.h (struct lwp_info): New fields stopped_by_watchpoint,
	stopped_data_address_p and stopped_data_address.

gdb/testsuite/
2009-11-20  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* gdb.base/watchthreads-reorder.exp,
	gdb.base/watchthreads-reorder.c: New.
2009-11-20 19:52:08 +00:00
Maxim Kuvyrkov 276a961bff 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
* features/m68k-core.xml: New file.

2009-11-17  Nathan Sidwell  <nathan@codesourcery.com>

	* gdb.xml/tdesc-regs.exp: Use for m68k.
2009-11-17 18:06:47 +00:00
Pedro Alves 4867c1fb96 * gdb.base/watch-vfork.c, gdb.base/watch-vfork.exp: New files. 2009-11-15 20:14:00 +00:00
Daniel Jacobowitz f6838f8147 * lib/gdb.exp (current_target_name): New procedure.
(gdb_wrapper_target): New variable.
	(gdb_wrapper_init): Set gdb_wrapper_target.
	(default_gdb_init): Check gdb_wrapper_target before rebuilding the
	wrapper.
2009-11-13 22:51:59 +00:00
Daniel Jacobowitz 4ac4dd3fec gdb/testsuite/
* gdb.base/remote.exp: Delete the slowest load test.
	Do not load with fixed packet sizes.
2009-11-13 22:33:50 +00:00
Daniel Jacobowitz a78817594d gdb/testsuite/
* gdb.cp/virtfunc.exp (do_tests): If runto_main fails, give up.
2009-11-13 22:28:54 +00:00
Daniel Jacobowitz 97a5b505d2 gdb/testsuite/
* gdb.base/freebpcmd.exp: Delete unused variable.  Specify
	srcfile when setting a breakpoint.
2009-11-13 22:25:00 +00:00
Daniel Jacobowitz d3e1fc54d4 2009-11-13 Maciej W. Rozycki <macro@codesourcery.com>
* gdb.base/find.c (int8_t, int16_t, int32_t, int64_t): Undefine
	macros.
2009-11-13 22:18:37 +00:00
Daniel Jacobowitz 7cbcbded71 gdb/testsuite/
* gdb.cp/formatted-ref.exp (test_p_x_ref_addr): Allow the reference
	to be in memory.
	* gdb.base/display.c (force_mem): New.
	(do_loops): Use it.  Add breakpoint comments.
	(do_vars): Add a breakpoint comment.
	* gdb.base/display.exp: Use gdb_get_line_number.  Remove hardcoded
	line numbers.
2009-11-13 21:59:00 +00:00
Nathan Froyd bdea3a92b7 * gdb.base/pending.exp: Use gdb_run_cmd to start the program
instead of a bare "run".
2009-11-13 20:01:07 +00:00
Paul Pluzhnikov 269f82e5eb gdb/ChangeLog:
2009-11-13  Paul Pluzhnikov  <ppluzhnikov@google.com>

	* python/py-prettyprint.c (print_string_repr): Suppress
	address printing


testsuite/ChangeLog:

2009-11-13  Paul Pluzhnikov  <ppluzhnikov@google.com>

	* gdb.python/py-prettyprint.exp: Adjust.
2009-11-13 17:17:57 +00:00
Daniel Jacobowitz a69b7d9d96 testsuite/
* lib/cell.exp (skip_cell_tests): Clean up test files before
	returning.
2009-11-12 19:59:28 +00:00
Daniel Jacobowitz b598bfda9b testsuite/
* lib/gdb.exp (gdb_test_multiple): Handle "y or [n]", "[y] or n",
	and the breakpoint menu.  Do not call perror if a prompt is seen.
	Consume the following GDB prompt.
	* gdb.cp/method2.exp (test_break): Use gdb_test_multiple.
	* gdb.cp/namespace.exp: Use gdb_test.
	* gdb.cp/templates.exp: Use gdb_test.
	(test_template_breakpoints): Use gdb_test_multiple.
2009-11-12 19:54:39 +00:00
Daniel Jacobowitz 87728fa060 testsuite/
* gdb.base/break1.c (struct some_struct, values): Move earlier.
	(marker4): Reference values.
2009-11-12 19:39:53 +00:00
Daniel Jacobowitz b67c692ff9 testsuite/
* gdb.base/macscp.exp: Avoid the first FAIL if macro information
	is missing.
2009-11-12 19:37:40 +00:00
Daniel Jacobowitz f0df251a26 * gdb.base/break.c (need_malloc): New.
* gdb.base/constvars.c (main): Reference crass and crisp.
	* gdb.base/gdb1821.c (main): Reference bar.
	* gdb.cp/gdb1355.cc (main): Reference s1.
	* gdb.cp/hang1.cc (dummy2, dummy3): Declare.
	(main): Call them.
	* gdb.cp/hang2.cc (dummy2): Define.
	* gdb.cp/hang3.cc (dummy3): Define.
	* gdb.cp/m-data.cc (main): Reference shadow.
2009-11-12 19:35:26 +00:00
Nathan Froyd bdf7534a4d * lib/gdb.exp (gdb_compile): Also set rpath for shlib=, on a
remote host.
2009-11-12 17:35:54 +00:00
Nathan Froyd f24fce7781 * gdb.base/step-line.exp: Copy step-line.inp to the remote host.
* gdb.dwarf2/dw2-basic.exp: Copy file1.txt to the remote host.
	* gdb.dwarf2/dw2-compressed.exp: Likewise.
	* gdb.dwarf2/dw2-intercu.exp: Likewise.
	* gdb.dwarf2/dw2-intermix.exp: Likewise.
	* gdb.dwarf2/dw2-producer.exp: Likewise.
	* gdb.dwarf2/mac-fileno.exp: Likewise.
	* gdb.python/py-prettyprint.exp (run_lang_tests): Copy
	py-prettyprint.py to the remote host.
	* gdb.python/py-mi.exp: Copy py-mi.py to the remote host.
2009-11-12 15:15:26 +00:00
Keith Seitz 40f0318e99 * gdb.cp/classes.cc (ByAnyOtherName): Add typedef and
use it instead of "Foo".
	* gdb.cp/classes.exp (do_tests): Add a test to access
	a method through a typedef'd class name.
2009-11-11 23:33:51 +00:00
Nathan Froyd f3d9f7fb03 * gdb.base/long_long.exp: Permit leading zeros on floating-point
exponents.
	* gdb.base/pointers.exp: Likewise.
	* gdb.cp/ref-types.exp: Likewise.
2009-11-11 20:01:24 +00:00
Keith Seitz a4216f37f0 * gdb.cp/cplusfuncs.cc (class foo): Add operators
new[] and delete[].
	* gdb.cp/cplusfuncs.exp (dm_type_void): Change to
	"void".
	(probe_demangler): Remove all single-quoting of
	method and variable names.
	(info_func_regexp): Remove the word "void" from any
	occurrence of "(void)".
	(print_addr_2): Remove all single-quoting of
	method names.
	(print_addr_2_kfail): Likewise.
	(print_addr): Single-quote C function names before
	passing to print_addr_2.
	(test_paddr_operator_functions): Remove single-quoting
	for method names.
	Add tests for operator new[] and operator delete[].
2009-11-11 16:45:16 +00:00
Jan Kratochvil 9b14d7aa41 gdb/
* objfiles.c (objfile_relocate): Update also the field psymtabs_addrmap.

gdb/testsuite/
	* gdb.dwarf2/dw2-ranges.exp: Call runto_main.
2009-11-11 04:59:48 +00:00
Keith Seitz 85feb311d3 * gdb.cp/overload.exp: Add tests for resolving overloaded
methods in expression parsing/evaluation.
2009-11-10 22:17:06 +00:00
Daniel Jacobowitz fa33544892 * lib/gdb.exp (default_gdb_version): Use --version instead of
--command.
2009-11-10 20:54:55 +00:00
Nathan Sidwell ec3c07fc0f * lib/gdb.exp (gdb_compile_test): New.
(skip_ada_tests, skip_java_tests): New.
	(gdb_compile): Use gdb_compile_test for f77.
	* lib/ada.exp (gdb_compile_ada): Use gdb_compile_test to record result.
	* lib/java.exp (compile_java_from_source): Remove runtests check,
	use gdb_compile_test to record result.
	* gdb.ada/packed_array.exp, gdb.ada/fixed_points.exp,
	gdb.ada/exec_changed.exp, gdb.ada/start.exp,
	gdb.ada/watch_arg.exp, gdb.ada/null_record.exp,
	gdb.ada/array_return.exp, gdb.ada/arrayidx.exp,
	gdb.mi/mi-var-child-f.exp, gdb.fortran/types.exp,
	gdb.fortran/array-element.exp, gdb.fortran/subarray.exp,
	gdb.fortran/derived-type.exp, gdb.fortran/exprs.exp,
	gdb.java/jmisc.exp, gdb.java/jmisc1.exp, gdb.java/jprint.exp,
	gdb.java/jv-print.exp, gdb.java/jmain.exp: Add language skip,
	adjust gdb_compile invocations.
2009-11-10 10:16:10 +00:00
Jan Kratochvil b8b4e42bde gdb/testsuite/
* Makefile.in (abs_builddir): New.
	(site.exp): New target `$(abs_builddir)/site.exp'.  New comment.
	(check-single, $(TEST_TARGETS), check-gdb.base%): Change `site.exp' to
	`$(abs_builddir)/site.exp'.
2009-11-09 17:57:34 +00:00
Daniel Jacobowitz f8b7eaf30a * config/m68k-emc.exp, lib/emc-support.exp,
gdb.trace/gdb_c_test.c: Delete.
	* gdb.trace/actions.exp, gdb.trace/backtrace.exp, gdb.trace/circ.exp,
	gdb.trace/collection.exp, gdb.trace/deltrace.exp,
	gdb.trace/infotrace.exp, gdb.trace/limits.exp, gdb.trace/packetlen.exp,
	gdb.trace/passc-dyn.exp, gdb.trace/passcount.exp, gdb.trace/report.exp,
	gdb.trace/save-trace.exp, gdb.trace/tfind.exp, gdb.trace/tracecmd.exp,
	gdb.trace/while-dyn.exp, gdb.trace/while-stepping.exp: Remove special
	casing for m68k-*-elf.
2009-11-05 20:06:03 +00:00
Nathan Sidwell c418769792 * gdb.arch/i386-gnu-cfi.exp: Define SYMBOL_PREFIX on *-*-mingw*.
* gdb.arch/i386-prologue.exp: Likewise.
	* gdb.arch/i386-unwind.exp: Likewise.
2009-11-03 16:44:16 +00:00
Daniel Jacobowitz db16b77203 * lib/gdb.exp (gdb_expect): Fix timeout typo. 2009-11-02 17:28:16 +00:00
Daniel Jacobowitz bcf7127760 * gdb.base/opaque.exp: Remove duplicate tests and xyz from test name. 2009-11-02 15:59:01 +00:00
Daniel Jacobowitz 0105cee2be * gdb.cp/ctti.exp: Correct return values for unsigned char functions. 2009-11-02 15:53:53 +00:00
Jan Kratochvil 24ddea6286 gdb/
* symfile.c (build_id_to_debug_filename): New variable debugdir.  Move
	variables size, s and data into a new inner block.  Change xmalloc for
	alloca, use direct BUILDID->SIZE there now.  Loop for the
	DEBUG_FILE_DIRECTORY components.
	(find_separate_debug_file): New variable debugdir and debugdir_end.
	Loop for the DEBUG_FILE_DIRECTORY components.
	(_initialize_symfile): For "debug-file-directory" use plural and note
	one can use multiple components now.

gdb/doc/
	* gdb.texinfo (set debug-file-directory, show debug-file-directory)
	(Auto-loading): Use plural and note one can use multiple components now.

gdb/testsuite/
	* gdb.base/sepdebug.exp: New test_different_dir call for multiple-dirs.
2009-11-02 14:59:53 +00:00