Commit Graph

104014 Commits

Author SHA1 Message Date
Przemyslaw Wirkus
a984d94aab [PATCH][GAS] aarch64: Add WFIT instruction for Armv8.7-a
This patch adds new to Armv8.7 WFIT instruction which take one operand:

    WFIT <Xt>

Where:
    <Xt> is 64-bit name of the general-purpose source register, encoded in the
         "Rd" field.

For more details regarding WFIT (Wait For Interrupt with Timeout) instruction for
Armv8.7-a please refer to Arm A64 Instruction set documentation for Armv8-A
architecture profile, see document pages 570 of [0].

	[0]: https://developer.arm.com/docs/ddi0596/i

gas/ChangeLog:

2020-10-30  Przemyslaw Wirkus  <przemyslaw.wirkus@arm.com>

	* NEWS: Update docs.
	* testsuite/gas/aarch64/system-5.d: Update test with WFIT insn.
	* testsuite/gas/aarch64/system-5.s: Update test with WFIT insn.

opcodes/ChangeLog:

2020-10-30  Przemyslaw Wirkus  <przemyslaw.wirkus@arm.com>

	* aarch64-tbl.h (struct aarch64_opcode): New instruction WFIT.
	* aarch64-asm-2.c: Regenerated.
	* aarch64-dis-2.c: Regenerated.
	* aarch64-opc-2.c: Regenerated.
2020-10-30 10:31:38 +00:00
Tankut Baris Aktemur
b78b3a297b gdb/infrun: disable pagination in fetch_inferior_event
Having pagination enabled when handling an inferior event gives the
user an option to quit, which causes early exit in GDB's flow and may
lead to half-baked state.  For instance, here is a case where we quit
in the middle of handling an inferior exit:

  $ gdb ./a.out
  Reading symbols from ./a.out...
  (gdb) set height 2
  (gdb) run
  Starting program: ./a.out
  --Type <RET> for more, q to quit, c to continue without paging--q
  Quit
  Couldn't get registers: No such process.
  (gdb) set height unlimited
  Couldn't get registers: No such process.
  (gdb) info threads
    Id   Target Id         Frame
  * 1    process 27098     Couldn't get registers: No such process.
  Couldn't get registers: No such process.
  (gdb)

Or suppose having a multi-threaded program like below:

  static void *
  fun (void *dummy)
  {
    int a = 1; /* break-here */
    return NULL;
  }

  int
  main (void)
  {
    pthread_t thread;
    pthread_create (&thread, NULL, fun, NULL);
    pthread_join (thread, NULL);

    return 0;
  }

If we define a breakpoint at line "break-here", we expect only Thread
2 to hit it.

  $ gdb ./a.out
  Reading symbols from ./a.out...
  (gdb) break 7
  Breakpoint 1 at 0x1182: file mt.c, line 7.
  (gdb) set height 2
  (gdb) run
  Starting program: ./a.out
  [Thread debugging using libthread_db enabled]
  Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
  [New Thread 0x7ffff77c4700 (LWP 23048)]
  --Type <RET> for more, q to quit, c to continue without paging--q
  Quit
  (gdb) set height unlimited
  (gdb) info thread
    Id   Target Id                                 Frame
  * 1    Thread 0x7ffff7fe3740 (LWP 23044) "a.out" 0x00007ffff7bbed2d in ...
    2    Thread 0x7ffff77c4700 (LWP 23048) "a.out" fun (dummy=0x0) at mt.c:7
  (gdb)

