Commit Graph

4731 Commits

Author SHA1 Message Date
Tom Tromey 18a9fc1261 * NEWS: Update.
* data-directory/Makefile.in (PYTHON_FILES): Add
	type_printers.py.
	* python/lib/gdb/command/type_printers.py: New file.
	* python/lib/gdb/command/types.py (TypePrinter): New class.
	(_get_some_type_recognizers, get_type_recognizers,
	apply_type_recognizers, register_type_printer): New
	functions.
	* python/py-objfile.c (objfile_object) <type_printers>: New
	field.
	(objfpy_dealloc): Decref new field.
	(objfpy_new): Set new field.
	(objfpy_get_type_printers, objfpy_set_type_printers): New
	functions.
	(objfile_to_objfile_object): Set new field.
	(objfile_getset): Add "type_printers".
	* python/py-progspace.c (pspace_object) <type_printers>: New
	field.
	(pspy_dealloc): Decref new field.
	(pspy_new): Set new field.
	(pspy_get_type_printers, pspy_set_type_printers): New functions.
	(pspace_to_pspace_object): Set new field.
	(pspace_getset): Add "type_printers".
	* python/python.c (start_type_printers, apply_type_printers,
	free_type_printers): New functions.
	(_initialize_python): Set gdb.type_printers.
	* python/python.h (start_type_printers, apply_type_printers,
	free_type_printers): Declare.
	* typeprint.c (type_print_raw_options, default_ptype_flags):
	Update for new fields.
	(do_free_global_table, create_global_typedef_table,
	find_global_typedef): New functions.
	(find_typedef_in_hash): Use find_global_typedef.
	(whatis_exp): Use create_global_typedef_table.  Change cleanup
	handling.
	* typeprint.h (struct type_print_options) <global_typedefs,
	global_printers>: New fields.
doc
	* gdb.texinfo (Symbols): Document "info type-printers",
	"enable type-printer" and "disable type-printer".
	(Python API): Add new node to menu.
	(Type Printing API): New node.
	(Progspaces In Python): Document type_printers field.
	(Objfiles In Python): Likewise.
	(gdb.types) <get_type_recognizers, apply_type_recognizers,
	register_type_printer, TypePrinter>: Document.
testsuite
	* gdb.base/completion.exp: Update for "info type-printers".
	* gdb.python/py-typeprint.cc: New file.
	* gdb.python/py-typeprint.exp: New file.
	* gdb.python/py-typeprint.py: New file.
2012-11-12 17:41:59 +00:00
Tom Tromey bd69fc683f * c-typeprint.c (find_typedef_for_canonicalize,
print_name_maybe_canonical): New functions.
	(c_print_type): Look up type name.
	(cp_type_print_derivation_info): Add flags argument.  Use
	print_name_maybe_canonical.
	(cp_type_print_method_args): Add wrapping.
	(c_type_print_varspec_prefix): Use print_name_maybe_canonical.
	(c_type_print_template_args): New function.
	(c_type_print_base): Change wrapping.  Use
	print_name_maybe_canonical.
	<TYPE_CODE_STRUCT>: Possibly create a typedef hash, and do
	type name lookups.
	* gdbtypes.c (types_equal): No longer static.
	* gdbtypes.h (types_equal): Declare.
	* typeprint.c (type_print_raw_options, default_ptype_flags):
	Update.
	(struct typedef_hash_table): New.
	(hash_typedef_field, eq_typedef_field,
	recursively_update_typedef_hash, add_template_parameters,
	create_typedef_hash, free_typedef_hash, do_free_typedef_hash,
	make_cleanup_free_typedef_hash, copy_typedef_hash_element,
	copy_typedef_hash, find_typedef_in_hash): New functions.
	* typeprint.h (struct type_print_options) <local_typedefs>:
	New field.
	(recursively_update_typedef_hash, add_template_parameters,
	create_typedef_hash, free_typedef_hash,
	make_cleanup_free_typedef_hash, copy_typedef_hash,
	find_typedef_in_hash): Declare.
testsuite
	* gdb.base/call-sc.exp: Use "ptype/r".
	* gdb.base/volatile.exp: Don't expect "int".
	* gdb.cp/ptype-flags.cc: New file.
	* gdb.cp/ptype-flags.exp: New file.
	* gdb.cp/templates.exp: Use ptype/r.
	(test_ptype_of_templates, test_template_typedef): Likewise.
	* lib/cp-support.exp (cp_test_ptype_class): Add in_ptype_arg
	argument.  Handle template names and template parameters.
	* gdb.mi/mi-var-cmd.exp: Accept "long".
	* gdb.mi/mi-var-child.exp: Accept "long".
	* gdb.mi/mi-var-display.exp: Accept "long".
	* gdb.mi/mi2-var-child.exp: Accept "long".
