From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29654 invoked by alias); 28 Feb 2013 09:46:18 -0000 Mailing-List: contact archer-commits-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: Received: (qmail 29377 invoked by uid 9514); 28 Feb 2013 09:46:15 -0000 Date: Thu, 28 Feb 2013 09:46:00 -0000 Message-ID: <20130228094615.29362.qmail@sourceware.org> From: pmuldoon@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] pmuldoon/python-backtrace: Merge remote-tracking branch 'gdb/master' into pmuldoon/python-backtrace X-Git-Refname: refs/heads/pmuldoon/python-backtrace X-Git-Reftype: branch X-Git-Oldrev: 3920788b2863520474fb37b4b333edee8cae84d0 X-Git-Newrev: eb06aa7cb8d8767fc52170a21cdc9e574bc4c1cd X-SW-Source: 2013-q1/txt/msg00204.txt.bz2 List-Id: The branch, pmuldoon/python-backtrace has been updated via eb06aa7cb8d8767fc52170a21cdc9e574bc4c1cd (commit) via 9b3d351fbd7a903ad4da9f9e9a654344a43e6ba1 (commit) via 8f9033e47ef46907343b53bafbed3d5549194870 (commit) via d553b22ba5a611eb42962b5d620e48c44dbd732c (commit) via 8030f6600cb4cc512b0e9eb539f3e7a15630a553 (commit) via 621259858ec670c217843a3a48acd5bc789cd001 (commit) via 5716ab79df45a7ba8e4717726b7cc0467e0a27e0 (commit) via 2d00f9f7698b624c0c46fa026f0965ce52801605 (commit) via 87d6ac5f28766d6cbe5b39104c7fd67d8591a20e (commit) via 1d14ca56409b5ce6472623c10cde009ca5a29a19 (commit) via ac647b5006be36a915d2efdb5733e54e2fac4dce (commit) via 579461a43ac1890f39b571d0c0efda846263be8c (commit) via 38c3c26c5e751a437f10f58cf58c99de1e242642 (commit) via c71fe3d967ea74866990ef1d109691e1002300d4 (commit) via 780aa79fa4ce360487bed6e6428d989f5457ecf8 (commit) via b9acb689c9d6c54e9ec304e816fe490c3991faf9 (commit) via 5b547fb74d1e39e66f6884addfb94007245b0e54 (commit) via ede57e81be6791a3a43157f1d10909c386a38fbf (commit) via 225cc5bbdd8aab1e38a53e75d9a7c6ddb3ecdaf6 (commit) via 7ba9038443b61a4de2c4181a75b2aebd033d0c03 (commit) from 3920788b2863520474fb37b4b333edee8cae84d0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit eb06aa7cb8d8767fc52170a21cdc9e574bc4c1cd Merge: 3920788 9b3d351 Author: Phil Muldoon Date: Thu Feb 28 09:45:55 2013 +0000 Merge remote-tracking branch 'gdb/master' into pmuldoon/python-backtrace commit 9b3d351fbd7a903ad4da9f9e9a654344a43e6ba1 Author: qiyao Date: Thu Feb 28 01:21:08 2013 +0000 gdb/gdbserver/ * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of pulongest. commit 8f9033e47ef46907343b53bafbed3d5549194870 Author: qiyao Date: Thu Feb 28 00:42:18 2013 +0000 gdb/gdbserver/ * gdb.trace/report.exp: Move some code to ... (use_collected_data): New. (top level): Call use_collected_data once on the live target. Save at file of the current trace session, load it with target tfile, and call use_collected_data again. commit d553b22ba5a611eb42962b5d620e48c44dbd732c Author: gdbadmin Date: Thu Feb 28 00:00:34 2013 +0000 *** empty log message *** commit 8030f6600cb4cc512b0e9eb539f3e7a15630a553 Author: Alan Modra Date: Wed Feb 27 23:00:07 2013 +0000 daily update commit 621259858ec670c217843a3a48acd5bc789cd001 Author: DJ Delorie Date: Wed Feb 27 21:39:17 2013 +0000 * reloc.c (BFD_RELOC_RL78_CODE): Add. * libbfd.h: Regenerate. * bfd-in2.h: Regenerate. * elf32-rl78.c (rl78_elf_relocate_section): Handle weak code references in compuated relocs. * config/tc-rl78.c (reloc_function): Add %code -> BFD_RELOC_RL78_CODE. (rl78_op): Handle %code(). (rl78_cons_fix_new): Likewise, but ignore for 20-bit operands. (tc_gen_reloc): Likwise; convert to a computed reloc. (md_apply_fix): Likewise. commit 5716ab79df45a7ba8e4717726b7cc0467e0a27e0 Author: Corinna Vinschen Date: Wed Feb 27 19:42:23 2013 +0000 * windows-nat.c: Throughout, fix format strings and casts of printf-like functions to avoid type related warnings on all platforms. (handle_output_debug_string): Fetch context information address from debug string using string_to_core_addr. commit 2d00f9f7698b624c0c46fa026f0965ce52801605 Author: Jan Kratochvil Date: Wed Feb 27 18:48:23 2013 +0000 gdb/testsuite/ * gdb.threads/fork-thread-pending.c (main): Add alarm. commit 87d6ac5f28766d6cbe5b39104c7fd67d8591a20e Author: Jan Kratochvil Date: Wed Feb 27 18:46:51 2013 +0000 gdb/testsuite/ * gdb.base/valgrind-infcall.exp (valgrind_pid): New variable. Add final kill of ${valgrind_pid}. commit 1d14ca56409b5ce6472623c10cde009ca5a29a19 Author: jiwang Date: Wed Feb 27 14:58:13 2013 +0000 gdb/ * regformats/reg-tilegx.dat (name): Change abi name to "tilegx". * regformats/reg-tilegx32.dat: New. gdbserver/ * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c. (reg-tilegx32.c): New rule. * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj. * linux-tile-low.c (tile_arch_setup): New function. Invoke different register info initializer according to elf class. (init_registers_tilgx32): New function. The tilegx32 register info initializer. (tile_fill_gregset): Use "uint_reg_t" to represent register size. (tile_store_gregset): Likewise. commit ac647b5006be36a915d2efdb5733e54e2fac4dce Author: jiwang Date: Wed Feb 27 14:49:14 2013 +0000 gdb/ * configure.tgt (tilegx-*-linux*): Enable gdbserver. commit 579461a43ac1890f39b571d0c0efda846263be8c Author: jiwang Date: Wed Feb 27 14:47:11 2013 +0000 gdb/ * configure.tgt (tilegx-*-linux*): Replace whitespace with tab. commit 38c3c26c5e751a437f10f58cf58c99de1e242642 Author: qiyao Date: Wed Feb 27 13:31:38 2013 +0000 gdb/gdbserver/ * server.c (process_point_options): Print debug message when debug_threads is true. commit c71fe3d967ea74866990ef1d109691e1002300d4 Author: Alan Modra Date: Wed Feb 27 03:00:43 2013 +0000 * rl78-decode.opc (rl78_decode_opcode): Fix typo. * rl78-decode.c: Regenerate. commit 780aa79fa4ce360487bed6e6428d989f5457ecf8 Author: qiyao Date: Wed Feb 27 01:39:26 2013 +0000 gdb/ 2013-02-27 Yao Qi Pedro Alves * tracepoint.c (tfile_trace_find): For tfind pc/tp/range/outside, look for the next trace frame instead of always starting from frame 0. commit b9acb689c9d6c54e9ec304e816fe490c3991faf9 Author: gdbadmin Date: Wed Feb 27 00:00:04 2013 +0000 *** empty log message *** commit 5b547fb74d1e39e66f6884addfb94007245b0e54 Author: Alan Modra Date: Tue Feb 26 23:00:06 2013 +0000 daily update commit ede57e81be6791a3a43157f1d10909c386a38fbf Author: Anthony Green Date: Tue Feb 26 22:12:44 2013 +0000 Add moxie-*-rtems* support. commit 225cc5bbdd8aab1e38a53e75d9a7c6ddb3ecdaf6 Author: Anthony Green Date: Tue Feb 26 22:07:53 2013 +0000 Tweak moxie-rtems triplet recognition commit 7ba9038443b61a4de2c4181a75b2aebd033d0c03 Author: qiyao Date: Tue Feb 26 14:11:57 2013 +0000 gdb/gdbserver/ * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF. ----------------------------------------------------------------------- Summary of changes: bfd/ChangeLog | 12 + bfd/bfd-in2.h | 1 + bfd/config.bfd | 2 +- bfd/elf32-rl78.c | 2 + bfd/libbfd.h | 1 + bfd/reloc.c | 2 + bfd/version.h | 2 +- gdb/ChangeLog | 32 ++ gdb/configure.tgt | 9 +- gdb/gdbserver/ChangeLog | 26 ++ gdb/gdbserver/Makefile.in | 3 + gdb/gdbserver/configure.srv | 1 + gdb/gdbserver/linux-tile-low.c | 31 ++- gdb/gdbserver/server.c | 3 +- gdb/gdbserver/tracepoint.c | 3 +- gdb/regformats/reg-tilegx.dat | 2 +- gdb/testsuite/ChangeLog | 17 + gdb/testsuite/gdb.base/valgrind-infcall.exp | 4 + gdb/testsuite/gdb.threads/fork-thread-pending.c | 2 + gdb/testsuite/gdb.trace/report.exp | 313 ++++++++++-------- gdb/tracepoint.c | 61 ++-- gdb/version.in | 2 +- gdb/windows-nat.c | 66 ++-- opcodes/ChangeLog | 5 + opcodes/rl78-decode.c | 403 ++++++++++++----------- opcodes/rl78-decode.opc | 2 +- 26 files changed, 592 insertions(+), 415 deletions(-) First 500 lines of diff: diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 99c7c2b..27746f2 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,15 @@ +2013-02-27 DJ Delorie + + * reloc.c (BFD_RELOC_RL78_CODE): Add. + * libbfd.h: Regenerate. + * bfd-in2.h: Regenerate. + * elf32-rl78.c (rl78_elf_relocate_section): Handle weak code + references in compuated relocs. + +2013-02-26 Anthony Green + + * config.bfd: Extend moxie-rtems target triplet name support. + 2013-02-21 H.J. Lu PR ld/15167 diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 6dfd17f..524e97e 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -4239,6 +4239,7 @@ in .byte hlo8(symbol) */ BFD_RELOC_RL78_HI16, BFD_RELOC_RL78_HI8, BFD_RELOC_RL78_LO16, + BFD_RELOC_RL78_CODE, /* Renesas RX Relocations. */ BFD_RELOC_RX_NEG8, diff --git a/bfd/config.bfd b/bfd/config.bfd index 0f75b0b..ade2731 100644 --- a/bfd/config.bfd +++ b/bfd/config.bfd @@ -436,7 +436,7 @@ case "${targ}" in targ_selvecs=bfd_elf32_frv_vec ;; - moxie-*-elf | moxie-*-rtems | moxie-*-uclinux) + moxie-*-elf | moxie-*-rtems* | moxie-*-uclinux) targ_defvec=bfd_elf32_bigmoxie_vec targ_selvecs=bfd_elf32_littlemoxie_vec ;; diff --git a/bfd/elf32-rl78.c b/bfd/elf32-rl78.c index 3a46c6b..ea9a076 100644 --- a/bfd/elf32-rl78.c +++ b/bfd/elf32-rl78.c @@ -778,6 +778,8 @@ rl78_elf_relocate_section + sec->output_section->vma + sec->output_offset + rel->r_addend); + else if (h->root.type == bfd_link_hash_undefweak) + RL78_STACK_PUSH (0); else _bfd_error_handler (_("Warning: RL78_SYM reloc with an unknown symbol")); } diff --git a/bfd/libbfd.h b/bfd/libbfd.h index bcd76a0..857d1ea 100644 --- a/bfd/libbfd.h +++ b/bfd/libbfd.h @@ -1970,6 +1970,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_RL78_HI16", "BFD_RELOC_RL78_HI8", "BFD_RELOC_RL78_LO16", + "BFD_RELOC_RL78_CODE", "BFD_RELOC_RX_NEG8", "BFD_RELOC_RX_NEG16", "BFD_RELOC_RX_NEG24", diff --git a/bfd/reloc.c b/bfd/reloc.c index 626c818..b59ca00 100644 --- a/bfd/reloc.c +++ b/bfd/reloc.c @@ -4560,6 +4560,8 @@ ENUMX BFD_RELOC_RL78_HI8 ENUMX BFD_RELOC_RL78_LO16 +ENUMX + BFD_RELOC_RL78_CODE ENUMDOC Renesas RL78 Relocations. diff --git a/bfd/version.h b/bfd/version.h index 8811919..c80f9a6 100644 --- a/bfd/version.h +++ b/bfd/version.h @@ -1,4 +1,4 @@ -#define BFD_VERSION_DATE 20130226 +#define BFD_VERSION_DATE 20130228 #define BFD_VERSION @bfd_version@ #define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@ #define REPORT_BUGS_TO @report_bugs_to@ diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a308ba8..a3bdecd 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,35 @@ +2013-02-27 Corinna Vinschen + + * windows-nat.c: Throughout, fix format strings and casts of + printf-like functions to avoid type related warnings on all + platforms. + (handle_output_debug_string): Fetch context information address + from debug string using string_to_core_addr. + +2013-02-27 Jiong Wang + + * regformats/reg-tilegx.dat (name): Change abi name to "tilegx". + * regformats/reg-tilegx32.dat: New. + +2013-02-27 Jiong Wang + + * configure.tgt (tilegx-*-linux*): Enable gdbserver. + +2013-02-27 Jiong Wang + + * configure.tgt (tilegx-*-linux*): Replace whitespace with tab. + +2013-02-27 Yao Qi + Pedro Alves + + * tracepoint.c (tfile_trace_find): For tfind + pc/tp/range/outside, look for the next trace frame instead of + always starting from frame 0. + +2013-02-26 Anthony Green + + * configure.tgt: Add support for moxie-*-rtems* target. + 2013-02-25 Pedro Alves * common/linux-ptrace.c (linux_ptrace_test_ret_to_nx): Change diff --git a/gdb/configure.tgt b/gdb/configure.tgt index feb2059..77dc37c 100644 --- a/gdb/configure.tgt +++ b/gdb/configure.tgt @@ -139,7 +139,7 @@ frv-*-*) gdb_sim=../sim/frv/libsim.a ;; -moxie-*-elf) +moxie-*-elf | moxie-*-rtems*) gdb_target_obs="moxie-tdep.o" gdb_sim=../sim/moxie/libsim.a ;; @@ -596,10 +596,11 @@ tic6x-*-*) ;; tilegx-*-linux*) - # Target: TILE-Gx - gdb_target_obs="tilegx-tdep.o tilegx-linux-tdep.o solib-svr4.o \ + # Target: TILE-Gx + gdb_target_obs="tilegx-tdep.o tilegx-linux-tdep.o solib-svr4.o \ symfile-mem.o glibc-tdep.o linux-tdep.o" - ;; + build_gdbserver=yes + ;; xstormy16-*-*) # Target: Sanyo Xstormy16a processor diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 88cd101..6e51f73 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,29 @@ +2013-02-28 Yao Qi + + * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of + pulongest. + +2013-02-27 Jiong Wang + + * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c. + (reg-tilegx32.c): New rule. + * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj. + * linux-tile-low.c (tile_arch_setup): New function. Invoke + different register info initializer according to elf class. + (init_registers_tilgx32): New function. The tilegx32 register info + initializer. + (tile_fill_gregset): Use "uint_reg_t" to represent register size. + (tile_store_gregset): Likewise. + +2013-02-27 Yao Qi + + * server.c (process_point_options): Print debug message when + debug_threads is true. + +2013-02-26 Yao Qi + + * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF. + 2013-02-19 Pedro Alves Kai Tietz diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in index dffe8ae..ee2c400 100644 --- a/gdb/gdbserver/Makefile.in +++ b/gdb/gdbserver/Makefile.in @@ -320,6 +320,7 @@ clean: rm -f reg-arm.c reg-bfin.c i386.c reg-ia64.c reg-m32r.c reg-m68k.c rm -f reg-sh.c reg-sparc.c reg-spu.c amd64.c i386-linux.c rm -f reg-cris.c reg-crisv32.c amd64-linux.c reg-xtensa.c + rm -f reg-tilegx.c reg-tilegx32.c rm -f arm-with-iwmmxt.c rm -f arm-with-vfpv2.c arm-with-vfpv3.c arm-with-neon.c rm -f mips-linux.c mips64-linux.c @@ -694,6 +695,8 @@ reg-xtensa.c : $(srcdir)/../regformats/reg-xtensa.dat $(regdat_sh) $(SHELL) $(regdat_sh) $(srcdir)/../regformats/reg-xtensa.dat reg-xtensa.c reg-tilegx.c : $(srcdir)/../regformats/reg-tilegx.dat $(regdat_sh) $(SHELL) $(regdat_sh) $(srcdir)/../regformats/reg-tilegx.dat reg-tilegx.c +reg-tilegx32.c : $(srcdir)/../regformats/reg-tilegx32.dat $(regdat_sh) + $(SHELL) $(regdat_sh) $(srcdir)/../regformats/reg-tilegx32.dat reg-tilegx32.c # # Dependency tracking. Most of this is conditional on GNU Make being diff --git a/gdb/gdbserver/configure.srv b/gdb/gdbserver/configure.srv index 93c499c..b9a99d0 100644 --- a/gdb/gdbserver/configure.srv +++ b/gdb/gdbserver/configure.srv @@ -333,6 +333,7 @@ case "${target}" in srv_linux_regsets=yes ;; tilegx-*-linux*) srv_regobj=reg-tilegx.o + srv_regobj="${srv_regobj} reg-tilegx32.o" srv_tgtobj="linux-low.o linux-tile-low.o linux-osdata.o linux-procfs.o" srv_tgtobj="${srv_tgtobj} linux-ptrace.o" srv_linux_regsets=yes diff --git a/gdb/gdbserver/linux-tile-low.c b/gdb/gdbserver/linux-tile-low.c index c73bdf2..f242675 100644 --- a/gdb/gdbserver/linux-tile-low.c +++ b/gdb/gdbserver/linux-tile-low.c @@ -20,10 +20,13 @@ #include "server.h" #include "linux-low.h" +#include #include -/* Defined in auto-generated file reg-tile.c. */ -void init_registers_tile (void); +/* Defined in auto-generated file reg-tilegx.c. */ +void init_registers_tilegx (void); +/* Defined in auto-generated file reg-tilegx32.c. */ +void init_registers_tilegx32 (void); #define tile_num_regs 65 @@ -103,7 +106,7 @@ tile_fill_gregset (struct regcache *regcache, void *buf) for (i = 0; i < tile_num_regs; i++) if (tile_regmap[i] != -1) - collect_register (regcache, i, ((unsigned int *) buf) + tile_regmap[i]); + collect_register (regcache, i, ((uint_reg_t *) buf) + tile_regmap[i]); } static void @@ -113,7 +116,7 @@ tile_store_gregset (struct regcache *regcache, const void *buf) for (i = 0; i < tile_num_regs; i++) if (tile_regmap[i] != -1) - supply_register (regcache, i, ((unsigned long *) buf) + tile_regmap[i]); + supply_register (regcache, i, ((uint_reg_t *) buf) + tile_regmap[i]); } struct regset_info target_regsets[] = @@ -123,9 +126,27 @@ struct regset_info target_regsets[] = { 0, 0, 0, -1, -1, NULL, NULL } }; +static void +tile_arch_setup (void) +{ + int pid = pid_of (get_thread_lwp (current_inferior)); + unsigned int machine; + int is_elf64 = linux_pid_exe_is_elf_64_file (pid, &machine); + + if (sizeof (void *) == 4) + if (is_elf64 > 0) + error (_("Can't debug 64-bit process with 32-bit GDBserver")); + + if (!is_elf64) + init_registers_tilegx32(); + else + init_registers_tilegx(); +} + + struct linux_target_ops the_low_target = { - init_registers_tile, + tile_arch_setup, tile_num_regs, tile_regmap, NULL, diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c index 371647c..768eae7 100644 --- a/gdb/gdbserver/server.c +++ b/gdb/gdbserver/server.c @@ -2860,7 +2860,8 @@ process_point_options (CORE_ADDR point_addr, char **packet) if (*dataptr == 'X') { /* Conditional expression. */ - fprintf (stderr, "Found breakpoint condition.\n"); + if (debug_threads) + fprintf (stderr, "Found breakpoint condition.\n"); add_breakpoint_condition (point_addr, &dataptr); } else if (strncmp (dataptr, "cmds:", strlen ("cmds:")) == 0) diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c index 95c55ad..0f83ae6 100644 --- a/gdb/gdbserver/tracepoint.c +++ b/gdb/gdbserver/tracepoint.c @@ -3969,7 +3969,7 @@ cmd_qtbuffer (char *own_buf) unpack_varlen_hex (packet, &num); trace_debug ("Want to get trace buffer, %d bytes at offset 0x%s", - (int) num, pulongest (offset)); + (int) num, phex_nz (offset, 0)); tot = (trace_buffer_hi - trace_buffer_lo) - free_space (); @@ -4002,7 +4002,6 @@ cmd_qtbuffer (char *own_buf) num = (PBUFSIZ - 16) / 2; convert_int_to_ascii (tbp, own_buf, num); - own_buf[num] = '\0'; } static void diff --git a/gdb/regformats/reg-tilegx.dat b/gdb/regformats/reg-tilegx.dat index fc971f9..588252f 100644 --- a/gdb/regformats/reg-tilegx.dat +++ b/gdb/regformats/reg-tilegx.dat @@ -1,4 +1,4 @@ -name:tile +name:tilegx expedite:sp,lr,pc 64:r0 64:r1 diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 3a8a8e1..54f0e3c 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,20 @@ +2013-02-28 Yao Qi + + * gdb.trace/report.exp: Move some code to ... + (use_collected_data): New. + (top level): Call use_collected_data once on the live target. + Save at file of the current trace session, load it with target + tfile, and call use_collected_data again. + +2013-02-27 Jan Kratochvil + + * gdb.threads/fork-thread-pending.c (main): Add alarm. + +2013-02-27 Jan Kratochvil + + * gdb.base/valgrind-infcall.exp (valgrind_pid): New variable. + Add final kill of ${valgrind_pid}. + 2013-02-20 Siva Chandra Reddy * gdb.python/py-arch.c: New test case diff --git a/gdb/testsuite/gdb.base/valgrind-infcall.exp b/gdb/testsuite/gdb.base/valgrind-infcall.exp index 50a273f..5ca83d4 100644 --- a/gdb/testsuite/gdb.base/valgrind-infcall.exp +++ b/gdb/testsuite/gdb.base/valgrind-infcall.exp @@ -79,6 +79,7 @@ gdb_test_multiple "" $test { } # Do not kill valgrind. +set valgrind_pid [exp_pid -i [board_info host fileid]] unset gdb_spawn_id set board [host_info name] unset_board_info fileid @@ -122,3 +123,6 @@ gdb_test_multiple $test $test { pass $test } } + +# Only if valgrind got stuck. +remote_exec host "kill -9 ${valgrind_pid}" diff --git a/gdb/testsuite/gdb.threads/fork-thread-pending.c b/gdb/testsuite/gdb.threads/fork-thread-pending.c index 43188bd..1c06c0b 100644 --- a/gdb/testsuite/gdb.threads/fork-thread-pending.c +++ b/gdb/testsuite/gdb.threads/fork-thread-pending.c @@ -94,6 +94,8 @@ main (void) int args[NUMTHREADS]; int i, j; + alarm (600); + i = pthread_barrier_init (&barrier, NULL, NUMTHREADS); assert (i == 0); diff --git a/gdb/testsuite/gdb.trace/report.exp b/gdb/testsuite/gdb.trace/report.exp index e8aa597..b32bca1 100644 --- a/gdb/testsuite/gdb.trace/report.exp +++ b/gdb/testsuite/gdb.trace/report.exp @@ -181,210 +181,243 @@ gdb_test "continue" \ gdb_test "tstop" ".*" "" -# -# 9.1 test the tdump command -# +gdb_tfind_test "9.1: init: make sure not debugging any trace frame" \ + "none" "-1" -set timeout 60 +# 9.3 help tdump -gdb_tfind_test "9.1: init: make sure not debugging any trace frame" "none" "-1" +gdb_test "help tdump" "Print everything collected at the current.*" \ + "9.3: help tdump" -gdb_tfind_test "9.1: find frame for TP $tdp1" "tracepoint $tdp1" \ +# Check the collected trace data from different sources, such as live +# inferior and tfile. + +proc use_collected_data { data_source } { with_test_prefix "${data_source}" { + global tdp1 tdp2 tdp3 tdp4 tdp5 tdp6 + global testline1 testline2 testline3 testline4 testline5 testline6 + global pcreg fpreg spreg + global srcfile srcdir subdir + global arg1 arg3 + global decimal hex gdb_prompt + # + # 9.1 test the tdump command + # + + set timeout 60 + + gdb_tfind_test "9.1: find frame for TP $tdp1" "tracepoint $tdp1" \ "\$tracepoint" "$tdp1" -# Nothing was collected at tdp1, so this tdump should be empty. -gdb_test "tdump" \ + # Nothing was collected at tdp1, so this tdump should be empty. + gdb_test "tdump" \ "Data collected at tracepoint $tdp1, trace frame $decimal:" \ "9.1: tdump, nothing collected" -gdb_tfind_test "9.1: find frame for TP $tdp2" "tracepoint $tdp2" \ + gdb_tfind_test "9.1: find frame for TP $tdp2" "tracepoint $tdp2" \ "\$tracepoint" "$tdp2" -# regs were collected at tdp2. -# How to match for the output of "info registers" on an unknown architecture? -# For now, assume that most architectures have a register called "pc". + # regs were collected at tdp2. + # How to match for the output of "info registers" on an unknown architecture? + # For now, assume that most architectures have a register called "pc". -gdb_test "tdump" \ - "\[\r\n\]$pcreg .*" \ - "9.1: tdump, regs collected" + gdb_test "tdump" \ + "\[\r\n\]$pcreg .*" \ + "9.1: tdump, regs collected" -gdb_tfind_test "9.1: find frame for TP $tdp3" "tracepoint $tdp3" \ + gdb_tfind_test "9.1: find frame for TP $tdp3" "tracepoint $tdp3" \ "\$tracepoint" "$tdp3" -# args were collected at tdp3 -gdb_test "tdump" \ + # args were collected at tdp3 + gdb_test "tdump" \ "depth = 3.*q1 = 2.*q2 = 2.*q3 = 3.*q4 = 4.*q5 = 5.*q6 = 6" \ "9.1: tdump, args collected" -gdb_tfind_test "9.1: find frame for TP $tdp4" "tracepoint $tdp4" \ + gdb_tfind_test "9.1: find frame for TP $tdp4" "tracepoint $tdp4" \ "\$tracepoint" "$tdp4" -# locals were collected at tdp4 -gdb_test "tdump" \ + # locals were collected at tdp4 + gdb_test "tdump" \ "q = 1" \ "9.1: tdump, locals collected" -gdb_tfind_test "9.1: find frame for TP $tdp5" "tracepoint $tdp5" \ + gdb_tfind_test "9.1: find frame for TP $tdp5" "tracepoint $tdp5" \ "\$tracepoint" "$tdp5" -# stack was collected at tdp5, plus the frame pointer -gdb_test "tdump" \ - ".$fpreg = .*$spreg @ 64 = .*" \ - "9.1: tdump, memrange collected" + # stack was collected at tdp5, plus the frame pointer + gdb_test "tdump" \ + ".$fpreg = .*$spreg @ 64 = .*" \ + "9.1: tdump, memrange collected" -gdb_tfind_test "9.1: find frame for TP $tdp6" "tracepoint $tdp6" \ + gdb_tfind_test "9.1: find frame for TP $tdp6" "tracepoint $tdp6" \ hooks/post-receive -- Repository for Project Archer.