Commit Graph

4703 Commits

Author SHA1 Message Date
Andrew Burgess 2f27adfe29 http://sourceware.org/ml/gdb-patches/2012-10/msg00525.html
gdb/ChangeLog

        PR cli/14772
        * c-typeprint.c (c_print_type): Don't print a space for vector
        types, this is handled within the suffix.
        (c_type_print_varspec_suffix): Add a space to vector suffix

gdb/testsuite/ChangeLog

        PR cli/14772
        * gdb.base/gnu_vector.c (union_with_vector_1)
        (struct_with_vector_1): Add new struct and union for testing
        ptype.
        * gdb.base/gnu_vector.exp: Add testing of ptype on vectors, and
        structs / unions containing vectors.
2012-10-31 09:26:22 +00:00
Yao Qi bb662ca6e4 gdb/testsuite:
* gdb.trace/ftrace.exp (test_fast_tracepoints): Use
	'setup_kfail' instead of 'setup_kfail_for_target'.
	* gdb.base/varargs.exp: Likewise.
	* lib/gdb.exp (setup_kfail_for_target): Remove.
2012-10-25 14:56:09 +00:00
Joel Brobecker 528b42ae75 gdb.base/ldbl_e308.exp: Do not allow "inf" in value output.
That was an attempt at handling the targets where sizeof(long double)
is less than 8, but the way it was implement allows the bug that
this testcase verifies to come back without being noticed.

gdb/testsuite/ChangeLog:

        * gdb.base/ldbl_e308.exp: Remove "inf" from possible expected
        output for "print inp" test.
2012-10-25 11:16:18 +00:00
Mark Kettenis 635d23ff1a * gdb.base/varargs.exp: PR gdb/12790 is now fixed. 2012-10-25 08:59:07 +00:00
Mark Kettenis afdb064f98 * gdb.base/callfuncs.exp: PR gdb/12783 is now fixed. 2012-10-25 08:00:58 +00:00
Joel Brobecker d99dcf51e1 [Ada] Allow assignment to wide string.
Given the following variable declaration...

   Www : Wide_String := "12345";

... this patch allows the following assignment to work:

   (gdb) set variable www := "qwert"

Without this patch, the debugger rejects the assignment because
the size of the array elements are different:

   (gdb) set www := "asdfg"
   Incompatible types in assignment

(on the lhs, we have an array of 2-bytes elements, and on the rhs,
we have a standard 1-byte string).

gdb/ChangeLog:

        * ada-lang.c (ada_same_array_size_p): New function.
        (ada_promote_array_of_integrals): New function.
        (coerce_for_assign): Add handling of arrays where the elements
        are integrals of a smaller size than the size of the target
        array element type.

gdb/testsuite/ChangeLog:

        * gdb.ada/set_wstr: New testcase.
2012-10-24 18:14:23 +00:00
Joel Brobecker 3256027470 off-by-one max exponent computation in convert_doublest_to_floatformat
Assuming the following variable definition:

    long double inp = 2.0;

On platforms where "long double" is a double precision IEEE flaoting
point, GDB currently behaves as follow:

    (gdb) set variable inp = 1.6e+308l
    (gdb) p inp
    $2 = inf   <<<<---- !!!!

Instead, the value of "inp" should be printed as:

    (gdb) p inp
    $1 = 1.6e+308

The problem is due to a small error in the comparison of the exponent
versus the maximum value this exponent can take, causing us to think
that the value was too big to fit. But it isn't.

gdb/ChangeLog:

        * doublest.c (convert_doublest_to_floatformat): Fix comparison
        against maximum exponent value.

gdb/testsuite/ChangeLog:

        * gdb.base/ldbl_e308.c, gdb.base/ldbl_e308.exp: New files.
2012-10-24 18:11:21 +00:00
Joel Brobecker 5ded533171 [Ada] Pointers to unconstrained arrays inside variant record.
gdb/ChangeLog:

        * ada-lang.c (ada_template_to_fixed_record_type_1): Do not
        strip typedef layer when computing the fixed type's field type,
        only when computing its size.