2012-11-12 17:37:38 +00:00
Tom Tromey b3720c3afd * gdb.cp/classes.exp (test_ptype_class_objects): Remove
"ptype" from calls to cp_test_ptype_class.
	(test_enums): Likewise.
	* gdb.cp/derivation.exp: Remove "ptype" from calls to
	cp_test_ptype_class.
	* gdb.cp/inherit.exp (test_ptype_si): Remove "ptype" from
	calls to cp_test_ptype_class.
	(test_ptype_mi, test_ptype_vi, test_ptype_mvi): Likewise.
	* gdb.cp/virtfunc.exp (test_ptype_of_classes): Remove "ptype"
	from calls to cp_test_ptype_class.
	* lib/cp-support.exp (cp_test_ptype_class): Supply "ptype"
	command here.  Change "in_command" argument to "in_exp".
2012-11-12 17:08:09 +00:00
Keith Seitz 0d63ecdad0 PR gdb/14288
* c-valprint.c (c_val_print): For character arrays
        with "print null" option on, print ellipses if
        the output is truncated and the next character is not \000.
        * valprint.c (MAX_WCHARS): Define.
        (WCHAR_BUFLEN): Likewise.
        (WCHAR_BUFLEN_MAX): Likewise.
        (struct converted_character): New structure.
        (count_next_character): New function.
        (print_converted_chars_to_obstack): New function.
        (generic_printstr): Rewrite using count_next_character
        and print_converted_chars_to_obstack.

        * gdb.base/printcmds.c: Add invalid_XXX globals
        for repeated byte tests.
        * gdb.base/printcmds.exp (test_repeat_bytes): New procedure.
        * gdb.base/wchar.c (main): Add and construct a wchar_t
        array with repeated characters.
        * gdb.base/wchar.exp: Add repeated character tests.
2012-11-10 20:19:01 +00:00
Andrew Burgess ed8a1c2de8 http://sourceware.org/ml/gdb-patches/2012-10/msg00083.html
gdb/ChangeLog

        * source.c (print_source_lines_base): Add fullname field giving
        full path to file in mi output.
        * NEWS: Mention the new fullname field.

gdb/doc/ChangeLog


        * gdb.texinfo (GDB/MI Data Manipulation): Add fullname field to
        the example -data-disassemble output.  Extend the description of
        the -data-disassemble results to document all fields.  Document
        the cli disassemble command as being related to -data-disassemble.

gdb/testsuite/ChangeLog

        * gdb.mi/mi-disassemble.exp: Expect fullname field in mi
        disassembly output.
2012-11-09 13:23:33 +00:00
Pedro Alves 9107fc8d18 2012-11-09 Pedro Alves <palves@redhat.com>
PR gdb/14306

	* infrun.c: Include target-descriptions.h.
	(follow_exec): Fetch new target description.

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

	PR gdb/14306

	* gdb.multi/multi-arch-exec.c: New file.
	* gdb.multi/multi-arch-exec.exp: New file.
2012-11-09 12:20:24 +00:00
Yao Qi 558a9d8255 2012-11-09 Yao Qi <yao@codesourcery.com>
* breakpoint.c: Declare set_tracepoint_count.
        (install_breakpoint): Call set_tracepoint_count if B is a
        tracepoint.
        (trace_command): Don't call set_tracepoint_count.  Re-indent.
        (strace_command, ftrace_command):
        (create_tracepoint_from_upload): Likewise.

gdb/testsuite:

2012-11-09  Yao Qi  <yao@codesourcery.com>

        * gdb.mi/mi-break.exp (test_abreak_creation): New procedure.
        (top level): Call it
2012-11-09 07:21:03 +00:00
Yao Qi e714f336ee gdb/testsuite:
* gdb.mi/mi-watch.exp (test_rwatch_creation_and_listing): Fix
	typo.