The prompt for continuation was triggered because Thread 2 hit the
breakpoint.  (If we had hit 'c', we were going to see that stop event,
but we didn't.)  The context did not switch to Thread 2.  GDB also did
not execute several other things it would normally do in
infrun.c:normal_stop after outputting "[Switching to Thread ...]" (but
it seems harmless in this case).  If we 'continue' at this state, both
threads run until termination, and we don't see the breakpoint hit
event ever.

Here is another related and more complicated scenario that leads to a
GDB crash.  Create two inferiors, one sitting on top of a native
target, and the other on a remote target, so that we have a
multi-target setting, like so:

  (gdb) i inferiors
    Num  Description       Connection     Executable
    1    process 13786     1 (native)     a.out
  * 2    process 13806     2 (remote ...) target:a.out

Next, resume both inferiors to run until termination:

  (gdb) set schedule-multiple on
  (gdb) set height 2
  (gdb) continue
  Continuing.
  --Type <RET> for more, q to quit, c to continue without paging--[Inferior 2 (process 13806) exited normally]

  terminate called after throwing an instance of 'gdb_exception_error'
  Aborted

Here, GDB first received a termination event from Inferior 1.  GDB
attempted to print this event, triggering a "prompt for continue", and
GDB started polling for events, hoping to get an input from the user.
However, the exit event from Inferior 2 was received instead.  So, GDB
started processing an exit event while being in the middle of
processing another exit event.  It was not ready for this situation
and eventually crashed.

To address these cases, temporarily disable pagination in
fetch_inferior_event.  This doesn't affect commands like 'info
threads', 'backtrace', or 'thread apply'.

Regression-tested on X86_64 Linux.

gdb/ChangeLog:
2020-10-30  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>

	* infrun.c (fetch_inferior_event): Temporarily disable pagination.

gdb/testsuite/ChangeLog:
2020-10-30  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>

	* gdb.base/paginate-after-ctrl-c-running.exp: Update with no pagination
	behavior.
	* gdb.base/paginate-bg-execution.exp: Ditto.
	* gdb.base/paginate-inferior-exit.exp: Ditto.
	* gdb.base/double-prompt-target-event-error.c: Remove.
	* gdb.base/double-prompt-target-event-error.exp: Remove.
2020-10-30 08:15:20 +01:00
Pedro Alves
d70bdd3cc4 Move lookup_selected_frame to frame.c
This function is now external, and isn't really threads related.  Move
it to frame.c.

gdb/ChangeLog:

	* thread.c (lookup_selected_frame): Move ...
	* frame.c (lookup_selected_frame): ... here.

Change-Id: Ia96b79c15767337c68efd3358bcc715ce8e26c15
2020-10-30 01:26:49 +00:00
Pedro Alves
79952e6963 Make scoped_restore_current_thread's cdtors exception free (RFC)
If the remote target closes while we're reading registers/memory for
restoring the selected frame in scoped_restore_current_thread's dtor,
the corresponding TARGET_CLOSE_ERROR error is swallowed by the
scoped_restore_current_thread's dtor, because letting exceptions
escape from a dtor is bad.  It isn't great to lose that errors like
that, though.  I've been thinking about how to avoid it, and I came up
with this patch.

The idea here is to make scoped_restore_current_thread's dtor do as
little as possible, to avoid any work that might throw in the first
place.  And to do that, instead of having the dtor call
restore_selected_frame, which re-finds the previously selected frame,
just record the frame_id/level of the desired selected frame, and have
get_selected_frame find the frame the next time it is called.  In
effect, this implements most of Cagney's suggestion, here:

  /* On demand, create the selected frame and then return it.  If the
     selected frame can not be created, this function prints then throws
     an error.  When MESSAGE is non-NULL, use it for the error message,
     otherwize use a generic error message.  */
  /* FIXME: cagney/2002-11-28: At present, when there is no selected
     frame, this function always returns the current (inner most) frame.
     It should instead, when a thread has previously had its frame
     selected (but not resumed) and the frame cache invalidated, find
     and then return that thread's previously selected frame.  */
  extern struct frame_info *get_selected_frame (const char *message);

The only thing missing to fully implement that would be to make
reinit_frame_cache just clear selected_frame instead of calling
select_frame(NULL), and the call select_frame(NULL) explicitly in the
places where we really wanted reinit_frame_cache to go back to the
current frame too.  That can done separately, though, I'm not
proposing to do that in this patch.

Note that this patch renames restore_selected_frame to
lookup_selected_frame, and adds a new restore_selected_frame function
that doesn't throw, to be paired with the also-new save_selected_frame
function.

There's a restore_selected_frame function in infrun.c that I think can
be replaced by the new one in frame.c.

Also done in this patch is make the get_selected_frame's parameter be
optional, so that we don't have to pass down nullptr explicitly all
over the place.

lookup_selected_frame should really move from thread.c to frame.c, but
I didn't do that here, just to avoid churn in the patch while it
collects comments.  I did make it extern and declared it in frame.h
already, preparing for the move.  I will do the move as a follow up
patch if people agree with this approach.

Incidentally, this patch alone would fix the crashes fixed by the
previous patches in the series, because with this,
scoped_restore_current_thread's constructor doesn't throw either.

gdb/ChangeLog:

	* blockframe.c (block_innermost_frame): Use get_selected_frame.
	* frame.c
	(scoped_restore_selected_frame::scoped_restore_selected_frame):
	Use save_selected_frame.  Save language as well.
	(scoped_restore_selected_frame::~scoped_restore_selected_frame):
	Use restore_selected_frame, and restore language as well.
	(selected_frame_id, selected_frame_level): New.
	(selected_frame): Update comments.
	(save_selected_frame, restore_selected_frame): New.
	(get_selected_frame): Use lookup_selected_frame.
	(get_selected_frame_if_set): Delete.
	(select_frame): Record selected_frame_level and selected_frame_id.
	* frame.h (scoped_restore_selected_frame) <m_level, m_lang>: New
	fields.
	(get_selected_frame): Make 'message' parameter optional.
	(get_selected_frame_if_set): Delete declaration.
	(select_frame): Update comments.
	(save_selected_frame, restore_selected_frame)
	(lookup_selected_frame): Declare.
	* gdbthread.h (scoped_restore_current_thread) <m_lang>: New field.
	* infrun.c (struct infcall_control_state) <selected_frame_level>:
	New field.
	(save_infcall_control_state): Use save_selected_frame.
	(restore_selected_frame): Delete.
	(restore_infcall_control_state): Use restore_selected_frame.
	* stack.c (select_frame_command_core, frame_command_core): Use
	get_selected_frame.
	* thread.c (restore_selected_frame): Rename to ...
	(lookup_selected_frame): ... this and make extern.  Select the
	current frame if the frame level is -1.
	(scoped_restore_current_thread::restore): Also restore the
	language.
	(scoped_restore_current_thread::~scoped_restore_current_thread):
	Don't try/catch.
	(scoped_restore_current_thread::scoped_restore_current_thread):
	Save the language as well.  Use save_selected_frame.

Change-Id: I73fd1cfc40d8513c28e5596383b7ecd8bcfe700f
2020-10-30 01:01:12 +00:00
GDB Administrator
4dd5c35212 Automatic date update in version.in 2020-10-30 00:00:15 +00:00
Simon Marchi
58103c3313 gdb: fix documentation of gdbarch_displaced_step_hw_singlestep
The last commit missed updating the doc of
gdbarch_displaced_step_hw_singlestep to avoid mentioning the removed
parameter, this one fixes it.

gdb/ChangeLog:

	* gdbarch.sh (displaced_step_hw_singlestep): Adjust
	documentation.
	* gdbarch.h: Re-generate.

Change-Id: I33675d9a6c253443eee707e8285d16615ce20aaa
2020-10-29 18:11:33 -04:00
Simon Marchi
40a5376690 gdb: remove parameter of gdbarch_displaced_step_hw_singlestep
I noticed that the closure parameter of
gdbarch_displaced_step_hw_singlestep is never used by any
implementation of the method, so this patch removes it.

gdb/ChangeLog:

	* gdbarch.sh (displaced_step_hw_singlestep): Remove closure
	parameter.
	* aarch64-tdep.c (aarch64_displaced_step_hw_singlestep):
	Likewise.
	* aarch64-tdep.h (aarch64_displaced_step_hw_singlestep):
	Likewise.
	* arch-utils.c (default_displaced_step_hw_singlestep):
	Likewise.
	* arch-utils.h (default_displaced_step_hw_singlestep):
	Likewise.
	* rs6000-tdep.c (ppc_displaced_step_hw_singlestep):
	Likewise.
	* s390-tdep.c (s390_displaced_step_hw_singlestep):
	Likewise.
	* gdbarch.c: Re-generate.
	* gdbarch.h: Re-generate.
	* infrun.c (resume_1): Adjust.

Change-Id: I7354f0b22afc2692ebff0cd700a462db8f389fc1
2020-10-29 18:02:13 -04:00
Tom Tromey
8407f91bd3 Remove call to exec_close
There's no need to call exec_close from ~progspace, because that
method just does some cleanup that's already going to be done during
destruction.  This patch removes the call.

gdb/ChangeLog
2020-10-29  Tom Tromey  <tom@tromey.com>

	* progspace.c (program_space::~program_space): Don't call
	exec_close.
2020-10-29 15:04:41 -06:00
Tom Tromey
5008b3b2eb Don't change current program space in exec_target::close
Now that we've removed the macros and moved various functions to be
methods on program_space (removing uses of current_program_space),
it's clear that exec_target::close can operate on program spaces
without changing the current program space.

gdb/ChangeLog
2020-10-29  Tom Tromey  <tom@tromey.com>

	* exec.c (exec_target::close): Don't change current program
	space.
2020-10-29 15:04:41 -06:00
Tom Tromey
d9eebde018 Change add_target_sections_of_objfile to method on program_space
This changes add_target_sections_of_objfile to be a method on
program_space.  It is renamed to be another overload of
add_target_sections, because they are semantically equivalent in a
sense.

gdb/ChangeLog
2020-10-29  Tom Tromey  <tom@tromey.com>

	* symfile.c (add_symbol_file_command): Update.
	* exec.c (program_space::add_target_sections): Rename.
	* symfile-mem.c (symbol_file_add_from_memory): Update.
	* progspace.h (struct program_space) <add_target_sections>:
	Declare new overload.
	* exec.h (add_target_sections_of_objfile): Don't declare.
2020-10-29 15:04:40 -06:00
Tom Tromey
3769e2277d Change add_target_sections to method on program_space
This changes add_target_sections to be a method on program_space.
Like the earlier change to remove_target_sections, this makes sense
because this function is manipulating data that is stored on the
program space.

gdb/ChangeLog
2020-10-29  Tom Tromey  <tom@tromey.com>

	* solib.c (solib_map_sections): Update.
	* exec.c (program_space::add_target_sections): Now a method.
	(exec_file_attach): Update.
	* exec.h (add_target_sections): Don't declare.
	* progspace.h (struct program_space) <add_target_sections>:
	Declare.
2020-10-29 15:04:40 -06:00
Tom Tromey
2a3f84af53 Change remove_target_sections to method on program_space
This changes remove_target_sections to be a method on program_space.
This makes sense because this function manipulates data that is
attached to the program space.

gdb/ChangeLog
2020-10-29  Tom Tromey  <tom@tromey.com>

	* progspace.h (struct program_space) <remove_target_sections>:
	Declare.
	* exec.c (program_space::remove_target_sections): Now a method.
	* exec.h (remove_target_sections): Don't declare.
2020-10-29 15:04:39 -06:00
Tom Tromey
004eecfdc7 Change program_space_empty_p to method on program_space
This changes program_space_empty_p to be a method on program_space.
It also changes it to return bool.  I removed the "_p" suffix because
"empty" is a "well-known" C++ method name.

gdb/ChangeLog
2020-10-29  Tom Tromey  <tom@tromey.com>

	* inferior.c (delete_inferior): Update.
	* progspace.c (program_space::empty): Rename from
	program_space_empty_p.  Return bool.
	* progspace.h (struct program_space) <empty>: New method.
	(program_space_empty_p): Don't declare.
2020-10-29 15:04:38 -06:00
Tom Tromey
e39fb97114 Change clear_program_space_solib_cache to method on program_space
This changes clear_program_space_solib_cache to be a method on
program_space.  Also, it removes a call to this function from the
program_space destructor, as that is not necessary.

gdb/ChangeLog
2020-10-29  Tom Tromey  <tom@tromey.com>

	* progspace.c (program_space::~program_space): Don't call
	clear_program_space_solib_cache.
	(program_space::clear_solib_cache): Rename from
	clear_solib_cache.
	* solib.c (handle_solib_event): Update.
	* progspace.h (struct program_space) <clear_solib_cache>: New
	method.
	(clear_program_space_solib_cache): Don't declare.
2020-10-29 15:04:38 -06:00
Tom Tromey
a42d7dd873 Remove symfile_objfile macro
This removes the symfile_objfile macro, in favor of just spelling out
the member access.

gdb/ChangeLog
2020-10-29  Tom Tromey  <tom@tromey.com>

	* windows-tdep.c (windows_solib_create_inferior_hook): Update.
	* target.c (info_target_command): Update.
	* symfile.c (syms_from_objfile_1, finish_new_objfile)
	(symbol_file_clear, reread_symbols): Update.
	* symfile-mem.c (add_symbol_file_from_memory_command): Update.
	* stabsread.c (scan_file_globals): Update.
	* solib.c (update_solib_list): Update.
	* solib-svr4.c (elf_locate_base, open_symbol_file_object)
	(svr4_fetch_objfile_link_map, enable_break)
	(svr4_relocate_main_executable)
	(svr4_iterate_over_objfiles_in_search_order): Update.
	* solib-frv.c (lm_base, enable_break)
	(frv_relocate_main_executable): Update.
	(main_got, frv_fdpic_find_canonical_descriptor): Update.
	(frv_fetch_objfile_link_map): Update.
	* solib-dsbt.c (lm_base, dsbt_relocate_main_executable): Update.
	* solib-darwin.c (darwin_solib_create_inferior_hook): Update.
	* solib-aix.c (solib_aix_solib_create_inferior_hook): Update.
	* remote.c (remote_target::get_offsets): Update.
	(remote_target::start_remote)
	(extended_remote_target::post_attach): Update.
	* objfiles.c (entry_point_address_query): Update.
	* nto-procfs.c (nto_procfs_target::create_inferior): Update.
	* minsyms.c (get_symbol_leading_char): Update.
	* frame.c (inside_main_func): Update.
	* progspace.h (symfile_objfile): Remove macro.
2020-10-29 15:04:37 -06:00
Tom Tromey
19f6550ebb Change program_space::ebfd to a gdb_bfd_ref_ptr
This changes program_space::ebfd to a gdb_bfd_ref_ptr, removing some
manual management.

gdb/ChangeLog
2020-10-29  Tom Tromey  <tom@tromey.com>

	* exec.c (exec_file_attach): Update.
	* progspace.c (program_space::exec_close): Update.
	* progspace.h (struct program_space) <ebfd>: Now a
	gdb_bfd_ref_ptr.
	<set_exec_bfd>: Change argument type.
	<exec_bfd>: Update.
2020-10-29 15:04:37 -06:00
Tom Tromey
7e10abd146 Remove the exec_bfd macro
This removes the exec_bfd macro, in favor of new accessors on
program_space.  In one spot the accessor can't be used; but this is
still a big improvement over the macro, IMO.

gdb/ChangeLog
2020-10-29  Tom Tromey  <tom@tromey.com>

	* windows-tdep.c (windows_solib_create_inferior_hook): Update.
	* symfile.c (reread_symbols): Update.
	* symfile-mem.c (add_symbol_file_from_memory_command)
	(add_vsyscall_page): Update.
	* source-cache.c (source_cache::get_plain_source_lines): Update.
	* solib-svr4.c (find_program_interpreter, elf_locate_base)
	(svr4_current_sos_direct, svr4_exec_displacement)
	(svr4_relocate_main_executable): Update.
	(svr4_iterate_over_objfiles_in_search_order): Update.
	* solib-frv.c (enable_break2, enable_break): Update.
	* solib-dsbt.c (lm_base, enable_break): Update.
	* solib-darwin.c (find_program_interpreter)
	(darwin_solib_create_inferior_hook): Update.
	* sol-thread.c (rw_common, ps_pdmodel): Update.
	* rs6000-nat.c (rs6000_nat_target::create_inferior): Update.
	* remote.c (compare_sections_command)
	(remote_target::trace_set_readonly_regions): Update.
	* remote-sim.c (get_sim_inferior_data)
	(gdbsim_target::create_inferior, gdbsim_target::create_inferior): Update.
	(gdbsim_target_open, gdbsim_target::files_info): Update.
	* exec.h (exec_bfd): Remove macro.
	* progspace.c (initialize_progspace): Update.
	* proc-service.c (ps_addr_to_core_addr, core_addr_to_ps_addr):
	Update.
	* nto-procfs.c (nto_procfs_target::post_attach)
	(nto_procfs_target::create_inferior): Update.
	* maint.c (maintenance_info_sections): Update.
	* linux-thread-db.c (thread_db_target::get_thread_local_address):
	Update.
	* infcmd.c (post_create_inferior): Update.
	* gcore.c (default_gcore_arch, default_gcore_target): Update.
	(objfile_find_memory_regions): Update.
	* exec.c (validate_exec_file, exec_file_attach)
	(exec_read_partial_read_only, print_section_info): Update.
	* corelow.c (core_target_open): Update.
	* corefile.c (reopen_exec_file, validate_files): Update.
	* arm-tdep.c (gdb_print_insn_arm): Update.
	* arch-utils.c (gdbarch_update_p, default_print_insn): Update.
	* progspace.h (struct program_space) <exec_bfd, set_exec_bfd>: New
	methods.
2020-10-29 15:04:36 -06:00
Tom Tromey
b55221abba Remove current_target_sections macro
This removes the current_target_sections macro, replacing it with uses
of the appropriate member from current_program_space.

gdb/ChangeLog
2020-10-29  Tom Tromey  <tom@tromey.com>

	* progspace.h (current_target_sections): Remove macro.
	* solib-svr4.c (scan_dyntag): Update.
	* solib-dsbt.c (scan_dyntag): Update.
	* exec.c (exec_target::close): Update.
	(add_target_sections, add_target_sections_of_objfile)
	(remove_target_sections, exec_target::get_section_table)
	(exec_target::files_info, set_section_command)
	(exec_set_section_address, exec_target::has_memory)
	(exec_target::has_memory): Update.
2020-10-29 15:04:36 -06:00
Tom Tromey
5a36e71525 Remove exec_bfd_mtime define
This removes the exec_bfd_mtime define, in favor of directly using the
appropriate member of the current program space.

gdb/ChangeLog
2020-10-29  Tom Tromey  <tom@tromey.com>

	* source-cache.c (source_cache::get_plain_source_lines): Use
	current_program_space.
	* corefile.c (reopen_exec_file): Use current_program_space.
	* exec.c (exec_file_attach): Use current_program_space.
	* exec.h (exec_bfd_mtime): Remove.
2020-10-29 15:04:35 -06:00
Tom Tromey
784c859246 Remove commented-out code from gcore.c
I found some code in gcore.c that has been commented out since

d3420b2fce (Mark Kettenis     2003-09-04 166) #if 1	/* See if this even matters...  */

This patch deletes this entire function, because the body was reduced
to just "return 0".

gdb/ChangeLog
2020-10-29  Tom Tromey  <tom@tromey.com>

	* gcore.c (default_gcore_mach): Remove.
	(create_gcore_bfd): Update.
2020-10-29 15:04:35 -06:00
Tom Tromey
8a4f140205 Change exec_close to be a method on program_space
exec_close uses the current program space, so it seemed cleaner to
change it to be a method on program_space.  This patch makes this
change.

gdb/ChangeLog
2020-10-29  Tom Tromey  <tom@tromey.com>

	* progspace.c (program_space::exec_close): New method, from
	exec_close in exec.c.
	* exec.c (exec_close): Move to progspace.c.
	(exec_target::close, exec_file_attach): Update.
	* progspace.h (struct program_space) <exec_close>: Declare
	method.
2020-10-29 15:04:34 -06:00
Tom Tromey
c20cb6860c Remove exec_filename macro
This removes the exec_filename macro, replacing it with uses of the
member of current_program_space.  This also renames that member, and
changes it to be a unique pointer.

gdb/ChangeLog
2020-10-29  Tom Tromey  <tom@tromey.com>

	* progspace.h (struct program_space) <exec_filename>: Rename from
	pspace_exec_filename.  Now a unique_xmalloc_ptr.
	* inferior.c (print_selected_inferior): Update.
	(print_inferior): Update.
	* mi/mi-main.c (print_one_inferior): Update.
	* exec.h (exec_filename): Remove macro.
	* corefile.c (get_exec_file): Update.
	* exec.c (exec_close): Update.
	(exec_file_attach): Update.
	* progspace.c (clone_program_space): Update.
	(print_program_space): Update.
2020-10-29 15:04:34 -06:00
Tom Tromey
6be2a9ab1f Add target_section constructor
This adds a constructor to target_section, simplifying the code that
creates instances of this.

gdb/ChangeLog
2020-10-29  Tom Tromey  <tom@tromey.com>

	* target-section.h (struct target_section): Add constructor.
	* exec.c (build_section_table, add_target_sections_of_objfile):
	Update.
	* corelow.c (core_target::build_file_mappings): Update.
2020-10-29 15:04:33 -06:00
Nick Clifton
8ee54925b4 Fix an illegal memory access problem when processing secondary relocs for architectures which support both REL and RELA relocs.
PR 26809
	* elf.c (_bfd_elf_slurp_secondary_reloc_section): Use the correct
	sized reloc reading function.
	(_bfd_elf_write_secondary_reloc_section): Use the correct sized
	reloc writing function.
2020-10-29 20:13:00 +00:00
Przemyslaw Wirkus
59d5613e42 aarch64: Fix DSB instruction 'missing immediate expression' errors
This patch fixes errors with DSB instruction after introduction of DSB nXS
variant. That change would cause GAS to reject valid DSB immediate string
operands.

gas/ChangeLog:

2020-10-28  Przemyslaw Wirkus  <przemyslaw.wirkus@arm.com>

	* config/tc-aarch64.c (parse_operands): Check for C0-C15 value of DSB
	immediate string operand.
	* testsuite/gas/aarch64/system-4.d: Update test.
	* testsuite/gas/aarch64/system-4.s: Update test.
2020-10-29 16:33:00 +00:00
H.J. Lu
76868f3606 dwarf: Also match abbrev base when searching abbrev list
A .debug_abbrev section can have multiple CUs.  When caching abbrev list,
we need to check abbrev base to support multiple CUs.

	PR binutils/26808
	* dwarf.c (abbrev_list): Add abbrev_base.
	(new_abbrev_list): Add an abbrev_base argument and record it.
	(find_abbrev_list_by_abbrev_offset): Add an abbrev_base argument
	and match it.
	(process_debug_info): Pass abbrev_base to new_abbrev_list and
	find_abbrev_list_by_abbrev_offset.
	(display_debug_abbrev): Pass 0 abbrev_base to new_abbrev_list
	and find_abbrev_list_by_abbrev_offset.
	* testsuite/binutils-all/x86-64/pr26808.dump: New file.
	* testsuite/binutils-all/x86-64/pr26808.dwp.bz2: Likewise.
	* testsuite/binutils-all/x86-64/x86-64.exp: Run PR binutils/26808
	test.
2020-10-29 09:19:35 -07:00
Tankut Baris Aktemur
cfaa8f7692 gdb: restore thread after detaching or killing an inferior
The "detach inferiors N" command causes the current inferior to
switch.  E.g.:

  $ gdb a.out
  Reading symbols from a.out...
  (gdb) start
  ...
  (gdb) add-inferior
  [New inferior 2]
  Added inferior 2 on connection 1 (native)
  (gdb) inferior 2
  [Switching to inferior 2 [<null>] (<noexec>)]
  (gdb) info inferiors
    Num  Description       Connection           Executable
    1    process 18242     1 (native)           /path/to/a.out
  * 2    <null>            1 (native)
  (gdb) detach inferiors 1
  Detaching from program: /path/to/a.out, process 18242
  [Inferior 1 (process 18242) detached]
  (gdb) info inferiors
    Num  Description       Connection           Executable
  * 1    <null>                                 /path/to/a.out
    2    <null>            1 (native)
  (gdb)

The same switch happens with the "kill inferiors N" command.  Prevent
it by restoring the current thread.

gdb/ChangeLog:
2020-10-29  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>

	PR gdb/19318
	* inferior.c (detach_inferior_command): Restore the current thread.
	(kill_inferior_command): Ditto.

gdb/testsuite/ChangeLog:
2020-10-29  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>

	* gdb.base/kill-detach-inferiors-cmd.exp: Check that 'kill
	inferiors' and 'detach inferiors' do not change the current
	inferior.
2020-10-29 15:33:39 +01:00
Nick Clifton
00c19b8e78 Fix a potential illegal memory access by objcopy when extracting dwo sections.
PR 26805
 * objcopy.c (is_dwo_section): Check for missing or short section
 names.
2020-10-29 11:17:39 +00:00
Tom de Vries
0ad0e70c73 [gdb/testsuite] Fix DUPLICATEs in gdb.threads/tls.exp
With test-case gdb.threads/tls.exp, we get these:
...
DUPLICATE: gdb.threads/tls.exp: selected thread: 4
DUPLICATE: gdb.threads/tls.exp: selected thread: 2
DUPLICATE: gdb.threads/tls.exp: selected thread: 3
...

Fix these using with_test_prefix.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2020-10-29  Tom de Vries  <tdevries@suse.de>

	* gdb.threads/tls.exp: Fix DUPLICATEs.
2020-10-29 07:55:46 +01:00
GDB Administrator
f06c0d01f1 Automatic date update in version.in 2020-10-29 00:00:22 +00:00
Tom de Vries
99cc6b2abf [gdb/testsuite] Fix gdb.python/py-symbol.exp with -readnow
When running test-case gdb.python/py-symbol.exp with target board readnow, we
get:
...
FAIL: gdb.python/py-symbol.exp: print line number of rr
FAIL: gdb.python/py-symbol.exp: print value of rr
...

These are FAILs due to PR25857.

Mark these FAILs as KFAILs.

gdb/testsuite/ChangeLog:

2020-10-28  Tom de Vries  <tdevries@suse.de>

	* gdb.python/py-symbol.exp: Add KFAILs for -readnow.
2020-10-28 21:04:12 +01:00
Tom de Vries
efe9b87393 [gdb/testsuite] Fix re-read FAILs with -readnow
When running the testsuite with target board readnow, we run into:
...
FAIL: gdb.ada/exec_changed.exp: start second
FAIL: gdb.ada/exec_changed.exp: start just first
FAIL: gdb.base/reread.exp: opts= "" "" : run to foo() second time
FAIL: gdb.base/reread.exp: opts= "" "" : second pass: run to foo() second time
FAIL: gdb.base/reread.exp: opts= "-fPIE" "ldflags=-pie" : \
  run to foo() second time
FAIL: gdb.base/reread.exp: opts= "-fPIE" "ldflags=-pie" : second pass: \
  run to foo() second time
...

These are FAILs due to PR26800.

Mark these as KFAILs.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2020-10-28  Tom de Vries  <tdevries@suse.de>

	* gdb.ada/exec_changed.exp: Add KFAILs for -readnow.
	* gdb.base/reread.exp: Same.
2020-10-28 21:04:12 +01:00
Tom de Vries
6b68fd45a8 [gdb/testsuite] Fix gdb.rust/traits.exp with -readnow
With test-case gdb.rust/traits.exp and target board readnow we get:
...
FAIL: gdb.rust/traits.exp: print *td
FAIL: gdb.rust/traits.exp: print *tu
...

Mark these FAILs as KFAILs.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2020-10-28  Tom de Vries  <tdevries@suse.de>

	* lib/gdb.exp (readnow): Handle arg.
	* gdb.rust/traits.exp: Add KFAILs for -readnow.
2020-10-28 21:04:12 +01:00
Tom de Vries
32a5f98aa4 [gdb/testsuite] Fix gdb.base/relocate.exp with -readnow
With test-case gdb.base/relocate.exp and target board readnow, we get:
...
FAIL: gdb.base/relocate.exp: symbol-file with offset
FAIL: gdb.base/relocate.exp: add-symbol-file with offset
FAIL: gdb.base/relocate.exp: add-symbol-file with offset, text address given
FAIL: gdb.base/relocate.exp: add-symbol-file with offset, data address given
...

Fix these FAILs by updating the regexps for -readnow.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2020-10-28  Tom de Vries  <tdevries@suse.de>

	* gdb.base/relocate.exp: Update regexp for -readnow.
2020-10-28 21:04:12 +01:00
Tom de Vries
f93b876030 [gdb/testsuite] Fix gdb.dwarf2/dw2-error.exp with -readnow
With test-case gdb.dwarf2/dw2-error.exp and target board readnow, we get:
...
FAIL: gdb.dwarf2/dw2-error.exp: break -q main
...

In the normal case, after running into the dwarf error, the minimal symbols
are still available, but with -readnow this is not the case.

Mark the FAIL as KFAIL.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2020-10-28  Tom de Vries  <tdevries@suse.de>

	* gdb.dwarf2/dw2-error.exp: Mark failure break in main as known with
	-readnow.
2020-10-28 21:04:12 +01:00
Tom de Vries
1b00ef063f [gdb/symtab] Fix language of frame without debug info
On openSUSE Leap 15.2, I run into this FAIL with target board readnow and
test-case gdb.dwarf2/dw2-align.exp:
...
(gdb) set lang c++^M
Warning: the current language does not match this frame.^M
(gdb) FAIL: gdb.dwarf2/dw2-align.exp: set lang c++
...

Adding some extra debugging shows that the current language differs without
and with readnow:
...
 Breakpoint 1, 0x00000000004004ab in main ()^M
 (gdb) show lang^M
-The current source language is "auto; currently c".^M
+The current source language is "auto; currently asm".^M
...

This is explained by find_pc_compunit_symtab (0x4004ab) called from
select_frame, which:
- without readnow: returns NULL, and
- with readnow: returns the symtab for the CU crtn.S, wich has language
  "MIPS assembler".

In the former case, the symtab for crtn.S is not expanded, and
find_pc_compunit_symtab hits the default NULL return.  In the latter case, the
symtab for crtn.S is expanded, and the "best match" loop in
find_pc_compunit_symtab returns that symtab as its best match.

The GLOBAL_BLOCK for crtn.S has these outer limits of the address range:
...
(gdb) p /x b.startaddr
$6 = 0x4003c2
(gdb) p /x b.endaddr
$7 = 0x40053d
...
and 0x4004ab indeed fits in that range, which explains why the CU is
considered a match.

However, the actual address ranges for the CU are:
...
    00000040 ffffffffffffffff 0000000000000000 (base address)
    00000040 00000000004003c2 00000000004003c7
    00000040 0000000000400538 000000000040053d
    00000040 <End of list>
...
which confirms that the CU should not be considered a match.

The problem is that the "best match" loop is based on the assumption that a
symtab with a better match will be found, but in this case we don't find a
better match because there's no debug info describing main.

Fix this by preferring to use the addres map in the "best match" loop, which
will accurately tell us that addrmap_find (bv.map, 0x4004ab) == NULL.

Tested on x86_64-linux (that is, openSUSE Leap 15.2), with and without
readnow.  In the case of a readnow run, brings down the number of unexpected
failures from 66 to 38.

The FAIL does not reproduce on f.i. Ubuntu 18.04.5, because there the exec
does not contain debug info for crtn.S.  The dwarf assembly test-case mimics
the scenario described above, and reproduces the FAIL with and without
-readnow, for both mentioned OS configurations.

Also fixes PR25980 - "Overlapping Dwarf Compile Units with non-overlapping
subranges gives incorrect line information".

gdb/ChangeLog:

2020-10-28  Tom de Vries  <tdevries@suse.de>

	PR symtab/26772
	* symtab.c (find_pc_sect_compunit_symtab): In case there's an address
	map, check it in the "best match" loop.

gdb/testsuite/ChangeLog:

2020-10-28  Tom de Vries  <tdevries@suse.de>

	PR symtab/26772
	* gdb.dwarf2/dw2-ranges-overlap.c: New test.
	* gdb.dwarf2/dw2-ranges-overlap.exp: New file.
2020-10-28 21:04:12 +01:00
Andreas Rammhold
ce04ca3123 Use sha256 for hashes in the release process
I just came across the GDB 10.1 release notes and saw that md5 is still
being used in those. I thought it would be a good idea to instead have a
more modern, secure and wildly available hash function such as SHA256 as
part of the release process.

The changes have been done rather mechnically via sed but executing the
`src-release.sh -b gdb` did work so I am confident about the result.

While this does not directly address the release mails, I was wasn't
able to find the template/script used for those, this is probably still
an improvement.

ChangeLog:
	* src-release.sh: Use sha256sum instead of md5sum.

binutils/ChangeLog:
	* README-how-to-make-a-release: Use sha256sum instead of md5sum.

Change-Id: I9cf19ea40699137c45463b8514f6e29271af2347
2020-10-28 10:35:28 -04:00
Przemyslaw Wirkus
dd4a72c859 aarch64: Add CSR PDEC instruction
This patch adds:
+ New feature +csre to -march command line.
+ New instruction CSR PDEC associated with CSRE feature.

Please note that CSRE system registers were already upstreamed. This patch
should finalize CSRE feature implementation.

CSRE feature adds CSR PDEC (Decrements Call stack pointer by the size of
a Call stack record) instruction. Although this instruction has operand
(PDEC) it's instruction's only operand. PDEC forces instruction field Rt
to be set to 0b1111. This results in fixed opcode of the instruction.

gas/ChangeLog:

2020-10-27  Przemyslaw Wirkus  <przemyslaw.wirkus@arm.com>

	* NEWS: Update docs.
	* config/tc-aarch64.c (parse_csr_operand): New operand parser.
	(parse_operands): Call to CSR operand parser.
	* testsuite/gas/aarch64/csre_csr-invalid.d: New test.
	* testsuite/gas/aarch64/csre_csr-invalid.l: New test.
	* testsuite/gas/aarch64/csre_csr-invalid.s: New test.
	* testsuite/gas/aarch64/csre_csr.d: New test.
	* testsuite/gas/aarch64/csre_csr.s: New test.

include/ChangeLog:

2020-10-27  Przemyslaw Wirkus  <przemyslaw.wirkus@arm.com>

	* opcode/aarch64.h (AARCH64_FEATURE_CSRE): New -march feature.
	(enum aarch64_opnd): New CSR instruction field AARCH64_OPND_CSRE_CSR.

opcodes/ChangeLog:

2020-10-27  Przemyslaw Wirkus  <przemyslaw.wirkus@arm.com>

	* aarch64-opc.c (aarch64_print_operand): CSR PDEC operand print-out.
	* aarch64-tbl.h (CSRE): New CSRE feature handler.
	(_CSRE_INSN): New CSRE instruction type.
	(struct aarch64_opcode): New 'csre' entry for a CSRE CLI feature.
	* aarch64-asm-2.c: Regenerated.
	* aarch64-dis-2.c: Regenerated.
	* aarch64-opc-2.c: Regenerated.
2020-10-28 14:19:42 +00:00
Przemyslaw Wirkus
82503ca7ed aarch64: Add WFET instruction for Armv8.7-a
This patch adds new to Armv8.7 WFET instruction which take one operand:

    WFET <Xt>

Where:
    <Xt> is 64-bit name of the general-purpose source register, encoded in the
         "Rd" field.

For more details regarding WFET (Wait For Event with Timeout) instruction for
Armv8.7-a please refer to Arm A64 Instruction set documentation for Armv8-A
architecture profile, see document pages 565 of [0].

	[0]: https://developer.arm.com/docs/ddi0596/i

gas/ChangeLog:

2020-10-27  Przemyslaw Wirkus  <przemyslaw.wirkus@arm.com>

	* NEWS: Update docs.
	* testsuite/gas/aarch64/system-5.d: New test.
	* testsuite/gas/aarch64/system-5.s: New test.

opcodes/ChangeLog:

2020-10-27  Przemyslaw Wirkus  <przemyslaw.wirkus@arm.com>

	* aarch64-tbl.h (struct aarch64_opcode): Add new WFET instruction encoding
	and operand description.
	* aarch64-asm-2.c: Regenerated.
	* aarch64-dis-2.c: Regenerated.
	* aarch64-opc-2.c: Regenerated.
2020-10-28 14:12:37 +00:00
Przemyslaw Wirkus
fd195909ce aarch64: Add DSB instruction Armv8.7-a variant
This patch adds new variant (nXS) of DSB memory barrier instruction
available in Armv8.7-a. New nXS variant has different encoding in
comparison with pre Armv8.7-a DSB memory barrier variant thus new
instruction and new operand was added.

DSB memory nXS barrier variant specifies the limitation on the barrier
operation. Allowed values are:

	DSB SYnXS|#28
	DSB ISHnXS|#24
	DSB NSHnXS|#20
	DSB OSHnXS|#16

Please note that till now,  for barriers, barrier operation was encoded in
4-bit unsigned immediate CRm field (in the range 0 to 15).
For DSB memory nXS barrier variant, barrier operation is a 5-bit unsigned
assembly instruction immediate, encoded in instruction in two bits CRm<3:2>:

		CRm<3:2>  #imm
		  00       16
		  01       20
		  10       24
		  11       28

This patch extends current AArch64 barrier instructions with above mapping.

Notable patch changes include:
+ New DSB memory barrier variant encoding for Armv8.7-a.
+ New operand BARRIER_DSB_NXS for above instruction in order to
distinguish between existing and new DSB instruction flavour.
+ New set of DSB nXS barrier options.
+ New instruction inserter and extractor map between instruction
immediate 5-bit value and 2-bit CRm field of the instruction itself (see
FLD_CRm_dsb_nxs).
+ Regeneration of aarch64-[asm|dis|opc]-2.c files.
+ Test cases to cover new instruction assembling and disassembling.

For more details regarding DSB memory barrier instruction and its
Armv8.7-a flavour please refer to Arm A64 Instruction set documentation
for Armv8-A architecture profile, see document pages 132-133 of [0].

	[0]: https://developer.arm.com/docs/ddi0596/i

gas/ChangeLog:

2020-10-23  Przemyslaw Wirkus  <przemyslaw.wirkus@arm.com>

	* NEWS: Docs update.
	* config/tc-aarch64.c (parse_operands): Add
	AARCH64_OPND_BARRIER_DSB_NXS handler.
	(md_begin): Add content of aarch64_barrier_dsb_nxs_options to
	aarch64_barrier_opt_hsh hash.
	* testsuite/gas/aarch64/system-4-invalid.d: New test.
	* testsuite/gas/aarch64/system-4-invalid.l: New test.
	* testsuite/gas/aarch64/system-4-invalid.s: New test.
	* testsuite/gas/aarch64/system-4.d: New test.
	* testsuite/gas/aarch64/system-4.s: New test.

include/ChangeLog:

2020-10-23  Przemyslaw Wirkus  <przemyslaw.wirkus@arm.com>

	* opcode/aarch64.h (enum aarch64_opnd): New operand
	AARCH64_OPND_BARRIER_DSB_NXS.
	(aarch64_barrier_dsb_nxs_options): Declare DSB nXS options.

opcodes/ChangeLog:

2020-10-23  Przemyslaw Wirkus  <przemyslaw.wirkus@arm.com>

	* aarch64-asm.c (aarch64_ins_barrier_dsb_nxs): New inserter.
	* aarch64-asm.h (AARCH64_DECL_OPD_INSERTER): New inserter
	ins_barrier_dsb_nx.
	* aarch64-dis.c (aarch64_ext_barrier_dsb_nxs): New extractor.
	* aarch64-dis.h (AARCH64_DECL_OPD_EXTRACTOR): New extractor
	ext_barrier_dsb_nx.
	* aarch64-opc.c (aarch64_print_operand): New options table
	aarch64_barrier_dsb_nxs_options.
	* aarch64-opc.h (enum aarch64_field_kind): New field name FLD_CRm_dsb_nxs.
	* aarch64-tbl.h (struct aarch64_opcode): Define DSB nXS barrier
	Armv8.7-a instruction.
	* aarch64-asm-2.c: Regenerated.
	* aarch64-dis-2.c: Regenerated.
	* aarch64-opc-2.c: Regenerated.
2020-10-28 14:05:05 +00:00
Przemyslaw Wirkus
8926e54e3a aarch64: Add basic support for armv8.7-a architecture
This patch adds support for AArch64 -march=armv8.7-a command line option
in GAS.

Please note that this change ONLY extends -march= command line interface
with a new "armv8.7-a" option. Architectural changes like new instructions
will be added in following patches.

gas/ChangeLog:

2020-10-16  Przemyslaw Wirkus  <przemyslaw.wirkus@arm.com>

	* NEWS: Docs update.
	* config/tc-aarch64.c (armv8.7-a): New arch.
	* doc/c-aarch64.texi (-march=armv8.7-a): Update docs.

include/ChangeLog:

2020-10-16  Przemyslaw Wirkus  <przemyslaw.wirkus@arm.com>

	* opcode/aarch64.h (AARCH64_FEATURE_V8_7): New feature bitmask.
	(AARCH64_ARCH_V8_7): New arch feature set.

opcodes/ChangeLog:

2020-10-16  Przemyslaw Wirkus  <przemyslaw.wirkus@arm.com>

	* aarch64-tbl.h (ARMV8_7): New macro.
2020-10-28 13:58:17 +00:00
Nick Clifton
2aec1123f9 Fix a potential illegal memory access when creating an srec format file.
PR 26774
	* srec.c (srec_write_symbols): Do not emit symbols in sections
	that have been removed from the output.
2020-10-28 11:07:02 +00:00
Nick Clifton
ec3f28df02 Fix compile time warning building with gcc 11.
PR 26795
	* elfedit.c (process_archive): Remove spurious call to free().
2020-10-28 10:56:00 +00:00
Tom de Vries
364bb90300 [gdb/testsuite] Fix gdb.cp/nsalias.exp with -readnow
When running test-case gdb.cp/nsalias.exp with target board readnow, we get:
...
FAIL: gdb.cp/nsalias.exp: complaint for too many recursively imported \
  declarations
...

The complaint is not detected, because:
- the complaint is triggered during the file command instead of during
  "print N100::x"
- the "set complaints 1" is not effective because it's issued
  after the file command

Fix the FAIL by setting the complaints limit earlier, and detecting the
complaint also during the file command.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2020-10-28  Tom de Vries  <tdevries@suse.de>

	* lib/gdb.exp (gdb_file_cmd): Set gdb_file_cmd_msg.
	* gdb.cp/nsalias.exp: Set complaints limit before file cmd.  Expect
	complaint during file command for -readnow.
2020-10-28 10:01:32 +01:00
Tom de Vries
445a033f48 [gdb/testsuite] Fix typo in gdb.cp/nsalias.exp
Fix typo "compaint" -> "complaint".

gdb/testsuite/ChangeLog:

2020-10-28  Tom de Vries  <tdevries@suse.de>

	* gdb.cp/nsalias.exp: Fix typo in test name.
2020-10-28 10:01:32 +01:00
Tom de Vries
fdd67a422f [gdb/testsuite] Fix gdb.dwarf2/dw2-filename.exp with -readnow
When running test-case gdb.dwarf2/dw2-filename.exp with target board -readnow,
we run into:
...
FAIL: gdb.dwarf2/dw2-filename.exp: info sources
...

The normal output is:
...
(gdb) info sources^M
Source files for which symbols have been read in:^M
^M
Source files for which symbols will be read in on demand:^M
^M
src/gdb/testsuite/gdb.dwarf2/file1.txt^M
(gdb)
...
but with -readnow file1.txt appears in the "Source files for which symbols
have been read in" catagory instead, as expected.

Fix the FAIL by making the regexp match the -readnow output.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2020-10-28  Tom de Vries  <tdevries@suse.de>

	* gdb.dwarf2/dw2-filename.exp: Update regexp for -readnow.
2020-10-28 10:01:32 +01:00
Tom de Vries
706baf4c50 [gdb/testsuite] Fix gdb.dwarf2/dw2-stack-boundary.exp with -readnow
When running test-case gdb.dwarf2/dw2-stack-boundary.exp with target board
readnow, we run into:
...
FAIL: gdb.dwarf2/dw2-stack-boundary.exp: check partial symtab errors
...

The cause for the FAIL is that these complaints are not there:
...
During symbol reading: location description stack underflow^M
During symbol reading: location description stack overflow^M
...

Fix this by KFAILing the complaints for -readnow.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2020-10-28  Tom de Vries  <tdevries@suse.de>

	* gdb.dwarf2/dw2-stack-boundary.exp: KFAILing the complaints for
	-readnow.
2020-10-28 10:01:32 +01:00
GDB Administrator
e9bb6a60bf Automatic date update in version.in 2020-10-28 00:00:15 +00:00
Tom de Vries
b448cca522 [gdb/testsuite] Fix gdb.base/multi-forks.exp timeout with -readnow
When running test-case gdb.base/multi-forks.exp with target board readnow, we
run into:
...
FAIL: gdb.base/multi-forks.exp: run to exit 1 (timeout)
...

Fix this by using exp_continue.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2020-10-27  Tom de Vries  <tdevries@suse.de>

	* gdb.base/multi-forks.exp: Use exp_continue to fix timeout.
2020-10-27 23:17:09 +01:00
Tom de Vries
297e9a75f2 [gdb/testsuite] Fix DUPLICATEs in gdb.base/multi-forks.exp
When running test-case gdb.base/multi-forks.exp I get:
...
DUPLICATE: gdb.base/multi-forks.exp: run to exit 2
DUPLICATE: gdb.base/multi-forks.exp: run to exit 2
...

Fix these by using test_with_prefix.

Tested on x86_64-linux.
2020-10-27 23:17:09 +01:00