Commit Graph

31465 Commits

Author SHA1 Message Date
gdbadmin ddb7cf33ad *** empty log message *** 2012-11-11 00:00:03 +00:00
Keith Seitz cf4ded82d0 * breakpoint.c (clear_command): Add cleanup for
sals.sals if an argument is given.

	* linespec.c (parse_linespec): Do cleanups after
	parsing a convenience variable.
2012-11-10 20:25:56 +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
Stephane Carrez 9b8d682720 * tui/tui.c (tui_rl_command_key): Switch to TUI_ONE_COMMAND_MODE
while executing the gdb command.
(tui_rl_startup_hook): Do not switch back to TUI_SINGLE_KEY_MODE if we
are called from prompt_for_continue.
* tui/tui-io.c (tui_redisplay_readline): Likewise.
2012-11-10 13:12:18 +00:00
Stephane Carrez e840f632eb PR tui/9584
* tui/tui.c (tui_rl_command_key): Do not call execute_command
  but insert the command to execute in readline's buffer.
2012-11-10 12:25:07 +00:00
gdbadmin 9014f82463 *** empty log message *** 2012-11-10 00:00:03 +00:00
Tom Tromey f5656eadf4 * gdbarch.sh (target_gdbarch): Remove macro.
(get_target_gdbarch): Rename to target_gdbarch.
	* gdbarch.c, gdbarch.h: Rebuild.
	* ada-tasks.c, aix-thread.c, amd64-linux-nat.c, arch-utils.c,
	arm-tdep.c, auxv.c, breakpoint.c, bsd-uthread.c, corefile.c,
	darwin-nat-info.c, dcache.c, dsrec.c, exec.c, fbsd-nat.c,
	filesystem.c, gcore.c, gnu-nat.c, i386-darwin-nat.c, i386-nat.c,
	ia64-vms-tdep.c, inf-ptrace.c, infcmd.c, jit.c, linux-nat.c,
	linux-tdep.c, linux-thread-db.c, m32r-rom.c, memattr.c,
	mep-tdep.c, microblaze-tdep.c, mips-linux-nat.c,
	mips-linux-tdep.c, mips-tdep.c, monitor.c, moxie-tdep.c,
	nto-procfs.c, nto-tdep.c, ppc-linux-nat.c, proc-service.c,
	procfs.c, progspace.c, ravenscar-thread.c, record.c,
	remote-m32r-sdi.c, remote-mips.c, remote-sim.c, remote.c,
	rl78-tdep.c, rs6000-nat.c, rx-tdep.c, s390-nat.c, sol-thread.c,
	solib-darwin.c, solib-dsbt.c, solib-frv.c, solib-ia64-hpux.c,
	solib-irix.c, solib-pa64.c, solib-som.c, solib-spu.c,
	solib-sunos.c, solib-svr4.c, solib.c, spu-linux-nat.c,
	spu-multiarch.c, spu-tdep.c, symfile-mem.c, symfile.c, symtab.c,
	target-descriptions.c, target.c, target.h, tracepoint.c,
	windows-nat.c, windows-tdep.c, xcoffsolib.c, cli/cli-dump.c,
	common/agent.c, mi/mi-interp.c, python/py-finishbreakpoint.c,
	python/py-inferior.c, python/python.c: Update.
2012-11-09 19:58:03 +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
Yao Qi 504b36fd47 2012-11-09 Yao Qi <yao@codesourcery.com>
* NEWS: Mention the fix to the ambiguity of 'fo' command.
2012-11-09 12:48:11 +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 30f8135b5c gdb:
* i386-tdep.c (i386_analyze_frame_setup): Handle opcode
	0x8d (lea).
2012-11-09 10:11:21 +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 8506d139b8 gdb/doc:
PR gdb/14777.
	* gdb.texinfo (OS Information): Remove doc on command
	'info udot'.
2012-11-09 03:06:29 +00:00
Yao Qi fbd5db48c5 gdb/gdbserver:
2012-11-09  Yao Qi  <yao@codesourcery.com>

	* spu-low.c (current_ptid): Move it to ..
	* gdbthread.h: ... here.  New.
	* remote-utils.c (read_ptid): Use macro 'current_ptid'.
	* server.c (myresume, process_serial_event): Likewise.
	* thread-db.c (thread_db_find_new_threads): Likewise.
	* tracepoint.c (run_inferior_command): Likewise.