2012-11-09 02:30:49 +00:00
Pedro Alves 6ecd47299a gdb/
2012-11-09  Pedro Alves  <palves@redhat.com>

	* gdbarch.sh (target_gdbarch) <gdbarch.h>: Reimplement as macro.
	(get_target_gdbarch) <gdbarch.h>: New function.
	(startup_gdbarch) <gdbarch.h>: Declare.
	<gdbarch.c> (target_gdbarch): Delete.
	<gdbarch.c> (deprecated_target_gdbarch_select_hack): Set the
	current inferior's gdbarch.
	<gdbarch.c> (get_target_gdbarch): New function.
	* inferior.c: Include target-descriptions.h.
	(free_inferior): Free target description info.
	(add_inferior_with_spaces): Set the inferior's initial
	architecture.
	(clone_inferior_command): Copy the original inferior's target
	description if it was user specified.
	(initialize_inferiors): Add comment.
	* inferior.h (struct target_desc_info): Forward declare.
	(struct inferior) <gdbarch>: New field.
	* linux-nat.c: Include target-descriptions.h.
	(linux_child_follow_fork): Copy the parent's architecture and
	target description to the child.
	* target-descriptions.c: Include inferior.h.
	(struct target_desc_info): New structure, holding the equivalents
	of ...
	(target_desc_fetched, current_target_desc)
	(target_description_filename): ... these removed globals.
	(get_tdesc_info, target_desc_info_from_user_p)
	(copy_inferior_target_desc_info, target_desc_info_free): New.
	(target_desc_fetched, current_target_desc)
	(target_description_filename): Reimplemented as convenience
	macros.
	(tdesc_filename_cmd_string): New global.
	(set_tdesc_filename_cmd): Copy the string manipulated by the "set
	tdescs filename ..." commands to the per-inferior equivalent.
	(show_tdesc_filename_cmd): Get the value to show from the
	per-inferior description filename.
	(_initilize_target_descriptions): Change the "set/show tdesc
	filename" commands' variable.
	* target-descriptions.h (struct target_desc, struct target_desc_info)
	(struct inferior): Forward declare.
	(target_find_description, target_clear_description)
	(target_current_description): Adjust comments.
	(copy_inferior_target_desc_info, target_desc_info_free)
	(target_desc_info_from_user_p). Declare.

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

	* gdb.multi/multi-arch.exp: New.
2012-11-09 01:47:20 +00:00
Tom Tromey 9015683b1c gdb
* linux-tdep.c (linux_make_siginfo_note): New function.
	(linux_make_corefile_notes): Use it.
	* corelow.c (get_core_siginfo): New function.
	(core_xfer_partial) <TARGET_OBJECT_SIGNAL_INFO>: New case.
gdb/testsuite
	* gdb.base/siginfo-obj.exp: Create core file.  Test siginfo from
	core files, if possible.
	* gdb.base/siginfo-thread.c: New file
	* gdb.base/siginfo-thread.exp: New file
bfd
	* elf.c (elfcore_grok_note) <NT_SIGINFO>: New case; make
	pseudosection.
2012-11-08 21:16:43 +00:00
Tom Tromey ea9f10bb87 PR gdb/14704:
* gdb_bfd.c (gdb_bfd_ref): Set BFD_DECOMPRESS.
	(zlib_decompress_section): Remove.
	(gdb_bfd_map_section): Only check for compressed section
	in mmap case.  Use bfd_get_full_section_contents.
	* osabi.c (check_note): Add 'sectsize' argument.  Read
	section data.
	(generic_elf_osabi_sniff_abi_tag_sections): Don't read
	section data.  Update for check_note change.
	* xcoffread.c (xcoff_initial_scan): Use
	bfd_get_full_section_contents.
	* py-auto-load.c (auto_load_section_scripts): Use
	bfd_get_full_section_contents.
	* contrib/cc-with-tweaks.sh: Add -Z option.
testsuite
	* gdb.base/comprdebug.exp: New file.
2012-11-08 19:52:42 +00:00
Pedro Alves f659243918 gdb/
2012-11-06  Pedro Alves  <palves@redhat.com>

	PR gdb/14810

	* breakpoint.c (bpstat_stop_status): Skip disabled locations.

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

	PR gdb/14810

	* gdb.base/disabled-location.c: New file.
	* gdb.base/disabled-location.exp: New file.
