Age | Commit message (Collapse) | Author | Files | Lines |
|
Rename gdb_load_shlibs to gdb_load_shlib to reflect that it can only
load a single shlib at the time.
gdb/testsuite/ChangeLog:
* lib/gdb.exp (gdb_load_shlibs): Rename to...
(gdb_load_shlib): ... this.
* gdb.arch/ftrace-insn-reloc.exp: Adjust gdb_load_shlibs ->
gdb_load_shlib.
* gdb.base/catch-load.exp (one_catch_load_test): Likewise.
* gdb.base/ctxobj.exp: Likewise.
* gdb.base/dprintf-pending.exp: Likewise.
* gdb.base/dso2dso.exp: Likewise.
* gdb.base/fixsection.exp: Likewise.
* gdb.base/gcore-relro.exp: Likewise.
* gdb.base/gdb1555.exp: Likewise.
* gdb.base/global-var-nested-by-dso.exp: Likewise.
* gdb.base/gnu-ifunc.exp: Likewise.
* gdb.base/hbreak-in-shr-unsupported.exp: Likewise.
* gdb.base/jit-so.exp (one_jit_test): Likewise.
* gdb.base/pending.exp: Likewise.
* gdb.base/print-file-var.exp: Likewise.
* gdb.base/print-symbol-loading.exp: Likewise.
* gdb.base/shlib-call.exp: Likewise.
* gdb.base/shreloc.exp: Likewise.
* gdb.base/so-impl-ld.exp: Likewise.
* gdb.base/solib-disc.exp: Likewise.
* gdb.base/solib-nodir.exp: Likewise.
* gdb.base/solib-overlap.exp: Likewise.
* gdb.base/solib-symbol.exp: Likewise.
* gdb.base/solib-weak.exp (do_test): Likewise.
* gdb.base/sym-file.exp: Likewise.
* gdb.base/symtab-search-order.exp: Likewise.
* gdb.base/type-opaque.exp: Likewise.
* gdb.base/unload.exp: Likewise.
* gdb.base/watchpoint-solib.exp: Likewise.
* gdb.compile/compile.exp: Likewise.
* gdb.cp/gdb2384.exp: Likewise.
* gdb.cp/infcall-dlopen.exp: Likewise.
* gdb.cp/re-set-overloaded.exp: Likewise.
* gdb.fortran/library-module.exp: Likewise.
* gdb.opt/solib-intra-step.exp: Likewise.
* gdb.python/py-finish-breakpoint.exp: Likewise.
* gdb.python/py-shared.exp: Likewise.
* gdb.reverse/solib-precsave.exp: Likewise.
* gdb.reverse/solib-reverse.exp: Likewise.
* gdb.server/solib-list.exp: Likewise.
* gdb.threads/dlopen-libpthread.exp: Likewise.
* gdb.threads/tls-shared.exp: Likewise.
* gdb.threads/tls-so_extern.exp: Likewise.
* gdb.trace/change-loc.exp: Likewise.
* gdb.trace/ftrace-lock.exp: Likewise.
* gdb.trace/ftrace.exp: Likewise.
* gdb.trace/mi-tracepoint-changed.exp (test_reconnect): Likewise.
* gdb.trace/pending.exp: Likewise.
* gdb.trace/range-stepping.exp: Likewise.
* gdb.trace/strace.exp (strace_remove_socket): Likewise.
(strace_info_marker): Likewise.
(strace_probe_marker): Likewise.
(strace_trace_on_same_addr): Likewise.
(strace_trace_on_diff_addr): Likewise.
* gdb.trace/trace-break.exp: Likewise.
* gdb.trace/trace-condition.exp: Likewise.
* gdb.trace/trace-mt.exp: Likewise.
|
|
I see the following test fail in arm-linux with -marm and -fomit-frame-pointer,
step
callee () at /home/yao/SourceCode/gnu/gdb/git/gdb/testsuite/gdb.reverse/step-reverse.c:27
27 } /* RETURN FROM CALLEE */
(gdb) step
main () at /home/yao/SourceCode/gnu/gdb/git/gdb/testsuite/gdb.reverse/step-reverse.c:58
58 callee(); /* STEP INTO THIS CALL */
(gdb) FAIL: gdb.reverse/step-precsave.exp: reverse step into fn call
As we can see, the "step" has already stepped into the function callee,
but in the last line. The second "step" attempts to step to function
body, but it goes out of callee, which isn't expected.
The program is compiled with -marm and -fomit-frame-pointer, the
function callee is prologue-less, because nothing needs to be saved
on stack,
(gdb) disassemble callee
Dump of assembler code for function callee:
0x00010680 <+0>: movw r3, #2364 ; 0x93c
0x00010684 <+4>: movt r3, #2
0x00010688 <+8>: ldr r3, [r3]
0x0001068c <+12>: add r2, r3, #1
0x00010690 <+16>: movw r3, #2364 ; 0x93c
0x00010694 <+20>: movt r3, #2
0x00010698 <+24>: str r2, [r3]
0x0001069c <+28>: mov r3, #0
0x000106a0 <+32>: mov r0, r3
0x000106a4 <+36>: bx lr
program stops at the 0x106a0 (passed the epilogue) after the first
"step". When second "step" is executed, the stepping range is
[0x10680-0x106a0], which starts from the first instruction of function
callee (because it doesn't have prologue).
infrun: resume (step=1, signal=GDB_SIGNAL_0), trap_expected=0, current thread [LWP 2461] at 0x1069c^M
infrun: prepare_to_wait^M
infrun: target_wait (-1.0.0, status) =^M
infrun: 2461.2461.0 [LWP 2461],^M
infrun: status->kind = stopped, signal = GDB_SIGNAL_TRAP^M
infrun: TARGET_WAITKIND_STOPPED^M
infrun: stop_pc = 0x10698^M
infrun: stepping inside range [0x10680-0x106a0]
When program goes out of the range, it stops at the caller of callee,
and test fails. IOW, if function callee has prologue, the stepping
range won't start from the first instruction of the function, and
program stops at the prologue and test passes.
IMO, GDB does nothing wrong, but test shouldn't expect the program
stops in callee after the second "step". I decide to fix test rather
than GDB. In this patch, I change to test to do one "step", and check
the program is still in callee, then, do multiple "step" until program
goes out of the callee.
gdb/testsuite:
2016-04-22 Yao Qi <yao.qi@linaro.org>
* gdb.reverse/step-precsave.exp: Do one step and test program
stops in "callee" and do multiple steps until program goes out
of "callee".
* gdb.reverse/step-reverse.exp: Likewise.
|
|
I see the following fail on aarch64-linux
break void_func
Breakpoint 2 at 0x4007a0: file gdb/testsuite/gdb.reverse/finish-reverse.c, line 44.
(gdb) PASS: gdb.reverse/finish-reverse-bkpt.exp: set breakpoint on void_func
continue
Continuing.
Breakpoint 2, void_func () at gdb/testsuite/gdb.reverse/finish-reverse.c:44^M
44 void_test = 1; /* VOID FUNC */^M
(gdb) PASS: gdb.reverse/finish-reverse-bkpt.exp: continue to breakpoint: void_func
break *void_func^M
Note: breakpoint 2 also set at pc 0x4007a0.^M
Breakpoint 3 at 0x4007a0: file gdb/testsuite/gdb.reverse/finish-reverse.c, line 44.
(gdb) PASS: gdb.reverse/finish-reverse-bkpt.exp: set breakpoint at void_func's entry
reverse-finish^M
Run back to call of #0 void_func () at gdb/testsuite/gdb.reverse/finish-reverse.c:44
main (argc=1, argv=0x7ffffffb78) at gdb/testsuite/gdb.reverse/finish-reverse.c:98
98 void_func (); /* call to void_func */^M
(gdb) FAIL: gdb.reverse/finish-reverse-bkpt.exp: reverse-finish from void_func trips breakpoint at entry
The test assumes that brekapoints on "void_func" and "*void_func" are
set on different places because of function prologue. However, on
aarch64-linux, there is no prologue in void_func, so two breakpoints
are set at the same place (0x4007a0).
(gdb) disassemble void_func
Dump of assembler code for function void_func:
0x00000000004007a0 <+0>: adrp x0, 0x410000
0x00000000004007a4 <+4>: add x0, x0, #0xc14
0x00000000004007a8 <+8>: mov w1, #0x1
0x00000000004007ac <+12>: str w1, [x0]
0x00000000004007b0 <+16>: ret
The fix to this problem is to single step forward before setting
breakpoint on *void_func.
gdb/testsuite:
2016-04-07 Yao Qi <yao.qi@linaro.org>
* gdb.reverse/finish-reverse-bkpt.exp: Use temporary breakpoint.
Execute "si" command.
|
|
I see the fail on aarch64-linux,
(gdb) reverse-next
Breakpoint 2, callee () at /home/yao/SourceCode/gnu/gdb/git/gdb/testsuite/gdb.reverse/step-reverse.c:26^M
26 myglob++; return 0; /* ARRIVED IN CALLEE */
(gdb) FAIL: gdb.reverse/next-reverse-bkpt-over-sr.exp: reverse-next over call trips user breakpoint at function entry
The test expects program stops at line 25, but program stops at line 26.
(gdb) maintenance info line-table
objfile: /scratch/yao/gdb/build-git/aarch64-linux-gnu/gdb/testsuite/outputs/gdb.reverse/next-reverse-bkpt-over-sr/next-reverse-bkpt-over-sr ((struct objfile *) 0x613000002880)
compunit_symtab: ((struct compunit_symtab *) 0x621000121760)
symtab: /home/yao/SourceCode/gnu/gdb/git/gdb/testsuite/gdb.reverse/step-reverse.c ((struct symtab *) 0x6210001217e0)
linetable: ((struct linetable *) 0x6210001520d0):
INDEX LINE ADDRESS
0 25 0x0000000000400890
1 26 0x0000000000400890
2 27 0x00000000004008b0
(gdb) disassemble callee
Dump of assembler code for function callee:
0x0000000000400890 <+0>: adrp x0, 0x410000
0x0000000000400894 <+4>: add x0, x0, #0xcac
the line-table show that the first instruction of function callee is
mapped line 25 and 26. I am not sure the line-table is correct, but
it is not the point of this test. The goal of this test is to test
program hits the breakpoint on the first instruction of function after
'reverse-next', so I change this test to expect the breakpoint number
the program hits.
gdb/testsuite:
2016-04-07 Yao Qi <yao.qi@linaro.org>
* gdb.reverse/next-reverse-bkpt-over-sr.exp: Match the breakpoint
number instead of the comments on some line.
|
|
Nowadays, functions fprintf, printf and malloc are executed in
gdb.reverse/until-reverse.c, so that it takes much time to record
instructions inside them. This may cause timeout, and we had several
fixes to bump the timeout,
https://sourceware.org/ml/gdb-patches/2012-02/msg00038.html
https://sourceware.org/ml/gdb-patches/2015-08/msg00186.html
also I still see this on arm-linux,
continue
Continuing.
Do you want to auto delete previous execution log entries when record/replay buffer becomes full (record full stop-at-limit)?([y] or n) n
Process record: stopped by user.
Program stopped.
0xf77021e6 in __linkin_atfork (newp=0xf7751748 <atfork_mem>) at ../nptl/sysdeps/unix/sysv/linux/register-atfork.c:117
117 ../nptl/sysdeps/unix/sysv/linux/register-atfork.c: No such file or directory.
(gdb) FAIL: gdb.reverse/until-precsave.exp: run to end of main (got interactive prompt)
however, I can't figure out how these functions (fprintf, printf and
malloc) are related to the test itself. marker1 is a function from
shared library too so we don't need these complicated libc functions
at all. IMO, recording the instructions in these libc functions has
nothing to do with the test itself except slow down the test. This
patch is to remove the usage of fprintf and printf, and also move
malloc to a dead code path.
gdb/testsuite:
2016-03-30 Yao Qi <yao.qi@linaro.org>
* gdb.reverse/until-precsave.exp: Match function name only.
* gdb.reverse/until-reverse.c (main): Don't call fprintf nor printf.
Move malloc to a condition block.
* gdb.reverse/until-reverse.exp: Match function name only.
|
|
I happen to see a quotation mark is missing the following test,
gdb_test "break $end_location" \
"Breakpoint $decimal at .* line $end_location\." \
set breakpoint at end of main"
so the test result is
PASS: gdb.reverse/break-reverse.exp: set
This patch is to add the missing quotation mark back, and the test
result becomes
PASS: gdb.reverse/break-reverse.exp: set breakpoint at end of main
gdb/testsuite:
2016-03-24 Yao Qi <yao.qi@linaro.org>
* gdb.reverse/break-reverse.exp: Add quotation mark in the
test message.
|
|
This patch fixes various bugs in arm_record_exreg_ld_st_insn, and use
gdb.reverse/insn-reverse.c to test more arm instructions.
- Set flag SINGLE_REG correctly. In the arch reference manual,
SING_REG is true when the bit 8 of instruction is zero.
- Record the right D registers for instructions changing S registers.
- Fix the order of length and address in record_buf_mem array.
- Shift the offset by 2 instead of by 24.
This patch also fixes one internal error,
(gdb) PASS: gdb.reverse/finish-precsave.exp: BP at end of main
continue^M
Continuing.^M
../../binutils-gdb/gdb/utils.c:1072: internal-error: virtual memory exhausted.^M
A problem internal to GDB has been detected,FAIL: gdb.reverse/finish-precsave.exp: run to end of main (GDB internal error)
gdb:
2016-02-26 Yao Qi <yao.qi@linaro.org>
* arm-tdep.c (arm_record_exreg_ld_st_insn): Set 'single_reg'
per bit 8. Check bit 20 instead of bit 4 for VMOV
instruction. Record D registers for instructions changing
S registers. Change of the order of length and address
in record_buf_mem array.
gdb/testsuite:
2016-02-26 Yao Qi <yao.qi@linaro.org>
* gdb.reverse/insn-reverse.c [__arm__] (ext_reg_load): New.
[__arm__] (ext_reg_mov, ext_reg_push_pop): New.
(testcases): Update.
|
|
gdb/testsuite:
2016-02-26 Yao Qi <yao.qi@linaro.org>
* gdb.reverse/aarch64.c: Rename to ...
* gdb.reverse/insn-reverse.c: ... it.
* gdb.reverse/aarch64.exp: Rename to ...
* gdb.reverse/insn-reverse.exp: ... it.
|
|
I said we can generialize gdb.reverse/aarch64.exp for other
architectures https://sourceware.org/ml/gdb-patches/2015-05/msg00482.html
and here is the patch to change aarch64.exp so that it can be used to
test for other architectures as well.
gdb/testsuite:
2016-02-26 Yao Qi <yao.qi@linaro.org>
* gdb.reverse/aarch64.c: [__aarch64__] Include arm_neon.h.
(testcase_ftype): New.
(testcases): New array.
(n_testcases): New.
(main): Call each element in testcases.
* gdb.reverse/aarch64.exp: Remove is_aarch64_target check.
(read_testcase): New.
Do the tests in a loop.
|
|
When running tests in parallel, each test puts its generated files in a
different directory, under "outputs". I think it would be nice if it
was always the case, as it would isolate the test cases a bit more. An
artifact created by a test wouldn't get overwritten by another test.
Also, it makes it easier to clean up. A lot of executables are left all
over the place because their names do not appear in gdb.*/Makefile. If
everything is in "outputs", then we just have to delete that directory
(which we already do).
At the same time it makes the gdb.foo directories and their Makefiles
useless in the build directory, since they are pretty much only used for
cleaning.
What do you think?
gdb/testsuite/ChangeLog:
* Makefile.in (ALL_SUBDIRS): Remove.
(clean mostlyclean): Do not recurse in ALL_SUBDIRS.
(distclean maintainer-clean realclean): Likewise.
* configure.ac (AC_OUTPUT): Remove gdb.*/Makefile.
* configure: Regenerate.
* gdb.ada/Makefile.in: Delete.
* gdb.arch/Makefile.in: Likewise.
* gdb.asm/Makefile.in: Likewise.
* gdb.base/Makefile.in: Likewise.
* gdb.btrace/Makefile.in: Likewise.
* gdb.cell/Makefile.in: Likewise.
* gdb.compile/Makefile.in: Likewise.
* gdb.cp/Makefile.in: Likewise.
* gdb.disasm/Makefile.in: Likewise.
* gdb.dlang/Makefile.in: Likewise.
* gdb.dwarf2/Makefile.in: Likewise.
* gdb.fortran/Makefile.in: Likewise.
* gdb.gdb/Makefile.in: Likewise.
* gdb.go/Makefile.in: Likewise.
* gdb.guile/Makefile.in: Likewise.
* gdb.java/Makefile.in: Likewise.
* gdb.linespec/Makefile.in: Likewise.
* gdb.mi/Makefile.in: Likewise.
* gdb.modula2/Makefile.in: Likewise.
* gdb.multi/Makefile.in: Likewise.
* gdb.objc/Makefile.in: Likewise.
* gdb.opencl/Makefile.in: Likewise.
* gdb.opt/Makefile.in: Likewise.
* gdb.pascal/Makefile.in: Likewise.
* gdb.perf/Makefile.in: Likewise.
* gdb.python/Makefile.in: Likewise.
* gdb.reverse/Makefile.in: Likewise.
* gdb.server/Makefile.in: Likewise.
* gdb.stabs/Makefile.in: Likewise.
* gdb.threads/Makefile.in: Likewise.
* gdb.trace/Makefile.in: Likewise.
* gdb.xml/Makefile.in: Likewise.
* lib/gdb.exp (make_gdb_parallel_path): Add check for
GDB_PARALLEL.
(standard_output_file): Remove check for GDB_PARALLEL, always
return path in outputs/$subdir/$testname.
|
|
gdb/ChangeLog:
Update year range in copyright notice of all files.
|
|
gdb/ChangeLog:
PR/18376
* gdb/configure.tgt: Add linux-record.o to s390*-linux.
* gdb/s390-linux-tdep.c: #include "linux-record.h", "record-full.h"
(s390_linux_record_tdep): New static global variable.
(s390x_linux_record_tdep): New static global variable.
(s390_all_but_pc_registers_record): New function.
(s390_canonicalize_syscall): New function.
(s390_linux_syscall_record): New function.
(s390_linux_record_signal): New function.
(s390_record_calc_disp_common): New function.
(s390_record_calc_disp): New function.
(s390_record_calc_disp_vsce): New function.
(s390_record_calc_rl): New function.
(s390_record_gpr_g): New function.
(s390_record_gpr_h): New function.
(s390_record_vr): New function.
(s390_process_record): New function.
(s390_init_linux_record_tdep): New function.
(s390_gdbarch_init): Fill record function slots.
gdb/testsuite/ChangeLog:
* gdb.reverse/s390-mvcle.c: New test.
* gdb.reverse/s390-mvcle.exp: New file.
* lib/gdb.exp: Enable reverse tests on s390*-linux.
|
|
gdb/testsuite/ChangeLog:
* gdb.reverse/readv-reverse.exp: Obvious typo fixed.
|
|
continue_to_breakpoint always continues to the next breakpoint, not to the
one named in parameter. This rendered the tests effectively useless, since
marker2 was never reached.
gdb/testsuite/ChangeLog:
* gdb.reverse/fstatat-reverse.exp: Set breakpoint on marker1 after
reaching marker2.
* gdb.reverse/getresuid-reverse.exp: Likewise.
* gdb.reverse/pipe-reverse.exp: Likewise.
* gdb.reverse/readv-reverse.exp: Likewise.
* gdb.reverse/recvmsg-reverse.exp: Likewise.
* gdb.reverse/time-reverse.exp: Likewise.
* gdb.reverse/waitpid-reverse.exp: Likewise and add KFAILs.
|
|
gdb/testsuite/ChangeLog:
* gdb.reverse/fstatat-reverse.c: New test.
* gdb.reverse/fstatat-reverse.exp: New file.
* gdb.reverse/getresuid-reverse.c: New test.
* gdb.reverse/getresuid-reverse.exp: New file.
* gdb.reverse/pipe-reverse.c: New test.
* gdb.reverse/pipe-reverse.exp: New file.
* gdb.reverse/readv-reverse.c: New test.
* gdb.reverse/readv-reverse.exp: New file.
* gdb.reverse/recvmsg-reverse.c: New test.
* gdb.reverse/recvmsg-reverse.exp: New file.
* gdb.reverse/time-reverse.c: New test.
* gdb.reverse/time-reverse.exp: New file.
* gdb.reverse/waitpid-reverse.c: New test.
* gdb.reverse/waitpid-reverse.exp: New file.
|
|
The buildbot shows that PPC64 and x86_64 builders, both native and
extended-remote gdbserver frequently timeout these tests.
until-precsave.exp times out on my x86_64 occasionally as well.
Inspecting the logs, we see that if we waited some more, the tests
would pass.
Simply bump until-precsave.exp timeouts further, and apply the same
treatment to step-precsave.exp.
gdb/testsuite/ChangeLog:
2015-08-06 Pedro Alves <palves@redhat.com>
* gdb.reverse/step-precsave.exp: Use with_timeout_factor to
increase timeout.
* gdb.reverse/until-precsave.exp: Bump timeouts.
|
|
Some tests expect the the target is aarch64, but checking target
triplet is not accurate, because target triplet can be aarch64 but
the program is in arm (or aarch32) state.
This patch addes a new proc is_aarch64_target which returns true
if the target is on aarch64 state.
gdb/testsuite:
2015-07-07 Yao Qi <yao.qi@linaro.org>
* gdb.arch/aarch64-atomic-inst.exp: Check is_aarch64_target
instead of istarget "aarch64*-*-*".
* gdb.arch/aarch64-fp.exp: Likewise.
* gdb.base/float.exp: Likewise.
* gdb.reverse/aarch64.exp: Likewise.
* lib/gdb.exp (is_aarch64_target): New proc.
|
|
This patch adds a test case to test the process record for some of
aarch64 instructions.
In each function, GDB turns on process record, and single step until
program goes to the end of the function. Then, single step backward.
In each of forward single step and backward single step, the contents
of registers are saved, and test compares them. If there is any
differences, a FAIL is emitted.
The test is flexible, and we can test other instructions easily in the
future.
gdb/testsuite:
2015-05-26 Omair Javaid <omair.javaid@linaro.org>
Yao Qi <yao.qi@linaro.org>
* gdb.reverse/aarch64.c: New.
* gdb.reverse/aarch64.exp: New.
|
|
I see the following two timeout fails on pandaboard (arm-linux target),
FAIL: gdb.base/watch-bitfields.exp: -location watch against bitfields: continue until exit (timeout)
FAIL: gdb.base/watch-bitfields.exp: regular watch against bitfields: continue until exit (timeout)
In this test, more than one watchpoint is used, so the following
watchpoint requests fall back to software watchpoint, so that GDB
will single step all the way and it is very slow.
This patch is to copy the fix from
[PATCH] GDB/testsuite: Correct gdb.base/watchpoint-solib.exp timeout tweak
https://sourceware.org/ml/gdb-patches/2014-07/msg00716.html
I find the left-over of this patch review is to factor out code into
a procedure, so I do that in this patch.
Re-run tests watch-bitfields.exp, watchpoint-solib.exp, sigall-reverse.exp,
and until-precsave.exp on pandaboard, no regression.
gdb/testsuite:
2015-04-15 Pedro Alves <palves@redhat.com>
Yao Qi <yao.qi@linaro.org>
* gdb.base/watch-bitfields.exp (test_watch_location): Increase
timeout by factor of 4.
(test_regular_watch): Likewise.
* gdb.base/watchpoint-solib.exp: Use with_timeout_factor.
* gdb.reverse/sigall-reverse.exp: Likewise.
* gdb.reverse/until-precsave.exp: Likewise.
* lib/gdb.exp (with_timeout_factor): New proc.
(gdb_expect): Move some code to ...
(get_largest_timeout): ... here. New procedure.
|
|
GCC5 defaults to the GNU11 standard for C and warns by default for
implicit function declarations and implicit return types.
https://gcc.gnu.org/gcc-5/porting_to.html
Fixing these issues in the testsuite turns 9 untested and 17 unsupported
testcases into 417 new passes when compiling with GCC5.
gdb/testsuite/ChangeLog:
* gdb.arch/i386-bp_permanent.c (standard): New declaration.
* gdb.base/disp-step-fork.c: Include unistd.h.
* gdb.base/siginfo-obj.c: Include stdio.h.
* gdb.base/siginfo-thread.c: Likewise.
* gdb.mi/non-stop.c: Include unistd.h.
* gdb.mi/nsthrexec.c: Include stdio.h.
* gdb.mi/pthreads.c: Include unistd.h.
* gdb.modula2/unbounded1.c (main): Declare returns int.
* gdb.reverse/consecutive-reverse.c: Likewise.
* gdb.threads/create-fail.c: Include unistd.h.
* gdb.threads/killed.c: Likewise.
* gdb.threads/linux-dp.c: Likewise.
* gdb.threads/non-ldr-exc-1.c: Include stdio.h and string.h.
* gdb.threads/non-ldr-exc-2.c: Likewise.
* gdb.threads/non-ldr-exc-3.c: Likewise.
* gdb.threads/non-ldr-exc-4.c: Likewise.
* gdb.threads/pthreads.c: Include unistd.h.
(main): Declare returns int.
* gdb.threads/tls-main.c (foo): New declaration.
* gdb.threads/watchpoint-fork-mt.c: Define _GNU_SOURCE.
|
|
gdb/ChangeLog:
Update year range in copyright notice of all files.
|
|
tests.
FAIL: gdb.reverse/consecutive-precsave.exp: reload precord save file
FAIL: gdb.reverse/finish-precsave.exp: reload precord save file
FAIL: gdb.reverse/until-precsave.exp: reload core file
FAIL: gdb.reverse/watch-precsave.exp: reload core file
FAIL: gdb.reverse/step-precsave.exp: reload core file
FAIL: gdb.reverse/break-precsave.exp: reload precord save file
FAIL: gdb.reverse/sigall-precsave.exp: reload precord save file
They happen for two reasons.
- mingw32 does not define SIGTRAP, so upon recording a core file, the
signal information will be missing, which in turn causes GDB to not
display the stopping signal when it loads the same core file. An
earlier message warns about this:
"warning: Signal SIGTRAP does not exist on this system."
- The testcase is crafted in a way that expects a pattern of the
stopping signal message instead of a successful core file read message.
The following patch fixes this by changing the old pattern to a more
reasonable one, while still ignoring the fact that mingw32-based GDB
does not record a SIGTRAP in a core file because it does not define
it.
gdb/testsuite/
2014-11-18 Luis Machado <lgustavo@codesourcery.com>
* gdb.reverse/break-precsave: Expect completion message for
core file reads.
* gdb.reverse/consecutive-precsave.exp: Likewise.
* gdb.reverse/finish-precsave.exp: Likewise.
* gdb.reverse/i386-precsave.exp: Likewise.
* gdb.reverse/machinestate-precsave.exp: Likewise.
* gdb.reverse/sigall-precsave.exp: Likewise.
* gdb.reverse/solib-precsave.exp: Likewise.
* gdb.reverse/step-precsave.exp: Likewise.
* gdb.reverse/until-precsave.exp: Likewise.
* gdb.reverse/watch-precsave.exp: Likewise.
|
|
In some .exp files it was missed to remove the references to
eye-catchers like "set breakpoint 9 here" when the non-prototype
function header variants they belonged to were deleted. This patch
cleans this up.
gdb/testsuite/ChangeLog:
* gdb.base/condbreak.exp: Drop references to removed non-prototype
function header variants in break1.c.
* gdb.base/ena-dis-br.exp: Likewise.
* gdb.base/hbreak2.exp: Likewise.
* gdb.reverse/until-precsave.exp: Drop references to removed
non-prototype function header variants in ur1.c.
* gdb.reverse/until-reverse.exp: Likewise.
|
|
Remove many old-style function header variants in C source files of
the GDB test suite, using the 'unifdef' tool with '-DPROTOTYPES=1'.
gdb/testsuite/ChangeLog:
* gdb.base/annota1.c: Remove #ifdef PROTOTYPES, keep prototyped
variant.
* gdb.base/annota3.c: Likewise.
* gdb.base/async.c: Likewise.
* gdb.base/average.c: Likewise.
* gdb.base/call-ar-st.c: Likewise.
* gdb.base/call-rt-st.c: Likewise.
* gdb.base/call-sc.c: Likewise.
* gdb.base/call-strs.c: Likewise.
* gdb.base/ending-run.c: Likewise.
* gdb.base/execd-prog.c: Likewise.
* gdb.base/exprs.c: Likewise.
* gdb.base/foll-exec.c: Likewise.
* gdb.base/foll-fork.c: Likewise.
* gdb.base/foll-vfork.c: Likewise.
* gdb.base/funcargs.c: Likewise.
* gdb.base/gcore.c: Likewise.
* gdb.base/jump.c: Likewise.
* gdb.base/langs0.c: Likewise.
* gdb.base/langs1.c: Likewise.
* gdb.base/langs2.c: Likewise.
* gdb.base/mips_pro.c: Likewise.
* gdb.base/nodebug.c: Likewise.
* gdb.base/opaque0.c: Likewise.
* gdb.base/opaque1.c: Likewise.
* gdb.base/recurse.c: Likewise.
* gdb.base/run.c: Likewise.
* gdb.base/scope0.c: Likewise.
* gdb.base/scope1.c: Likewise.
* gdb.base/setshow.c: Likewise.
* gdb.base/setvar.c: Likewise.
* gdb.base/shmain.c: Likewise.
* gdb.base/shr1.c: Likewise.
* gdb.base/shr2.c: Likewise.
* gdb.base/sigall.c: Likewise.
* gdb.base/signals.c: Likewise.
* gdb.base/so-indr-cl.c: Likewise.
* gdb.base/solib2.c: Likewise.
* gdb.base/structs.c: Likewise.
* gdb.base/sum.c: Likewise.
* gdb.base/vforked-prog.c: Likewise.
* gdb.base/watchpoint.c: Likewise.
* gdb.reverse/shr2.c: Likewise.
* gdb.reverse/until-reverse.c: Likewise.
* gdb.reverse/ur1.c: Likewise.
* gdb.reverse/watch-reverse.c: Likewise.
|
|
Some testcases, mostly gdb.reverse ones, assume the presence of a
'/' directory separator before the source file name. This is
incorrect for mingw32 hosts, generating false failures for those
tests.
I attempted to catch most of the occurrences of the pattern
".*/$srcfile" and replaced them with ".*$srcfile". The latter
is used elsewhere in the testsuite. The resulting patch is attached.
I also see other occurrences of the same assumption throughout the
testsuite, but usually they are arguments for function calls and i
seem to recall either the test harness or GDB deals with those
paths properly.
gdb/testsuite:
2014-10-17 Luis Machado <lgustavo@codesourcery.com>
* gdb.guile/scm-breakpoint.exp: Do not assume any
directory separators when matching source file paths.
* gdb.python/py-breakpoint.exp: Likewise.
* gdb.reverse/break-precsave.exp: Likewise.
* gdb.reverse/break-reverse.exp: Likewise.
* gdb.reverse/consecutive-precsave.exp: Likewise.
* gdb.reverse/finish-precsave.exp: Likewise.
* gdb.reverse/finish-reverse-bkpt.exp: Likewise.
* gdb.reverse/finish-reverse.exp: Likewise.
* gdb.reverse/i386-precsave.exp: Likewise.
* gdb.reverse/i387-env-reverse.exp: Likewise.
* gdb.reverse/i387-stack-reverse.exp: Likewise.
* gdb.reverse/machinestate-precsave.exp: Likewise.
* gdb.reverse/machinestate.exp: Likewise.
* gdb.reverse/sigall-precsave.exp: Likewise.
* gdb.reverse/solib-precsave.exp: Likewise.
* gdb.reverse/step-precsave.exp: Likewise.
* gdb.reverse/until-precsave.exp: Likewise.
* gdb.reverse/watch-precsave.exp: Likewise.
* gdb.reverse/watch-reverse.exp: Likewise.
|
|
This commit does most of the mechanical removal. IOW, the easy part.
procfs.c isn't touched beyond removing a couple obvious bits that are
guarded by a couple macros defined in config/alpha/nm-osf3.h. Going
beyond that for procfs.c & co would be a harder excision that
potentially affects Solaris.
Some comments in the generic alpha code ABIs that may still be
relevant and I wouldn't know what to do with them. That can always be
done on a separate pass, preferably by someone who can test on alpha.
A couple other spots have references to OSF/Tru64 and related files
being removed, but it felt like removing them would make things worse,
not better. We can revisit those when we next need to touch that
code.
I didn't remove a reference to osf in testsuite/lib/future.exp, as I
believe that code is imported from DejaGNU.
Built and tested on x86_64 Fedora 20, with --enable-targets=all.
Tested that building for --target=alpha-osf3 on x86_64 Fedora 20
fails with:
checking for default auto-load directory... $debugdir:$datadir/auto-load
checking for default auto-load safe-path... $debugdir:$datadir/auto-load
*** Configuration alpha-unknown-osf3 is obsolete.
*** Support has been REMOVED.
make[1]: *** [configure-gdb] Error 1
make[1]: Leaving directory `build-osf'
make: *** [all] Error 2
gdb/
2014-10-17 Pedro Alves <palves@redhat.com>
* Makefile.in (ALL_64_TARGET_OBS): Remove alpha-osf1-tdep.o.
(HFILES_NO_SRCDIR): Remove config/alpha/nm-osf3.h.
(ALLDEPFILES): Remove alpha-nat.c, alpha-osf1-tdep.c and
solib-osf.c.
* NEWS: Mention that support for alpha*-*-osf* has been removed.
* ada-lang.h [__alpha__ && __osf__]
(ADA_KNOWN_RUNTIME_FILE_NAME_PATTERNS): Delete.
* alpha-nat.c, alpha-osf1-tdep.c: Delete files.
* alpha-tdep.c (alpha_gdbarch_init): Remove reference to
GDB_OSABI_OSF1.
* config/alpha/alpha-osf3.mh, config/alpha/nm-osf3.h: Delete
files.
* config/djgpp/fnchange.lst (config/alpha/alpha-osf1.mh)
(config/alpha/alpha-osf2.mh, config/alpha/alpha-osf3.mh): Delete.
* configure: Regenerate.
* configure.ac: Remove references to osf.
* configure.host: Handle alpha*-*-osf* in the obsolete hosts
section. Remove all other references to osf.
* configure.tgt: Add alpha*-*-osf* to the obsolete targets section.
Remove all other references to osf.
* dec-thread.c: Delete file.
* defs.h (GDB_OSABI_OSF1): Delete.
* inferior.h (START_INFERIOR_TRAPS_EXPECTED): New unconditionally
defined.
* osabi.c (gdb_osabi_names): Delete "OSF/1".
* procfs.c (procfs_debug_inferior) [PROCFS_DONT_TRACE_FAULTS]:
Delete code.
(unconditionally_kill_inferior)
[PROCFS_NEED_CLEAR_CURSIG_FOR_KILL]: Delete code.
* solib-osf.c: Delete file.
gdb/testsuite/
2014-10-17 Pedro Alves <palves@redhat.com>
* gdb.base/callfuncs.exp: emove references to osf.
* gdb.base/sigall.exp: Likewise.
* gdb.gdb/selftest.exp: Likewise.
* gdb.hp/gdb.base-hp/callfwmall.exp: Likewise.
* gdb.mi/non-stop.c: Likewise.
* gdb.mi/pthreads.c: Likewise.
* gdb.reverse/sigall-precsave.exp: Likewise.
* gdb.reverse/sigall-reverse.exp: Likewise.
* gdb.threads/pthreads.c: Likewise.
* gdb.threads/pthreads.exp: Likewise.
gdb/doc/
2014-10-17 Pedro Alves <palves@redhat.com>
* gdb.texinfo (Ada Tasks and Core Files): Delete mention of Tru64.
(SVR4 Process Information): Delete mention of OSF/1.
|
|
"target vxworks" and friends have been removed 10 years ago already:
commit e84ecc995d6a5e4e9114d3cea61717b8a573afb6
Author: Andrew Cagney <cagney@redhat.com>
AuthorDate: Sat Nov 13 23:10:02 2004 +0000
2004-11-13 Andrew Cagney <cagney@gnu.org>
* configure.tgt: Delete i[34567]86-*-vxworks*, m68*-netx-*,
m68*-*-vxworks*, mips*-*-vxworks*, powerpc-*-vxworks*, and
sparc-*-vxworks*.
* NEWS: Mention that vxworks was deleted.
(...)
* remote-vxmips.c, remote-vx.c: Delete.
* remote-vx68.c: Delete.
(...)
This removes related leftover cruft from the testsuite.
Tested on x86_64 Fedora 20, native and gdbserver.
gdb/testsuite/
2014-09-16 Pedro Alves <palves@redhat.com>
* config/vx.exp, config/vxworks.exp, config/vxworks29k.exp: Delete
files.
* gdb.base/a2-run.exp: Remove all code guarded by istarget
"*-*-vxworks*" throughout.
* gdb.base/break.exp: Likewise.
* gdb.base/default.exp: Likewise.
* gdb.base/scope.exp: Likewise.
* gdb.base/sepdebug.exp: Likewise.
* gdb.base/break.c: Remove all code guarded by #ifdef vxworks
throughout.
* gdb.base/run.c: Likewise.
* gdb.base/sepdebug.c: Likewise.
* gdb.hp/gdb.aCC/run.c: Likewise.
* gdb.reverse/until-reverse.c: Likewise.
* lib/gdb.exp (gdb_compile): Remove is_vxworks branch.
|
|
There are three cases in two scripts in the gdb.reverse subset that
take a particularly long time. Two of them are already attempted to
take care of by extending the timeout from the default. The remaining
one has no precautions taken. The timeout extension is ineffective
though, it is done by adding a constant rather than by scaling and as
a result while it may work for target boards that get satisfied with
the detault test timeout of 10s, it does not serve its purpose for
slower ones.
Here are indicative samples of execution times (in seconds) observed
for these cases respectively, for an ARMv7 Panda board running Linux
and a `-march=armv5te' multilib:
PASS: gdb.reverse/sigall-reverse.exp: continue to signal exit
elapsed: 385
PASS: gdb.reverse/until-precsave.exp: run to end of main
elapsed: 4440
PASS: gdb.reverse/until-precsave.exp: save process recfile
elapsed: 965
for the same board and a `-mthumb -march=armv5te' multilib:
PASS: gdb.reverse/sigall-reverse.exp: continue to signal exit
elapsed: 465
PASS: gdb.reverse/until-precsave.exp: run to end of main
elapsed: 4191
PASS: gdb.reverse/until-precsave.exp: save process recfile
elapsed: 669
and for QEMU in the system emulation mode and a `-march=armv4t'
multilib:
PASS: gdb.reverse/sigall-reverse.exp: continue to signal exit
elapsed: 45
PASS: gdb.reverse/until-precsave.exp: run to end of main
elapsed: 433
PASS: gdb.reverse/until-precsave.exp: save process recfile
elapsed: 104
Based on the performance of other tests these two test configurations
have their default timeout set to 450s and 60s respectively.
The remaining two multilibs (`-mthumb -march=armv4t' and `-mthumb
-march=armv7-a') do not produce test results usable enough to have data
available for these cases.
Based on these results I have tweaked timeouts for these cases as
follows. This, together with a suitable board timeout setting, removes
timeouts for these cases. Note that for the default timeout of 10s the
new setting for the first case in gdb.reverse/until-precsave.exp is
compatible with the old one, just a bit higher to keep the convention
of longer timeouts to remain multiples of 30s. The second case there
does not need such a high setting so I have lowered it a bit to avoid
an unnecessary delay where this test case genuinely times out.
* gdb.reverse/sigall-reverse.exp: Increase the timeout by
a factor of 2 for a slow test case. Take the `gdb,timeout'
target setting into account for this calculation.
* gdb.reverse/until-precsave.exp: Increase the timeout by
a factor of 15 and 3 respectively rather than adding 120
for a pair of slow test cases. Take the `gdb,timeout'
target setting into account for this calculation.
|
|
This fixes the record "run" regression pointed out by Marc Khouzam:
https://sourceware.org/ml/gdb/2014-06/msg00096.html
The bug is that target_require_runnable must agree with the handling
of the "run" target, but currently it is out of sync. This patch
fixes the problem by changing target_require_runnable to also ignore
the record_stratum.
Built and regtested on x86-64 Fedora 20.
New test case included.
2014-07-14 Tom Tromey <tromey@redhat.com>
* target.c (target_require_runnable): Also check record_stratum.
Update comment.
2014-07-14 Tom Tromey <tromey@redhat.com>
* gdb.reverse/rerun-prec.c: New file.
* gdb.reverse/rerun-prec.exp: New file.
|
|
This commit reorders various pieces of code to separate ANSI-standard
signals from other signals that need checking. Comments are added to
document this, and to document the ordering of the signals.
gdb/
2014-06-09 Gary Benson <gbenson@redhat.com>
* common/signals.c (gdb_signal_from_host): Reorder to separate
the always-available ANSI-standard signals from the signals that
require checking.
(do_gdb_signal_to_host): Likewise.
* proc-events.c (signal_table): Likewise.
gdb/testsuite/
2014-06-09 Gary Benson <gbenson@redhat.com>
* gdb.base/sigall.c [Functions to send signals]: Reorder to
separate the always-available ANSI-standard signals from the
signals that require checking.
(main): Likewise.
* gdb.reverse/sigall-reverse.c [Functions to send signals]:
Likewise.
(main): Likewise.
|
|
The six signals SIGINT, SIGILL, SIGABRT, SIGFPE, SIGSEGV and SIGTERM
are ANSI-standard and thus guaranteed to be available. This patch
removes all preprocessor conditionals relating to these symbols.
gdb/
2014-06-06 Gary Benson <gbenson@redhat.com>
* common/signals.c: Remove preprocessor conditionals for
always-defined signals SIGINT, SIGILL, SIGABRT, SIGFPE,
SIGSEGV and SIGTERM.
* proc-events.c: Likewise.
gdb/testsuite/
2014-06-06 Gary Benson <gbenson@redhat.com>
* gdb.base/call-signals.c: Remove preprocessor conditionals
for always-defined signals SIGINT, SIGILL, SIGABRT, SIGFPE,
SIGSEGV and SIGTERM.
* gdb.base/sigall.c: Likewise.
* gdb.base/unwindonsignal.c: Likewise.
* gdb.reverse/sigall-reverse.c: Likewise.
|
|
* gdb.reverse/sigall-reverse.exp: Fix a typo.
|
|
This finally makes background execution commands possible by default.
However, in order to do that, there's one last thing we need to do --
we need to separate the MI and target notions of "async". Unlike the
CLI, where the user explicitly requests foreground vs background
execution in the execution command itself (c vs c&), MI chose to treat
"set target-async" specially -- setting it changes the default
behavior of execution commands.
So, we can't simply "set target-async" default to on, as that would
affect MI frontends. Instead we have to make the setting MI-specific,
and teach MI about sync commands on top of an async target.
Because the "target" word in "set target-async" ends up as a potential
source of confusion, the patch adds a "set mi-async" option, and makes
"set target-async" a deprecated alias.
Rather than make the targets always async, this patch introduces a new
"maint set target-async" option so that the GDB developer can control
whether the target is async. This makes it simpler to debug issues
arising only in the synchronous mode; important because sync mode
seems unlikely to go away.
Unlike in previous revisions, "set target-async" does not affect this
new maint parameter. The rationale for this is that then one can
easily run the test suite in the "maint set target-async off" mode and
have tests that enable mi-async fail just like they fail on
non-async-capable targets. This emulation is exactly the point of the
maint option.
I had asked Tom in a previous iteration to split the actual change of
the target async default to a separate patch, but it turns out that
that is quite awkward in this version of the patch, because with MI
async and target async decoupled (unlike in previous versions), if we
don't flip the default at the same time, then just "set target-async
on" alone never actually manages to do anything. It's best to not
have that transitory state in the tree.
Given "set target-async on" now only has effect for MI, the patch goes
through the testsuite removing it from non-MI tests. MI tests are
adjusted to use the new and less confusing "mi-async" spelling.
2014-05-29 Pedro Alves <palves@redhat.com>
Tom Tromey <tromey@redhat.com>
* NEWS: Mention "maint set target-async", "set mi-async", and that
background execution commands are now always available.
* target.h (target_async_permitted): Update comment.
* target.c (target_async_permitted, target_async_permitted_1):
Default to 1.
(set_target_async_command): Rename to ...
(maint_set_target_async_command): ... this.
(show_target_async_command): Rename to ...
(maint_show_target_async_command): ... this.
(_initialize_target): Adjust.
* infcmd.c (prepare_execution_command): Make extern.
* inferior.h (prepare_execution_command): Declare.
* infrun.c (set_observer_mode): Leave target async alone.
* mi/mi-interp.c (mi_interpreter_init): Install
mi_on_sync_execution_done as sync_execution_done observer.
(mi_on_sync_execution_done): New function.
(mi_execute_command_input_handler): Don't print the prompt if we
just started a synchronous command with an async target.
(mi_on_resume): Check sync_execution before printing prompt.
* mi/mi-main.h (mi_async_p): Declare.
* mi/mi-main.c: Include gdbcmd.h.
(mi_async_p): New function.
(mi_async, mi_async_1): New globals.
(set_mi_async_command, show_mi_async_command, mi_async): New
functions.
(exec_continue): Call prepare_execution_command.
(run_one_inferior, mi_cmd_exec_run, mi_cmd_list_target_features)
(mi_execute_async_cli_command): Use mi_async_p.
(_initialize_mi_main): Install "set mi-async". Make
"target-async" a deprecated alias.
2014-05-29 Pedro Alves <palves@redhat.com>
Tom Tromey <tromey@redhat.com>
* gdb.texinfo (Non-Stop Mode): Remove "set target-async 1"
from example.
(Asynchronous and non-stop modes): Document '-gdb-set mi-async'.
Mention that target-async is now deprecated.
(Maintenance Commands): Document maint set/show target-async.
2014-05-29 Pedro Alves <palves@redhat.com>
Tom Tromey <tromey@redhat.com>
* gdb.base/async-shell.exp: Don't enable target-async.
* gdb.base/async.exp
* gdb.base/corefile.exp (corefile_test_attach): Remove 'async'
parameter. Adjust.
(top level): Don't test with "target-async".
* gdb.base/dprintf-non-stop.exp: Don't enable target-async.
* gdb.base/gdb-sigterm.exp: Don't test with "target-async".
* gdb.base/inferior-died.exp: Don't enable target-async.
* gdb.base/interrupt-noterm.exp: Likewise.
* gdb.mi/mi-async.exp: Use "mi-async" instead of "target-async".
* gdb.mi/mi-nonstop-exit.exp: Likewise.
* gdb.mi/mi-nonstop.exp: Likewise.
* gdb.mi/mi-ns-stale-regcache.exp: Likewise.
* gdb.mi/mi-nsintrall.exp: Likewise.
* gdb.mi/mi-nsmoribund.exp: Likewise.
* gdb.mi/mi-nsthrexec.exp: Likewise.
* gdb.mi/mi-watch-nonstop.exp: Likewise.
* gdb.multi/watchpoint-multi.exp: Adjust comment.
* gdb.python/py-evsignal.exp: Don't enable target-async.
* gdb.python/py-evthreads.exp: Likewise.
* gdb.python/py-prompt.exp: Likewise.
* gdb.reverse/break-precsave.exp: Don't test with "target-async".
* gdb.server/solib-list.exp: Don't enable target-async.
* gdb.threads/thread-specific-bp.exp: Likewise.
* lib/mi-support.exp: Adjust to use mi-async.
|
|
A patch in the target cleanup series caused a regression when using
record with target-async. Version 4 of the patch is here:
https://sourceware.org/ml/gdb-patches/2014-03/msg00159.html
The immediate problem is that record supplies to_can_async_p and
to_is_async_p methods, but does not supply a to_async method. So,
when target-async is set, record claims to support async -- but if the
underlying target does not support async, then the to_async method
call will end up in that method's default implementation, namely
tcomplain.
This worked previously because the record target used to provide a
to_async method; one that (erroneously, only at push time) checked the
other members of the target stack, and then simply dropped to_async
calls in the "does not implement async" case.
My first thought was to simply drop tcomplain as the default for
to_async. This works, but Pedro pointed out that the only reason
record has to supply to_can_async_p and to_is_async_p is that these
default to using the find_default_run_target machinery -- and these
defaults are only needed by "run" and "attach".
So, a nicer solution presents itself: change run and attach to
explicitly call into the default run target when needed; and change
to_is_async_p and to_can_async_p to default to "return 0". This makes
the target stack simpler to use and lets us remove the method
implementations from record. This is also in harmony with other plans
for the target stack; namely trying to reduce the impact of
find_default_run_target. This approach makes it clear that
find_default_is_async_p is not needed -- it is asking whether a target
that may not even be pushed is actually async, which seems like a
nonsensical question.
While an improvement, this approach proved to introduce the same bug
when using the core target. Looking a bit deeper, the issue is that
code in "attach" and "run" may need to use either the current target
stack or the default run target -- but different calls into the target
API in those functions could wind up querying different targets.
This new patch makes the target to use more explicit in "run" and
"attach". Then these commands explicitly make the needed calls
against that target. This ensures that a single target is used for
all relevant operations. This lets us remove a couple find_default_*
functions from various targets, including the dummy target. I think
this is a decent understandability improvement.
One issue I see with this patch is that the new calls in "run" and
"attach" are not very much like the rest of the target API. I think
fundamentally this is due to bad factoring in the target API, which
may need to be fixed for multi-target. Tackling that seemed ambitious
for a regression fix.
While working on this I noticed that there don't seem to be any test
cases that involve both target-async and record, so this patch changes
break-precsave.exp to add some. It also changes corefile.exp to add
some target-async tests; these pass with current trunk and with this
patch applied, but fail with the v1 patch.
This patch differs from v4 in that it moves initialization of
to_can_async_p and to_supports_non_stop into inf-child, adds some
assertions to complete_target_initialization, and adds some comments
to target.h.
Built and regtested on x86-64 Fedora 20.
2014-03-12 Tom Tromey <tromey@redhat.com>
* inf-child.c (return_zero): New function.
(inf_child_target): Set to_can_async_p, to_supports_non_stop.
* aix-thread.c (aix_thread_inferior_created): New function.
(aix_thread_attach): Remove.
(init_aix_thread_ops): Don't set to_attach.
(_initialize_aix_thread): Register inferior_created observer.
* corelow.c (init_core_ops): Don't set to_attach or
to_create_inferior.
* exec.c (init_exec_ops): Don't set to_attach or
to_create_inferior.
* infcmd.c (run_command_1): Use find_run_target. Make direct
target calls.
(attach_command): Use find_attach_target. Make direct target
calls.
* record-btrace.c (init_record_btrace_ops): Don't set
to_create_inferior.
* record-full.c (record_full_can_async_p, record_full_is_async_p):
Remove.
(init_record_full_ops, init_record_full_core_ops): Update. Don't
set to_create_inferior.
* target.c (complete_target_initialization): Add assertion.
(target_create_inferior): Remove.
(find_default_attach, find_default_create_inferior): Remove.
(find_attach_target, find_run_target): New functions.
(find_default_is_async_p, find_default_can_async_p)
(target_supports_non_stop, target_attach): Remove.
(init_dummy_target): Don't set to_create_inferior or
to_supports_non_stop.
* target.h (struct target_ops) <to_attach>: Add comment. Remove
TARGET_DEFAULT_FUNC.
<to_create_inferior>: Add comment.
<to_can_async_p, to_is_async_p, to_supports_non_stop>: Use
TARGET_DEFAULT_RETURN.
<to_can_async_p, to_supports_non_stop, to_can_run>: Add comments.
(find_attach_target, find_run_target): Declare.
(target_create_inferior): Remove.
(target_has_execution_1): Update comment.
(target_supports_non_stop): Remove.
* target-delegates.c: Rebuild.
2014-03-12 Tom Tromey <tromey@redhat.com>
* gdb.base/corefile.exp (corefile_test_run, corefile_test_attach):
New procs. Add target-async tests.
* gdb.reverse/break-precsave.exp (precsave_tests): New proc.
Add target-async tests.
|
|
|
|
* gdb.reverse/shr1.c: New file.
* gdb.reverse/shr2.c: #include "shr.h".
* gdb.reverse/solib-reverse.c: Remove #include <stdio.h>.
#include "shr.h". Replace calls to printf,sleep to call shr1 instead.
* gdb.reverse/solib-precsave.exp: Build shr2.sl.
Update tests using sleep/printf to use shr2.sl instead.
* gdb.reverse/solib-reverse.exp: Ditt.o
|
|
Two modifications:
1. The addition of 2013 to the copyright year range for every file;
2. The use of a single year range, instead of potentially multiple
year ranges, as approved by the FSF.
|
|
* gdb.reverse/solib-precsave.exp: Skip if skip_shlib_test
returns true.
Call gdb_load_shlibs.
* gdb.reverse/solib-reverse.exp: Likewise.
|
|
PR 14119
* frame.c (skip_inlined_frames): Skip also TAILCALL_FRAME frames.
(frame_pop): Drop also TAILCALL_FRAME frames.
* infcmd.c (finish_command): Ignore also TAILCALL_FRAME frames.
gdb/testsuite/
PR 14119
* gdb.arch/amd64-tailcall-ret.S: New file.
* gdb.arch/amd64-tailcall-ret.c: New file.
* gdb.arch/amd64-tailcall-ret.exp: New file.
* gdb.reverse/amd64-tailcall-reverse.S: New file.
* gdb.reverse/amd64-tailcall-reverse.c: New file.
* gdb.reverse/amd64-tailcall-reverse.exp: New file.
|
|
PR 14548
* infrun.c (handle_inferior_event): Do not reverse-continue back to the
function start if we are already at function start. Both for
reverse-next and for reverse-step into function without line number
info.
gdb/testsuite/
PR 14548
* gdb.reverse/singlejmp-reverse-nodebug.S: New file.
* gdb.reverse/singlejmp-reverse-nodebug.c: New file.
* gdb.reverse/singlejmp-reverse.S: New file.
* gdb.reverse/singlejmp-reverse.c: New file.
* gdb.reverse/singlejmp-reverse.exp: New file.
|
|
* config/monitor.exp (gdb_load): Remove redundant ';' in for loop.
* config/vx.exp (gdb_start): Likewise.
* gdb.base/printcmds.exp (test_print_repeats_10): Likewise.
* gdb.base/setvar.exp (test_set): Likewise.
* gdb.base/sigall.exp: Use foreach+lrange instead of for+continue.
* gdb.reverse/sigall-precsave.exp: Likewise.
* gdb.reverse/sigall-reverse.exp: Likewise.
|
|
* gdb.reverse/sigall-precsave.exp: Set a breakpoint at each signal
handler before recording.
|
|
* gdb.base/sigall.exp (signals): New list.
<top level>: Loop over signals in the $signals list instead of
calling a test function once per signal.
* gdb.reverse/sigall-precsave.exp (signals): New list.
<top level>: Loop over signals in the $signals list instead of
calling a test function once per signal.
* gdb.reverse/sigall-reverse.exp (signals): New list.
<top level>: Loop over signals in the $signals list instead of
calling a test function once per signal.
|
|
* gdb.reverse/consecutive-precsave.exp: Use standard_output_file.
* gdb.reverse/finish-precsave.exp: Use standard_output_file.
* gdb.reverse/i386-precsave.exp: Use standard_output_file.
* gdb.reverse/machinestate-precsave.exp: Use standard_output_file.
* gdb.reverse/sigall-precsave.exp: Use standard_output_file.
* gdb.reverse/solib-precsave.exp: Use standard_output_file.
* gdb.reverse/step-precsave.exp: Use standard_output_file.
* gdb.reverse/until-precsave.exp: Use standard_output_file.
* gdb.reverse/watch-precsave.exp: Use standard_output_file.
|
|
* gdb.reverse/break-reverse.exp: Use standard_testfile.
* gdb.reverse/consecutive-precsave.exp: Use standard_testfile.
* gdb.reverse/consecutive-reverse.exp: Use standard_testfile.
* gdb.reverse/finish-precsave.exp: Use standard_testfile.
* gdb.reverse/finish-reverse-bkpt.exp: Use standard_testfile.
* gdb.reverse/finish-reverse.exp: Use standard_testfile.
* gdb.reverse/i386-precsave.exp: Use standard_testfile,
prepare_for_testing.
* gdb.reverse/i386-reverse.exp: Use standard_testfile,
prepare_for_testing.
* gdb.reverse/i386-sse-reverse.exp: Use standard_testfile,
prepare_for_testing.
* gdb.reverse/i387-env-reverse.exp: Use standard_testfile,
prepare_for_testing.
* gdb.reverse/i387-stack-reverse.exp: Use standard_testfile,
prepare_for_testing
* gdb.reverse/machinestate-precsave.exp: Use standard_testfile.
* gdb.reverse/machinestate.exp: Use standard_testfile.
* gdb.reverse/next-reverse-bkpt-over-sr.exp: Use standard_testfile.
* gdb.reverse/sigall-precsave.exp: Use standard_testfile,
build_executable.
* gdb.reverse/sigall-reverse.exp: Use standard_testfile,
build_executable.
* gdb.reverse/solib-precsave.exp: Use standard_testfile,
standard_output_file.
* gdb.reverse/solib-reverse.exp: Use standard_testfile,
standard_output_file.
* gdb.reverse/step-precsave.exp: Use standard_testfile.
* gdb.reverse/step-reverse.exp: Use standard_testfile.
* gdb.reverse/until-precsave.exp: Use standard_testfile.
* gdb.reverse/until-reverse.exp: Use standard_testfile.
* gdb.reverse/watch-precsave.exp: Use standard_testfile.
* gdb.reverse/watch-reverse.exp: Use standard_testfile.
|
|
(build_executable): Update.
(get_compiler_info): Remove 'binfile' argument.
* gdb.ada/arrayidx.exp: Update.
* gdb.ada/null_array.exp: Update.
* gdb.arch/altivec-abi.exp: Update.
* gdb.arch/altivec-regs.exp: Update.
* gdb.arch/amd64-byte.exp: Update.
* gdb.arch/amd64-dword.exp: Update.
* gdb.arch/amd64-word.exp: Update.
* gdb.arch/i386-avx.exp: Update.
* gdb.arch/i386-byte.exp: Update.
* gdb.arch/i386-sse.exp: Update.
* gdb.arch/i386-word.exp: Update.
* gdb.arch/ppc-dfp.exp: Update.
* gdb.arch/ppc-fp.exp: Update.
* gdb.arch/vsx-regs.exp: Update.
* gdb.base/all-bin.exp: Update.
* gdb.base/annota1.exp: Update.
* gdb.base/async.exp: Update.
* gdb.base/attach.exp: Update.
* gdb.base/break-interp.exp: Update.
* gdb.base/call-ar-st.exp: Update.
* gdb.base/call-rt-st.exp: Update.
* gdb.base/call-sc.exp: Update.
* gdb.base/callfuncs.exp: Update.
* gdb.base/catch-load.exp: Update.
* gdb.base/completion.exp: Update.
* gdb.base/complex.exp: Update.
* gdb.base/condbreak.exp: Update.
* gdb.base/consecutive.exp: Update.
* gdb.base/constvars.exp: Update.
* gdb.base/corefile.exp: Update.
* gdb.base/eval-skip.exp: Update.
* gdb.base/expand-psymtabs.exp: Update.
* gdb.base/exprs.exp: Update.
* gdb.base/fileio.exp: Update.
* gdb.base/fixsection.exp: Update.
* gdb.base/funcargs.exp: Update.
* gdb.base/gdb11530.exp: Update.
* gdb.base/gdb1555.exp: Update.
* gdb.base/gnu-ifunc.exp: Update.
* gdb.base/gnu_vector.exp: Update.
* gdb.base/info-macros.exp: Update.
* gdb.base/jit-simple.exp: Update.
* gdb.base/jit-so.exp: Update.
* gdb.base/jit.exp: Update.
* gdb.base/langs.exp: Update.
* gdb.base/list.exp: Update.
* gdb.base/logical.exp: Update.
* gdb.base/long_long.exp: Update.
* gdb.base/longjmp.exp: Update.
* gdb.base/macscp.exp: Update.
* gdb.base/mips_pro.exp: Update.
* gdb.base/miscexprs.exp: Update.
* gdb.base/morestack.exp: Update.
* gdb.base/nodebug.exp: Update.
* gdb.base/opaque.exp: Update.
* gdb.base/pc-fp.exp: Update.
* gdb.base/pending.exp: Update.
* gdb.base/permissions.exp: Update.
* gdb.base/pointers.exp: Update.
* gdb.base/prelink.exp: Update.
* gdb.base/printcmds.exp: Update.
* gdb.base/psymtab.exp: Update.
* gdb.base/ptype.exp: Update.
* gdb.base/relational.exp: Update.
* gdb.base/scope.exp: Update.
* gdb.base/setvar.exp: Update.
* gdb.base/shlib-call.exp: Update.
* gdb.base/shreloc.exp: Update.
* gdb.base/signals.exp: Update.
* gdb.base/sizeof.exp: Update.
* gdb.base/so-impl-ld.exp: Update.
* gdb.base/so-indr-cl.exp: Update.
* gdb.base/solib-disc.exp: Update.
* gdb.base/solib-display.exp: Update.
* gdb.base/solib-nodir.exp: Update.
* gdb.base/solib-overlap.exp: Update.
* gdb.base/solib-symbol.exp: Update.
* gdb.base/solib-weak.exp: Update.
* gdb.base/solib.exp: Update.
* gdb.base/store.exp: Update.
* gdb.base/structs.exp: Update.
* gdb.base/structs2.exp: Update.
* gdb.base/type-opaque.exp: Update.
* gdb.base/unload.exp: Update.
* gdb.base/varargs.exp: Update.
* gdb.base/volatile.exp: Update.
* gdb.base/watch_thread_num.exp: Update.
* gdb.base/watchpoint-solib.exp: Update.
* gdb.base/watchpoint.exp: Update.
* gdb.base/watchpoints.exp: Update.
* gdb.base/whatis.exp: Update.
* gdb.cell/arch.exp: Update.
* gdb.cell/break.exp: Update.
* gdb.cell/bt.exp: Update.
* gdb.cell/core.exp: Update.
* gdb.cell/data.exp: Update.
* gdb.cell/ea-cache.exp: Update.
* gdb.cell/f-regs.exp: Update.
* gdb.cell/fork.exp: Update.
* gdb.cell/gcore.exp: Update.
* gdb.cell/mem-access.exp: Update.
* gdb.cell/ptype.exp: Update.
* gdb.cell/registers.exp: Update.
* gdb.cell/sizeof.exp: Update.
* gdb.cell/solib-symbol.exp: Update.
* gdb.cell/solib.exp: Update.
* gdb.cp/ambiguous.exp: Update.
* gdb.cp/breakpoint.exp: Update.
* gdb.cp/bs15503.exp: Update.
* gdb.cp/casts.exp: Update.
* gdb.cp/class2.exp: Update.
* gdb.cp/cpexprs.exp: Update.
* gdb.cp/cplusfuncs.exp: Update.
* gdb.cp/ctti.exp: Update.
* gdb.cp/dispcxx.exp: Update.
* gdb.cp/gdb1355.exp: Update.
* gdb.cp/gdb2384.exp: Update.
* gdb.cp/gdb2495.exp: Update.
* gdb.cp/infcall-dlopen.exp: Update.
* gdb.cp/local.exp: Update.
* gdb.cp/m-data.exp: Update.
* gdb.cp/m-static.exp: Update.
* gdb.cp/mb-ctor.exp: Update.
* gdb.cp/mb-inline.exp: Update.
* gdb.cp/mb-templates.exp: Update.
* gdb.cp/member-ptr.exp: Update.
* gdb.cp/method.exp: Update.
* gdb.cp/namespace.exp: Update.
* gdb.cp/nextoverthrow.exp: Update.
* gdb.cp/nsdecl.exp: Update.
* gdb.cp/nsrecurs.exp: Update.
* gdb.cp/nsstress.exp: Update.
* gdb.cp/nsusing.exp: Update.
* gdb.cp/pr-1023.exp: Update.
* gdb.cp/pr-1210.exp: Update.
* gdb.cp/pr-574.exp: Update.
* gdb.cp/pr9631.exp: Update.
* gdb.cp/printmethod.exp: Update.
* gdb.cp/psmang.exp: Update.
* gdb.cp/re-set-overloaded.exp: Update.
* gdb.cp/rtti.exp: Update.
* gdb.cp/shadow.exp: Update.
* gdb.cp/templates.exp: Update.
* gdb.cp/try_catch.exp: Update.
* gdb.dwarf2/dw2-ranges.exp: Update.
* gdb.dwarf2/pr10770.exp: Update.
* gdb.fortran/library-module.exp: Update.
* gdb.hp/gdb.aCC/optimize.exp: Update.
* gdb.hp/gdb.aCC/watch-cmd.exp: Update.
* gdb.hp/gdb.base-hp/callfwmall.exp: Update.
* gdb.hp/gdb.base-hp/hwwatchbus.exp: Update.
* gdb.hp/gdb.base-hp/pxdb.exp: Update.
* gdb.hp/gdb.base-hp/sized-enum.exp: Update.
* gdb.hp/gdb.base-hp/so-thresh.exp: Update.
* gdb.hp/gdb.compat/xdb1.exp: Update.
* gdb.hp/gdb.compat/xdb2.exp: Update.
* gdb.hp/gdb.compat/xdb3.exp: Update.
* gdb.hp/gdb.defects/bs14602.exp: Update.
* gdb.hp/gdb.defects/solib-d.exp: Update.
* gdb.hp/gdb.objdbg/objdbg01.exp: Update.
* gdb.hp/gdb.objdbg/objdbg02.exp: Update.
* gdb.hp/gdb.objdbg/objdbg03.exp: Update.
* gdb.hp/gdb.objdbg/objdbg04.exp: Update.
* gdb.mi/gdb792.exp: Update.
* gdb.mi/mi-pending.exp: Update.
* gdb.mi/mi-solib.exp: Update.
* gdb.mi/mi-var-cp.exp: Update.
* gdb.opt/clobbered-registers-O2.exp: Update.
* gdb.opt/inline-bt.exp: Update.
* gdb.opt/inline-cmds.exp: Update.
* gdb.opt/inline-locals.exp: Update.
* gdb.python/py-events.exp: Update.
* gdb.python/py-finish-breakpoint.exp: Update.
* gdb.python/py-type.exp: Update.
* gdb.reverse/solib-precsave.exp: Update.
* gdb.reverse/solib-reverse.exp: Update.
* gdb.server/solib-list.exp: Update.
* gdb.stabs/weird.exp: Update.
* gdb.threads/attach-into-signal.exp: Update.
* gdb.threads/attach-stopped.exp: Update.
* gdb.threads/tls-shared.exp: Update.
* gdb.trace/change-loc.exp: Update.
* gdb.trace/strace.exp: Update.
|
|
* gdb.ada/Makefile.in (clean): Ditto.
* gdb.arch/Makefile.in (clean): Ditto.
* gdb.asm/Makefile.in (clean): Ditto.
* gdb.base/Makefile.in (clean): Ditto.
* gdb.cell/Makefile.in (clean): Ditto.
* gdb.cp/Makefile.in (clean): Ditto.
* gdb.disasm/Makefile.in (clean): Ditto.
* gdb.dwarf2/Makefile.in (clean): Ditto.
* gdb.fortran/Makefile.in (clean): Ditto.
* gdb.go/Makefile.in (clean): Ditto.
* gdb.hp/Makefile.in (clean): Ditto.
* gdb.hp/gdb.aCC/Makefile.in (clean): Ditto.
* gdb.hp/gdb.base-hp/Makefile.in (clean): Ditto.
* gdb.hp/gdb.compat/Makefile.in (clean): Ditto.
* gdb.hp/gdb.defects/Makefile.in (clean): Ditto.
* gdb.hp/gdb.objdbg/Makefile.in (clean): Ditto.
* gdb.java/Makefile.in (clean): Ditto.
* gdb.linespec/Makefile.in (clean): Ditto.
* gdb.mi/Makefile.in (clean): Ditto.
* gdb.modula2/Makefile.in (clean): Ditto.
* gdb.multi/Makefile.in (clean): Ditto.
* gdb.objc/Makefile.in (clean): Ditto.
* gdb.opencl/Makefile.in (clean): Ditto.
* gdb.opt/Makefile.in (clean): Ditto.
* gdb.pascal/Makefile.in (clean): Ditto.
* gdb.python/Makefile.in (clean): Ditto.
* gdb.reverse/Makefile.in (clean): Ditto.
* gdb.server/Makefile.in (clean): Ditto.
* gdb.stabs/Makefile.in (clean): Ditto.
* gdb.threads/Makefile.in (clean): Ditto.
* gdb.trace/Makefile.in (clean): Ditto.
* gdb.xml/Makefile.in (clean): Ditto.
|
|
Fix false FAIL on distros with relro linkage as default.
* gdb.reverse/solib-precsave.exp: Try to compile the test using
-Wl,-z,norelro first.
|
|
Support processors without SSSE3.
* gdb.reverse/i386-sse-reverse.c (sse_test): Move pabsb, pabsw and
pabsd into ...
(ssse3_test): ... a new function.
(main): Call ssse3_test.
* gdb.reverse/i386-sse-reverse.exp: New variable end_ssse3_test.
Update expected values everywhere.
(reverse-step to pabsd, verify xmm0 after reverse pabsd)
(verify xmm1 after reverse pabsd, verify xmm2 after reverse pabsd)
(reverse-step to pabsw, verify xmm0 after reverse pabsw)
(verify xmm1 after reverse pabsw, verify xmm2 after reverse pabsw)
(reverse-step to pabsb, verify xmm0 after reverse pabsb)
(verify xmm1 after reverse pabsb, verify xmm2 after reverse pabsb):
Move these tests lower.
(set breakpoint at end of ssse3_test, continue to end of ssse3_test)
(verify xmm0 at end of ssse3_test, verify xmm1 at end of ssse3_test)
(verify xmm2 at end of ssse3_test, continue to end of ssse3_test #2):
New tests.
|
|
* gdb.base/annota1.c [__sh__]: Remove any special-casing.
* gdb.base/annota3.c: Likewise.
* gdb.base/sigall.c: Likewise.
* gdb.base/signals.c: Likewise.
* gdb.reverse/sigall-reverse.c: Likewise.
|