2012-11-09 02:58:50 +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
gdbadmin 090fa3d5eb *** empty log message *** 2012-11-09 00:00:03 +00:00
Stephane Carrez 4ca4d1616a * tui/tui-hooks.c (tui_about_to_proceed): New function.
(tui_target_wait_hook): Remove.
  (tui_install_hooks): Install the about_to_proceed observer.
  (tui_remove_hooks): And remove it here.
2012-11-08 22:54:11 +00:00
Joel Brobecker 4d3f93a25a document gdb.init check only performed in home directory
The documentation is a little ambiguous and might be suggesting that
GDB checks all locations where a gdbinit might be located for gdb.ini
files.  This clarifies the current situation.

gdb/doc/ChangeLog:

        * gdb.texinfo (Startup): Minor rewording, and clarify scope of
        gdb.ini warning for Windows port.
2012-11-08 22:26:31 +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
Tom Tromey d071a26bbc * python/py-bpevent.c: Include defs.h.
* python/py-continueevent.c: Include defs.h.
	* python/py-event.c: Include defs.h.
	* python/py-event.h: Don't include defs.h.
	* python/py-events.h: Don't include defs.h.
	* python/py-evts.c: Include defs.h.
	* python/py-exitedevent.c: Include defs.h.
	* python/py-newobjfileevent.c: Include defs.h.
	* python/py-signalevent.c: Include defs.h.
	* python/py-stopevent.c: Include defs.h.
	* python/py-threadevent.c: Include defs.h.
2012-11-08 19:38:43 +00:00
Pierre Muller 4574b35a66 * update-web-ari.sh (print_heading): Add number of files
checked.
	(nb_files): New variable counting the number of sources
	files found by gdb_find.sh script.
	(debug_awk): New variable to allow extra debug output.
	(indexes): Add more information if DEBUG_AWK is set.
2012-11-08 16:50:56 +00:00
Edjunior Barbosa Machado 2834ab4264 * ppc-linux-tdep.c (ppc64_standard_linkage1, ppc64_standard_linkage2,
ppc64_standard_linkage3): Mark ld r11 instructions as optional,
	following the change in PLT call stubs on linker.
2012-11-08 14:16:33 +00:00
Pierre Muller 84f1359519 * contrib/ari/gdb_ari.sh (LANG, LC_ALL): Use 'C' instead of 'c'
as default language.
	(AWK): Use = instead of == for sh test to avoid warning.
	(Linux rule): Correct [:digit] into [[:digit:]].
	(__func__ rule): Adapt to "gdb_assert.h" move to common subdirectory.
	(vasprintf rule): Adapt to common subdirectory moves.
	(xasprintf rule): Idem.
	(xvasprintf rule): Idem.
	(var_boolean rule): Accept occurence in == or != test.

	* contrib/ari/gdb_find.sh: Also prune gdbtk directory.
2012-11-08 09:04:27 +00:00
Stephane Carrez d69e6a338d * tui/tui-hooks.c (tui_inferior_exit): New function.
(tui_detach_hook): Remove.
  (tui_install_hooks): Install the inferior exit observer.
  (tui_remove_hooks): Remove it.
2012-11-08 06:58:30 +00:00
Yao Qi 1e96de833a gdb/doc:
2012-11-08  Yao Qi  <yao@codesourcery.com>

	* gdb.texinfo (Search): Add kindex for 'fo'.
gdb:
2012-11-08  Yao Qi  <yao@codesourcery.com>

	PR gdb/14777.
	* source.c (_initialize_source): Call add_com_alias to abbreviate
	'forward-search' as 'fo'.
2012-11-08 04:05:16 +00:00
gdbadmin 66807a1547 *** empty log message *** 2012-11-08 00:00:32 +00:00
Pedro Alves 0baeab039d 2012-11-07 Pedro Alves <palves@redhat.com>
* arm-tdep.c: Make defs.h be the first include.
	* coff-pe-read.c: Ditto.
	* gnu-nat.c: Ditto.
	* go32-nat.c: Ditto.
	* i386-nat.c: Ditto.
	* ppcnbsd-nat.c: Ditto.
	* ada-varobj.h: Don't include defs.h.
	* i386-darwin-tdep.h: Ditto.
	* i386-nat.h: Ditto.