gdb/testsuite/ChangeLog:

        * gdb.ada/unc_arr_ptr_in_var_rec: New testcase.
2012-10-24 18:06:10 +00:00
Mark Kettenis d8d842913d * gdb.base/callfuncs.exp: PR gdb/12783 is now fixed. 2012-10-24 14:59:24 +00:00
Jan Kratochvil 6e933c51ce gdb/testsuite/
* gdb.base/callfuncs.exp (do_function_calls): Fix
	setup_kfail_for_target for -m32 mode.
2012-10-24 13:45:51 +00:00
Mark Kettenis 274bd0009d * gdb.base/callfuncs.exp: PR gdb/12796, gdb/12798 and gdb/12800
are now fixed.
2012-10-23 18:25:25 +00:00
Yao Qi 545f743d64 gdb/testsuite:
* gdb.base/info-os.exp: Resume the inferior until it exits.
2012-10-23 15:49:11 +00:00
xuepeng guo 99c7d5a823 Correct my ChangeLog entry 2012-10-19 07:50:20 +00:00
xuepeng guo 48b56b6a3e * gdb.base/ctxobj.exp: Skip if skip_shlib_tests returns true.
* gdb.base/print-file-var.exp: Likewise.
        * gdb.base/type-opaque.exp: Likewise.
2012-10-19 07:36:19 +00:00
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
Yao Qi 448835468f gdb/testsuite/
* gdb.reverse/solib-precsave.exp: Skip if skip_shlib_test
	returns true.
	Call gdb_load_shlibs.
	* gdb.reverse/solib-reverse.exp: Likewise.
2012-10-16 13:14:36 +00:00
Keith Seitz 345f514a93 * lib/cp-support.exp (cp_test_ptype_class): Add support
for class typedefs.

	* gdb.cp/derivation.exp: Add tests for g_instance.
2012-10-15 22:32:50 +00:00
Jan Kratochvil 9e3a7d65fb gdb/
Fix entry values resolving in inlined frames.
	* dwarf2loc.c (dwarf_expr_reg_to_entry_parameter): Move func_addr,
	gdbarch and caller_frame initialization later.  Skip INLINE_FRAME
	entries of FRAME.

gdb/testsuite/
	Fix entry values resolving in inlined frames.
	* gdb.arch/amd64-entry-value-inline.S: New file.
	* gdb.arch/amd64-entry-value-inline.c: New file.
	* gdb.arch/amd64-entry-value-inline.exp: New file.
2012-10-15 19:15:57 +00:00
Jan Kratochvil 21a7b08989 gdb/testsuite/
Fix recent gdb_breakpoint regression.
	* gdb.java/jmisc.exp: gdb_breakpoint for $function - remove curly
	braces from the parameter.
	* gdb.java/jprint.exp: Likewise.
2012-10-15 19:11:56 +00:00
Doug Evans 2c47921e64 * lib/gdb.exp (runto): Fix call to gdb_breakpoint. 2012-10-15 17:35:54 +00:00
Joel Brobecker 89398707cd Remove trailing '#' in gdb.dwarf2/dw2-icc-opaque.S
gdb/testsuite/ChangeLog:

        * gdb.dwarf2/dw2-icc-opaque.S: Remove '#'.
2012-10-15 17:26:14 +00:00
Tom Tromey 801e418523 PR python/14635:
* python/py-symtab.c (del_objfile_sal): Set 'symtab' field
	to Py_None.
testsuite
	* gdb.python/py-symtab.exp: Test sal and symtab destructors.
2012-10-15 15:23:47 +00:00
Tom Tromey 74f910c87c PR python/14634:
* python/py-symbol.c (sympy_dealloc): Check for NULL symbol.
testsuite
	* gdb.python/py-symbol.exp: Test symbol destructor.
