Age | Commit message (Collapse) | Author | Files | Lines |
|
I wanted to make this change before pushing the last patch but forgot to
amend before pushing.
Change-Id: I8e1f03ee0131c1e75973718e7835b39580a06054
|
|
The multi-target tests involve some inferiors using remote targets. By
default, GDB uses target: as the sysroot, which makes it read loaded
libraries and their debug info through GDBserver. This makes the tests
run slower than necessary.
Pass `-ex "set sysroot"` when launching GDB in these tests, so that GDB
always reads from its local file system.
On a system where I don't have debug info for libc, that reduces run
time for
$ make check TESTS="gdb.multi/multi-target-*.exp"
from 1:15 to 0:45.
On this other system where debug info is installed though, it reduces it
from 13:00 to 1:45.
gdb/testsuite/ChangeLog:
* gdb.multi/multi-target.exp.tcl (setup): Add "set sysroot" to
GDBFLAGS.
Change-Id: I9d24f3def843472d35dfb5667c12d70ae1d7e984
|
|
This commits the result of running gdb/copyright.py as per our Start
of New Year procedure...
gdb/ChangeLog
Update copyright year range in copyright header of all GDB files.
|
|
That test fails intermittently for me. The problem is a race condition
between the exec syscall and GDB resuming threads.
The initial situation is that we have two threads, let's call them
"leader" and "other". Leader is the one who is going to do the exec.
We stop at the breakpoint on the all_started function, so both threads
are stopped. When resuming, GDB resumes leader first and other second.
However, between resuming the two threads, leader has time to run and do
its exec, making other disappear. When GDB tries to resume other, it is
ino longer there. We get some "Couldn't get registers: No such
process." messages, and the state is a bit messed up.
The issue can be triggered consistently by adding a small delay after
the resume syscall:
diff --git a/gdb/inf-ptrace.c b/gdb/inf-ptrace.c
index d5a062163c7..9540339a9da 100644
--- a/gdb/inf-ptrace.c
+++ b/gdb/inf-ptrace.c
@@ -308,6 +308,8 @@ inf_ptrace_target::resume (ptid_t ptid, int step, enum gdb_signal signal)
gdb_ptrace (request, ptid, (PTRACE_TYPE_ARG3)1, gdb_signal_to_host (signal));
if (errno != 0)
perror_with_name (("ptrace"));
+ for (int i = 0 ; i < 100; i++)
+ usleep (10000);
}
/* Wait for the child specified by PTID to do something. Return the
This patch is about fixing the test to avoid this, since the test is not
about testing this particular corner case. Handling of multi-threaded
program doing execs should be improved too, but that's not the goal of
this patch.
Fix it by adding a synchronization point in the test to make sure both
threads were resumed by GDB before doing the exec. I added two
pthread_barrier_wait calls in each thread (for a total of three). I
think adding one call in each thread would not be enough, because this
could happen:
- both threads reach the first barrier
- the "other" thread is scheduled so has time to run and hit the second
barrier
- the "leader" thread hits the all_started function breakpoint, causing
both threads to be stopped by GDB
- GDB resumes the "leader" thread
- Since the "other" thread has already reached the second barrier, the
"leader" thread is free to run past its second barrier and do the
exec, while GDB still hasn't resumed the second one
By adding two barrier calls in each thread, I think we are good. The test
passes consistently for me, even with the artificial delay added.
gdb/testsuite/ChangeLog:
PR gdb/24694
* gdb.multi/multi-arch-exec.c (thread_start, main): Add barrier
calls.
Change-Id: I25c8ea9724010b6bf20b42691c716235537d0e27
|
|
A number of testcases define variables and/or functions which are
referenced by GDB during the test, but which are not referenced from
within the test executable. Clang correctly recognizes that these
variables and functions are unused, and optimizes them out, causing
the testcases in question to fail. This commit adds __attribute__
((used)) in various places to prevent this.
gdb/testsuite/ChangeLog:
* gdb.base/msym-bp.c (foo): Add __attribute__ ((used)).
* gdb.base/msym-bp-2.c (foo): Likewise.
* gdb.base/msym-lang.c (foo): Likewise.
* gdb.base/msym-lang-main.c (foo): Likewise.
* gdb.base/symtab-search-order-1.c (static_global): Likewise.
* gdb.guile/scm-pretty-print.c (eval_func): Likewise.
* gdb.mi/mi-sym-info-1.c (global_f1): Likewise.
* gdb.mi/mi-sym-info-2.c (global_f1, var1, var2): Likewise.
* gdb.multi/watchpoint-multi-exit.c (globalvar): Likewise.
* gdb.python/py-as-string.c (enum_valid, enum_invalid): Likewise.
* gdb.python/py-objfile.c (static_var): Likewise.
* gdb.python/py-symbol.c (rr): Likewise.
* gdb.python/py-symbol-2.c (anon, rr): Likewise.
* gdb.mi/mi-sym-info.exp (lineno1, lineno2): Updated.
|
|
"thread find" with multiple inferiors got broken with the multi-target
work:
Thread 1 "gdb" hit Breakpoint 1, internal_error (...) at ../../src/gdbsupport/errors.cc:51
51 {
(top-gdb) bt
#0 internal_error (file=0xffffd4d0 <error: Cannot access memory at address 0xffffd4d0>, line=0, fmt=0x555556330320 "en_US.UTF-8") at ../../src/gdbsupport/errors.cc:51
#1 0x0000555555bca4c7 in target_thread_name (info=0x555556801290) at ../../src/gdb/target.c:2035
#2 0x0000555555beb07a in thread_find_command (arg=0x7fffffffe08e "1", from_tty=0) at ../../src/gdb/thread.c:1959
#3 0x000055555572ec49 in do_const_cfunc (c=0x555556786bc0, args=0x7fffffffe08e "1", from_tty=0) at ../../src/gdb/cli/cli-decode.c:95
#4 0x0000555555732abd in cmd_func (cmd=0x555556786bc0, args=0x7fffffffe08e "1", from_tty=0) at ../../src/gdb/cli/cli-decode.c:2181
#5 0x0000555555bf1245 in execute_command (p=0x7fffffffe08e "1", from_tty=0) at ../../src/gdb/top.c:664
#6 0x00005555559cad10 in catch_command_errors (command=0x555555bf0c31 <execute_command(char const*, int)>, arg=0x7fffffffe082 "thread find 1", from_tty=0) at ../../src/gdb/main.c:457
#7 0x00005555559cc33d in captured_main_1 (context=0x7fffffffdb60) at ../../src/gdb/main.c:1218
#8 0x00005555559cc571 in captured_main (data=0x7fffffffdb60) at ../../src/gdb/main.c:1243
#9 0x00005555559cc5e8 in gdb_main (args=0x7fffffffdb60) at ../../src/gdb/main.c:1268
#10 0x0000555555623816 in main (argc=17, argv=0x7fffffffdc78) at ../../src/gdb/gdb.c:32
The problem is that we're not switching to the inferior/target before
calling target methods, which trips on an assertion put in place
exactly to catch this sort of problem.
gdb/testsuite/ChangeLog:
PR gdb/26631
* gdb.multi/multi-target-thread-find.exp: New file.
gdb/ChangeLog:
PR gdb/26631
* thread.c (thread_find_command): Switch inferior before calling
target methods.
|
|
gdb.multi/multi-target.exp sets up a debug environment with multiple
gdbservers, multiple native processes, and multiple cores, which has
proved useful for exercising a number of multi-target scenarios.
But, as we add more tests to gdb.base/multi-target.exp, it is growing
a bit too large (making a bit cumbersome to debug) and too slow to run
(if you have glibc debug info).
This commit thus splits the multi-target.exp into several testcases,
one per use case. The common setup code is moved to a new
multi-target.exp.tcl file that is included by all the resulting
multi-target testcases.
gdb/testsuite/ChangeLog:
* gdb.multi/multi-target-continue.exp: New file, factored out from
multi-target.exp.
* gdb.multi/multi-target-info-inferiors.exp: New file, factored out from
multi-target.exp.
* gdb.multi/multi-target-interrupt.exp: New file, factored out from
multi-target.exp.
* gdb.multi/multi-target-no-resumed.exp: New file, factored out from
multi-target.exp.
* gdb.multi/multi-target-ping-pong-next.exp: New file, factored out from
multi-target.exp.
* gdb.multi/multi-target.exp.tcl: New file, factored out from
multi-target.exp.
* gdb.multi/multi-target.exp: Delete.
|
|
This adds a testcase that covers the scenarios described in the
previous two commits.
gdb/testsuite/ChangeLog:
PR gdb/26199
* gdb.multi/multi-target.c (exit_thread): New.
(thread_start): Break loop if EXIT_THREAD.
* gdb.multi/multi-target.exp (test_no_unwaited_for): New proc.
(top level) Call test_no_resumed.
|
|
The new exec-file-mismatch feature reveals that when running
gdb.multi/multi-re-run.exp against --target_board=native-gdbserver,
we've been starting gdbserver with the wrong program:
(gdb) spawn /home/pedro/brno/pedro/gdb/binutils-gdb/build/gdb/testsuite/../../gdbserver/gdbserver --once localhost:2347 /home/pedro/brno/pedro/gdb/binutils-gdb/build/gdb/te
stsuite/outputs/gdb.multi/multi-re-run/multi-re-run-2
Process /home/pedro/brno/pedro/gdb/binutils-gdb/build/gdb/testsuite/outputs/gdb.multi/multi-re-run/multi-re-run-2 created; pid = 6280
Listening on port 2347
target remote localhost:2347
Remote debugging using localhost:2347
warning: Mismatch between current exec-file /home/pedro/brno/pedro/gdb/binutils-gdb/build/gdb/testsuite/outputs/gdb.multi/multi-re-run/multi-re-run-1
and automatically determined exec-file /home/pedro/brno/pedro/gdb/binutils-gdb/build/gdb/testsuite/outputs/gdb.multi/multi-re-run/multi-re-run-2
exec-file-mismatch handling is currently "ask"
Load new symbol table from "/home/pedro/brno/pedro/gdb/binutils-gdb/build/gdb/testsuite/outputs/gdb.multi/multi-re-run/multi-re-run-2"? (y or n) Quit
(gdb) FAIL: gdb.multi/multi-re-run.exp: re_run_inf=1: iter=1: running to all_started in runto
The problem is that gdb_reload uses the last loaded file as binary to
spawn, but we load the program for inferior 2 and then switch to
inferior 1 and run it, so the last loaded file is the program for
inferior 2.
Fix this by tweaking last_loaded_file.
gdb/testsuite/ChangeLog:
2020-05-16 Pedro Alves <palves@redhat.com>
* gdb.multi/multi-re-run.exp (test_re_run): Switch
LAST_LOADED_FILE accordingly.
|
|
When running the testsuite with clang, a number of testcases fail to
build with the following errors:
warning: control reaches end of non-void function [-Wreturn-type]
warning: control may reach end of non-void function [-Wreturn-type]
This prevents a number of testcases from executing. This commit fixes.
gdb/testsuite/ChangeLog:
* gdb.base/info-os.c (main): Add return statement.
* gdb.base/info_minsym.c (minsym_fun): Likewise.
* gdb.base/large-frame-2.c (func): Likewise.
* gdb.base/pr10179-a.c (foo1, bar1): Likewise.
* gdb.base/pr10179-b.c (foo2): Likewise.
* gdb.base/valgrind-disp-step.c (foo): Likewise.
* gdb.base/watch-cond.c (func): Likewise.
* gdb.multi/goodbye.c (verylongfun): Likewise.
* gdb.multi/hello.c (commonfun): Likewise.
* gdb.python/py-finish-breakpoint.c (call_longjmp): Likewise.
* gdb.threads/fork-plus-threads.c (thread_func): Likewise.
* gdb.threads/forking-threads-plus-breakpoint.c (thread_forks):
Likewise.
* gdb.threads/hand-call-new-thread.c (foo): Likewise.
* gdb.threads/interrupt-while-step-over.c (child_function):
Likewise.
* gdb.trace/actions-changed.c (end): Likewise.
|
|
The previous patch misssed declaring the 'testpid' array as namespace
variable. While it at, might as well go back to having start_inferior
refer to the "global" testpid, using "variable" too.
gdb/testsuite/ChangeLog:
2020-05-15 Pedro Alves <palves@redhat.com>
* gdb.multi/multi-kill.exp (start_inferior): Remove
'testpid' parameter. Refer to namespace variable directly.
(testpid): Declare as namespace variable.
|
|
The new gdb.multi/multi-kill.exp testcase added an 'testpid' array,
which may conflict with other global 'testpid' variables used by other
testcases, resulting in:
...
ERROR: tcl error sourcing
/data/gdb_versions/devel/src/gdb/testsuite/gdb.multi/multi-kill.exp.
ERROR: can't set "testpid(1)": variable isn't array
while executing
"set testpid($num) [get_integer_valueof "pid" -1]"
or
$ runtest gdb.threads/check-libthread-db.exp gdb.multi/multi-kill.exp
...
Running /home/pedro/gdb/binutils-gdb/src/gdb/testsuite/gdb.multi/multi-kill.exp ...
Running /home/pedro/gdb/binutils-gdb/src/gdb/testsuite/gdb.threads/check-libthread-db.exp ...
ERROR: tcl error sourcing /home/pedro/gdb/binutils-gdb/src/gdb/testsuite/gdb.threads/check-libthread-db.exp.
ERROR: can't set "testpid": variable is array
while executing
"set testpid [spawn_id_get_pid $test_spawn_id]"
("uplevel" body line 8)
Fix this with a namespace, like gdb.linespec/explicit.exp does.
gdb/testsuite/ChangeLog:
2020-05-15 Pedro Alves <palves@redhat.com>
* gdb.multi/multi-kill.exp: Wrap in namespace.
(start_inferior): Add TESTPID parameter. Use it instead of the
testpid global.
(top level): Define empty TESTPID array, and pass it down to
start_inferior.
|
|
In stop_all_threads, GDB sends signals to other threads in an attempt
to stop them. While in a typical scenario the expected wait status is
TARGET_WAITKIND_STOPPED, it is possible that the thread GDB attempted
to stop has already terminated. If so, a waitstatus other than
TARGET_WAITKIND_STOPPED would be received. Handle this case
appropriately.
If a wait status that denotes thread termination is ignored, GDB goes
into an infinite loop in stop_all_threads.
E.g.:
$ gdb ./a.out
(gdb) start
...
(gdb) add-inferior -exec ./a.out
...
(gdb) inferior 2
...
(gdb) start
...
(gdb) set schedule-multiple on
(gdb) set debug infrun 2
(gdb) continue
Continuing.
infrun: clear_proceed_status_thread (process 10449)
infrun: clear_proceed_status_thread (process 10453)
infrun: proceed (addr=0xffffffffffffffff, signal=GDB_SIGNAL_DEFAULT)
infrun: proceed: resuming process 10449
infrun: resume (step=0, signal=GDB_SIGNAL_0), trap_expected=0, current thread [process 10449] at 0x55555555514e
infrun: infrun_async(1)
infrun: prepare_to_wait
infrun: proceed: resuming process 10453
infrun: resume (step=0, signal=GDB_SIGNAL_0), trap_expected=0, current thread [process 10453] at 0x55555555514e
infrun: prepare_to_wait
infrun: Found 2 inferiors, starting at #0
infrun: target_wait (-1.0.0, status) =
infrun: 10449.10449.0 [process 10449],
infrun: status->kind = exited, status = 0
infrun: handle_inferior_event status->kind = exited, status = 0
[Inferior 1 (process 10449) exited normally]
infrun: stop_waiting
infrun: stop_all_threads
infrun: stop_all_threads, pass=0, iterations=0
infrun: process 10453 executing, need stop
infrun: target_wait (-1.0.0, status) =
infrun: 10453.10453.0 [process 10453],
infrun: status->kind = exited, status = 0
infrun: stop_all_threads status->kind = exited, status = 0 process 10453
infrun: process 10453 executing, already stopping
infrun: target_wait (-1.0.0, status) =
infrun: -1.0.0 [process -1],
infrun: status->kind = no-resumed
infrun: infrun_async(0)
infrun: stop_all_threads status->kind = no-resumed process -1
infrun: process 10453 executing, already stopping
infrun: stop_all_threads status->kind = no-resumed process -1
infrun: process 10453 executing, already stopping
infrun: stop_all_threads status->kind = no-resumed process -1
infrun: process 10453 executing, already stopping
infrun: stop_all_threads status->kind = no-resumed process -1
infrun: process 10453 executing, already stopping
infrun: stop_all_threads status->kind = no-resumed process -1
infrun: process 10453 executing, already stopping
infrun: stop_all_threads status->kind = no-resumed process -1
infrun: process 10453 executing, already stopping
infrun: stop_all_threads status->kind = no-resumed process -1
infrun: process 10453 executing, already stopping
infrun: stop_all_threads status->kind = no-resumed process -1
infrun: process 10453 executing, already stopping
infrun: stop_all_threads status->kind = no-resumed process -1
infrun: process 10453 executing, already stopping
infrun: stop_all_threads status->kind = no-resumed process -1
infrun: process 10453 executing, already stopping
...
And this polling goes on forever. This patch prevents the infinite
looping behavior. For the same scenario above, we obtain the
following behavior:
...
(gdb) continue
Continuing.
infrun: clear_proceed_status_thread (process 31229)
infrun: clear_proceed_status_thread (process 31233)
infrun: proceed (addr=0xffffffffffffffff, signal=GDB_SIGNAL_DEFAULT)
infrun: proceed: resuming process 31229
infrun: resume (step=0, signal=GDB_SIGNAL_0), trap_expected=0, current thread [process 31229] at 0x55555555514e
infrun: infrun_async(1)
infrun: prepare_to_wait
infrun: proceed: resuming process 31233
infrun: resume (step=0, signal=GDB_SIGNAL_0), trap_expected=0, current thread [process 31233] at 0x55555555514e
infrun: prepare_to_wait
infrun: Found 2 inferiors, starting at #0
infrun: target_wait (-1.0.0, status) =
infrun: 31229.31229.0 [process 31229],
infrun: status->kind = exited, status = 0
infrun: handle_inferior_event status->kind = exited, status = 0
[Inferior 1 (process 31229) exited normally]
infrun: stop_waiting
infrun: stop_all_threads
infrun: stop_all_threads, pass=0, iterations=0
infrun: process 31233 executing, need stop
infrun: target_wait (-1.0.0, status) =
infrun: 31233.31233.0 [process 31233],
infrun: status->kind = exited, status = 0
infrun: stop_all_threads status->kind = exited, status = 0 process 31233
infrun: saving status status->kind = exited, status = 0 for 31233.31233.0
infrun: process 31233 not executing
infrun: stop_all_threads, pass=1, iterations=1
infrun: process 31233 not executing
infrun: stop_all_threads done
(gdb)
The exit event from Inferior 1 is received and shown to the user.
The exit event from Inferior 2 is not displayed, but kept pending.
(gdb) info inferiors
Num Description Connection Executable
* 1 <null> a.out
2 process 31233 1 (native) a.out
(gdb) inferior 2
[Switching to inferior 2 [process 31233] (a.out)]
[Switching to thread 2.1 (process 31233)]
Couldn't get registers: No such process.
(gdb) continue
Continuing.
infrun: clear_proceed_status_thread (process 31233)
infrun: clear_proceed_status_thread: thread process 31233 has pending wait status status->kind = exited, status = 0 (currently_stepping=0).
infrun: proceed (addr=0xffffffffffffffff, signal=GDB_SIGNAL_DEFAULT)
infrun: proceed: resuming process 31233
infrun: resume: thread process 31233 has pending wait status status->kind = exited, status = 0 (currently_stepping=0).
infrun: prepare_to_wait
infrun: Using pending wait status status->kind = exited, status = 0 for process 31233.
infrun: target_wait (-1.0.0, status) =
infrun: 31233.31233.0 [process 31233],
infrun: status->kind = exited, status = 0
infrun: handle_inferior_event status->kind = exited, status = 0
[Inferior 2 (process 31233) exited normally]
infrun: stop_waiting
(gdb) info inferiors
Num Description Connection Executable
1 <null> a.out
* 2 <null> a.out
(gdb)
When a process exits and we leave the process exit event pending, we
need to make sure that at least one thread is left listed in the
inferior's thread list. This is necessary in order to make sure we
have a thread that we can later resume, so the process exit event can
be collected/reported.
When native debugging, the GNU/Linux back end already makes sure that
the last LWP isn't deleted.
When remote debugging against GNU/Linux GDBserver, the GNU/Linux
GDBserver backend also makes sure that the last thread isn't deleted
until the process exit event is reported to GDBserver core.
However, between the backend reporting the process exit event to
GDBserver core, and GDB consuming the event, GDB may update the thread
list and find no thread left in the process. The process exit event
will be pending somewhere in GDBserver's stop reply queue, or
gdb/remote.c's queue, or whathever other event queue inbetween
GDBserver and infrun.c's handle_inferior_event.
This patch tweaks remote.c's target_update_thread_list implementation
to avoid deleting the last thread of an inferior.
In the past, this case of inferior-with-no-threads led to a special
case at the bottom of handle_no_resumed, where it reads:
/* Note however that we may find no resumed thread because the whole
process exited meanwhile (thus updating the thread list results
in an empty thread list). In this case we know we'll be getting
a process exit event shortly. */
for (inferior *inf : all_non_exited_inferiors (ecs->target))
In current master, that code path is still reachable with the
gdb.threads/continue-pending-after-query.exp testcase, when tested
against GDBserver, with "maint set target-non-stop" forced "on".
With this patch, the scenario that loop was concerned about is still
properly handled, because the loop above it finds the process's last
thread with "executing" set to true, and thus the handle_no_resumed
function still returns true.
Since GNU/Linux native and remote are the only targets that support
non-stop mode, and with this patch, we always make sure the inferior
has at least one thread, this patch also removes that "inferior with
no threads" special case handling from handle_no_resumed.
Since remote.c now has a special case where we treat a thread that has
already exited as if it was still alive, we might need to tweak
remote.c's target_thread_alive implementation to return true for that
thread without querying the remote side (which would say "no, not
alive"). After inspecting all the target_thread_alive calls in the
codebase, it seems that only the one from prune_threads could result
in that thread being accidentally deleted. There's only one call to
prune_threads in GDB's common code, so this patch handles this by
replacing the prune_threads call with a delete_exited_threads call.
This seems like an improvement anyway, because we'll still be doing
what the comment suggests we want to do, and, we avoid remote protocol
traffic.
Regression-tested on X86_64 Linux.
gdb/ChangeLog:
2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Tom de Vries <tdevries@suse.de>
Pedro Alves <palves@redhat.com>
PR threads/25478
* infrun.c (stop_all_threads): Do NOT ignore
TARGET_WAITKIND_NO_RESUMED, TARGET_WAITKIND_THREAD_EXITED,
TARGET_WAITKIND_EXITED, TARGET_WAITKIND_SIGNALLED wait statuses
received.
(handle_no_resumed): Remove code handling a live inferior with no
threads.
* remote.c (has_single_non_exited_thread): New.
(remote_target::update_thread_list): Do not delete a thread if is
the last thread of the process.
* thread.c (thread_select): Call delete_exited_threads instead of
prune_threads.
gdb/testsuite/ChangeLog:
2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Pedro Alves <palves@redhat.com>
* gdb.multi/multi-exit.c: New file.
* gdb.multi/multi-exit.exp: New file.
* gdb.multi/multi-kill.c: New file.
* gdb.multi/multi-kill.exp: New file.
|
|
In gdb.multi we have:
...
DUPLICATE: gdb.multi/multi-term-settings.exp: \
inf1_how=run: inf2_how=run: info inferiors
DUPLICATE: gdb.multi/multi-term-settings.exp: \
inf1_how=run: inf2_how=attach: info inferiors
DUPLICATE: gdb.multi/multi-term-settings.exp: \
inf1_how=run: inf2_how=tty: info inferiors
DUPLICATE: gdb.multi/multi-term-settings.exp: \
inf1_how=attach: inf2_how=run: info inferiors
DUPLICATE: gdb.multi/multi-term-settings.exp: \
inf1_how=attach: inf2_how=attach: attach
DUPLICATE: gdb.multi/multi-term-settings.exp: \
inf1_how=attach: inf2_how=attach: info inferiors
DUPLICATE: gdb.multi/multi-term-settings.exp: \
inf1_how=attach: inf2_how=tty: info inferiors
DUPLICATE: gdb.multi/multi-term-settings.exp: \
inf1_how=tty: inf2_how=run: info inferiors
DUPLICATE: gdb.multi/multi-term-settings.exp: \
inf1_how=tty: inf2_how=attach: info inferiors
DUPLICATE: gdb.multi/multi-term-settings.exp: \
inf1_how=tty: inf2_how=tty: tty TTY
DUPLICATE: gdb.multi/multi-term-settings.exp: \
inf1_how=tty: inf2_how=tty: info inferiors
...
Fix these using with_test_prefix.
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2020-05-12 Tom de Vries <tdevries@suse.de>
* gdb.multi/multi-term-settings.exp: Use with_test_prefix.
|
|
In infrun.c's 'displaced_step_fixup', as part of the 'finish_step_over'
flow, switch to the eventing thread *before* calling
'displaced_step_restore', because down in the flow ptid-dependent
memory accesses are used via current_inferior() and current_top_target().
Without this patch, the problem is exposed with the scenario below:
$ gdb -q
(gdb) maint set target-non-stop on
(gdb) file a.out
Reading symbols from a.out...
(gdb) set remote exec-file a.out
(gdb) target extended-remote | gdbserver --once --multi -
...
(gdb) add-inferior
[New inferior 2]
Added inferior 2 on connection 1 (extended-remote ...)
(gdb) inferior 2
[Switching to inferior 2 [<null>] (<noexec>)]
(gdb) file a.out
Reading symbols from a.out...
(gdb) set remote exec-file a.out
(gdb) run
...
Cannot access memory at address 0x555555555042
(gdb)
The problem is, down inside 'displaced_step_restore', GDB wants to
access the memory for inferior 2 because of an internal breakpoint.
However, the current inferior and inferior_ptid are out of sync.
While inferior_ptid correctly points to the process of inf 2 that was
just started, current_inferior points to inf 1. Then, the attempt to
access the memory fails, because target_has_execution results in false
since inf 1 was not started. I was not able to simplify the failing
scenario, but it shows the problem.
After this patch, we get
... same steps above...
(gdb) run
...
[Inferior 2 (process 28652) exited normally]
(gdb)
Regression-tested on X86_64 Linux with `make check`s default board file
and also `--target_board=native-extended-gdbserver`. In fact, the bug
fixed by this patch was exposed when using the native-extended-gdbserver
board file.
gdb/ChangeLog:
2020-04-21 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
* infrun.c (displaced_step_fixup): Switch to the event_thread
before calling displaced_step_restore, not after.
gdb/testsuite/ChangeLog:
2020-04-21 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
* gdb.multi/run-only-second-inf.c: New file.
* gdb.multi/run-only-second-inf.exp: New file.
|
|
While running test-case gdb.multi/multi-target.exp, I observed a silent
timeout related to "monitor exit".
By making the timeout explicit in an expect clause in gdbserver_gdb_exit:
...
+ timeout {
+ warning "Timed out waiting for EOF in server after $monitor_exit"
+ }
...
we get in the log:
...
monitor exit^M
"monitor" command not supported by this target.^M
(gdb) WARNING: Timed out waiting for EOF in server after monitor exit
...
What happens is the following:
- the inferior 5 is selected
- a breakpoint is set in inferior 1
- the breakpoint triggers and we switch to inferior 1
- setup is called by test_continue, which calls clean_restart, which calls
gdbserver_gdb_exit (due to load_lib gdbserver-support.exp)
- gdbserver_gdb_exit issues "monitor exit"
- gdb responds with "not supported by this target" because inferior 1 is
native
Fix this by keeping a list of server_spawn_id, and cleaning those up before
calling gdbserver_gdb_exit.
This reduces testing time from 1m22s to 32s.
gdb/testsuite/ChangeLog:
2020-04-02 Tom de Vries <tdevries@suse.de>
* lib/gdbserver-support.exp (gdbserver_exit): Factor out of ...
(gdbserver_gdb_exit): ... here. Add timeout warning.
* gdb.multi/multi-target.exp (server_spawn_ids): New global var.
(connect_target_extended_remote): Append new server_spawn_id to
server_spawn_ids.
(cleanup): New proc.
(setup, <toplevel>): Call cleanup.
|
|
Stop all threads not only if the current target is non-stop, but also
if there exists a non-stop target.
The multi-target patch (5b6d1e4fa4f "Multi-target support") made the
following change to gdb/inf-child.c:
void
inf_child_target::maybe_unpush_target ()
{
- if (!inf_child_explicitly_opened && !have_inferiors ())
+ if (!inf_child_explicitly_opened)
unpush_target (this);
}
If we are in all-stop mode with multiple inferiors, and an exit event
is received from an inferior, target_mourn_inferior() gets to this
point and without the have_inferiors() check, the target is unpushed.
This leads to having exec_ops as the top target.
Here is a test scenario. Two executables, ./a.out returns
immediately; ./sleepy just sleeps.
$ gdb ./sleepy
(gdb) start
...
(gdb) add-inferior -exec ./a.out
...
(gdb) inferior 2
[Switching to inferior 2..
(gdb) start
...
(gdb) set schedule-multiple on
(gdb) set debug infrun 1
(gdb) continue
At this point, the exit event is received from ./a.out. Normally,
this would lead to stop_all_threads() to also stop ./sleepy, but this
doesn't happen, because target_is_non_stop_p() returns false. And it
returns false because the top target is no longer the process target;
it is the exec_ops.
This patch modifies 'stop_waiting' to call 'stop_all_threads' if there
exists a non-stop target, not just when the current top target is
non-stop.
Tested on X86_64 Linux.
gdb/ChangeLog:
2020-04-01 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
* infrun.c (stop_all_threads): Update assertion, plus when
stopping threads, take into account that we might be trying
to stop an all-stop target.
(stop_waiting): Call 'stop_all_threads' if there exists a
non-stop target.
gdb/testsuite/ChangeLog:
2020-04-01 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
* gdb.multi/stop-all-on-exit.c: New test.
* gdb.multi/stop-all-on-exit.exp: New file.
|
|
Pre-commit 919adfe840 "Move gdbserver to top level", if we build gdb with
--disable-gdbserver, and run test-case gdb.multi/multi-target.exp, we run
into:
...
(gdb) PASS: gdb.multi/multi-target.exp: continue: non-stop=off: set remote-exec file in inferior 2
spawn of --once --multi localhost:2346 failed
ERROR: tcl error sourcing /data/gdb_versions/devel/src/gdb/testsuite/gdb.multi/multi-target.exp.
ERROR: Timeout waiting for gdbserver response.
...
Fix this by using skip_gdbserver_tests in multi-target.exp.
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2020-02-10 Tom de Vries <tdevries@suse.de>
* gdb.multi/multi-target.exp: Skip if skip_gdbserver_tests.
|
|
This fixes a latent bug exposed by the multi-target patch (5b6d1e4fa
"Multi-target support), and then fixes two other latent bugs exposed
by fixing that first latent bug.
The symptom described in the bug report is that starting a first
inferior, then trying to run a second (multi-threaded) inferior twice,
causes libthread_db to fail to load, along with other erratic
behavior:
(gdb) run
Starting program: /tmp/foo
warning: td_ta_new failed: generic error
Going a bit deeply, I found that if the two inferiors have different
symbols, we can see that just after inferior 2 exits, we are left with
inferior 2 selected, which is correct, but the symbols in scope belong
to inferior 1, which is obviously incorrect...
This problem is that there's a path in
scoped_restore_current_thread::restore() that switches to no thread
selected, and switches the current inferior, but leaves the current
program space as is, resulting in leaving the program space pointing
to the wrong program space (the one of the other inferior). This was
happening after handling TARGET_WAITKIND_NO_RESUMED, which is an event
that triggers after TARGET_WAITKIND_EXITED for the previous inferior
exit. Subsequent symbol lookups find the symbols of the wrong
inferior.
The fix is to use switch_to_inferior_no_thread in that problem spot.
This function was recently added along with the multi-target work
exactly for these situations.
As for testing, this patch adds a new testcase that tests symbol
printing just after inferior exit, which exercises the root cause of
the problem more directly. And then, to cover the use case described
in the bug too, it also exercises the lithread_db.so mis-loading, by
using TLS printing as a proxy for being sure that threaded debugging
was activated sucessfully. The testcase fails without the fix like
this, for the "print symbol just after exit" bits:
...
[Inferior 1 (process 8719) exited normally]
(gdb) PASS: gdb.multi/multi-re-run.exp: re_run_inf=1: iter=1: continue until exit
print re_run_var_1
No symbol "re_run_var_1" in current context.
(gdb) FAIL: gdb.multi/multi-re-run.exp: re_run_inf=1: iter=1: print re_run_var_1
...
And like this for the "libthread_db.so loading" bits:
(gdb) run
Starting program: /home/pedro/gdb/binutils-gdb/build/gdb/testsuite/outputs/gdb.multi/multi-re-run/multi-re-run
warning: td_ta_new failed: generic error
[New LWP 27001]
Thread 1.1 "multi-re-run" hit Breakpoint 3, all_started () at /home/pedro/gdb/binutils-gdb/build/../src/gdb/testsuite/gdb.multi/multi-re-run.c:44
44 }
(gdb) PASS: gdb.multi/multi-re-run.exp: re_run_inf=1: iter=2: running to all_started in runto
print tls_var
Cannot find thread-local storage for LWP 27000, executable file /home/pedro/gdb/binutils-gdb/build/gdb/testsuite/outputs/gdb.multi/multi-re-run/multi-re-run:
Cannot find thread-local variables on this target
(gdb) FAIL: gdb.multi/multi-re-run.exp: re_run_inf=1: iter=2: print tls_var
As mentioned, that fix above goes on to expose a couple other latent
bugs. This commit fixes those as well.
The first latent bug exposed is in
infrun.c:handle_vfork_child_exec_or_exit. The current code is leaving
inf->pspace == NULL while calling clone_program_space. The idea was
to make it so that the breakpoints module doesn't use this inferior's
pspace to set breakpoints. With that, any
scoped_restore_current_thread use from within clone_program_space
tries to restore a NULL program space, which hits an assertion:
Attaching after Thread 0x7ffff74b8700 (LWP 27276) vfork to child process 27277]
[New inferior 2 (process 27277)]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
/home/pedro/gdb/binutils-gdb/build/../src/gdb/progspace.c:243: internal-error: void set_current_program_space(program_space*): Assertion `pspace != NULL' faile
d.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) FAIL: gdb.threads/vfork-follow-child-exit.exp: detach-on-fork=off: continue (GDB internal error)
That NULL pspace idea was legitimate, but it's no longer necessary,
since commit b2e586e850db ("Defer breakpoint reset when cloning
progspace for fork child"). So the fix is to just set the inferior's
program space earlier.
The other latent bug exposed is in exec.c. When exec_close is called
from the program_space destructor, it is purposedly called with a
current program space that is not the current inferior's program
space. The problem is that the multi-target work added some code to
remove_target_sections that loops over all inferiors, and uses
scoped_restore_current_thread to save/restore the previous
thread/inferior/frame state. This makes it so that exec_close returns
with the current program space set to the current inferior's program
space, which is exactly what we did not want. Then the program_space
destructor continues into free_all_objfiles, but it is now running
that method on the wrong program space, resulting in:
Reading symbols from /home/pedro/gdb/binutils-gdb/build/gdb/testsuite/outputs/gdb.threads/fork-plus-threads/fork-plus-threads...
Reading symbols from /usr/lib/debug/usr/lib64/libpthread-2.26.so.debug...
Reading symbols from /usr/lib/debug/usr/lib64/libm-2.26.so.debug...
Reading symbols from /usr/lib/debug/usr/lib64/libc-2.26.so.debug...
Reading symbols from /usr/lib/debug/usr/lib64/ld-2.26.so.debug...
[Inferior 3 (process 9583) exited normally]
/home/pedro/gdb/binutils-gdb/build/../src/gdb/progspace.c:170: internal-error: void program_space::free_all_objfiles(): Assertion `so->objfile == NULL' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) FAIL: gdb.threads/fork-plus-threads.exp: detach-on-fork=off: inferior 1 exited (GDB internal error)
The fix is to use scoped_restore_current_pspace_and_thread instead of
scoped_restore_current_thread.
gdb/ChangeLog:
2020-01-24 Pedro Alves <palves@redhat.com>
PR gdb/25410
* thread.c (scoped_restore_current_thread::restore): Use
switch_to_inferior_no_thread.
* exec.c: Include "progspace-and-thread.h".
(add_target_sections, remove_target_sections):
scoped_restore_current_pspace_and_thread instead of
scoped_restore_current_thread.
* infrun.c (handle_vfork_child_exec_or_exit): Assign the pspace
and aspace to the inferior before calling clone_program_space.
Remove stale comment.
gdb/testsuite/ChangeLog:
2020-01-24 Pedro Alves <palves@redhat.com>
PR gdb/25410
* gdb.multi/multi-re-run-1.c: New.
* gdb.multi/multi-re-run-2.c: New.
* gdb.multi/multi-re-run.exp: New.
|
|
GDB uses the 'current_top_target' when displaying the description of
an inferior. This leads to same target being used for each inferior
and, in turn, yields incorrect output when the inferior has a target
that is supposed to give a specialized output. For instance, the
remote target outputs "Remote target" instead of "process XYZ" as the
description if the multi-process feature is not supported or turned
off.
E.g.: Suppose we have a native and a remote target, and the native is
the current inferior. The remote target does not support multi-process.
For "info inferiors", we would expect to see:
~~~
(gdb) i inferiors
Num Description Connection Executable
* 1 process 29060 1 (native) /a/path
2 Remote target 2 (remote ...)
~~~
but instead we get
~~~
(gdb) i inferiors
Num Description Connection Executable
* 1 process 29060 1 (native) /a/path
2 process 42000 2 (remote ...)
~~~
Similarly, if the current inferior is the remote one, we would expect
to see
~~~
(gdb) i inferiors
Num Description Connection Executable
1 process 29060 1 (native) /a/path
* 2 Remote target 2 (remote ...)
~~~
but we get
~~~
(gdb) i inferiors
Num Description Connection Executable
* 1 Remote target 1 (native) /a/path
2 Remote target 2 (remote ...)
~~~
With this patch, we switch to the inferior when outputting its
description, so that the current_top_target will be aligned to the
inferior we are displaying.
For testing, this patch expands the "info inferiors" test for the
multi-target feature. The test was checking for the output of the
info commands after setup, only when the current inferior is the last
added inferior.
This patch does the following to the testcase:
1. The "info inferiors" and "info connections" test is extracted out
from the "setup" procedure to a separate procedure.
2. The test is enriched to check the output after switching to each
inferior, not just the last one.
3. The test is performed twice; one for when the multi-process feature
is turned on, one for off.
gdb/ChangeLog:
2020-01-10 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
* inferior.c (print_inferior): Switch inferior before printing it.
gdb/testsuite/ChangeLog:
2020-01-10 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
* gdb.multi/multi-target.exp (setup): Factor out "info
connections" and "info inferiors" tests to ...
(test_info_inferiors): ... this new procedure.
(top level): Run new "info-inferiors" tests.
|
|
This commit extends the CLI a bit for multi-target, in three ways.
#1 - New "info connections" command.
This is a new command that lists the open connections (process_stratum
targets). For example, if you're debugging two remote connections, a
couple local/native processes, and a core dump, all at the same time,
you might see something like this:
(gdb) info connections
Num What Description
1 remote 192.168.0.1:9999 Remote serial target in gdb-specific protocol
2 remote 192.168.0.2:9998 Remote serial target in gdb-specific protocol
* 3 native Native process
4 core Local core dump file
#2 - New "info inferiors" "Connection" column
You'll also see a new matching "Connection" column in "info
inferiors", showing you which connection an inferior is bound to:
(gdb) info inferiors
Num Description Connection Executable
1 process 18526 1 (remote 192.168.0.1:9999) target:/tmp/a.out
2 process 18531 2 (remote 192.168.0.2:9998) target:/tmp/a.out
3 process 19115 3 (native) /tmp/prog1
4 process 6286 4 (core) myprogram
* 5 process 19122 3 (native) /bin/hello
#3 - Makes "add-inferior" show the inferior's target connection
"add-inferior" now shows you the connection you've just bound the
inferior to, which is the current process_stratum target:
(gdb) add-inferior
[New inferior 2]
Added inferior 2 on connection 1 (extended-remote localhost:2346)
gdb/ChangeLog:
2020-01-10 Pedro Alves <palves@redhat.com>
* Makefile.in (COMMON_SFILES): Add target-connection.c.
* inferior.c (uiout_field_connection): New function.
(print_inferior): Add new "connection-id" column.
(add_inferior_command): Show connection number/string of added
inferior.
* process-stratum-target.h
(process_stratum_target::connection_string): New virtual method.
(process_stratum_target::connection_number): New field.
* remote.c (remote_target::connection_string): New override.
* target-connection.c: New file.
* target-connection.h: New file.
* target.c (decref_target): Remove process_stratum targets from
the connection list.
(target_stack::push): Add process_stratum targets to the
connection list.
gdb/testsuite/ChangeLog:
2020-01-10 Pedro Alves <palves@redhat.com>
* gdb.base/kill-detach-inferiors-cmd.exp: Adjust expected output
of "add-inferior".
* gdb.base/quit-live.exp: Likewise.
* gdb.base/remote-exec-file.exp: Likewise.
* gdb.guile/scm-progspace.exp: Likewise.
* gdb.linespec/linespec.exp: Likewise.
* gdb.mi/new-ui-mi-sync.exp: Likewise.
* gdb.mi/user-selected-context-sync.exp: Likewise.
* gdb.multi/multi-target.exp (setup): Add "info connection" and
"info inferiors" tests.
* gdb.multi/remove-inferiors.exp: Adjust expected output of
"add-inferior".
* gdb.multi/watchpoint-multi.exp: Likewise.
* gdb.python/py-inferior.exp: Likewise.
* gdb.server/extended-remote-restart.exp: Likewise.
* gdb.threads/fork-plus-threads.exp: Adjust expected output of
"info inferiors".
* gdb.threads/forking-threads-plus-breakpoint.exp: Likewise.
* gdb.trace/report.exp: Likewise.
|
|
This adds a testcase exercising multi-target features. It spawns 6
inferiors, like this:
inferior 1 -> native
inferior 2 -> extended-remote 1
inferior 3 -> core
inferior 4 -> native
inferior 5 -> extended-remote 2
inferior 6 -> core
and then tests various details, including:
- running to breakpoints
- interrupting with Ctrl-C and "interrupt -a"
- "next" bouncing between two breakpoints in two threads running in
different targets.
- since we have cores and live inferiors mixed in the same session,
this makes sure that gdb doesn't try to remove a core dump's
threads.
- all-stop and non-stop modes.
This testcase caught a _lot_ of bugs in development.
gdb/testsuite/ChangeLog:
2020-01-10 Pedro Alves <palves@redhat.com>
* gdb.multi/multi-target.c: New file.
* gdb.multi/multi-target.exp: New file.
* lib/gdbserver-support.exp (gdb_target_cmd): Handle "Non-stop
mode requested, but remote does not support non-stop".
|
|
In non-stop mode, if you resume the program in the background (with
"continue&", for example), then gdb makes sure to not switch the
current thread behind your back. That means that you can be sure that
the commands you type apply to the thread you selected, even if some
other thread that was running in the background hits some event just
while you're typing.
In all-stop mode, however, if you resume the program in the
background, gdb let's the current thread switch behind your back.
This is bogus, of course. All-stop and non-stop background
resumptions should behave the same.
This patch fixes that, and adds a testcase that exposes the bad
behavior in current master.
The fork-running-state.exp changes are necessary because that
preexisting testcase was expecting the old behavior:
Before:
continue &
Continuing.
(gdb)
[Attaching after process 8199 fork to child process 8203]
[New inferior 2 (process 8203)]
info threads
Id Target Id Frame
1.1 process 8199 "fork-running-st" (running)
* 2.1 process 8203 "fork-running-st" (running)
(gdb)
After:
continue &
Continuing.
(gdb)
[Attaching after process 24660 fork to child process 24664]
[New inferior 2 (process 24664)]
info threads
Id Target Id Frame
* 1.1 process 24660 "fork-running-st" (running)
2.1 process 24664 "fork-running-st" (running)
(gdb)
Here we see that before this patch GDB switches current inferior to
the new inferior behind the user's back, as a side effect of handling
the fork.
The delete_exited_threads call in inferior_appeared is there to fix an
issue that Baris found in a previous version of this patch. The
fetch_inferior_event change increases the refcount of the current
thread, and in case the fetched inferior event denotes a thread exit,
the thread will not be deleted right away. A non-deleted but exited
thread stays in the inferior's thread list. This, in turn, causes the
"init_thread_list" call in inferior.c to be skipped. A consequence is
that the global thread ID counter is not restarted if the current
thread exits, and then the inferior is restarted:
(gdb) start
Temporary breakpoint 1 at 0x4004d6: file main.c, line 21.
Starting program: /tmp/main
Temporary breakpoint 1, main () at main.c:21
21 foo ();
(gdb) info threads -gid
Id GId Target Id Frame
* 1 1 process 16106 "main" main () at main.c:21
(gdb) c
Continuing.
[Inferior 1 (process 16106) exited normally]
(gdb) start
Temporary breakpoint 2 at 0x4004d6: file main.c, line 21.
Starting program: /tmp/main
Temporary breakpoint 2, main () at main.c:21
21 foo ();
(gdb) info threads -gid
Id GId Target Id Frame
* 1 2 process 16138 "main" main () at main.c:21
^^^
Notice that GId == 2 above. It should have been "1" instead.
The new tids-git-reset.exp testcase exercises the problem above.
gdb/ChangeLog:
2020-01-10 Pedro Alves <palves@redhat.com>
* gdbthread.h (scoped_restore_current_thread)
<dont_restore, restore, m_dont_restore>: Declare.
* thread.c (thread_alive): Add assertion. Return bool.
(switch_to_thread_if_alive): New.
(prune_threads): Switch inferior/thread.
(print_thread_info_1): Switch thread before calling target methods.
(scoped_restore_current_thread::restore): New, factored out from
...
(scoped_restore_current_thread::~scoped_restore_current_thread):
... this.
(scoped_restore_current_thread::scoped_restore_current_thread):
Add assertion.
(thread_apply_all_command, thread_select): Use
switch_to_thread_if_alive.
gdb/testsuite/ChangeLog:
2020-01-10 Pedro Alves <palves@redhat.com>
* gdb.base/fork-running-state.exp (do_test): Adjust expected
output.
* gdb.threads/async.c: New.
* gdb.threads/async.exp: New.
* gdb.multi/tids-gid-reset.c: New.
* gdb.multi/tids-gid-reset.exp: New.
|
|
gdb/ChangeLog:
Update copyright year range in all GDB files.
|
|
There's a pattern:
...
gdb_test <command> <pattern> <command>
...
that can be written shorter as:
...
gdb_test <command> <pattern>
...
Detect this pattern in proc gdb_test:
...
global gdb_prompt
upvar timeout timeout
if [llength $args]>2 then {
set message [lindex $args 2]
+ if { $message == [lindex $args 0] && [llength $args] == 3 } {
+ error "HERE"
+ }
} else {
set message [lindex $args 0]
}
...
and fix all occurrences in some gdb testsuite subdirs.
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2019-10-31 Tom de Vries <tdevries@suse.de>
* gdb.arch/amd64-disp-step-avx.exp: Drop superfluous 3rd argument to
gdb_test.
* gdb.arch/amd64-disp-step.exp: Same.
* gdb.asm/asm-source.exp: Same.
* gdb.btrace/buffer-size.exp: Same.
* gdb.btrace/cpu.exp: Same.
* gdb.btrace/enable.exp: Same.
* gdb.dwarf2/count.exp: Same.
* gdb.dwarf2/dw2-ranges-func.exp: Same.
* gdb.dwarf2/dw2-ranges-psym.exp: Same.
* gdb.fortran/vla-datatypes.exp: Same.
* gdb.fortran/vla-history.exp: Same.
* gdb.fortran/vla-ptype.exp: Same.
* gdb.fortran/vla-value.exp: Same.
* gdb.fortran/whatis_type.exp: Same.
* gdb.guile/guile.exp: Same.
* gdb.multi/tids.exp: Same.
* gdb.python/py-finish-breakpoint.exp: Same.
* gdb.python/py-framefilter.exp: Same.
* gdb.python/py-pp-registration.exp: Same.
* gdb.python/py-xmethods.exp: Same.
* gdb.python/python.exp: Same.
* gdb.server/connect-with-no-symbol-file.exp: Same.
* gdb.server/no-thread-db.exp: Same.
* gdb.server/run-without-local-binary.exp: Same.
* gdb.stabs/weird.exp: Same.
* gdb.threads/attach-many-short-lived-threads.exp: Same.
* gdb.threads/thread-find.exp: Same.
* gdb.threads/tls-shared.exp: Same.
* gdb.threads/tls.exp: Same.
* gdb.threads/wp-replication.exp: Same.
* gdb.trace/ax.exp: Same.
* lib/gdb.exp (gdb_test_exact, help_test_raw): Same.
Change-Id: I2fa544c68f8c0099a77e03ff04ddc010eb2b6c7c
|
|
multi-term-settings.exp
This racy fail message, reported in PR24929:
...
FAIL: gdb.multi/multi-term-settings.exp: inf1_how=attach: inf2_how=attach: \
stop with control-c
...
does not make clear which gdb_test fails here:
...
if {$expect_ttou} {
gdb_test "" "Quit" "stop with control-c"
} else {
gdb_test "" "received signal SIGINT.*" "stop with control-c"
}
...
Fix this by making the gdb_test message argument more informative.
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2019-08-22 Tom de Vries <tdevries@suse.de>
* gdb.multi/multi-term-settings.exp (coretest): Make gdb_test messages
more informative.
|
|
We currently have these FAILs:
...
FAIL: gdb.multi/tids.exp: two inferiors: info threads -1
FAIL: gdb.multi/tids.exp: two inferiors: info threads -$one
...
because we're expecting:
...
Invalid thread ID: -1
...
but instead we have:
...
Unrecognized option at: -1
...
This error message for info threads has changed since commit 54d6600669
'Make "info threads" use the gdb::option framework'.
Update the test accordingly.
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2019-07-24 Tom de Vries <tdevries@suse.de>
PR testsuite/24831
* gdb.multi/tids.exp: Update error messages for info threads.
|
|
I noticed this inconsistency in the error messages below:
(gdb) print --1
Left operand of assignment is not an lvalue.
(gdb) thread apply 1 print --1
Thread 1 (Thread 0x7ffff7fb6740 (LWP 17805)):
inverted range
The "inverted range" error happens because get_number_trailer returns
0 to indicate error, but number_or_range_parser::get_number is not
checking for that. I tried detected the error there, but that doesn't
work because number_of_range_parser is used in places that _do_ want
to legitimately handle 0. IMO we should fix get_number_trailer's
interface or use something else when we want to parse 0 too.
I've decided to fix it in a different way, similarly to how
number_or_range_parser::finished was changed in commit 529c08b25ec7
("Add helper functions parse_flags and parse_flags_qcs").
Seems like a good change, even if we tweaked
number_or_range_parser::get_number, as it simplifies
thread_apply_command and makes them consistent with
number_or_range_parser::finished().
We now get the same error message in both cases:
(gdb) print --1
Left operand of assignment is not an lvalue.
(gdb) thread apply 1 print --1
Thread 1 (Thread 0x7ffff7fb6740 (LWP 17805)):
Left operand of assignment is not an lvalue.
gdb/ChangeLog:
2019-06-13 Pedro Alves <palves@redhat.com>
* thread.c (thread_apply_command): Adjust TID parsing.
* tid-parse.c (tid_range_parser::finished): Ensure parsing end is
detected before end of string.
(tid_is_in_list): Error out if LIST is invalid.
gdb/testsuite/ChangeLog:
2019-06-13 Pedro Alves <palves@redhat.com>
* gdb.multi/tids.exp: Adjust expected output. Add "thread apply 1
foo --1" test.
|
|
We see this failure with the readnow board:
...
FAIL: gdb.multi/remove-inferiors.exp: load binary
...
When running with board readnow, an extra message "Expanding full symbols" is
emitted after the "Reading symbols" message, and the regexp corresponding to
the FAIL only allows the first message.
Fix this by allowing the extra message in the regexp.
gdb/testsuite/ChangeLog:
2019-06-11 Tom de Vries <tdevries@suse.de>
PR testsuite/24521
* gdb.multi/remove-inferiors.exp: Allow "Expanding full symbols"
message.
|
|
Similarly to multi-arch-exec.exp, increase the alarm timer to avoid
test blocking under high load or with a slow gdb.
2019-03-28 Philippe Waroquiers <philippe.waroquiers@skynet.be>
* gdb.multi/multi-term-settings.c (main): Increase alarm timer.
|
|
When running multi-arch-exec.exp under valgrind, the test succeeds
when the machine is not loaded, but blocks when the machine is highly
loaded (e.g. when running the testsuite with valgrind with -j X
where X is one more than the nr of available cores).
The problem is that the hello program dies too early due to the alarm (30).
So, increase the alarm timer.
Note that this does not make the test take longer (it takes about
3.5 seconds on my system). As I understand, the alarm is just there
to avoid hello staying there forever in case of another problem.
2019-03-28 Philippe Waroquiers <philippe.waroquiers@skynet.be>
* gdb.multi/hello.c (main): Increase alarm timer.
|
|
This commit applies all changes made after running the gdb/copyright.py
script.
Note that one file was flagged by the script, due to an invalid
copyright header
(gdb/unittests/basic_string_view/element_access/char/empty.cc).
As the file was copied from GCC's libstdc++-v3 testsuite, this commit
leaves this file untouched for the time being; a patch to fix the header
was sent to gcc-patches first.
gdb/ChangeLog:
Update copyright year range in all GDB files.
|
|
This patch is another attempt to fix PR cli/19551. Unlike my previous
attempt, it doesn't print progress. Instead, it just changes some
messages and adds newlines to make the output a bit nicer.
It also removes the "done." text that was previously emitted. The
idea here is that it is obvious when gdb is done reading debug info,
as it starts then doing something else; and that while this message
did not provide much benefit to users, it did make it harder to make
the output clean.
After this change the output from "./gdb -iex 'set complaint 1' -nx ./gdb"
reads:
Reading symbols from ./gdb...
.debug_ranges entry has start address of zero [in module /home/tromey/gdb/build/gdb/gdb]
DW_AT_low_pc 0x0 is zero for DIE at 0x17116c1 [in module /home/tromey/gdb/build/gdb/gdb]
.debug_line address at offset 0xa22f5 is 0 [in module /home/tromey/gdb/build/gdb/gdb]
During symbol reading, unsupported tag: 'DW_TAG_unspecified_type'.
During symbol reading, const value length mismatch for 'std::ratio<1, 1000000000>::num', got 8, expected 0.
gdb/ChangeLog
2018-10-04 Tom Tromey <tom@tromey.com>
PR cli/19551:
* symfile.c (symbol_file_add_with_addrs): Update output.
* psymtab.c (require_partial_symbols): Update output.
gdb/testsuite/ChangeLog
2018-10-04 Tom Tromey <tom@tromey.com>
PR cli/19551:
* lib/mi-support.exp (mi_gdb_file_cmd): Update.
* lib/gdb.exp (gdb_file_cmd): Update.
* gdb.stabs/weird.exp (print_weird_var): Update.
* gdb.server/solib-list.exp: Update.
* gdb.multi/remove-inferiors.exp (test_remove_inferiors): Update.
* gdb.mi/mi-cli.exp: Update.
* gdb.linespec/linespec.exp: Update.
* gdb.dwarf2/dw2-stack-boundary.exp: Update.
* gdb.dwarf2/dw2-objfile-overlap.exp: Update.
* gdb.cp/cp-relocate.exp: Update.
* gdb.base/sym-file.exp: Update.
* gdb.base/relocate.exp: Update.
* gdb.base/readnever.exp: Update.
* gdb.base/print-symbol-loading.exp (test_load_core): Update.
* gdb.base/kill-detach-inferiors-cmd.exp: Update.
* gdb.base/dbx.exp (gdb_file_cmd): Update.
* gdb.base/code_elim.exp: Update.
* gdb.base/break-unload-file.exp (test_break): Update.
* gdb.base/break-interp.exp (test_attach_gdb): Update.
* gdb.base/break-idempotent.exp (force_breakpoint_re_set):
Update.
* gdb.base/attach.exp (do_attach_tests): Update.
* gdb.base/sepdebug.exp: Update.
* gdb.python/py-section-script.exp: Update.
|
|
In the GDB test suite, there are still multiple invocations of
"target_info exists use_gdb_stub". However, the recommended way of
checking for use_gdb_stub is to call the convenience function of the same
name.
Replace these occurrences and just call "use_gdb_stub" instead.
gdb/testsuite/ChangeLog:
* gdb.ada/exec_changed.exp: Replace "target_info exists
use_gdb_stub" by "use_gdb_stub".
* gdb.ada/start.exp: Likewise.
* gdb.base/async-shell.exp: Likewise.
* gdb.base/attach-pie-misread.exp: Likewise.
* gdb.base/attach-wait-input.exp: Likewise.
* gdb.base/break-entry.exp: Likewise.
* gdb.base/break-interp.exp: Likewise.
* gdb.base/dprintf-detach.exp: Likewise.
* gdb.base/nostdlib.exp: Likewise.
* gdb.base/solib-nodir.exp: Likewise.
* gdb.base/statistics.exp: Likewise.
* gdb.base/testenv.exp: Likewise.
* gdb.mi/mi-exec-run.exp: Likewise.
* gdb.mi/mi-start.exp: Likewise.
* gdb.multi/dummy-frame-restore.exp: Likewise.
* gdb.multi/multi-arch-exec.exp: Likewise.
* gdb.multi/multi-arch.exp: Likewise.
* gdb.multi/tids.exp: Likewise.
* gdb.multi/watchpoint-multi.exp: Likewise.
* gdb.python/py-events.exp: Likewise.
* gdb.threads/attach-into-signal.exp: Likewise.
* gdb.threads/attach-stopped.exp: Likewise.
* gdb.threads/threadapply.exp: Likewise.
* lib/selftest-support.exp: Likewise.
|
|
In my multi-target branch I ran into problems with GDB's terminal
handling that exist in master as well, with multi-inferior debugging.
This patch adds a testcase for said problems
(gdb.multi/multi-term-settings.exp), fixes the problems, fixes PR
gdb/13211 as well (and adds a testcase for that too,
gdb.base/interrupt-daemon.exp).
The basis of the problem I ran into is the following. Consider a
scenario where you have:
- inferior 1 - started with "attach", process is running on some
other terminal.
- inferior 2 - started with "run", process is sharing gdb's terminal.
In this scenario, when you stop/resume both inferiors, you want GDB to
save/restore the terminal settings of inferior 2, the one that is
sharing GDB's terminal. I.e., you want inferior 2 to "own" the
terminal (in target_terminal::is_ours/target_terminal::is_inferior
sense).
Unfortunately, that's not what you get currently. Because GDB doesn't
know whether an attached inferior is actually sharing GDB's terminal,
it tries to save/restore its settings anyway, ignoring errors. In
this case, this is pointless, because inferior 1 is running on a
different terminal, but GDB doesn't know better.
And then, because it is only possible to have the terminal settings of
a single inferior be in effect at a time, or make one inferior/pgrp be
the terminal's foreground pgrp (aka, only one inferior can "own" the
terminal, ignoring fork children here), if GDB happens to try to
restore the terminal settings of inferior 1 first, then GDB never
restores the terminal settings of inferior 2.
This patch fixes that and a few things more along the way:
- Moves enum target_terminal::terminal_state out of the
target_terminal class (it's currently private) and makes it a
scoped enum so that it can be easily used elsewhere.
- Replaces the inflow.c:terminal_is_ours boolean with a
target_terminal_state variable. This allows distinguishing is_ours
and is_ours_for_output states. This allows finally making
child_terminal_ours_1 do something with its "output_only"
parameter.
- Makes each inferior have its own copy of the
is_ours/is_ours_for_output/is_inferior state.
- Adds a way for GDB to tell whether the inferior is sharing GDB's
terminal. Works best on Linux and Solaris; the fallback works just
as well as currently.
- With that, we can remove the inf->attach_flag tests from
child_terminal_inferior/child_terminal_ours.
- Currently target_ops.to_ours is responsible for both saving the
current inferior's terminal state, and restoring gdb's state.
Because each inferior has its own terminal state (possibly handled
by different targets in a multi-target world, even), we need to
split the inferior-saving part from the gdb-restoring part. The
patch adds a new target_ops.to_save_inferior target method for
that.
- Adds a new target_terminal::save_inferior() function, so that
sequences like:
scoped_restore_terminal_state save_state;
target_terminal::ours_for_output ();
... restore back inferiors that were
target_terminal_state::is_inferior before back to is_inferior, and
leaves inferiors that were is_ours alone.
- Along the way, this adds a default implementation of
target_pass_ctrlc to inflow.c (for inf-child.c), that handles
passing the Ctrl-C to a process running on GDB's terminal or to
some other process otherwise.
- Similarly, adds a new target default implementation of
target_interrupt, for the "interrupt" command. The current
implementation of this hook in inf-ptrace.c kills the whole process
group, but that's incorrect/undesirable because we may not be
attached to all processes in the process group. And also, it's
incorrect because inferior_process_group() doesn't really return
the inferior's real process group id if the inferior is not a
process group leader... This is the cause of PR gdb/13211 [1],
which this patch fixes. While at it, that target method's "ptid"
parameter is eliminated, because it's not really used.
- A new test is included that exercises and fixes PR gdb/13211, and
also fixes a GDB issue reported on stackoverflow that I ran into
while working on this [2]. The problem is similar to PR gdb/13211,
except that it also triggers with Ctrl-C. When debugging a daemon
(i.e., a process that disconnects from the controlling terminal and
is not a process group leader, then Ctrl-C doesn't work, you just
can't interrupt the inferior at all, resulting in a hung debug
session. The problem is that since the inferior is no longer
associated with gdb's session / controlling terminal, then trying
to put the inferior in the foreground fails. And so Ctrl-C never
reaches the inferior directly. pass_signal is only used when the
inferior is attached, but that is not the case here. This is fixed
by the new child_pass_ctrlc. Without the fix, the new
interrupt-daemon.exp testcase fails with timeout waiting for a
SIGINT that never arrives.
[1] PR gdb/13211 - Async / Process group and interrupt not working
https://sourceware.org/bugzilla/show_bug.cgi?id=13211
[2] GDB not reacting Ctrl-C when after fork() and setsid()
https://stackoverflow.com/questions/46101292/gdb-not-reacting-ctrl-c-when-after-fork-and-setsid
Note this patch does _not_ fix:
- PR gdb/14559 - The 'interrupt' command does not work if sigwait is in use
https://sourceware.org/bugzilla/show_bug.cgi?id=14559
- PR gdb/9425 - When using "sigwait" GDB doesn't trap SIGINT. Ctrl+C terminates program when should break gdb.
https://sourceware.org/bugzilla/show_bug.cgi?id=9425
The only way to fix that that I know of (without changing the kernel)
is to make GDB put inferiors in a separate session (create a
pseudo-tty master/slave pair, make the inferior run with the slave as
its terminal, and have gdb pump output/input on the master end).
gdb/ChangeLog:
2018-01-30 Pedro Alves <palves@redhat.com>
PR gdb/13211
* config.in, configure: Regenerate.
* configure.ac: Check for getpgid.
* go32-nat.c (go32_pass_ctrlc): New.
(go32_target): Install it.
* inf-child.c (inf_child_target): Install
child_terminal_save_inferior, child_pass_ctrlc and
child_interrupt.
* inf-ptrace.c (inf_ptrace_interrupt): Delete.
(inf_ptrace_target): No longer install it.
* infcmd.c (interrupt_target_1): Adjust.
* inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
(child_interrupt): Declare.
(inferior::terminal_state): New.
* inflow.c (struct terminal_info): Update comments.
(inferior_process_group): Delete.
(terminal_is_ours): Delete.
(gdb_tty_state): New.
(child_terminal_init): Adjust.
(is_gdb_terminal, sharing_input_terminal_1)
(sharing_input_terminal): New functions.
(child_terminal_inferior): Adjust. Use sharing_input_terminal.
Set the process's actual process group in the foreground if
possible. Handle is_ours_for_output/is_ours distinction. Don't
mark terminal as the inferior's if not sharing GDB's terminal.
Don't check attach_flag.
(child_terminal_ours_for_output, child_terminal_ours): Adjust to
pass down a target_terminal_state.
(child_terminal_save_inferior): New, factored out from ...
(child_terminal_ours_1): ... this. Handle
target_terminal_state::is_ours_for_output.
(child_interrupt, child_pass_ctrlc): New.
(inflow_inferior_exit): Clear the inferior's terminal_state.
(copy_terminal_info): Copy the inferior's terminal state.
(_initialize_inflow): Remove reference to terminal_is_ours.
* inflow.h (inferior_process_group): Delete.
* nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
* procfs.c (procfs_target): Don't install procfs_interrupt.
(procfs_interrupt): Delete.
* remote.c (remote_serial_quit_handler): Adjust.
(remote_interrupt): Remove ptid parameter. Adjust.
* target-delegates.c: Regenerate.
* target.c: Include "terminal.h".
(target_terminal::terminal_state): Rename to ...
(target_terminal::m_terminal_state): ... this.
(target_terminal::init): Adjust.
(target_terminal::inferior): Adjust to per-inferior
terminal_state.
(target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
(target_terminal::ours, target_terminal::ours_for_output): Use
target_terminal_is_ours_kind.
(target_interrupt): Remove ptid parameter. Adjust.
(default_target_pass_ctrlc): Adjust.
* target.h (target_ops::to_terminal_save_inferior): New field.
(target_ops::to_interrupt): Remove ptid_t parameter.
(target_interrupt): Remove ptid_t parameter. Update comment.
(target_pass_ctrlc): Update comment.
* target/target.h (target_terminal_state): New scoped enum,
factored out of ...
(target_terminal::terminal_state): ... here.
(target_terminal::inferior): Update comments.
(target_terminal::restore_inferior): New.
(target_terminal::is_inferior, target_terminal::is_ours)
(target_terminal::is_ours_for_output): Adjust.
(target_terminal::scoped_restore_terminal_state): Adjust to
rename, and call restore_inferior() instead of inferior().
(target_terminal::scoped_restore_terminal_state::m_state): Change
type.
(target_terminal::terminal_state): Rename to ...
(target_terminal::m_terminal_state): ... this and change type.
gdb/gdbserver/ChangeLog:
2018-01-30 Pedro Alves <palves@redhat.com>
PR gdb/13211
* target.c (target_terminal::terminal_state): Rename to ...
(target_terminal::m_terminal_state): ... this.
gdb/testsuite/ChangeLog:
2018-01-30 Pedro Alves <palves@redhat.com>
PR gdb/13211
* gdb.base/interrupt-daemon.c: New.
* gdb.base/interrupt-daemon.exp: New.
* gdb.multi/multi-term-settings.c: New.
* gdb.multi/multi-term-settings.exp: New.
|
|
gdb/ChangeLog:
Update copyright year range in all GDB files
|
|
"pthreads" in the right flag to pass in prepare_for_testing to linker,
instead of additional_flags. Without this patch, the test case can't be
complied by clang.
gdb compile failed, clang: warning: -lpthread: 'linker' input unused
gdb/testsuite:
2017-11-22 Yao Qi <yao.qi@linaro.org>
* gdb.base/info-os.exp: Pass pthreads.
* gdb.multi/multi-attach.exp: Likewise.
|
|
gdb.server/ext-{attach, restart, ext-run}.exp
This commit fixes this same problem in several places:
(gdb) PASS: gdb.multi/multi-attach.exp: backtrace 2
kill
Kill the program being debugged? (y or n) y
(gdb) FAIL: gdb.multi/multi-attach.exp: kill inferior 2 (got interactive prompt)
This is just another case of the gdb_test_multiple's internal "got
interactive prompt" pattern matching because the testcase misses
matching enough.
gdb/testsuite/ChangeLog:
2017-11-09 Pedro Alves <palves@redhat.com>
* gdb.multi/multi-attach.exp ("kill" test): Match the whole query
output.
* gdb.server/ext-attach.exp ("kill" test): Likewise.
* gdb.server/ext-restart.exp ("kill" test): Likewise.
* gdb.server/ext-run.exp ("kill" test): Likewise.
* gdb.server/ext-wrapper.exp ("kill" test): Likewise.
|
|
These tests want to use raw "run", so skip them on targets that can't
do that.
Also adds a small utility procedure that clearly conveys intent instead of
explicitly checking use_gdb_stub in the testcases.
This makes sure these testcases continue to be skipped with
--target_board=native-gdbserver once that board stops setting
is_remote.
gdb/testsuite/ChangeLog:
2017-10-13 Pedro Alves <palves@redhat.com>
* lib/gdb.exp (target_can_use_run_cmd): New procedure.
* gdb.base/annota1.exp: Use it instead of is_remote.
* gdb.base/annota3.exp: Use it instead of is_remote.
* gdb.cp/annota2.exp: Use it instead of is_remote.
* gdb.cp/annota3.exp: Use it instead of is_remote.
* gdb.multi/bkpt-multi-exec.exp: Use it instead of is_remote.
|
|
The gdb.multi/multi-arch-exec.exp testcase currently tests execing
from -m64 to -m32, but does not test the other direction. For
thoroughness, this commit fixes that. Without the fix in the previous
commit for example ("Multi-arch exec, more register reading
avoidance"), on x86_64 we would get different symptoms depending on
"execing direction". Vis:
Continuing.
Truncated register 50 in remote 'g' packet
Truncated register 50 in remote 'g' packet
(gdb) FAIL: gdb.multi/multi-arch-exec.exp: first_arch=1: selected_thread=2: follow_exec_mode=same: continue across exec that changes architecture
Vs:
Continuing.
Remote 'g' packet reply is too long (expected 440 bytes, got 816 bytes): daffffffffffffff0000[snip]
Remote 'g' packet reply is too long (expected 440 bytes, got 816 bytes): daffffffffffffff0000[snip]
(gdb) FAIL: gdb.multi/multi-arch-exec.exp: first_arch=2: selected_thread=2: follow_exec_mode=same: continue across exec that changes architecture
gdb/testsuite/ChangeLog:
2017-10-09 Pedro Alves <palves@redhat.com>
Test both arch1=>arch2 and arch2=>arch1.
* gdb.multi/multi-arch-exec.exp (exec1, srcfile1, binfile1, exec2)
(srcfile2, binfile2, march1, march2): Remove globals. Largely
factored out to...
(append_arch1_options, append_arch2_options, append_arch_options)
(build_executables): New procedures.
(do_test): New 'first_arch' parameter. Use it to define 'from_exec'
local.
(top level): Add new 'first_arch' testing axis.
|
|
As mentioned in commit bf93d7ba9931 ("Add thread after updating
gdbarch when exec'ing"), we should avoid doing register reads after a
process does an exec and before we've updated that inferior's gdbarch.
Otherwise, we may interpret the registers using the wrong
architecture.
There's still (at least) one case where we still read registers
post-exec with the pre-exec architecture. That's when infrun decides
it needs to switch context to the exec'ing thread. I.e., if the exec
event is processed at a time when the current thread is not already
the exec'ing thread, then we get (with the test added by this commit):
continue
Continuing.
Truncated register 50 in remote 'g' packet
Truncated register 50 in remote 'g' packet
(gdb) FAIL: gdb.multi/multi-arch-exec.exp: selected_thread=2: follow_exec_mode=same: continue across exec that changes architecture
The fix is to avoid reading registers when switching context in this
case.
(I'd be nice to get rid of the constant stop_pc reading when switching
threads, but that'd be a deeper change.)
gdb/ChangeLog:
2017-10-09 Pedro Alves <palves@redhat.com>
* infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
reading registers when switching context.
gdb/testsuite/ChangeLog:
2017-10-09 Pedro Alves <palves@redhat.com>
* gdb.multi/multi-arch-exec.c: Include <pthread.h> and <assert.h>.
(barrier): New.
(thread_start, all_started): New functions.
(main): Spawn new thread and wait until it is scheduled.
* gdb.multi/multi-arch-exec.exp: Build $srcfile1 with the pthreads
option.
(do_test): Add 'selected_thread' parameter. Run to all_started
instead of main. Explicitly set the breakpoint at main. Switch
to the SELECTED_THREAD thread.
(top level): Test handling the exec event with either the main
thread or the second thread selected.
|
|
When debugging two inferiors (or more) against gdbserver, and the
inferiors have different architectures, such as e.g., on x86_64
GNU/Linux and one inferior is 64-bit while the other is 32-bit, then
GDB can get confused with the different architectures in a couple
spots.
In both cases I ran into, GDB incorrectly ended up using the
architecture of whatever happens to be the selected inferior instead
of the architecture of some other given inferior:
#1 - When parsing the expedited registers in stop replies.
#2 - In the default implementation of the target_thread_architecture
target method.
These resulted in instances of the infamous "Remote 'g' packet reply
is too long" error. For example, with the test added in this commit,
we get:
~~~
Continuing.
Remote 'g' packet reply is too long (expected 440 bytes, got 816 bytes): ad064000000000000[snip]
(gdb) FAIL: gdb.multi/multi-arch.exp: inf1 event with inf2 selected: continue to hello_loop
c
Continuing.
Truncated register 50 in remote 'g' packet
(gdb) PASS: gdb.multi/multi-arch.exp: inf2 event with inf1 selected: c
~~~
This commit fixes that.
gdb/ChangeLog:
2017-10-04 Pedro Alves <palves@redhat.com>
* remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
it instead of target_gdbarch.
(get_remote_state, get_remote_packet_size): Adjust
get_remote_arch_state calls, passing down target_gdbarch
explicitly.
(packet_reg_from_regnum, packet_reg_from_pnum): New parameter
'gdbarch' and use it instead of target_gdbarch.
(get_memory_packet_size): Adjust get_remote_arch_state calls,
passing down target_gdbarch explicitly.
(struct stop_reply) <arch>: New field.
(remote_parse_stop_reply): Use the stopped thread's architecture,
not the current inferior's. Save the architecture in the
stop_reply.
(process_stop_reply): Use the stop reply's architecture.
(process_g_packet, remote_fetch_registers)
(remote_prepare_to_store, store_registers_using_G)
(remote_store_registers): Adjust get_remote_arch_state calls,
using the regcache's architecture.
(remote_get_trace_status): Adjust get_remote_arch_state calls,
passing down target_gdbarch explicitly.
* spu-multiarch.c (spu_thread_architecture): Defer to the target
beneath instead of calling target_gdbarch.
* target.c (default_thread_architecture): Use the specified
inferior's architecture, instead of the current inferior's
architecture (via target_gdbarch).
gdb/testsuite/ChangeLog:
2017-10-04 Pedro Alves <palves@redhat.com>
* gdb.multi/hangout.c: Include <unistd.h>.
(hangout_loop): New function.
(main): Call alarm. Call hangout_loop in a loop.
* gdb.multi/hello.c: Include <unistd.h>.
(hello_loop): New function.
(main): Call alarm. Call hangout_loop in a loop.
* gdb.multi/multi-arch.exp: Test running to a breakpoint one
inferior with the other selected.
|
|
Using follow-exec-mode "new" takes a different code path than "same", so
it's interesting to test this path in combination with a change in
architecture of the inferior. This test fails if you remove the
previous patch.
gdb/testsuite/ChangeLog:
* gdb.multi/multi-arch-exec.exp: Test with different
"follow-exec-mode" settings.
(do_test): New procedure.
|
|
This applies the second part of GDB's End of Year Procedure, which
updates the copyright year range in all of GDB's files.
gdb/ChangeLog:
Update copyright year range in all GDB files.
|
|
I noticed more occurrences of improper test names. The rather mechanical,
tedious and large patch below addresses, hopefully, most of the leftover cases.
As usual, another pair of eyes is welcome to check if missed something or did
an invalid substitution.
This patch also fixes the prepare_for_testing calls to pass proper test names.
gdb/testsuite/ChangeLog:
2016-12-23 Luis Machado <lgustavo@codesourcery.com>
Fix test names for the following files:
* gdb.ada/exec_changed.exp
* gdb.ada/info_types.exp
* gdb.arch/aarch64-atomic-inst.exp
* gdb.arch/aarch64-fp.exp
* gdb.arch/altivec-abi.exp
* gdb.arch/altivec-regs.exp
* gdb.arch/amd64-byte.exp
* gdb.arch/amd64-disp-step.exp
* gdb.arch/amd64-dword.exp
* gdb.arch/amd64-entry-value-inline.exp
* gdb.arch/amd64-entry-value-param.exp
* gdb.arch/amd64-entry-value-paramref.exp
* gdb.arch/amd64-entry-value.exp
* gdb.arch/amd64-i386-address.exp
* gdb.arch/amd64-invalid-stack-middle.exp
* gdb.arch/amd64-invalid-stack-top.exp
* gdb.arch/amd64-optimout-repeat.exp
* gdb.arch/amd64-prologue-skip.exp
* gdb.arch/amd64-prologue-xmm.exp
* gdb.arch/amd64-stap-special-operands.exp
* gdb.arch/amd64-stap-wrong-subexp.exp
* gdb.arch/amd64-tailcall-cxx.exp
* gdb.arch/amd64-tailcall-noret.exp
* gdb.arch/amd64-tailcall-ret.exp
* gdb.arch/amd64-tailcall-self.exp
* gdb.arch/amd64-word.exp
* gdb.arch/arm-bl-branch-dest.exp
* gdb.arch/arm-disp-step.exp
* gdb.arch/arm-neon.exp
* gdb.arch/arm-single-step-kernel-helper.exp
* gdb.arch/avr-flash-qualifier.exp
* gdb.arch/disp-step-insn-reloc.exp
* gdb.arch/e500-abi.exp
* gdb.arch/e500-regs.exp
* gdb.arch/ftrace-insn-reloc.exp
* gdb.arch/i386-avx512.exp
* gdb.arch/i386-bp_permanent.exp
* gdb.arch/i386-byte.exp
* gdb.arch/i386-cfi-notcurrent.exp
* gdb.arch/i386-disp-step.exp
* gdb.arch/i386-dr3-watch.exp
* gdb.arch/i386-float.exp
* gdb.arch/i386-gnu-cfi.exp
* gdb.arch/i386-mpx-map.exp
* gdb.arch/i386-mpx-sigsegv.exp
* gdb.arch/i386-mpx-simple_segv.exp
* gdb.arch/i386-mpx.exp
* gdb.arch/i386-permbkpt.exp
* gdb.arch/i386-prologue.exp
* gdb.arch/i386-signal.exp
* gdb.arch/i386-size-overlap.exp
* gdb.arch/i386-unwind.exp
* gdb.arch/i386-word.exp
* gdb.arch/mips-fcr.exp
* gdb.arch/powerpc-d128-regs.exp
* gdb.arch/powerpc-stackless.exp
* gdb.arch/ppc64-atomic-inst.exp
* gdb.arch/s390-stackless.exp
* gdb.arch/s390-tdbregs.exp
* gdb.arch/s390-vregs.exp
* gdb.arch/sparc-sysstep.exp
* gdb.arch/thumb-bx-pc.exp
* gdb.arch/thumb-singlestep.exp
* gdb.arch/thumb2-it.exp
* gdb.arch/vsx-regs.exp
* gdb.asm/asm-source.exp
* gdb.base/a2-run.exp
* gdb.base/advance.exp
* gdb.base/all-bin.exp
* gdb.base/anon.exp
* gdb.base/args.exp
* gdb.base/arithmet.exp
* gdb.base/async-shell.exp
* gdb.base/async.exp
* gdb.base/attach-pie-noexec.exp
* gdb.base/attach-twice.exp
* gdb.base/auto-load.exp
* gdb.base/bang.exp
* gdb.base/bitfields.exp
* gdb.base/break-always.exp
* gdb.base/break-caller-line.exp
* gdb.base/break-entry.exp
* gdb.base/break-inline.exp
* gdb.base/break-on-linker-gcd-function.exp
* gdb.base/break-probes.exp
* gdb.base/break.exp
* gdb.base/breakpoint-shadow.exp
* gdb.base/call-ar-st.exp
* gdb.base/call-sc.exp
* gdb.base/call-signal-resume.exp
* gdb.base/call-strs.exp
* gdb.base/callfuncs.exp
* gdb.base/catch-fork-static.exp
* gdb.base/catch-gdb-caused-signals.exp
* gdb.base/catch-load.exp
* gdb.base/catch-signal-fork.exp
* gdb.base/catch-signal.exp
* gdb.base/catch-syscall.exp
* gdb.base/charset.exp
* gdb.base/checkpoint.exp
* gdb.base/chng-syms.exp
* gdb.base/code-expr.exp
* gdb.base/code_elim.exp
* gdb.base/commands.exp
* gdb.base/completion.exp
* gdb.base/complex.exp
* gdb.base/cond-expr.exp
* gdb.base/condbreak.exp
* gdb.base/consecutive.exp
* gdb.base/continue-all-already-running.exp
* gdb.base/coredump-filter.exp
* gdb.base/corefile.exp
* gdb.base/dbx.exp
* gdb.base/debug-expr.exp
* gdb.base/define.exp
* gdb.base/del.exp
* gdb.base/disabled-location.exp
* gdb.base/disasm-end-cu.exp
* gdb.base/disasm-optim.exp
* gdb.base/display.exp
* gdb.base/duplicate-bp.exp
* gdb.base/ena-dis-br.exp
* gdb.base/ending-run.exp
* gdb.base/enumval.exp
* gdb.base/environ.exp
* gdb.base/eu-strip-infcall.exp
* gdb.base/eval-avoid-side-effects.exp
* gdb.base/eval-skip.exp
* gdb.base/exitsignal.exp
* gdb.base/expand-psymtabs.exp
* gdb.base/filesym.exp
* gdb.base/find-unmapped.exp
* gdb.base/finish.exp
* gdb.base/float.exp
* gdb.base/foll-exec-mode.exp
* gdb.base/foll-exec.exp
* gdb.base/foll-fork.exp
* gdb.base/fortran-sym-case.exp
* gdb.base/freebpcmd.exp
* gdb.base/func-ptr.exp
* gdb.base/func-ptrs.exp
* gdb.base/funcargs.exp
* gdb.base/gcore-buffer-overflow.exp
* gdb.base/gcore-relro-pie.exp
* gdb.base/gcore-relro.exp
* gdb.base/gcore.exp
* gdb.base/gdb1090.exp
* gdb.base/gdb11530.exp
* gdb.base/gdb11531.exp
* gdb.base/gdb1821.exp
* gdb.base/gdbindex-stabs.exp
* gdb.base/gdbvars.exp
* gdb.base/hbreak.exp
* gdb.base/hbreak2.exp
* gdb.base/included.exp
* gdb.base/infcall-input.exp
* gdb.base/inferior-died.exp
* gdb.base/infnan.exp
* gdb.base/info-macros.exp
* gdb.base/info-os.exp
* gdb.base/info-proc.exp
* gdb.base/info-shared.exp
* gdb.base/info-target.exp
* gdb.base/infoline.exp
* gdb.base/interp.exp
* gdb.base/interrupt.exp
* gdb.base/jit-reader.exp
* gdb.base/jit-simple.exp
* gdb.base/kill-after-signal.exp
* gdb.base/kill-detach-inferiors-cmd.exp
* gdb.base/label.exp
* gdb.base/langs.exp
* gdb.base/ldbl_e308.exp
* gdb.base/line-symtabs.exp
* gdb.base/linespecs.exp
* gdb.base/list.exp
* gdb.base/long_long.exp
* gdb.base/longest-types.exp
* gdb.base/maint.exp
* gdb.base/max-value-size.exp
* gdb.base/memattr.exp
* gdb.base/mips_pro.exp
* gdb.base/morestack.exp
* gdb.base/moribund-step.exp
* gdb.base/multi-forks.exp
* gdb.base/nested-addr.exp
* gdb.base/nextoverexit.exp
* gdb.base/noreturn-finish.exp
* gdb.base/noreturn-return.exp
* gdb.base/nostdlib.exp
* gdb.base/offsets.exp
* gdb.base/opaque.exp
* gdb.base/pc-fp.exp
* gdb.base/permissions.exp
* gdb.base/print-symbol-loading.exp
* gdb.base/prologue-include.exp
* gdb.base/psymtab.exp
* gdb.base/ptype.exp
* gdb.base/random-signal.exp
* gdb.base/randomize.exp
* gdb.base/range-stepping.exp
* gdb.base/readline-ask.exp
* gdb.base/recpar.exp
* gdb.base/recurse.exp
* gdb.base/relational.exp
* gdb.base/restore.exp
* gdb.base/return-nodebug.exp
* gdb.base/return.exp
* gdb.base/run-after-attach.exp
* gdb.base/save-bp.exp
* gdb.base/scope.exp
* gdb.base/sect-cmd.exp
* gdb.base/set-lang-auto.exp
* gdb.base/set-noassign.exp
* gdb.base/setvar.exp
* gdb.base/sigall.exp
* gdb.base/sigbpt.exp
* gdb.base/siginfo-addr.exp
* gdb.base/siginfo-infcall.exp
* gdb.base/siginfo-obj.exp
* gdb.base/siginfo.exp
* gdb.base/signals-state-child.exp
* gdb.base/signest.exp
* gdb.base/sigstep.exp
* gdb.base/sizeof.exp
* gdb.base/skip.exp
* gdb.base/solib-corrupted.exp
* gdb.base/solib-nodir.exp
* gdb.base/solib-search.exp
* gdb.base/stack-checking.exp
* gdb.base/stale-infcall.exp
* gdb.base/stap-probe.exp
* gdb.base/start.exp
* gdb.base/step-break.exp
* gdb.base/step-bt.exp
* gdb.base/step-line.exp
* gdb.base/step-over-exit.exp
* gdb.base/step-over-syscall.exp
* gdb.base/step-resume-infcall.exp
* gdb.base/step-test.exp
* gdb.base/store.exp
* gdb.base/structs3.exp
* gdb.base/sym-file.exp
* gdb.base/symbol-without-target_section.exp
* gdb.base/term.exp
* gdb.base/testenv.exp
* gdb.base/ui-redirect.exp
* gdb.base/until.exp
* gdb.base/unwindonsignal.exp
* gdb.base/value-double-free.exp
* gdb.base/vla-datatypes.exp
* gdb.base/vla-ptr.exp
* gdb.base/vla-sideeffect.exp
* gdb.base/volatile.exp
* gdb.base/watch-cond-infcall.exp
* gdb.base/watch-cond.exp
* gdb.base/watch-non-mem.exp
* gdb.base/watch-read.exp
* gdb.base/watch-vfork.exp
* gdb.base/watchpoint-cond-gone.exp
* gdb.base/watchpoint-delete.exp
* gdb.base/watchpoint-hw-hit-once.exp
* gdb.base/watchpoint-hw.exp
* gdb.base/watchpoint-stops-at-right-insn.exp
* gdb.base/watchpoints.exp
* gdb.base/wchar.exp
* gdb.base/whatis-exp.exp
* gdb.btrace/buffer-size.exp
* gdb.btrace/data.exp
* gdb.btrace/delta.exp
* gdb.btrace/dlopen.exp
* gdb.btrace/enable.exp
* gdb.btrace/exception.exp
* gdb.btrace/function_call_history.exp
* gdb.btrace/gcore.exp
* gdb.btrace/instruction_history.exp
* gdb.btrace/nohist.exp
* gdb.btrace/reconnect.exp
* gdb.btrace/record_goto-step.exp
* gdb.btrace/record_goto.exp
* gdb.btrace/rn-dl-bind.exp
* gdb.btrace/segv.exp
* gdb.btrace/step.exp
* gdb.btrace/stepi.exp
* gdb.btrace/tailcall-only.exp
* gdb.btrace/tailcall.exp
* gdb.btrace/tsx.exp
* gdb.btrace/unknown_functions.exp
* gdb.btrace/vdso.exp
* gdb.compile/compile-ifunc.exp
* gdb.compile/compile-ops.exp
* gdb.compile/compile-print.exp
* gdb.compile/compile-setjmp.exp
* gdb.cp/abstract-origin.exp
* gdb.cp/ambiguous.exp
* gdb.cp/annota2.exp
* gdb.cp/annota3.exp
* gdb.cp/anon-ns.exp
* gdb.cp/anon-struct.exp
* gdb.cp/anon-union.exp
* gdb.cp/arg-reference.exp
* gdb.cp/baseenum.exp
* gdb.cp/bool.exp
* gdb.cp/breakpoint.exp
* gdb.cp/bs15503.exp
* gdb.cp/call-c.exp
* gdb.cp/casts.exp
* gdb.cp/chained-calls.exp
* gdb.cp/class2.exp
* gdb.cp/classes.exp
* gdb.cp/cmpd-minsyms.exp
* gdb.cp/converts.exp
* gdb.cp/cp-relocate.exp
* gdb.cp/cpcompletion.exp
* gdb.cp/cpexprs.exp
* gdb.cp/cplabel.exp
* gdb.cp/cplusfuncs.exp
* gdb.cp/cpsizeof.exp
* gdb.cp/ctti.exp
* gdb.cp/derivation.exp
* gdb.cp/destrprint.exp
* gdb.cp/dispcxx.exp
* gdb.cp/enum-class.exp
* gdb.cp/exception.exp
* gdb.cp/exceptprint.exp
* gdb.cp/expand-psymtabs-cxx.exp
* gdb.cp/expand-sals.exp
* gdb.cp/extern-c.exp
* gdb.cp/filename.exp
* gdb.cp/formatted-ref.exp
* gdb.cp/fpointer.exp
* gdb.cp/gdb1355.exp
* gdb.cp/gdb2495.exp
* gdb.cp/hang.exp
* gdb.cp/impl-this.exp
* gdb.cp/infcall-dlopen.exp
* gdb.cp/inherit.exp
* gdb.cp/iostream.exp
* gdb.cp/koenig.exp
* gdb.cp/local.exp
* gdb.cp/m-data.exp
* gdb.cp/m-static.exp
* gdb.cp/mb-ctor.exp
* gdb.cp/mb-inline.exp
* gdb.cp/mb-templates.exp
* gdb.cp/member-name.exp
* gdb.cp/member-ptr.exp
* gdb.cp/meth-typedefs.exp
* gdb.cp/method.exp
* gdb.cp/method2.exp
* gdb.cp/minsym-fallback.exp
* gdb.cp/misc.exp
* gdb.cp/namelessclass.exp
* gdb.cp/namespace-enum.exp
* gdb.cp/namespace-nested-import.exp
* gdb.cp/namespace.exp
* gdb.cp/nextoverthrow.exp
* gdb.cp/no-dmgl-verbose.exp
* gdb.cp/non-trivial-retval.exp
* gdb.cp/noparam.exp
* gdb.cp/nsdecl.exp
* gdb.cp/nsimport.exp
* gdb.cp/nsnested.exp
* gdb.cp/nsnoimports.exp
* gdb.cp/nsrecurs.exp
* gdb.cp/nsstress.exp
* gdb.cp/nsusing.exp
* gdb.cp/operator.exp
* gdb.cp/oranking.exp
* gdb.cp/overload-const.exp
* gdb.cp/overload.exp
* gdb.cp/ovldbreak.exp
* gdb.cp/ovsrch.exp
* gdb.cp/paren-type.exp
* gdb.cp/parse-lang.exp
* gdb.cp/pass-by-ref.exp
* gdb.cp/pr-1023.exp
* gdb.cp/pr-1210.exp
* gdb.cp/pr-574.exp
* gdb.cp/pr10687.exp
* gdb.cp/pr12028.exp
* gdb.cp/pr17132.exp
* gdb.cp/pr17494.exp
* gdb.cp/pr9067.exp
* gdb.cp/pr9167.exp
* gdb.cp/pr9631.exp
* gdb.cp/printmethod.exp
* gdb.cp/psmang.exp
* gdb.cp/psymtab-parameter.exp
* gdb.cp/ptype-cv-cp.exp
* gdb.cp/ptype-flags.exp
* gdb.cp/re-set-overloaded.exp
* gdb.cp/ref-types.exp
* gdb.cp/rtti.exp
* gdb.cp/scope-err.exp
* gdb.cp/shadow.exp
* gdb.cp/smartp.exp
* gdb.cp/static-method.exp
* gdb.cp/static-print-quit.exp
* gdb.cp/temargs.exp
* gdb.cp/templates.exp
* gdb.cp/try_catch.exp
* gdb.cp/typedef-operator.exp
* gdb.cp/typeid.exp
* gdb.cp/userdef.exp
* gdb.cp/using-crash.exp
* gdb.cp/var-tag.exp
* gdb.cp/virtbase.exp
* gdb.cp/virtfunc.exp
* gdb.cp/virtfunc2.exp
* gdb.cp/vla-cxx.exp
* gdb.disasm/t01_mov.exp
* gdb.disasm/t02_mova.exp
* gdb.disasm/t03_add.exp
* gdb.disasm/t04_sub.exp
* gdb.disasm/t05_cmp.exp
* gdb.disasm/t06_ari2.exp
* gdb.disasm/t07_ari3.exp
* gdb.disasm/t08_or.exp
* gdb.disasm/t09_xor.exp
* gdb.disasm/t10_and.exp
* gdb.disasm/t11_logs.exp
* gdb.disasm/t12_bit.exp
* gdb.disasm/t13_otr.exp
* gdb.dlang/circular.exp
* gdb.dwarf2/arr-stride.exp
* gdb.dwarf2/arr-subrange.exp
* gdb.dwarf2/atomic-type.exp
* gdb.dwarf2/bad-regnum.exp
* gdb.dwarf2/bitfield-parent-optimized-out.exp
* gdb.dwarf2/callframecfa.exp
* gdb.dwarf2/clztest.exp
* gdb.dwarf2/corrupt.exp
* gdb.dwarf2/data-loc.exp
* gdb.dwarf2/dup-psym.exp
* gdb.dwarf2/dw2-anon-mptr.exp
* gdb.dwarf2/dw2-anonymous-func.exp
* gdb.dwarf2/dw2-bad-mips-linkage-name.exp
* gdb.dwarf2/dw2-bad-unresolved.exp
* gdb.dwarf2/dw2-basic.exp
* gdb.dwarf2/dw2-canonicalize-type.exp
* gdb.dwarf2/dw2-case-insensitive.exp
* gdb.dwarf2/dw2-common-block.exp
* gdb.dwarf2/dw2-compdir-oldgcc.exp
* gdb.dwarf2/dw2-compressed.exp
* gdb.dwarf2/dw2-const.exp
* gdb.dwarf2/dw2-cp-infcall-ref-static.exp
* gdb.dwarf2/dw2-cu-size.exp
* gdb.dwarf2/dw2-dup-frame.exp
* gdb.dwarf2/dw2-entry-value.exp
* gdb.dwarf2/dw2-icycle.exp
* gdb.dwarf2/dw2-ifort-parameter.exp
* gdb.dwarf2/dw2-inline-break.exp
* gdb.dwarf2/dw2-inline-param.exp
* gdb.dwarf2/dw2-intercu.exp
* gdb.dwarf2/dw2-intermix.exp
* gdb.dwarf2/dw2-lexical-block-bare.exp
* gdb.dwarf2/dw2-linkage-name-trust.exp
* gdb.dwarf2/dw2-minsym-in-cu.exp
* gdb.dwarf2/dw2-noloc.exp
* gdb.dwarf2/dw2-op-call.exp
* gdb.dwarf2/dw2-op-out-param.exp
* gdb.dwarf2/dw2-opt-structptr.exp
* gdb.dwarf2/dw2-param-error.exp
* gdb.dwarf2/dw2-producer.exp
* gdb.dwarf2/dw2-ranges-base.exp
* gdb.dwarf2/dw2-ref-missing-frame.exp
* gdb.dwarf2/dw2-reg-undefined.exp
* gdb.dwarf2/dw2-regno-invalid.exp
* gdb.dwarf2/dw2-restore.exp
* gdb.dwarf2/dw2-restrict.exp
* gdb.dwarf2/dw2-single-line-discriminators.exp
* gdb.dwarf2/dw2-strp.exp
* gdb.dwarf2/dw2-undefined-ret-addr.exp
* gdb.dwarf2/dw2-unresolved.exp
* gdb.dwarf2/dw2-var-zero-addr.exp
* gdb.dwarf2/dw4-sig-types.exp
* gdb.dwarf2/dwz.exp
* gdb.dwarf2/dynarr-ptr.exp
* gdb.dwarf2/enum-type.exp
* gdb.dwarf2/gdb-index.exp
* gdb.dwarf2/implptr-64bit.exp
* gdb.dwarf2/implptr-optimized-out.exp
* gdb.dwarf2/implptr.exp
* gdb.dwarf2/implref-array.exp
* gdb.dwarf2/implref-const.exp
* gdb.dwarf2/implref-global.exp
* gdb.dwarf2/implref-struct.exp
* gdb.dwarf2/mac-fileno.exp
* gdb.dwarf2/main-subprogram.exp
* gdb.dwarf2/member-ptr-forwardref.exp
* gdb.dwarf2/method-ptr.exp
* gdb.dwarf2/missing-sig-type.exp
* gdb.dwarf2/nonvar-access.exp
* gdb.dwarf2/opaque-type-lookup.exp
* gdb.dwarf2/pieces-optimized-out.exp
* gdb.dwarf2/pieces.exp
* gdb.dwarf2/pr10770.exp
* gdb.dwarf2/pr13961.exp
* gdb.dwarf2/staticvirtual.exp
* gdb.dwarf2/subrange.exp
* gdb.dwarf2/symtab-producer.exp
* gdb.dwarf2/trace-crash.exp
* gdb.dwarf2/typeddwarf.exp
* gdb.dwarf2/valop.exp
* gdb.dwarf2/watch-notconst.exp
* gdb.fortran/array-element.exp
* gdb.fortran/charset.exp
* gdb.fortran/common-block.exp
* gdb.fortran/complex.exp
* gdb.fortran/derived-type-function.exp
* gdb.fortran/derived-type.exp
* gdb.fortran/logical.exp
* gdb.fortran/module.exp
* gdb.fortran/multi-dim.exp
* gdb.fortran/nested-funcs.exp
* gdb.fortran/print-formatted.exp
* gdb.fortran/subarray.exp
* gdb.fortran/vla-alloc-assoc.exp
* gdb.fortran/vla-datatypes.exp
* gdb.fortran/vla-history.exp
* gdb.fortran/vla-ptr-info.exp
* gdb.fortran/vla-ptype-sub.exp
* gdb.fortran/vla-ptype.exp
* gdb.fortran/vla-sizeof.exp
* gdb.fortran/vla-type.exp
* gdb.fortran/vla-value-sub-arbitrary.exp
* gdb.fortran/vla-value-sub-finish.exp
* gdb.fortran/vla-value-sub.exp
* gdb.fortran/vla-value.exp
* gdb.fortran/whatis_type.exp
* gdb.go/chan.exp
* gdb.go/handcall.exp
* gdb.go/hello.exp
* gdb.go/integers.exp
* gdb.go/methods.exp
* gdb.go/package.exp
* gdb.go/strings.exp
* gdb.go/types.exp
* gdb.go/unsafe.exp
* gdb.guile/scm-arch.exp
* gdb.guile/scm-block.exp
* gdb.guile/scm-breakpoint.exp
* gdb.guile/scm-cmd.exp
* gdb.guile/scm-disasm.exp
* gdb.guile/scm-equal.exp
* gdb.guile/scm-frame-args.exp
* gdb.guile/scm-frame-inline.exp
* gdb.guile/scm-frame.exp
* gdb.guile/scm-iterator.exp
* gdb.guile/scm-math.exp
* gdb.guile/scm-objfile.exp
* gdb.guile/scm-ports.exp
* gdb.guile/scm-symbol.exp
* gdb.guile/scm-symtab.exp
* gdb.guile/scm-value-cc.exp
* gdb.guile/types-module.exp
* gdb.linespec/break-ask.exp
* gdb.linespec/cpexplicit.exp
* gdb.linespec/explicit.exp
* gdb.linespec/keywords.exp
* gdb.linespec/linespec.exp
* gdb.linespec/ls-dollar.exp
* gdb.linespec/ls-errs.exp
* gdb.linespec/skip-two.exp
* gdb.linespec/thread.exp
* gdb.mi/mi-async.exp
* gdb.mi/mi-basics.exp
* gdb.mi/mi-break.exp
* gdb.mi/mi-catch-load.exp
* gdb.mi/mi-cli.exp
* gdb.mi/mi-cmd-param-changed.exp
* gdb.mi/mi-console.exp
* gdb.mi/mi-detach.exp
* gdb.mi/mi-disassemble.exp
* gdb.mi/mi-eval.exp
* gdb.mi/mi-file-transfer.exp
* gdb.mi/mi-file.exp
* gdb.mi/mi-fill-memory.exp
* gdb.mi/mi-inheritance-syntax-error.exp
* gdb.mi/mi-linespec-err-cp.exp
* gdb.mi/mi-logging.exp
* gdb.mi/mi-memory-changed.exp
* gdb.mi/mi-read-memory.exp
* gdb.mi/mi-record-changed.exp
* gdb.mi/mi-reg-undefined.exp
* gdb.mi/mi-regs.exp
* gdb.mi/mi-return.exp
* gdb.mi/mi-reverse.exp
* gdb.mi/mi-simplerun.exp
* gdb.mi/mi-solib.exp
* gdb.mi/mi-stack.exp
* gdb.mi/mi-stepi.exp
* gdb.mi/mi-syn-frame.exp
* gdb.mi/mi-until.exp
* gdb.mi/mi-var-block.exp
* gdb.mi/mi-var-child.exp
* gdb.mi/mi-var-cmd.exp
* gdb.mi/mi-var-cp.exp
* gdb.mi/mi-var-display.exp
* gdb.mi/mi-var-invalidate.exp
* gdb.mi/mi-var-list-children-invalid-grandchild.exp
* gdb.mi/mi-vla-fortran.exp
* gdb.mi/mi-watch.exp
* gdb.mi/mi2-var-child.exp
* gdb.mi/user-selected-context-sync.exp
* gdb.modula2/unbounded-array.exp
* gdb.multi/dummy-frame-restore.exp
* gdb.multi/multi-arch-exec.exp
* gdb.multi/multi-arch.exp
* gdb.multi/tids.exp
* gdb.multi/watchpoint-multi.exp
* gdb.opencl/callfuncs.exp
* gdb.opencl/convs_casts.exp
* gdb.opencl/datatypes.exp
* gdb.opencl/operators.exp
* gdb.opencl/vec_comps.exp
* gdb.opt/clobbered-registers-O2.exp
* gdb.opt/inline-break.exp
* gdb.opt/inline-bt.exp
* gdb.opt/inline-cmds.exp
* gdb.opt/inline-locals.exp
* gdb.pascal/case-insensitive-symbols.exp
* gdb.pascal/floats.exp
* gdb.pascal/gdb11492.exp
* gdb.python/lib-types.exp
* gdb.python/py-arch.exp
* gdb.python/py-as-string.exp
* gdb.python/py-bad-printers.exp
* gdb.python/py-block.exp
* gdb.python/py-breakpoint-create-fail.exp
* gdb.python/py-breakpoint.exp
* gdb.python/py-caller-is.exp
* gdb.python/py-cmd.exp
* gdb.python/py-explore-cc.exp
* gdb.python/py-explore.exp
* gdb.python/py-finish-breakpoint.exp
* gdb.python/py-finish-breakpoint2.exp
* gdb.python/py-frame-args.exp
* gdb.python/py-frame-inline.exp
* gdb.python/py-frame.exp
* gdb.python/py-framefilter-mi.exp
* gdb.python/py-infthread.exp
* gdb.python/py-lazy-string.exp
* gdb.python/py-linetable.exp
* gdb.python/py-mi-events.exp
* gdb.python/py-mi-objfile.exp
* gdb.python/py-mi.exp
* gdb.python/py-objfile.exp
* gdb.python/py-pp-integral.exp
* gdb.python/py-pp-maint.exp
* gdb.python/py-pp-re-notag.exp
* gdb.python/py-pp-registration.exp
* gdb.python/py-recurse-unwind.exp
* gdb.python/py-strfns.exp
* gdb.python/py-symbol.exp
* gdb.python/py-symtab.exp
* gdb.python/py-sync-interp.exp
* gdb.python/py-typeprint.exp
* gdb.python/py-unwind-maint.exp
* gdb.python/py-unwind.exp
* gdb.python/py-value-cc.exp
* gdb.python/py-xmethods.exp
* gdb.reverse/amd64-tailcall-reverse.exp
* gdb.reverse/break-precsave.exp
* gdb.reverse/break-reverse.exp
* gdb.reverse/consecutive-precsave.exp
* gdb.reverse/consecutive-reverse.exp
* gdb.reverse/finish-precsave.exp
* gdb.reverse/finish-reverse-bkpt.exp
* gdb.reverse/finish-reverse.exp
* gdb.reverse/fstatat-reverse.exp
* gdb.reverse/getresuid-reverse.exp
* gdb.reverse/i386-precsave.exp
* gdb.reverse/i386-reverse.exp
* gdb.reverse/i386-sse-reverse.exp
* gdb.reverse/i387-env-reverse.exp
* gdb.reverse/i387-stack-reverse.exp
* gdb.reverse/insn-reverse.exp
* gdb.reverse/machinestate-precsave.exp
* gdb.reverse/machinestate.exp
* gdb.reverse/next-reverse-bkpt-over-sr.exp
* gdb.reverse/pipe-reverse.exp
* gdb.reverse/readv-reverse.exp
* gdb.reverse/recvmsg-reverse.exp
* gdb.reverse/rerun-prec.exp
* gdb.reverse/s390-mvcle.exp
* gdb.reverse/step-precsave.exp
* gdb.reverse/step-reverse.exp
* gdb.reverse/time-reverse.exp
* gdb.reverse/until-precsave.exp
* gdb.reverse/until-reverse.exp
* gdb.reverse/waitpid-reverse.exp
* gdb.reverse/watch-precsave.exp
* gdb.reverse/watch-reverse.exp
* gdb.rust/generics.exp
* gdb.rust/methods.exp
* gdb.rust/modules.exp
* gdb.rust/simple.exp
* gdb.server/connect-with-no-symbol-file.exp
* gdb.server/ext-attach.exp
* gdb.server/ext-restart.exp
* gdb.server/ext-wrapper.exp
* gdb.server/file-transfer.exp
* gdb.server/server-exec-info.exp
* gdb.server/server-kill.exp
* gdb.server/server-mon.exp
* gdb.server/wrapper.exp
* gdb.stabs/exclfwd.exp
* gdb.stabs/gdb11479.exp
* gdb.threads/clone-new-thread-event.exp
* gdb.threads/corethreads.exp
* gdb.threads/current-lwp-dead.exp
* gdb.threads/dlopen-libpthread.exp
* gdb.threads/gcore-thread.exp
* gdb.threads/sigstep-threads.exp
* gdb.threads/watchpoint-fork.exp
* gdb.trace/actions-changed.exp
* gdb.trace/backtrace.exp
* gdb.trace/change-loc.exp
* gdb.trace/circ.exp
* gdb.trace/collection.exp
* gdb.trace/disconnected-tracing.exp
* gdb.trace/ftrace.exp
* gdb.trace/mi-trace-frame-collected.exp
* gdb.trace/mi-trace-unavailable.exp
* gdb.trace/mi-traceframe-changed.exp
* gdb.trace/mi-tsv-changed.exp
* gdb.trace/no-attach-trace.exp
* gdb.trace/passc-dyn.exp
* gdb.trace/qtro.exp
* gdb.trace/range-stepping.exp
* gdb.trace/read-memory.exp
* gdb.trace/save-trace.exp
* gdb.trace/signal.exp
* gdb.trace/status-stop.exp
* gdb.trace/tfile.exp
* gdb.trace/trace-break.exp
* gdb.trace/trace-buffer-size.exp
* gdb.trace/trace-condition.exp
* gdb.trace/tracefile-pseudo-reg.exp
* gdb.trace/tstatus.exp
* gdb.trace/unavailable.exp
* gdb.trace/while-dyn.exp
* gdb.trace/while-stepping.exp
|
|
The following patch is based on the previous patch i sent and handles cases of
test names that start with an uppercase letter. Test names should start with
lowercase unless it starts with the name of a technology, architecture, ISA
etc.
This first patch addresses cases of test names output explicitly via xfail,
kfail, kpass, fail, pass, unsupported, untested and also names set with the
pattern "set test" and "set testname".
gdb/testsuite/ChangeLog:
2016-12-01 Luis Machado <lgustavo@codesourcery.com>
Fix test names starting with uppercase throughout all the files below.
* gdb.ada/array_return.exp
* gdb.ada/catch_ex.exp
* gdb.ada/info_exc.exp
* gdb.ada/mi_catch_ex.exp
* gdb.ada/mi_dyn_arr.exp
* gdb.ada/mi_ex_cond.exp
* gdb.ada/mi_exc_info.exp
* gdb.ada/mi_interface.exp
* gdb.ada/mi_task_arg.exp
* gdb.ada/mi_task_info.exp
* gdb.ada/mi_var_array.exp
* gdb.arch/alpha-step.exp
* gdb.arch/amd64-disp-step.exp
* gdb.arch/arm-disp-step.exp
* gdb.arch/disp-step-insn-reloc.exp
* gdb.arch/e500-prologue.exp
* gdb.arch/ftrace-insn-reloc.exp
* gdb.arch/gdb1558.exp
* gdb.arch/i386-bp_permanent.exp
* gdb.arch/i386-disp-step.exp
* gdb.arch/i386-float.exp
* gdb.arch/i386-gnu-cfi.exp
* gdb.arch/ia64-breakpoint-shadow.exp
* gdb.arch/mips16-thunks.exp
* gdb.arch/pa-nullify.exp
* gdb.arch/powerpc-aix-prologue.exp
* gdb.arch/powerpc-power.exp
* gdb.arch/ppc-dfp.exp
* gdb.arch/s390-tdbregs.exp
* gdb.arch/spu-info.exp
* gdb.arch/spu-ls.exp
* gdb.arch/thumb-bx-pc.exp
* gdb.base/advance.exp
* gdb.base/annota-input-while-running.exp
* gdb.base/arrayidx.exp
* gdb.base/asmlabel.exp
* gdb.base/async.exp
* gdb.base/attach-wait-input.exp
* gdb.base/auto-connect-native-target.exp
* gdb.base/batch-preserve-term-settings.exp
* gdb.base/bfp-test.exp
* gdb.base/bigcore.exp
* gdb.base/bp-permanent.exp
* gdb.base/break-always.exp
* gdb.base/break-fun-addr.exp
* gdb.base/break-idempotent.exp
* gdb.base/break-main-file-remove-fail.exp
* gdb.base/break-probes.exp
* gdb.base/break-unload-file.exp
* gdb.base/break.exp
* gdb.base/call-ar-st.exp
* gdb.base/call-rt-st.exp
* gdb.base/call-sc.exp
* gdb.base/call-signal-resume.exp
* gdb.base/call-strs.exp
* gdb.base/callexit.exp
* gdb.base/callfuncs.exp
* gdb.base/catch-gdb-caused-signals.exp
* gdb.base/catch-signal-siginfo-cond.exp
* gdb.base/catch-syscall.exp
* gdb.base/compare-sections.exp
* gdb.base/cond-eval-mode.exp
* gdb.base/condbreak-call-false.exp
* gdb.base/consecutive-step-over.exp
* gdb.base/cursal.exp
* gdb.base/disabled-location.exp
* gdb.base/disasm-end-cu.exp
* gdb.base/display.exp
* gdb.base/double-prompt-target-event-error.exp
* gdb.base/dprintf-bp-same-addr.exp
* gdb.base/dprintf-detach.exp
* gdb.base/dprintf-next.exp
* gdb.base/dprintf-non-stop.exp
* gdb.base/dprintf-pending.exp
* gdb.base/dso2dso.exp
* gdb.base/ending-run.exp
* gdb.base/enum_cond.exp
* gdb.base/examine-backward.exp
* gdb.base/exe-lock.exp
* gdb.base/exec-invalid-sysroot.exp
* gdb.base/execl-update-breakpoints.exp
* gdb.base/execution-termios.exp
* gdb.base/fileio.exp
* gdb.base/fixsection.exp
* gdb.base/foll-exec-mode.exp
* gdb.base/foll-exec.exp
* gdb.base/fork-running-state.exp
* gdb.base/frame-args.exp
* gdb.base/fullpath-expand.exp
* gdb.base/func-ptr.exp
* gdb.base/gcore-relro-pie.exp
* gdb.base/gdb1090.exp
* gdb.base/gdb1555.exp
* gdb.base/global-var-nested-by-dso.exp
* gdb.base/gnu-ifunc.exp
* gdb.base/hbreak-in-shr-unsupported.exp
* gdb.base/hbreak-unmapped.exp
* gdb.base/hook-stop.exp
* gdb.base/infcall-input.exp
* gdb.base/info-fun.exp
* gdb.base/info-shared.exp
* gdb.base/interrupt-noterm.exp
* gdb.base/jit-so.exp
* gdb.base/jit.exp
* gdb.base/line-symtabs.exp
* gdb.base/list.exp
* gdb.base/longjmp.exp
* gdb.base/macscp.exp
* gdb.base/max-value-size.exp
* gdb.base/nodebug.exp
* gdb.base/nofield.exp
* gdb.base/overlays.exp
* gdb.base/paginate-after-ctrl-c-running.exp
* gdb.base/paginate-bg-execution.exp
* gdb.base/paginate-inferior-exit.exp
* gdb.base/pending.exp
* gdb.base/pr11022.exp
* gdb.base/printcmds.exp
* gdb.base/ptr-typedef.exp
* gdb.base/ptype.exp
* gdb.base/randomize.exp
* gdb.base/range-stepping.exp
* gdb.base/realname-expand.exp
* gdb.base/relativedebug.exp
* gdb.base/remote.exp
* gdb.base/savedregs.exp
* gdb.base/sepdebug.exp
* gdb.base/set-noassign.exp
* gdb.base/shlib-call.exp
* gdb.base/shreloc.exp
* gdb.base/sigaltstack.exp
* gdb.base/sigbpt.exp
* gdb.base/siginfo-addr.exp
* gdb.base/siginfo-obj.exp
* gdb.base/siginfo-thread.exp
* gdb.base/signest.exp
* gdb.base/signull.exp
* gdb.base/sigrepeat.exp
* gdb.base/skip.exp
* gdb.base/so-impl-ld.exp
* gdb.base/solib-corrupted.exp
* gdb.base/solib-disc.exp
* gdb.base/solib-display.exp
* gdb.base/solib-overlap.exp
* gdb.base/solib-search.exp
* gdb.base/solib-symbol.exp
* gdb.base/source-execution.exp
* gdb.base/sss-bp-on-user-bp-2.exp
* gdb.base/sss-bp-on-user-bp.exp
* gdb.base/stack-checking.exp
* gdb.base/stale-infcall.exp
* gdb.base/step-break.exp
* gdb.base/step-line.exp
* gdb.base/step-over-exit.exp
* gdb.base/step-test.exp
* gdb.base/structs.exp
* gdb.base/sym-file.exp
* gdb.base/symtab-search-order.exp
* gdb.base/term.exp
* gdb.base/type-opaque.exp
* gdb.base/unload.exp
* gdb.base/until-nodebug.exp
* gdb.base/until.exp
* gdb.base/unwindonsignal.exp
* gdb.base/watch-cond.exp
* gdb.base/watch-non-mem.exp
* gdb.base/watch_thread_num.exp
* gdb.base/watchpoint-reuse-slot.exp
* gdb.base/watchpoint-solib.exp
* gdb.base/watchpoint.exp
* gdb.btrace/dlopen.exp
* gdb.cell/arch.exp
* gdb.cell/break.exp
* gdb.cell/bt.exp
* gdb.cell/core.exp
* gdb.cell/data.exp
* gdb.cell/dwarfaddr.exp
* gdb.cell/ea-cache.exp
* gdb.cell/ea-standalone.exp
* gdb.cell/ea-test.exp
* gdb.cell/f-regs.exp
* gdb.cell/fork.exp
* gdb.cell/gcore.exp
* gdb.cell/mem-access.exp
* gdb.cell/ptype.exp
* gdb.cell/registers.exp
* gdb.cell/sizeof.exp
* gdb.cell/solib-symbol.exp
* gdb.cell/solib.exp
* gdb.compile/compile-tls.exp
* gdb.cp/exception.exp
* gdb.cp/gdb2495.exp
* gdb.cp/local.exp
* gdb.cp/mb-inline.exp
* gdb.cp/mb-templates.exp
* gdb.cp/pr10687.exp
* gdb.cp/pr9167.exp
* gdb.cp/scope-err.exp
* gdb.cp/templates.exp
* gdb.cp/virtfunc.exp
* gdb.dwarf2/dw2-dir-file-name.exp
* gdb.dwarf2/dw2-single-line-discriminators.exp
* gdb.fortran/complex.exp
* gdb.fortran/library-module.exp
* gdb.guile/guile.exp
* gdb.guile/scm-cmd.exp
* gdb.guile/scm-frame-inline.exp
* gdb.guile/scm-objfile.exp
* gdb.guile/scm-pretty-print.exp
* gdb.guile/scm-symbol.exp
* gdb.guile/scm-type.exp
* gdb.guile/scm-value.exp
* gdb.linespec/keywords.exp
* gdb.linespec/ls-errs.exp
* gdb.linespec/macro-relative.exp
* gdb.linespec/thread.exp
* gdb.mi/mi-breakpoint-changed.exp
* gdb.mi/mi-dprintf-pending.exp
* gdb.mi/mi-fullname-deleted.exp
* gdb.mi/mi-logging.exp
* gdb.mi/mi-pending.exp
* gdb.mi/mi-solib.exp
* gdb.mi/new-ui-mi-sync.exp
* gdb.mi/user-selected-context-sync.exp
* gdb.multi/dummy-frame-restore.exp
* gdb.multi/multi-arch-exec.exp
* gdb.multi/remove-inferiors.exp
* gdb.multi/watchpoint-multi-exit.exp
* gdb.opt/solib-intra-step.exp
* gdb.perf/backtrace.exp
* gdb.perf/single-step.exp
* gdb.perf/skip-command.exp
* gdb.perf/skip-prologue.exp
* gdb.perf/solib.exp
* gdb.python/lib-types.exp
* gdb.python/py-as-string.exp
* gdb.python/py-bad-printers.exp
* gdb.python/py-block.exp
* gdb.python/py-breakpoint.exp
* gdb.python/py-cmd.exp
* gdb.python/py-events.exp
* gdb.python/py-evthreads.exp
* gdb.python/py-finish-breakpoint.exp
* gdb.python/py-finish-breakpoint2.exp
* gdb.python/py-frame-inline.exp
* gdb.python/py-frame.exp
* gdb.python/py-inferior.exp
* gdb.python/py-infthread.exp
* gdb.python/py-mi.exp
* gdb.python/py-objfile.exp
* gdb.python/py-pp-maint.exp
* gdb.python/py-pp-registration.exp
* gdb.python/py-prettyprint.exp
* gdb.python/py-recurse-unwind.exp
* gdb.python/py-shared.exp
* gdb.python/py-symbol.exp
* gdb.python/py-symtab.exp
* gdb.python/py-template.exp
* gdb.python/py-type.exp
* gdb.python/py-unwind-maint.exp
* gdb.python/py-unwind.exp
* gdb.python/py-value.exp
* gdb.python/python.exp
* gdb.reverse/finish-reverse-bkpt.exp
* gdb.reverse/insn-reverse.exp
* gdb.reverse/next-reverse-bkpt-over-sr.exp
* gdb.reverse/solib-precsave.exp
* gdb.reverse/solib-reverse.exp
* gdb.stabs/gdb11479.exp
* gdb.stabs/weird.exp
* gdb.threads/fork-child-threads.exp
* gdb.threads/fork-plus-threads.exp
* gdb.threads/fork-thread-pending.exp
* gdb.threads/forking-threads-plus-breakpoint.exp
* gdb.threads/hand-call-in-threads.exp
* gdb.threads/interrupted-hand-call.exp
* gdb.threads/linux-dp.exp
* gdb.threads/local-watch-wrong-thread.exp
* gdb.threads/next-while-other-thread-longjmps.exp
* gdb.threads/non-ldr-exit.exp
* gdb.threads/pending-step.exp
* gdb.threads/print-threads.exp
* gdb.threads/process-dies-while-detaching.exp
* gdb.threads/process-dies-while-handling-bp.exp
* gdb.threads/pthreads.exp
* gdb.threads/queue-signal.exp
* gdb.threads/reconnect-signal.exp
* gdb.threads/signal-command-handle-nopass.exp
* gdb.threads/signal-command-multiple-signals-pending.exp
* gdb.threads/signal-delivered-right-thread.exp
* gdb.threads/signal-sigtrap.exp
* gdb.threads/sigthread.exp
* gdb.threads/staticthreads.exp
* gdb.threads/stepi-random-signal.exp
* gdb.threads/thread-unwindonsignal.exp
* gdb.threads/thread_check.exp
* gdb.threads/thread_events.exp
* gdb.threads/tid-reuse.exp
* gdb.threads/tls-nodebug.exp
* gdb.threads/tls-shared.exp
* gdb.threads/tls-so_extern.exp
* gdb.threads/tls.exp
* gdb.threads/wp-replication.exp
* gdb.trace/actions-changed.exp
* gdb.trace/actions.exp
* gdb.trace/backtrace.exp
* gdb.trace/change-loc.exp
* gdb.trace/collection.exp
* gdb.trace/deltrace.exp
* gdb.trace/disconnected-tracing.exp
* gdb.trace/entry-values.exp
* gdb.trace/ftrace-lock.exp
* gdb.trace/ftrace.exp
* gdb.trace/infotrace.exp
* gdb.trace/mi-trace-frame-collected.exp
* gdb.trace/mi-trace-unavailable.exp
* gdb.trace/mi-traceframe-changed.exp
* gdb.trace/mi-tracepoint-changed.exp
* gdb.trace/mi-tsv-changed.exp
* gdb.trace/no-attach-trace.exp
* gdb.trace/packetlen.exp
* gdb.trace/passc-dyn.exp
* gdb.trace/passcount.exp
* gdb.trace/pending.exp
* gdb.trace/pr16508.exp
* gdb.trace/qtro.exp
* gdb.trace/range-stepping.exp
* gdb.trace/read-memory.exp
* gdb.trace/report.exp
* gdb.trace/save-trace.exp
* gdb.trace/signal.exp
* gdb.trace/stap-trace.exp
* gdb.trace/status-stop.exp
* gdb.trace/strace.exp
* gdb.trace/tfile.exp
* gdb.trace/tfind.exp
* gdb.trace/trace-break.exp
* gdb.trace/trace-condition.exp
* gdb.trace/trace-enable-disable.exp
* gdb.trace/trace-mt.exp
* gdb.trace/tracecmd.exp
* gdb.trace/tracefile-pseudo-reg.exp
* gdb.trace/tspeed.exp
* gdb.trace/tstatus.exp
* gdb.trace/tsv.exp
* gdb.trace/unavailable.exp
* gdb.trace/while-dyn.exp
* gdb.trace/while-stepping.exp
* lib/gdb-guile.exp
* lib/gdb.exp
* lib/mi-support.exp
* lib/pascal.exp
* lib/perftest.exp
* lib/prelink-support.exp
* lib/selftest-support.exp
|
|
This inserts missing parentheses in the calculation of the comparison
result between two different inferior numbers. The problem was found by
Philipp Rudo.
gdb/ChangeLog:
* thread.c (tp_array_compar): Insert missing parentheses.
gdb/testsuite/ChangeLog:
* gdb.multi/tids.exp: Test "thread apply all".
|
|
This error message should not contain the word symbol:
(gdb) remove-inferiors 1
Warning: Can not remove current symbol inferior 1.
gdb/ChangeLog:
* inferior.c (remove_inferior_command): Fix error message.
gdb/testsuite/ChangeLog:
* gdb.multi/remove-inferiors.exp (test_remove_inferiors): Fix
expected error message.
|
|
I noticed that the remove-inferiors command was not tested, and as I am
doing some changes related to the user selection, I want to make sure I
don't break it. For example, I want to make sure it's not possible to
remove the current inferior.
gdb/testsuite/ChangeLog:
* gdb.multi/remove-inferiors.exp: New file.
* gdb.multi/remove-inferiors.c: New file.
|
|
If you have two inferiors (or more), set watchpoints in one of the
inferiors, and then that inferior exits, until you manually delete the
watchpoint (or something forces a breakpoint re-set), you can't resume
the other inferior.
This is exercised by the test added by this commit. Without the GDB
fix, this test fails like this:
FAIL: gdb.multi/watchpoint-multi-exit.exp: dispose=kill: continue to marker in inferior 1
FAIL: gdb.multi/watchpoint-multi-exit.exp: dispose=detach: continue to marker in inferior 1
FAIL: gdb.multi/watchpoint-multi-exit.exp: dispose=exit: continue to marker in inferior 1
and gdb.log shows (in all three cases):
(gdb) continue
Continuing.
Warning:
Could not insert hardware watchpoint 2.
Could not insert hardware breakpoints:
You may have requested too many hardware breakpoints/watchpoints.
Command aborted.
(gdb) FAIL: gdb.multi/watchpoint-multi-exit.exp: dispose=kill: continue to marker in inferior 1
The problem is that GDB doesn't forget about the locations of
watchpoints set in the inferior that is now dead. When we try to
continue the inferior that is still alive, we reach
insert_breakpoint_locations, which has the the loop that triggers the
error:
/* If we failed to insert all locations of a watchpoint, remove
them, as half-inserted watchpoint is of limited use. */
That loop finds locations that are not marked inserted, but which
according to should_be_inserted should have been inserted, and so
errors out.
gdb/ChangeLog:
2016-07-01 Pedro Alves <palves@redhat.com>
* breakpoint.c (breakpoint_init_inferior): Discard watchpoint
locations.
* infcmd.c (detach_command): Call breakpoint_init_inferior.
gdb/testsuite/ChangeLog:
2016-07-01 Pedro Alves <palves@redhat.com>
* gdb.multi/watchpoint-multi-exit.c: New file.
* gdb.multi/watchpoint-multi-exit.exp: New file.
|