I noticed today that multi-arch-exec.exp was failing in parallel mode.
The bug is that multi-arch-exec.c assumes the non-parallel directory
layout.
This patch fixes the problem using the same "BASEDIR" approach used in
other tests.
Tested both ways on x86-64 Fedora 18.
I'm checking this in.
2013-11-13 Tom Tromey <tromey@redhat.com>
* gdb.multi/multi-arch-exec.exp: Define BASEDIR when compiling.
* gdb.multi/multi-arch-exec.c (main): Use BASEDIR.
A few tests run an inferior that execs some other program. The name
of this exec'd program is compiled in. These tests assume the current
test suite directory layout, but fail in parallel mode.
This patch fixes these tests by letting the .exp files pass in the
directory names at compile time.
2013-11-04 Tom Tromey <tromey@redhat.com>
* gdb.base/foll-exec.c (main): Use BASEDIR.
* gdb.base/foll-exec.exp: Define BASEDIR during compilation.
* gdb.base/foll-vfork.c (main): Use BASEDIR.
* gdb.base/foll-vfork.exp: Define BASEDIR during compilation.
* gdb.multi/bkpt-multi-exec.c (main): Use BASEDIR.
* gdb.multi/bkpt-multi-exec.exp: Define BASEDIR during compilation.
Two modifications:
1. The addition of 2013 to the copyright year range for every file;
2. The use of a single year range, instead of potentially multiple
year ranges, as approved by the FSF.
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.
* gdb.multi/bkpt-multi-exec.exp: Use standard_output_file. Use
build_executable, not prepare_for_testing.
* gdb.multi/base.exp: Use standard_output_file. Use
build_executable, not prepare_for_testing.
Fix watchpoints to be specific for each inferior.
* breakpoint.c (watchpoint_in_thread_scope): Verify also
current_program_space.
* i386-nat.c (i386_inferior_data_cleanup): New.
(i386_inferior_data_get): Replace variable inf_data_local by an
inferior_data call.
(i386_use_watchpoints): Initialize i386_inferior_data.
* linux-nat.c (linux_nat_iterate_watchpoint_lwps): Use INFERIOR_PTID
specific iterate_over_lwps.
gdb/testsuite/
Fix watchpoints to be specific for each inferior.
* gdb.multi/watchpoint-multi.c: New file.
* gdb.multi/watchpoint-multi.exp: New file.
* inferior.c (detach_inferior_command): Use get_number_or_range.
(kill_inferior_command): Ditto.
(remove_inferior_command): Ditto.
(initialize_inferiors): Make command names plural.
Update help strings.
2011-02-25 Michael Snyder <msnyder@vmware.com>
* gdb.texinfo (Inferiors and Programs): Update commands to show
that they can accept multiple arguments.
2011-02-25 Michael Snyder <msnyder@vmware.com>
* gdb.multi/base.exp: Add test for remove-inferiors.
* inferior.c (print_inferior): Accept a string instead of an int
for requested_inferiors, and use get_number_or_range to parse it.
(info_inferiors_command): Pass args string to print_inferior.
(initialize_inferiors): Change help string for info inferiors.
* inferior.h (print_inferior): Export prototype change.
2011-02-25 Michael Snyder <msnyder@vmware.com>
* gdb.multi/base.exp: Add tests for info inferiors with args.
the branch only.
gdb/testsuite/
* gdb.base/foll-vfork.exp: Adjust to spell out "follow-fork".
* gdb.base/foll-exec.exp: Adjust to expect a process id before
"Executing new program".
* gdb.base/foll-fork.exp: Adjust to spell out "follow-fork".
* gdb.base/multi-forks.exp: Ditto. Adjust to the inferior being
left listed after having been killed.
* gdb.base/attach.exp: Adjust to spell out "symbol-file".
* gdb.base/maint.exp: Adjust test.
* Makefile.in (ALL_SUBDIRS): Add gdb.multi.
* gdb.multi/Makefile.in: New.
* gdb.multi/base.exp: New.
* gdb.multi/goodbye.c: New.
* gdb.multi/hangout.c: New.
* gdb.multi/hello.c: New.
* gdb.multi/bkpt-multi-exec.c: New.
* gdb.multi/bkpt-multi-exec.exp: New.
* gdb.multi/crashme.c: New.