aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-07-30Remove isize output argument from fast_tracepoint_valid_atPierre Langlois9-20/+31
This patch removes the isize output argument from the fast_tracepoint_valid_at gdbarch hook. It was used to return the size of the instruction that needs to be replaced when installing a fast tracepoint. Instead of getting this value from the fast_tracepoint_valid_at hook, we can call the gdb_insn_length function. If we do not do this, then architectures which do not have a restriction on where to install the fast tracepoint will send uninitialized memory off to GDBserver. See remote_download_tracepoint: ~~~ int isize; if (gdbarch_fast_tracepoint_valid_at (target_gdbarch (), tpaddr, &isize, NULL)) xsnprintf (buf + strlen (buf), BUF_SIZE - strlen (buf), ":F%x", isize); ~~~ The default implementation of fast_tracepoint_valid_at will not set isize resulting in uninitialized memory being sent. Later on, GDBserver could use this information to compute a jump offset. gdb/ChangeLog: * arch-utils.c (default_fast_tracepoint_valid_at): Remove unused isize argument. * arch-utils.h (default_fast_tracepoint_valid_at): Likewise. * breakpoint.c (check_fast_tracepoint_sals): Adjust call to gdbarch_fast_tracepoint_valid_at. * gdbarch.sh (fast_tracepoint_valid_at): Remove isize argument. * gdbarch.h: Regenerate. * gdbarch.c: Regenerate. * i386-tdep.c (i386_fast_tracepoint_valid_at): Remove isize argument. Do not set it. * remote.c (remote_download_tracepoint): Adjust call to gdbarch_fast_tracepoint_valid_at. Call gdb_insn_length to get the instruction length.
2015-07-30Remove global variable arm_hwcapYao Qi2-7/+9
After previous patch, we don't need global variable arm_hwcap. This patch is to remove it. gdb/gdbserver: 2015-07-30 Yao Qi <yao.qi@linaro.org> * linux-arm-low.c (arm_hwcap): Remove it. (arm_read_description): New local variable arm_hwcap. Don't set arm_hwcap to zero.
2015-07-30Use regcache->tdesc instead of arm_hwcapYao Qi2-12/+20
arm_hwcap is a global variable, and we should avoid using it as much as we can. Instead of checking arm_hwcap, we can check whether regcache->tdesc is a certain kind of target description. This is what this patch does. gdb/gdbserver: 2015-07-30 Yao Qi <yao.qi@linaro.org> * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap. Use regcache->tdesc instead. (arm_store_wmmxregset): Likewise. (arm_fill_vfpregset): Likewise. (arm_store_vfpregset): Likewise.
2015-07-30Don't use arm_regmap and arm_num_regs in arm_fill_gregset and arm_store_gregsetYao Qi2-8/+20
In order to align with arm-linux-nat.c counterparts, we don't use arm_num_regs and arm_regmap in functions arm_fill_gregset and arm_store_gregset. Instead, we use register numbers. With this patch applied, arm_fill_gregset and arm_store_gregset don't need arm_num_regs and arm_regmap, and they will be moved to a separate file shared for both arm and aarch64 in the following patch. gdb/gdbserver: 2015-07-30 Yao Qi <yao.qi@linaro.org> * linux-arm-low.c: Include arch/arm.h. (arm_fill_gregset): Don't use arm_num_regs and arm_regmap. (arm_store_gregset): Likewise.
2015-07-30Move ARM register numbers enum to arch/arm.hYao Qi4-39/+69
This patch moves ARM register numbers enum to arch/arm.h, so that it can used by GDBserver too. This patch also creates a new directory gdb/arch in which arch-specific or target-specific files are placed. gdb: 2015-07-30 Yao Qi <yao.qi@linaro.org> * arm-tdep.h (enum gdb_regnum): Move it to ... * arch/arm.h: ... here. New file. * Makefile.in (HFILES_NO_SRCDIR): Add arch/arm.h.
2015-07-30[AArch64] Rename boolean arguments in decoding functionsPierre Langlois2-24/+37
This patch cleans up the decoding functions using booleans when they can decode two instructions. The boolean argument is used to know which of the two instructions was decoded. The instructions affected are BR/BLR, B/BL, CBZ/CBNZ and TBZ/TBNZ. These arguments would be named after a named bit in the instruction encoding, this patch renames them to 'is_XXX'. Furthermore, the 'unsigned' type would be used to describe a boolean while aarch64_decode_cb would use 'int' (see the 'is64' argument). This patch makes all booleans be 'int' and decoded bitfields be 'unsigned'. gdb/ChangeLog: * aarch64-tdep.c (decode_b): Rename link argument to is_bl. Change its type to int *. (decode_br): Rename link argument to is_blr. Change its type to int *. (decode_cb): Rename op argument to is_cbnz. Change its type to int *. (decode_tb): Rename op argument to is_tbnz. Change its type to int *. Set is_tbnz to either 1 or 0. (aarch64_analyze_prologue): Change type of is_link to int. Add new variables is_cbnz and is_tbnz. Adjust call to aarch64_decode_cb and aarch64_decode_tb.
2015-07-30Properly disassemble movnti in Intel modeH.J. Lu6-5/+354
gas/testsuite/ PR binutils/13571 * gas/i386/i386.exp: Run i386-intel and x86_64-intel. * gas/i386/i386-intel.d: New file. * gas/i386/x86_64-intel.d: Likewise. opcodes/ PR binutils/13571 * i386-dis.c (MOD_0FC3): New. (PREFIX_0FC3): Renamed to ... (PREFIX_MOD_0_0FC3): This. (dis386_twobyte): Replace PREFIX_0FC3 with MOD_0FC3. (prefix_table): Replace Ma with Ev on movntiS. (mod_table): Add MOD_0FC3.
2015-07-30Don't change the default symbol for relocatable linkH.J. Lu5-9/+52
We should change the default symbol for the versioned symbol only when not performing a relocatable link. bfd/ PR ld/18735 * elflink.c (_bfd_elf_add_default_symbol): Add the default symbol if not performing a relocatable link. (elf_link_add_object_symbols): Adjust the default symbol if not performing a relocatable link. ld/testsuite/ PR ld/18735 * ld-elf/pr18735.d: New file. * ld-elf/pr18735.s: Likewise.
2015-07-30Automatic date update in version.inGDB Administrator1-1/+1
2015-07-29MIPS ptrace build fixesSimon Marchi5-4/+16
Since Pedro's ptrace cleanups, the MIPS buildbot compilation fails. Code in MIPS native uses ptrace with 3 arguments, where ptrace requires 4. When looking at the definition of ptrace in /usr/include/sys/ptrace.h, it shows that it takes a variable number of arguments. The wrapper macro in nat/gdb_ptrace.h takes a fixed number of arguments (4). That would explain why it used to work and stopped. I am pushing this as obvious, tell me if there is any problem. I built-tested this with a MIPS toolchain (ct-ng), but I don't have any setup to test it. At least it should put back the buildbot builder in a better shape. gdb/ChangeLog: * mips-linux-nat.c (write_watchpoint_regs): Add NULL as ptrace's 4th parameter. (mips_linux_new_thread): Likewise. * nat/mips-linux-watch.c (mips_linux_read_watch_registers): Likewise. gdb/gdbserver/ChangeLog: * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as ptrace's 4th parameter.
2015-07-29batch-preserve-term-settings.exp: use send_quit_command some morePatrick Palka2-17/+7
Just a slight cleanup. Committed as obvious. gdb/testsuite/ChangeLog: * gdb.base/batch-preserve-term-settings.exp (test_terminal_settings_preserved_after_cli_exit): Use send_quit_command.
2015-07-29Use noclone attribute only for GCC 4.5 or newerH.J. Lu2-0/+9
noclone attribute was added to GCC 4.5. We should check GCC version before using it. * ld-elf/pr18718.c (bar): Use noclone attribute only for GCC 4.5 or newer.
2015-07-29Move run-time support check for size relocationH.J. Lu2-14/+18
We must check run-time support for size relocation first before running the tests. * ld-size/size.exp: Move run-time support check.
2015-07-29Test that terminal settings are restored after quitting via SIGTERMPatrick Palka2-0/+122
Tested on x86_64 Debian Stretch, native, gdbserver and extended-gdbserver. Also tested that the various error paths, like if $PPID is empty or if SIGTERM did not not kill GDB, function correctly. gdb/testsuite/ChangeLog: * gdb.base/batch-preserve-term-settings.exp (send_quit_command): New proc. (test_terminal_settings_preserved_after_sigterm): New test.
2015-07-29Don't set link_info.executable for "ld -r"H.J. Lu4-5/+17
This patch changes "ld -r" not to set link_info.executable. It removes !info->relocatable check for info->executable and adds it for !info->executable in elflink.c. bfd/ * elflink.c (elf_link_add_object_symbols): Remove !info->relocatable check for info->executable. Add !info->relocatable check for !info->executable. (elf_link_output_extsym): Remove !info->relocatable check for info->executable. ld/ * lexsup.c (parse_args): Don't set link_info.executable to TRUE for link_info.relocatable.
2015-07-29Make gdb.base/multi-forks.exp work with the native-extended-gdbserver boardPedro Alves2-0/+8
Now that we can expect inferior output with the gdbserver boards, this is all it takes to have the test pass against extended-remote gdbserver. Don Breazeal originally wrong something like this: https://sourceware.org/ml/gdb-patches/2015-03/msg00506.html which was what originally inspired the introduction of $inferior_spawn_id. gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves <palves@redhat.com> Don Breazeal <donb@codesourcery.com> * gdb.base/multi-forks.exp (continue_to_exit_bp_loc): Expect output from both inferior_spawn_id and gdb_spawn_id.
2015-07-29Uniquefy gdb.threads/attach-into-signal.expSergio Durigan Junior2-61/+70
Hi, While examining BuildBot's logs, I noticed: <https://sourceware.org/ml/gdb-testers/2015-q3/msg03767.html> gdb.threads/attach-into-signal.exp has two nested loops and don't use unique messages. This commit fixes that. Pushed under the obvious rule. gdb/testsuite/ChangeLog: 2015-07-29 Sergio Durigan Junior <sergiodj@redhat.com> * gdb.threads/attach-into-signal.exp (corefunc): Use with_test_prefix on nested loops, uniquefying the test messages.
2015-07-29Fix typo in gdb.python/py-objfile.expSergio Durigan Junior2-1/+6
My last commit d60a92216e5d599fed6b37c58c744debe38a0b24 introduced a regression caused by a typo. This fixes it. Checked in as obvious. Thanks to Pedro for reporting. gdb/testsuite/ChangeLog: 2015-07-29 Sergio Durigan Junior <sergiodj@redhat.com> * gdb.python/py-objfile.exp: Fix typo that snuck in from my last commit.
2015-07-29Make sure terminal settings are restored before exitingPatrick Palka4-1/+125
When exiting GDB -- whether it's via the "quit" command, via a SIGTERM, or otherwise -- we should leave the terminal in the state we acquired it. To that end, we have to undo any modifications that may have been made by the TUI (ncurses) or by the CLI (readline). Tested on x86_64 Debian Stretch. gdb/ChangeLog: * top.c: Include "tui/tui.h". (undo_terminal_modifications_before_exit): New static function. (quit_force): Use it. gdb/testsuite/ChangeLog: * gdb.base/batch-preserve-term-settings.exp (test_terminal_settings_preserved_after_cli_exit): New test.
2015-07-29Initialize terminal_state to terminal_is_oursPatrick Palka2-1/+5
Right now this variable is initialized to 0 i.e. terminal_is_inferior and does not get set to terminal_is_ours until target_terminal_init() is called. This function however only gets called when an inferior is first created. In the meantime, terminal_state would wrongly remain set to terminal_is_inferior. Tested on x86_64 Debian Stretch -- native, gdbserver and extended-gdbserver. gdb/ChangeLog: * target.c (terminal_state): Initialize to terminal_is_ours.
2015-07-29Clean up batch-preserve-term-settings.expPatrick Palka2-13/+15
See ChangeLog for details. No functional change intended. Tested on x86_64 Debian Stretch by verifying that the gdb.log output remains unchanged for native, gdbserver and extended-gdbserver. gdb/testsuite/ChangeLog: * gdb.base/batch-preserve-term-settings.exp: Remove top-level manipulation of saved_gdbflags. (test_terminal_settings_preserved): Remove global declaration of the unused variable pagination_prompt. Remove manipulation of saved_gdbflags. Use a local variable EXTRA_GDBFLAGS instead of GDBFLAGS.
2015-07-29PR record/18691: Fix fails in solib-precsave.expYao Qi4-4/+16
We see the following regressions in testing on x86_64-linux, reverse-step^M Cannot access memory at address 0x2aaaaaed26c0^M (gdb) FAIL: gdb.reverse/solib-precsave.exp: reverse-step into solib function one when GDB reverse step into a function, GDB wants to skip prologue so it requests TARGET_OBJECT_CODE_MEMORY to read some code memory in memory_xfer_partial_1. However in dcache_read_memory_partial, the object becomes TARGET_OBJECT_MEMORY return ops->to_xfer_partial (ops, TARGET_OBJECT_MEMORY, NULL, myaddr, NULL, memaddr, len, xfered_len); in reverse debugging, ops->to_xfer_partial is record_full_core_xfer_partial and it will return TARGET_XFER_E_IO because it can't find any records. The test fails. At this moment, the delegate relationship is like dcache -> record-core -> core -> exec and we want to GDB read memory across targets, which means if the requested memory isn't found in record-core, GDB can read memory from core, and exec even further if needed. I find raw_memory_xfer_partial is exactly what I want. gdb: 2015-07-29 Yao Qi <yao.qi@linaro.org> PR record/18691 * dcache.c (dcache_read_memory_partial): Call raw_memory_xfer_partial. * target.c (raw_memory_xfer_partial): Make it non-static. * target.h (raw_memory_xfer_partial): Declare.
2015-07-29Don't set gdb,noinferiorio on gdbserver boardsPedro Alves2-3/+4
As all tests that check gdb,noinferiorio have been adjusted to expect inferior output with "-i $inferior_spawn_id", we can remove this now, and thus enable those tests against gdbserver. gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves <palves@redhat.com> * boards/gdbserver-base.exp: Don't set gdb,noinferiorio.
2015-07-29interrupt.exp: Revert back to checking gdb,noinferiorio at the topPedro Alves2-5/+10
The following patch will remove the gdb,noinferiorio setting from the gdbserver boards, so this bit can be reverted. gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves <palves@redhat.com> * gdb.base/interrupt.exp: Revert back to checking gdb,noinferiorio at the top.
2015-07-29Unbuffer all tests that rely on stdioPedro Alves16-6/+89
This forces all tests that rely on stdio to be unbuffered, like interrupt.exp was adjusted in 6f98576f. To recap, in some scenarios, GDB or GDBserver can be spawned with input _not_ connected to a tty, and then tests that rely on stdio fail with timeouts, because the inferior's stdout and stderr streams end up fully buffered. Calling gdb_unbuffer_output forces output to be unbuffered. See https://sourceware.org/ml/gdb-patches/2015-02/msg00809.html and https://sourceware.org/ml/gdb-patches/2015-02/msg00819.html. Tested on x86_64 Fedora 20, native, and against a remote gdbserver board file that connects to the target with ssh, with and without -t (create pty). gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves <palves@redhat.com> * gdb.base/call-ar-st.c: Include "../lib/unbuffer_output.c". (main): Call gdb_unbuffer_output. * gdb.base/call-rt-st.c: Include "../lib/unbuffer_output.c". (main): Call gdb_unbuffer_output. * gdb.base/call-strs.c: Include "../lib/unbuffer_output.c". (main): Call gdb_unbuffer_output. * gdb.base/call-strs.exp: Adjust to step over the gdb_unbuffer_output call. * gdb.base/catch-gdb-caused-signals.c: Include "../lib/unbuffer_output.c". (main): Call gdb_unbuffer_output. * gdb.base/dprintf.c: Include "../lib/unbuffer_output.c". (main): Call gdb_unbuffer_output. * gdb.base/ending-run.c: Include "../lib/unbuffer_output.c". (main): Call gdb_unbuffer_output. * gdb.base/run.c: Include "../lib/unbuffer_output.c". (main): Call gdb_unbuffer_output. * gdb.base/shlib-call.exp: Adjust to step over the gdb_unbuffer_output call. * gdb.base/shmain.c: Include "../lib/unbuffer_output.c". (main): Call gdb_unbuffer_output. * gdb.base/sizeof.c: Include "../lib/unbuffer_output.c". (main): Call gdb_unbuffer_output. * gdb.base/varargs.c: Include "../lib/unbuffer_output.c". (main): Rename to ... (test): ... this. (main): Reimplement. * gdb.base/varargs.exp: Run to test instead of to main. * gdb.mi/mi-dprintf.c: Include "../lib/unbuffer_output.c". (main): Call gdb_unbuffer_output.
2015-07-29Make gdb.mi/mi-dprintf.exp use $inferior_spawn_idPedro Alves2-32/+43
gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves <palves@redhat.com> * gdb.mi/mi-dprintf.exp (mi_expect_dprintf): New procedure, factore out from mi_continue_dprintf. For call-style dprintfs, expect dprintf output out of $inferior_spawn_id. (mi_continue_dprintf): Use mi_expect_dprintf. * gdb.mi/mi-dprintf.c: Include "../lib/unbuffer_output.c". (main): Call gdb_unbuffer_output.
2015-07-29Adjust MI to $inferior_spawn_idPedro Alves2-35/+30
Rather than trying to determine where (which spawn id) the inferior output comes out from, which depends on e.g., remote that supports file i/o remote protocol extension, vs remote that sends inferior output through a separate $inferior_spawn_id, vs native debugging, which sends output through $gdb_spawn_id, vs native debugging with a test that uses "separate-inferior-tty" (like mi-console.exp does), always expect inferior output from both $inferior_spawn_id and $gdb_spawn_id. mi-console.exp itself already copes with different possible outputs in a similar way: # Combine both outputs in a single pattern. set output "($semihosted_output|$native_output)" Fixes: FAIL: gdb.mi/mi-console.exp: Testing console output inferior output (timeout) when testing against local gdbserver with gdb,noinferiorio removed from the board file. gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves <palves@redhat.com> * lib/mi-support.exp (mi_inferior_spawn_id): Delete. (default_mi_gdb_start): Set inferior_spawn_id instead of mi_inferior_spawn_id. If $inferior_spawn_id is not set, set it to gdb_spawn_id. (mi_gdb_test): Always expect inferior output from both $inferior_spawn_id and $gdb_spawn_id.
2015-07-29Make gdb.gdb/selftest.exp use '-i $inferior_spawn_id'Pedro Alves2-5/+14
gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves <palves@redhat.com> * gdb.gdb/selftest.exp (test_with_self): Update comment. Use send_inferior and $inferior_spawn_id.
2015-07-29Make gdb.gdb/complaints.exp use '-i $inferior_spawn_id' and gdb_test_stdioPedro Alves2-46/+72
gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves <palves@redhat.com> * gdb.gdb/complaints.exp (test_initial_complaints) (test_serial_complaints, test_short_complaints): Use gdb_test_stdio. (test_empty_complaint): Handle $inferior_spawn_id != $gdb_spawn_id.
2015-07-29Make gdb.base/varargs.exp use gdb_test_stdioPedro Alves2-10/+19
gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves <palves@redhat.com> * gdb.base/varargs.exp: Use gdb_test_stdio.
2015-07-29Make gdb.base/shlib-call.exp use gdb_test_stdioPedro Alves2-8/+16
gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves <palves@redhat.com> * gdb.base/shlib-call.exp: Use gdb_test_stdio.
2015-07-29Make gdb.base/ending-run.exp use gdb_test_stdioPedro Alves2-3/+11
gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves <palves@redhat.com> * gdb.base/ending-run.exp: Use gdb_test_stdio.
2015-07-29Make gdb.base/call-rt-st.exp use $inferior_spawn_idPedro Alves2-15/+53
gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves <palves@redhat.com> * gdb.base/call-rt-st.exp (print_struct_call): Split "result" parameter into two new parameters, "inf_result" and "gdb_result". Expect inferior output and gdb output from $inferior_spawn_id and $gdb_spawn_id, respectively. Adjust all callers.
2015-07-29Make gdb.base/call-ar-st.exp use gdb_test_stdioPedro Alves2-201/+289
gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves <palves@redhat.com> * gdb.base/call-ar-st.exp: Use gdb_test_stdio+multi_line instead of gdb_test_sequence.
2015-07-29Make gdb.base/a2-run.exp use $inferior_spawn_id and gdb_test_stdioPedro Alves2-20/+77
This one is a little more complicated than the other patches in this series, because of the exit status wrapper handling, requiring a little state machine. gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves <palves@redhat.com> * gdb.base/a2-run.exp (saw_usage, saw_exit_wrapper) (saw_spurious_output): Expect inferior output from $inferior_spawn_id. Use gdb_test_stdio.
2015-07-29Make gdb.base/dprintf.exp use gdb_test_stdioPedro Alves2-44/+100
This one needed a larger revamp. The issue is that the "info breakpoints" test at the bottom of the file is broken on targets that can do both server-side dprintf, and inferior I/O, because then neither the breakpoint numbers match nor the "already hit N times" output. Address that by making the test restart gdb from scratch when switching between dprintf styles. Test groups are factored into procedures, and we now use with_test_prefix. While we're changing test messages, lowercase a few test messages, and then while at it, modernize a couple things here and there. gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves <palves@redhat.com> * gdb.base/dprintf.exp: Use standard_testfile. Change prepare_for_testing call. (srcfile): Don't set. (restart): New procedure. (test_dprintf): New procecure, use to continue over dprintfs. (test_call, test_agent): New procedures, tests moved here. Restart gdb and recreate dprintfs. Adjust expected output.
2015-07-29Make gdb.base/catch-gdb-caused-signals.exp use gdb_test_stdioPedro Alves2-1/+5
gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves <palves@redhat.com> * gdb.base/catch-gdb-caused-signals.exp: Use gdb_test_stdio.
2015-07-29Make gdb.base/call-strs.exp use gdb_test_stdioPedro Alves2-20/+34
gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves <palves@redhat.com> * gdb.base/call-strs.exp: Use gdb_test_stdio instead of gdb_test.
2015-07-29Make gdb.base/sizeof.exp use gdb_test_stdioPedro Alves2-4/+13
gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves <palves@redhat.com> * gdb.base/sizeof.exp (check_sizeof, check_valueof): Use gdb_test_stdio.
2015-07-29Introduce gdb_test_stdioPedro Alves2-0/+71
This adds a new helper procedure to be used by tests that rely on stdio. gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves <palves@redhat.com> * lib/gdb.exp (gdb_test_stdio): New procedure.
2015-07-29Don't rely on inferior I/O in gdb.base/restore.expPedro Alves2-14/+5
There seems to be no point in relying on stdio here. Simply use gdb_continue_to_end instead. (not removing the printf calls, as the .c file is half generated.) gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves <palves@redhat.com> * gdb.base/restore.exp (restore_tests): Use gdb_continue_to_end.
2015-07-29Don't rely on inferior I/O in {call-signal-resume, unwindonsignal}.expPedro Alves5-34/+16
These tests rely on inferior I/O, but that seems pointless and unrelated here. Simply remove the printf calls, and don't expect them. gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves <palves@redhat.com> * gdb.base/call-signal-resume.exp: Remove check for gdb,noinferiorio. Don't expect "no signal". Use gdb_test. * gdb.base/unwindonsignal.exp: Likewise. * gdb.base/call-signals.c (gen_signal): Remove printf call. * gdb.base/unwindonsignal.c (gen_signal): Likewise.
2015-07-29Don't rely on inferior I/O in gdb.base/siginfo-addr.expPedro Alves3-17/+16
No point in relying on stdio in this test. Simply run to a breakpoint instead. gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves <palves@redhat.com> * gdb.base/siginfo-addr.c (pass): New function. (handler): Call it iff si_addr is correct. * gdb.base/siginfo-addr.exp: Remove gdb_skip_stdio_test check. Set a breakpoint at "pass" and continue to it.
2015-07-29bfd/mmo.c (MMIX): Fix massive gcc LTO testsuite failures.Hans-Peter Nilsson2-47/+58
* mmo.c (mmo_write_symbols_and_terminator): Skip symbol-type assignment loop for bfd plugin objects.
2015-07-29Automatic date update in version.inGDB Administrator1-1/+1
2015-07-28Uniquify test names from gdb.python/{py-objfile.exp,py-pp-registration.exp}Sergio Durigan Junior3-9/+22
While running some regression tests, I noticed that the two Python tests mentioned in the $SUBJECT contain non-unique names. This is a violation of our guidelines: <https://sourceware.org/gdb/wiki/GDBTestcaseCookbook#Make_sure_test_messages_are_unique> And also makes things harder for BuildBot. So I hacked both testcases and made every test name unique. I guess this could be considered an obvious patch, but I decided to post it before pushing because others may have different opinions about the names. OK to apply? gdb/testsuite/ChangeLog: 2015-07-28 Sergio Durigan Junior <sergiodj@redhat.com> * gdb.python/py-objfile.exp: Make some tests have unique names. * gdb.python/py-pp-registration.exp: Likewise.
2015-07-28Fix gdb.server/server-exec-info.exp with the extended-remote boardPedro Alves2-0/+8
This test fails with --target_board=native-extended-gdbserver because it misses the usual "disconnect": (gdb) spawn ../gdbserver/gdbserver --once :2347 /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.server/server-exec-info Process /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.server/server-exec-info created; pid = 4736 Listening on port 2347 target extended-remote localhost:2347 Already connected to a remote target. Disconnect? (y or n) ^CsQuit (gdb) et sysroot remote: Undefined command: "et". Try "help". (gdb) n The program is not being run. (gdb) FAIL: gdb.server/server-exec-info.exp: set sysroot remote: (got interactive prompt) info files (gdb) FAIL: gdb.server/server-exec-info.exp: info files gdb/testsuite/ChangeLog: 2015-07-28 Pedro Alves <palves@redhat.com> * gdb.server/server-exec-info.exp: Issue a "disconnect".
2015-07-28Consider addressable memory unit size in various value functionsSimon Marchi8-57/+143
This patch updates various value handling functions to make them consider the addressable memory unit size of the current architecture. This allows to correctly extract and print values on architectures whose addressable memory unit is not 8 bits. The patch doesn't cover all the code that would ideally need to be adjusted, only the code paths that we happen to use, plus a few obvious ones. Specifically, those areas are not covered by this patch: - Management of unavailable bits - Bitfields - C++ stuff Regression-tested on x86-64 Ubuntu 14.04. I saw no related test result change. gdb/ChangeLog: * c-valprint.c (c_val_print_array): Consider addressable memory unit size. (c_val_print_ptr): Likewise. (c_val_print_int): Likewise. * findvar.c (read_frame_register_value): Likewise. * valarith.c (find_size_for_pointer_math): Likewise. (value_ptrdiff): Likewise. (value_subscripted_rvalue): Likewise. * valops.c (read_value_memory): Likewise (and rename variables). (value_assign): Likewise. (value_repeat): Likewise. (value_array): Likewise. (value_slice): Likewise. * valprint.c (generic_val_print_ptr): Likewise. (generic_val_print_enum): Likewise. (generic_val_print_bool): Likewise. (generic_val_print_int): Likewise. (generic_val_print_char): Likewise. (generic_val_print_float): Likewise. (generic_val_print_decfloat): Likewise. (generic_val_print_complex): Likewise. (val_print_scalar_formatted): Likewise. (val_print_array_elements): Likewise. * value.c (set_value_parent): Likewise. (value_contents_copy_raw): Likewise. (set_internalvar_component): Likewise. (value_primitive_field): Likewise. (value_fetch_lazy): Likewise. * value.h (read_value_memory): Update comment.
2015-07-28Introduce get_value_archSimon Marchi3-0/+17
Similar to get_type_arch, used to get the gdbarch associated to a struct value. gdb/ChangeLog: * value.c (get_value_arch): New function. * value.h (get_value_arch): New declaration.
2015-07-28Update comments in struct value for non-8-bits architecturesSimon Marchi2-15/+19
gdb/ChangeLog: * value.c (struct value): Update comments.