2012-11-06 15:25:05 +00:00
Tom Tromey 2d338fa948 * gdb.threads/gcore-thread.exp: Use gdb_gcore_cmd.
* gdb.python/py-strfns.exp (test_strfns_core_file): Use
	gdb_gcore_cmd.
	* gdb.cell/gcore.exp: Use gdb_gcore_cmd.
	* gdb.base/gcore.exp: Use gdb_gcore_cmd.
	* gdb.base/gcore-relro.exp: Use gdb_gcore_cmd.
	* gdb.base/gcore-buffer-overflow.exp: Use gdb_gcore_cmd.
	* gdb.base/auxv.exp: Use gdb_gcore_cmd.
	* gdb.arch/vsx-regs.exp: Use gdb_gcore_cmd.
	* gdb.arch/system-gcore.exp: Use gdb_gcore_cmd.
	* gdb.arch/pa-nullify.exp (test_core_bt): Use gdb_gcore_cmd.
	* lib/gdb.exp (gdb_gcore_cmd): New proc.
2012-11-06 15:21:24 +00:00
Pedro Alves 68c9da300b gdb/
2012-11-05  Pedro Alves  <palves@redhat.com>

	* inferior.c (exit_inferior_1): Clear 'vfork_parent' in the vfork
	child.  Clear 'pending_detach'.
	* infrun.c (handle_vfork_child_exec_or_exit): Clear
	'pending_detach' in the vfork parent.

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

	* gdb.base/foll-vfork.exp (vfork_relations_in_info_inferiors): New
	procedure.
	(do_vfork_and_follow_child_tests_exec)
	(do_vfork_and_follow_child_tests_exit): Call it.
2012-11-05 18:56:45 +00:00
Pedro Alves a7c8c9312a 2012-11-05 Pedro Alves <palves@redhat.com>
* gdb.base/foll-vfork.c (main): Call perror and _exit if execlp()
	fails.
2012-11-05 16:23:36 +00:00
Yao Qi 6f6484cd83 gdb:
Fix PR gdb/14617.
	* breakpoint.c (trace_pass_set_count): Call
	observer_notify_breakpoint_modified instead of
	observer_notify_tracepoint_modified.
	* mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.

gdb/doc:

	* observer.texi (GDB Observers): Remove observer
	'tracepoint_modified', 'tracepoint_created' and
	'tracepoint_deleted'.

gdb/testsuite:

	Fix PR gdb/14617.
	* gdb.mi/mi-breakpoint-changed.exp (test_insert_delete_modify):
	Remove setup_kfail, and update test.
2012-11-03 12:14:47 +00:00
Tom Tromey b45627a039 * breakpoint.c (catch_syscall_completer): Pass 'word' as second
argument to complete_on_enum.
testsuite
	* gdb.base/catch-syscall.exp (do_syscall_tests): Add completion
	test.
2012-11-02 19:05:12 +00:00
Pedro Alves f50f4e56a6 gdb/
2012-11-02  Pedro Alves  <palves@redhat.com>

	PR gdb/14766

	* infrun.c (handle_inferior_event)
	<TARGET_WAITKIND_EXITED/TARGET_WAITKIND_SIGNALLED>: Switch to
	null_ptid before handling a vfork child exec or exit.  Switch to
	the event ptid afterwards.

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

	PR gdb/14766

	* gdb.base/foll-vfork.exp (vfork_child_follow_to_exit): Remove
	setup_kfail.
	(tcatch_vfork_then_child_follow_exit): No longer expect "Couldn't
	get registers".
2012-11-02 18:13:37 +00:00
Pedro Alves 71ce889da9 2012-11-02 Pedro Alves <palves@redhat.com>
* gdb.base/foll-vfork-exit.c: New file.
	* gdb.base/foll-vfork.exp (top level): New file-describing
	comment.
	(vfork_child_follow_to_exit): New procedure.
	(tcatch_vfork_then_child_follow): Rename as ...
	(tcatch_vfork_then_child_follow_exec): ... this.
	(tcatch_vfork_then_child_follow_exit): New procedure.
	(do_vfork_and_follow_parent_tests): New procedure, factored out
	from do_vfork_and_exec_tests.
	(do_vfork_and_follow_child_tests_exec): Ditto.
	(do_vfork_and_exec_tests): Delete.
	(do_vfork_and_follow_child_tests_exit): New procedure.
	(top level): Run tests with both the program that has the vfork
	child execing, and the program has the vfork child exiting.