2012-11-07 20:10:13 +00:00
Pedro Alves 892a857082 2012-11-07 Pedro Alves <palves@redhat.com>
* MAINTAINERS: New FSF-appointed maintainers replace the Steering
	Committee.
2012-11-07 15:39:09 +00:00
Pierre Muller 719502e9c1 * common/linux-osdata.c (dirent.h): ARI fix: Remove.
File already uses "gdb_dirent.h" header.
2012-11-07 12:35:05 +00:00
Yao Qi ed86b35062 gdb:
* breakpoint.c (get_tracepoint_by_number): Remove 'extern int
	tracepoint_count'.
2012-11-07 00:42:14 +00:00
gdbadmin 208c3ac470 *** empty log message *** 2012-11-07 00:00:03 +00:00
Tom Tromey 9a4f1e4fda * target.h (inferior_has_forked, inferior_has_vforked)
(inferior_has_execd, inferior_has_called_syscall): Remove
	declarations.
2012-11-06 16:01:58 +00:00
Pierre Muller 0316657ea5 * remote.c (remote_insert_hw_breakpoint): ARI fix,
add missing internalization markup.
2012-11-06 15:59:17 +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
Pierre Muller 01f2564af3 * contrib/ari/create-web-ari-in-src.sh: Avoid problem if script
is not executable.
2012-11-06 08:24:44 +00:00
gdbadmin 22886de02a *** empty log message *** 2012-11-06 00:00:02 +00:00
Joel Brobecker 550889c322 Fix entry ordering issue in gdb/ChangeLog... 2012-11-05 23:07:39 +00:00
Joel Brobecker f37c4431f1 New script to update our gnulib import
gdb/ChangeLog:

        * gnulib/update-gnulib.sh: New script.
2012-11-05 23:06:31 +00:00
Stephane Carrez 2d1ef085ab * MAINTAINERS: Update my email address. 2012-11-05 22:08:10 +00:00
Tom Tromey 954b50b3ed * frame.c (put_frame_register): Don't use temporary buffer. 2012-11-05 21:43:12 +00:00
Tom Tromey dc93922978 PR python/14802:
* gdb.texinfo (Functions In Python): Add example.
2012-11-05 19:36:38 +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
Doug Evans 80626a55b9 Add support for DWP files. http://gcc.gnu.org/wiki/DebugFissionDWP
* contrib/cc-with-tweaks.sh: Add -p parameter to invoke dwp.
	* dwarf2read.c: #include "elf-bfd.h".
	(struct dwarf2_per_objfile): New members dwp_checked, dwp_file.
	(dwop_section_names): Renamed from dwo_section names.  All uses
	updated.  Add entries for .debug_cu_index, .debug_tu_index.
	(struct dwo_file): Rename dwo_name to name, dwo_bfd to dbfd.
	All uses updated.
	(struct dwp_sections): New type.
	(struct virtual_dwo_sections): New type.
	(struct dwp_hash_table): New type.
	(struct dwp_file): New type.
	(init_cutu_and_read_dies): Ensure DWO info/types section has been
	read in.  Handle DWOs coming from DWP files.
	(lookup_dwo_file_slot): New function.
	(dwarf2_locate_dwo_sections): Move definition closer to use.
	(create_dwo_debug_info_hash_table_reader): Renamed from
	create_debug_info_hash_table_reader.  All callers updated.
	(create_dwo_debug_info_hash_table): Renamed from
	create_debug_info_hash_table.  All callers updated.
	(create_dwp_hash_table): New function.
	(locate_virtual_dwo_sections, create_dwo_in_dwp): New functions.
	(lookup_dwo_in_dwp): New function.
	(try_open_dwop_file): Renamed from try_open_dwo_file.  New parameter
	is_dwp.  All callers updated.
	(open_dwop_file): Renamed from open_dwo_file.  All callers updated.
	(open_and_init_dwo_file): Renamed from init_dwo_file.
	All callers updated.
	(lookup_dwo_file): Delete.
	(dwarf2_locate_dwp_sections): New function.
	(hash_dwp_loaded_cutus, eq_dwp_loaded_cutus): New functions.
	(allocate_dwp_loaded_cutus_table): New function.
	(open_and_init_dwp_file): New function.
	(lookup_dwo_cutu): New function.
	(lookup_dwo_comp_unit, lookup_dwo_type_unit): Call it.