2012-10-15 15:20:27 +00:00
Yao Qi 91567807f8 gdb/testsuite/
* gdb.mi/mi2-cli.exp: Move to mi-cli.exp.
	* gdb.mi/mi-cli.exp: New.

	* gdb.mi/mi2-basics.exp: Remove.
	* gdb.mi/mi2-break.exp: Remove.
	* gdb.mi/mi2-console.exp: Remove.
	* gdb.mi/mi2-disassemble.exp: Remove.
	* gdb.mi/mi2-eval.exp: Remove.
	* gdb.mi/mi2-file.exp: Remove.
	* gdb.mi/mi2-hack-cli.exp: Remove.
	* gdb.mi/mi2-pthreads.exp: Remove.
	* gdb.mi/mi2-read-memory.exp: Remove.
	* gdb.mi/mi2-regs.exp: Remove.
	* gdb.mi/mi2-return.exp: Remove.
	* gdb.mi/mi2-simplerun.exp: Remove.
	* gdb.mi/mi2-stack.exp: Remove.
	* gdb.mi/mi2-stepi.exp: Remove.
	* gdb.mi/mi2-syn-frame.exp: Remove.
	* gdb.mi/mi2-until.exp: Remove.
	* gdb.mi/mi2-watch.exp: Remove.
	* gdb.mi/mi2-var-block.exp: Remove.
	* gdb.mi/mi2-var-cmd.exp: Remove.
	* gdb.mi/mi2-var-display.exp: Remove.
2012-10-14 12:24:08 +00:00
Yao Qi 8733202903 gdb/testsuite/
* gdb.mi/mi-breakpoint-changed.exp (test_pending_resolved): Remove
	trail '.*' on matching patterns.
2012-10-12 00:02:23 +00:00
H.J. Lu 11fc905705 Use is_x86_like_target to check x86 targets
* gdb.arch/i386-bp_permanent.exp: Skip if not is_x86_like_target.
	* gdb.arch/i386-cfi-notcurrent.exp: Likewise.
	* gdb.arch/i386-disp-step.exp: Likewise.
	* gdb.arch/i386-gnu-cfi.exp: Likewise.
	* gdb.arch/i386-prologue.exp: Likewise.
	* gdb.arch/i386-size-overlap.exp: Likewise.
	* gdb.arch/i386-size.exp: Likewise.
	* gdb.arch/i386-unwind.exp: Likewise.
2012-10-11 17:42:58 +00:00
H.J. Lu 7d46bcdc05 Check byte/word registers on x86_64
* gdb.arch/i386-byte.exp: Remove is_ilp32_target check.
	* gdb.arch/i386-word.exp: Likewise.
2012-10-11 17:41:33 +00:00
H.J. Lu 31224d9db8 Check is_amd64_regs_target to to set nr_regs
* gdb.arch/i386-avx.exp: Check is_amd64_regs_target instead of
	is_ilp32_target to set nr_regs.
	* gdb.arch/i386-sse.exp: Likewise.
2012-10-11 17:40:30 +00:00
Doug Evans 7c09e5a0f7 PR breakpoints/14643.
* linespec.c (struct ls_parser): New member keyword_ok.
	(linespec_lexer_lex_string): Add comment.
	(linespec_lexer_lex_one): Ignore keywords if it's the wrong place
	for one.
	(parse_linespec): Set keyword_ok.

	testsuite/
	* gdb.linespec/ls-errs.exp: Change tests of "b if|task|thread".
	* gdb.linespec/thread.c: New file.
	* gdb.linespec/thread.exp: New file.
2012-10-11 16:12:05 +00:00
Doug Evans 5b7d00507b * lib/gdb.exp (gdb_breakpoint): Fix varargs scan.
Recognize "message" -> print pass and fail.  Add eof case.
	(runto): Recognize message, no-message.  Print pass/fail if requested,
	with same treatment as gdb_breakpoint.
	(runto_main): Pass no-message to runto.
	(gdb_internal_error_resync): Add log message.
	(gdb_file_cmd): Tweak internal error fail text for consistency.
2012-10-11 15:59:57 +00:00
Jan Kratochvil 2e24f4aab7 gdb/
Fix crash during stepping on ppc32.
	* ppc-linux-tdep.c (powerpc_linux_in_dynsym_resolve_code): Test NULL
	SYM.