2012-11-02 18:10:29 +00:00
Pedro Alves 1e35b1a94e Move entries to correct ChangeLog file...
gdb/ChangeLog -> gdb/testsuite/ChangeLog
2012-11-02 18:06:46 +00:00
Pedro Alves 39c1263a21 2012-11-02 Pedro Alves <palves@redhat.com>
* gdb.base/foll-vfork.exp (setup_gdb): New procedure.
	(check_vfork_catchpoints, vfork_parent_follow_through_step)
	(vfork_parent_follow_to_bp): Call it.
	(kill_child): Delete.
	(vfork_and_exec_child_follow_to_main_bp)
	(vfork_and_exec_child_follow_through_step): Call setup_gdb.  No
	longer call kill_child.
	(tcatch_vfork_then_parent_follow): Call setup_gdb.
	(do_vfork_and_exec_tests): Don't runto_main before calling each
	test procedure.
	(top level): Don't clean restart and set verbose before running
	each test procedure.
2012-11-02 18:02:01 +00:00
Pedro Alves 339aeac6e5 2012-11-02 Pedro Alves <palves@redhat.com>
* gdb.base/foll-vfork.exp (vfork_parent_follow_through_step)
	(vfork_parent_follow_to_bp)
	(vfork_and_exec_child_follow_to_main_bp)
	(vfork_and_exec_child_follow_through_step)
	(tcatch_vfork_then_parent_follow)
	(tcatch_vfork_then_parent_follow, tcatch_vfork_then_child_follow):
	Use with_test_prefix.
2012-11-02 18:00:00 +00:00
Pedro Alves 19378a72b7 2012-11-02 Pedro Alves <palves@redhat.com>
* gdb.base/foll-vfork.c: Add copyright header.
	* gdb.base/vforked-prog.c: Add copyright header.
2012-11-02 17:59:13 +00:00
Pedro Alves 6dbc89975e 2012-11-02 Pedro Alves <palves@redhat.com>
* gdb.base/foll-vfork.exp
	(vfork_and_exec_child_follow_through_step): Don't skip on
	non-HP/UX targets.  Expect the next to only step one line on
	non-HP/UX targets, rather than stopping only after the exec.
2012-11-02 17:58:39 +00:00
Pedro Alves 43ae8f0101 2012-11-02 Pedro Alves <palves@redhat.com>
Don't hard code line numbers.

	* gdb.base/foll-vfork.exp (vfork_parent_follow_through_step):
	Expect text from the sources instead of a line number.
	(vfork_parent_follow_to_bp)
	(vfork_and_exec_child_follow_to_main_bp)
	(vfork_and_exec_child_follow_through_step)
	(tcatch_vfork_then_parent_follow, tcatch_vfork_then_child_follow):
	Use gdb_get_line_number.
2012-11-02 17:57:45 +00:00
Pedro Alves 771bc0af44 2012-11-02 Pedro Alves <palves@redhat.com>
Modernize.

	* gdb.base/foll-vfork.exp: Use standard_testfile and
	build_executable.  Pass descriptive string to untested.
	(vfork_parent_follow_through_step, vfork_parent_follow_to_bp)
	(vfork_and_exec_child_follow_to_main_bp)
	(vfork_and_exec_child_follow_through_step)
	(tcatch_vfork_then_parent_follow, tcatch_vfork_then_child_follow)
	(do_vfork_and_exec_tests): Use gdb_test/gdb_test_multiple instead
	of send_gdb/gdb_expect.

	(kill_child): New procedure.
	(vfork_and_exec_child_follow_to_main_bp)
	(vfork_and_exec_child_follow_through_step): Use it.
2012-11-02 17:57:04 +00:00
Yao Qi f0559fff60 gdb:
2012-11-02  Yao Qi  <yao@codesourcery.com>

	* std-operator.def: Remove OP_LABELED.
	* eval.c: Remove the declaration of 'get_label'.
	(get_label): Remove.
	(evaluate_struct_tuple): Remove code handling OP_LABELED.
	Update comment.
	Remove local variable 'variantno' and related code.
	Replace 'substruct_type' with 'struct_type'.  Replace 'subfieldno'
	with 'fieldno'.
	* expprint.c (print_subexp_standard): Likewise.
	(dump_subexp_body_standard): Likewise.
	* parse.c (operator_length_standard): Likewise.

gdb/testsuite:

2012-11-02  Yao Qi  <yao@codesourcery.com>

	* gdb.base/setvar.exp: Test setting nested struct.
	* gdb.base/setvar.c (v_struct3): New.
2012-11-02 00:14:39 +00:00
Doug Evans c207c6da70 * gdb.arch/amd64-pseudo.c (main): Mark registers that the testsuite
changes as clobbered (e.g., amd64-dword.exp) so gcc doesn't try to
	use them.
2012-11-01 17:53:05 +00:00
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