2012-11-05 15:50:22 +00:00
gdbadmin 5a9db15211 *** empty log message *** 2012-11-05 00:00:03 +00:00
gdbadmin cd1b95122f *** empty log message *** 2012-11-04 00:00:33 +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
gdbadmin 2036af69e1 *** empty log message *** 2012-11-03 00:00:03 +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
Tom Tromey d4fb63e140 * configure: Rebuild.
* configure.ac (build_warnings): Add -Wempty-body.
	* m68k-tdep.c (m68k_gdbarch_init): Remove empty 'if'.
	* remote.c (handle_notification): Use braces for empty 'else' body.
	* s390-tdep.c (s390_analyze_prologue): Use braces for empty
	'else' body.
	* sh64-tdep.c (sh64_push_dummy_call): Use braces for empty
	'else' body.
	* solib-som.c (som_relocate_section_addresses): Use braces
	for empty 'else' body.
	* ui-file.c (stdio_file_write): Use braces for empty 'if' body.
	(stdio_file_write_async_safe, stdio_file_fputs): Likewise.
2012-11-02 18:53:54 +00:00
Pierre Muller b786c52157 Re-added with correct permissions 2012-11-02 18:19:36 +00:00
Pierre Muller 80059fac3b Removed to be re-added with correct permissions 2012-11-02 18:18:46 +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
gdbadmin 9ad9e68c61 *** empty log message *** 2012-11-02 00:00:32 +00:00
Pierre Muller e5496e3ec6 Incorporate ARI web page generator into GDB sources.
* contrib/ari/create-web-ari-in-src.sh: New file.
	* contrib/ari/gdb_ari.sh: New file.
	* contrib/ari/gdb_find.sh: New file.
	* contrib/ari/update-web-ari.sh: New file.
2012-11-01 21:22:27 +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
gdbadmin 6e1f115e7a *** empty log message *** 2012-11-01 00:00:33 +00:00
Tom Tromey c66fb220b1 * gdbarch.c: Rebuild.
* gdbarch.sh: Remove references to gdbarch_swap.
	* corelow.c (core_open): Remove obsolete comment.
2012-10-31 14:29:10 +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
gdbadmin c70c126a54 *** empty log message *** 2012-10-31 00:00:33 +00:00
gdbadmin f3f8840bbd *** empty log message *** 2012-10-30 00:00:33 +00:00
gdbadmin a0a9cc8a7f *** empty log message *** 2012-10-29 00:00:32 +00:00
gdbadmin 401f7068c3 *** empty log message *** 2012-10-28 00:00:33 +00:00
gdbadmin 282178c4f4 *** empty log message *** 2012-10-27 00:00:32 +00:00
Pedro Alves 144db8270d 2012-10-26 Pedro Alves <palves@redhat.com>
* amd64-tdep.c (amd64_relocate_instruction): Use
	store_unsigned_integer instead of memcpy.
	* i386-tdep.c (i386_relocate_instruction): Ditto.
2012-10-26 19:34:09 +00:00
Pedro Alves 940c3c0683 2012-10-26 Pedro Alves <palves@redhat.com>
* infrun.c (handle_inferior_event) <TARGET_WAITKIND_SIGNALLED>:
	Remove comment.
2012-10-26 18:48:43 +00:00
Pedro Alves 47b1906506 2012-10-26 Pedro Alves <palves@redhat.com>
* infrun.c (handle_inferior_event) <TARGET_WAITKIND_SIGNALLED>:
	Remove comment.
2012-10-26 18:47:33 +00:00
Tom Tromey af4238e5f6 * gdb.texinfo (General Query Packets): Use @itemx for QAgent. 2012-10-26 18:18:55 +00:00
Pedro Alves 87d2d2a446 2012-10-26 Pedro Alves <palves@redhat.com>
* target.c (target_waitstatus_to_string): Handle
	TARGET_WAITKIND_VFORK_DONE.
2012-10-26 16:52:38 +00:00
Pedro Alves fed708ed1e 2012-10-26 Pedro Alves <palves@redhat.com>
* infrun.c (handle_inferior_event): Print TARGET_WAITKIND_VFORKED
	as "TARGET_WAITKIND_VFORKED", not "TARGET_WAITKIND_FORKED".