gdb/testsuite/
	Fix crash during stepping on ppc32.
	* gdb.base/step-symless.c: New file.
	* gdb.base/step-symless.exp: New file.
2012-10-06 21:10:33 +00:00
Doug Evans aa14df2525 PR symtab/14601
* buildsym.c (buildsym_init): Reset using_directives to NULL.

	testsuite/
	* gdb.cp/using-crash.exp: New file.
	* gdb.cp/using-crash.cc: New file.
2012-10-03 17:05:00 +00:00
Doug Evans 975531dbc9 * lib/gdb.exp (gdb_unload): Change wording of perror text to be
more consistent.
	(runto,gdb_debug_format): Ditto.
	(gdb_file_cmd): Watch for eof in nested gdb_expect.
	Clean up logging and error messages.
2012-10-02 17:17:45 +00:00
Andrew Burgess b3dc46ff7c http://sourceware.org/ml/gdb-patches/2012-09/msg00568.html
gdb/ChangeLog

        * target.c (simple_search_memory): Include access length in
        warning message.

gdb/gdbserver/ChangeLog

        * server.c (handle_search_memory_1): Include access length in
        warning message.

gdb/testsuite/ChangeLog

        Test find command on unmapped memory.
        * gdb.base/find-unmapped.c: New file.
        * gdb.base/find-unmapped.exp: New file.
2012-10-01 12:02:13 +00:00
Yao Qi 45814d4572 gdb/testsuite/
* gdb.trace/mi-tracepoint-changed.exp: New.
	* gdb.mi/mi-breakpoint-changed.exp: New.
	* gdb.mi/pending.c, gdb.mi/pendshr1.c: New
	* gdb.mi/pendshr2.c: New.
2012-09-29 00:03:56 +00:00
Yao Qi 4c2786ba1e gdb/
* mi/mi-main.c (mi_cmd_data_write_memory): Call
	write_memory_with_notification instead of write_memory.
	(mi_cmd_data_write_memory_bytes): Call write_memory_with_notification
	instead of target_write_memory.

gdb/testsuite/
	* gdb.mi/pr11022.exp: New.
	* gdb.mi/pr11022.c: New.  Copied from gdb.base/.
2012-09-28 00:39:18 +00:00
Tom Tromey 7977e5d2a6 Fix https://bugzilla.redhat.com/show_bug.cgi?id=849357
* cp-valprint.c (cp_print_value_fields): Use get_vptr_fieldno.
gdb/testsuite
	* gdb.cp/derivation.exp: Add regression test.
	* gdb.cp/derivation.cc (class V_base, class V_inter, class
	V_derived): New.
	(vderived): New global.
2012-09-27 16:04:23 +00:00
Tom Tromey 0971de02d5 * dwarf2read.c (mark_common_block_symbol_computed): New function.
(read_common_block): Handle child DIEs with
	DW_AT_data_member_location.
	(new_symbol_full): Add special case for common blocks.
gdb/testsuite
	* gdb.dwarf2/dw2-common-block.S: New file.
	* gdb.dwarf2/dw2-common-block.exp: New file.
2012-09-26 19:50:13 +00:00
Tom Tromey 4357ac6c6f 2012-09-26 Jan Kratochvil <jan.kratochvil@redhat.com>
Tom Tromey  <tromey@redhat.com>
	* dwarf2read.c (read_common_block): Rewrite.
	(new_symbol_full): Handle DW_TAG_common_block.
	* f-lang.c (head_common_list, find_common_for_function):
	Remove.
	* f-lang.h (struct common_entry, struct saved_f77_common,
	SAVED_F77_COMMON, SAVED_F77_COMMON_PTR, COMMON_ENTRY,
	COMMON_ENTRY_PTR, head_common_list, find_common_for_function,
	BLANK_COMMON_NAME_LOCAL): Remove.
	(struct common_block): New.
	* f-valprint.c (list_all_visible_commons): Remove.
	(info_common_command_for_block): New function.
	(info_common_command): Use it.
	* stack.c (iterate_over_block_locals): Special case for
	COMMON_BLOCK_DOMAIN.
	* symtab.h (enum domain_enum_tag) <COMMON_BLOCK_DOMAIN>: New
	constant.
	(struct general_symbol_info) <value.common_block>: New field.
	(SYMBOL_VALUE_COMMON_BLOCK): New define.
