diff options
author | Pedro Alves <palves@redhat.com> | 2016-03-31 19:28:47 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2016-03-31 19:28:47 +0100 |
commit | 64cdf930d9ed85e93ae55adbc20b0f9848ef863b (patch) | |
tree | 02dad0ba923b0897520d2e1e020d13ca342e1a89 /gdb/gdbserver/tracepoint.c | |
parent | 40dea8cbf6b40f159bdfab4f3d8ec9010c293e84 (diff) | |
download | gdb-64cdf930d9ed85e93ae55adbc20b0f9848ef863b.zip gdb-64cdf930d9ed85e93ae55adbc20b0f9848ef863b.tar.gz gdb-64cdf930d9ed85e93ae55adbc20b0f9848ef863b.tar.bz2 |
Add regression test for PR gdb/19858 (JIT code registration on attach)
This test would fail without the previous gdb/jit.c fix:
(gdb) attach 23031
Attaching to program: .../build/gdb/testsuite/outputs/gdb.base/jit/jit-main, process 23031
[...]
207 WAIT_FOR_GDB; i = 0; /* gdb break here 1 */
(gdb) PASS: gdb.base/jit.exp: attach: one_jit_test-2: attach
set var wait_for_gdb = 0
(gdb) PASS: gdb.base/jit.exp: attach: one_jit_test-2: set var wait_for_gdb = 0
info function ^jit_function
All functions matching regular expression "^jit_function":
(gdb) FAIL: gdb.base/jit.exp: attach: one_jit_test-2: info function ^jit_function
gdb/testsuite/ChangeLog:
2016-03-31 Pedro Alves <palves@redhat.com>
PR gdb/19858
* gdb.base/jit-main.c: Include unistd.h.
(ATTACH): Define to 0 if not already defined.
(wait_for_gdb, mypid): New globals.
(WAIT_FOR_GDB): New macro.
(MAIN): Set an alarm. Store the process's pid. Wait for GDB at
some breakpoint locations.
* gdb.base/jit.exp (clean_reattach, continue_to_test_location):
New procedures.
(one_jit_test): Add REATTACH parameter, and handle it. Use
continue_to_test_location.
(top level): Test attach, and adjusts calls to one_jit_test.
Diffstat (limited to 'gdb/gdbserver/tracepoint.c')
0 files changed, 0 insertions, 0 deletions