2012-10-26 16:47:17 +00:00
gdbadmin 6008649588 *** empty log message *** 2012-10-26 00:00:32 +00:00
Tom Tromey 687e43a437 * gdb.texinfo (General Query Packets): Use @itemx. 2012-10-25 16:16:06 +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
gdbadmin a7dd0df59e *** empty log message *** 2012-10-25 00:00:33 +00:00
Joel Brobecker 2590b6456f Add comments in ravenscar_sparc_fetch_registers.
gdb/ChangeLog:

	* ravenscar-sparc-thread.c (ravenscar_sparc_fetch_registers):
	Add comments.
2012-10-24 19:08:16 +00:00
Joel Brobecker bed0c24398 remote packet sent after Ravenscar inferior exited
When debugging a program using the Ravenscar profile, the debugger
sometimes tries to send the following packet to the remote after
the inferior exited.

     (gdb) c
     Continuing.
     [...]
     Sending packet: $vCont;c:1#13...Ack
     Packet received: W00
     Sending packet: $Hg1#e0...putpkt: write failed: Broken pipe.

As the inferior exited, the remote has already disconnected, and thus
the operation fails.

The reason why GDB sends the package is because the ravenscar-thread
module tries to updates the list of threads.  But this doesn't make
sense, since the program has exited.  This patch fixes it.

gdb/ChangeLog:

        * ravenscar-thread.c (ravenscar_wait): Only update the list
        of threads and inferior_ptid if the inferior is still alive.
2012-10-24 18:19:50 +00:00
Joel Brobecker f69c91ad24 [Ada] use lbasename when testing if file is part of Ada runtime.
We use a list of regular expressions to match a symtab filenames
against the names of the files in the Ada runtime.  These regular
expressions do assume that the filename is a basename, however.
So make sure to evaluate these regular expressions against
the symtab's filename.

Without this patch, we run into problems when the Ada runtime was built
using a project file (through gprbuild).

gdb/ChangeLog:

        * ada-lang.c (is_known_support_routine): Use lbasename when
        matching the symtab's filename against
        known_runtime_file_name_patterns.
2012-10-24 18:17:22 +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 5a04cc987f [Ada] Skip unwind-seh.c when searching first "user" frame
On x86_64-windows with GCC 4.7 (using native SEH info), the debugger
behaves as follow:

    (gdb) catch exception unhandled
    Catchpoint 1: unhandled Ada exceptions
    (gdb) run
    Starting program: C:\[...]\b.exe

    Catchpoint 1, unhandled CONSTRAINT_ERROR at 0x000000000040cc57 in _GCC_specific_handler ([...]) at ../../../src/libgcc/unwind-seh.c:289
    [...]

This is after compiler the following code:

    procedure B is
    begin
       raise Constraint_Error;
    end B;

... using the following command:

    % gnatmake -g b

When hitting the exception catchpoint, it should have gone up the stack
all the way until finding the frame corresponding to procedure B.
But if stopped short because unwind-seh.c is compiled with debugging
information, and the debugger is also able to locate that source file.

To prevent this from happening, this patch adds unwind-seh.c to the list
of files that should be ignored, regardless of other factors.

gdb/ChangeLog:

        * ada-lang.h (ADA_KNOWN_RUNTIME_FILE_NAME_PATTERNS): Add entry for
        "unwind-seh.c".
2012-10-24 18:08:05 +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
Mark Kettenis 2445fd7b3a PR gdb/12783
* i386-tdep.c (i386_return_value): Handle complex double and long
double.
2012-10-24 14:56:01 +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
Joel Brobecker 8f205f9c40 [Windows] run program with space in path to exe.
The following works...

    % gdb c:\path to exe\foo.exe
    (gdb) start

... unless a file or directory called "c:\path" or "c:\path to" exist.
This is what happens in the latter case:

    (gdb) start
    [...]
    Error creating process C:\path to exe\foo.exe (error 193).

This is because we are calling CreateProcess (et al) without specifying
the lpApplicationName, so Windows determines the name of the executable
using the second argument, which is the entire command line.  This
command line is a space-separated list of tokens, so the space in
the path to the executable which potentially creates an ambiguity.
The ambiguity is automatically resolved unless we're in the situation
above.

The solution, as suggested by the MSDN documentation for CreateProcess
is to quote the executable name.

gdb/ChangeLog:

        * windows-nat.c (windows_create_inferior) [!__CYGWIN__]:
        New local variable args_len.
        Quote the name of the executable when computing the command line.
2012-10-24 13:40:16 +00:00