gdb/testsuite
2012-09-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
	* gdb.fortran/common-block.exp: New file.
	* gdb.fortran/common-block.f90: New file.
2012-09-26 19:38:32 +00:00
Andrew Burgess 6f380991ba http://sourceware.org/ml/gdb-patches/2012-09/msg00403.html
gdb/ChangeLog

        * breakpoint.c (update_global_location_list): Ignore previous
        duplicate status of a breakpoint when starting a new scan for
        duplicate breakpoints.

gdb/testsuite/ChangeLog

        * gdb.base/duplicate-bp.c: New file.
        * gdb.base/duplicate-bp.exp: New file.
2012-09-26 16:36:00 +00:00
Yao Qi 8ae551cf47 gdb/testsuite:
* gdb.mi/mi2-cli.exp:  Avoid line number in test summary.

	Revert:
	2012-09-21  Yao Qi  <yao@codesourcery.com>

	* gdb.mi/mi2-cli.exp: Remove redundant '\'.
2012-09-26 06:53:46 +00:00
Siddhesh Poyarekar 318102b961 gdb/ChangeLog:
* c-typeprint.c (c_type_print_varspec_suffix): Remove cast and
	use plongest to print the array size.

testsuite/ChangeLog:

	* gdb.base/longest-types.c: New test case.
	* gdb.base/longest-types.exp: New test case.
2012-09-25 12:20:42 +00:00
Yao Qi a1e5fd6938 gdb/testsuite:
* gdb.mi/mi2-cli.exp: Check breakpoint notification.
2012-09-25 00:55:15 +00:00
Jan Kratochvil 04e7407c59 gdb/
Fix internal error on canonicalization of clang types.
	* cp-name-parser.y (operator): New comment at make_operator call for
	new, delete, new[] and delete[].
	(exp): Use "sizeof ".  Add new comment at make_operator call.

gdb/testsuite/
	Fix internal error on canonicalization of clang types.
	* gdb.dwarf2/dw2-canonicalize-type.S: New file.
	* gdb.dwarf2/dw2-canonicalize-type.exp: New file.
	* lib/gdb.exp (gdb_file_cmd): Catch also GDB internal error.
2012-09-21 20:01:12 +00:00
Jan Kratochvil 9bf4bce984 gdb/
Fix disassemble without parameters in tailcall frame.
	* cli/cli-cmds.c (disassemble_current_function): Use
	get_frame_address_in_block.

gdb/testsuite/
	Fix disassemble without parameters in tailcall frame.
	* gdb.arch/amd64-entry-value.exp (down, disassemble): New tests.
2012-09-21 18:53:15 +00:00
Andrew Burgess 2603f7eeca http://sourceware.org/ml/gdb-patches/2012-08/msg00715.html
gdb/ChangeLog

        * findvar.c (read_frame_register_value): Mark the result value as
        optimized out if any of the input registers have been optimized out.

gdb/testsuite/ChangeLog

        * gdb.dwarf2/dw2-op-out-param.S: New file.
        * gdb.dwarf2/dw2-op-out-param.exp: New file.
2012-09-21 17:17:23 +00:00
Yao Qi a3569abd1a gdb/testsuite:
* gdb.mi/mi2-cli.exp: Remove redundant '\'.
2012-09-21 12:26:30 +00:00
Yao Qi a065d7af0e gdb/testsuite:
* gdb.mi/mi-cli.exp: Remove.
	* gdb.mi/mi2-cli.exp: Merged from mi-cli.exp.
2012-09-21 08:39:08 +00:00
Yao Qi 15544bd96e gdb/testsuite:
* gdb.mi/mi-reverse.exp: Fix the typo in expected output of
	"=record-started" notification.
2012-09-21 07:29:46 +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