aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
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.
2015-07-28Update comment for struct type's length field, introduce type_length_unitsSimon Marchi3-25/+39
This patch tries to clean up a bit the blur around the length field in struct type, regarding its use with architectures with non-8-bits addressable memory. It clarifies that the field is expressed in host bytes, which is what is the closest to the current reality. It also introduces a new function to get the length of the type in target addressable memory units. gdb/ChangeLog: * gdbtypes.c (type_length_units): New function. * gdbtypes.h (type_length_units): New declaration. (struct type) <length>: Update comment.
2015-07-28Add cores for M5100 seriesRobert Suchanek3-0/+10
gas/ * config/tc-mips.c (mips_cpu_info_table): Add m5100 and m5101 entries. * doc/c-mips.texi: Document m5100 and m5101 for -march=.
2015-07-28Add -march=interaptivRobert Suchanek3-0/+8
gas/ * config/tc-mips.c (mips_cpu_info_table): Add interaptiv entry. * doc/c-mips.text: Document -march=interaptiv.
2015-07-28Fallout from "Reorder more powerpc64 sections for -z relro"Alan Modra4-13/+30
Commit 23283c1b changed the layout of some bss style sections on powerpc64, but neglected to add a page gap before the third PT_LOAD segment created by this reording. Without a page gap we get two PT_LOAD headers that overlap by one page in memory. That shouldn't be allowed because the dynamic loader will load garbage from the first page of the last segment over the last page of the previous segment. bfd/ * elf.c (_bfd_elf_map_sections_to_segments): Do not make a new segment for loaded sections after nonloaded sections if the sections are on the same page. ld/testsuite/ * ld-powerpc/elfv2so.d: Update
2015-07-28Check for asprintf and vasprintf during configure stage.Iain Buclaw4-0/+37
This should fix some build errors seen on AIX, MinGW, and possibly other non-GNU systems too due to missing asprintf(). bfd/ * configure.in: Add asprintf and vasprintf to AC_CHECK_DECLS. * config.in, configure: Regenerate.
2015-07-28Automatic date update in version.inGDB Administrator1-1/+1
2015-07-27Set NOPIE_CFLAGS and NOPIE_LDFLAGSH.J. Lu3-94/+276
GCC 6 can be configured to generate PIE by default. But some linker size tests expect non-PIE. This patch defines NOPIE_CFLAGS to "-fno-PIE" and NOPIE_LDFLAGS to "-no-pie" if target compiler supports them. Add $NOPIE_CFLAGS and $NOPIE_LDFLAGS to linker size tests if needed. * config/default.exp (NOPIE_CFLAGS): New. (NOPIE_LDFLAGS): Likewise. * ld-size/size.exp (run_cc_link_tests): Add $NOPIE_CFLAGS and $NOPIE_LDFLAGS if needed. (run_ld_link_exec_tests): Add $NOPIE_CFLAGS if needed.
2015-07-27gdb.mi/mi-pending.c: Return NULL instead of nothing in thread functionSimon Marchi2-2/+6
Using gcc 5.2 (maybe other versions as well), building mi-pending.c gives these warnings: ./gdb.mi/mi-pending.c: In function ‘thread_func’: ./gdb.mi/mi-pending.c:34:5: warning: ‘return’ with no value, in function returning non-void return; ^ ./gdb.mi/mi-pending.c:38:5: warning: ‘return’ with no value, in function returning non-void return; ^ gdb_compile_pthreads assumes that the build was successful only if there is no output. These warnings therefore make gdb_compile_pthreads think that the build failed, and the test doesn't run. The easy fix is to replace the "return" with "return NULL". I am pushing this as obvious. gdb/testsuite/ChangeLog: * gdb.mi/mi-pending.c (thread_func): Replace return with return NULL.
2015-07-27Remove xfail in gdb.mi/mi-watch.expSimon Marchi2-4/+4
I noticed there was an unexpected pass in mi-watch.exp when running on x86_64. Doing a bit of archeology shows that the xfail was added by 4a543da. This particular test failed on the MIPS architecture, which the original contributor was working with. Here is the thread: https://www.sourceware.org/ml/gdb-patches/2007-09/msg00151.html Looking at the latest buildbot results for MIPS, it seems that it's also an unexpected pass on that architecture. Therefore, I see no reason to leave the xfail in place. gdb/testsuite/ChangeLog: * gdb.mi/mi-watch.exp (test_watchpoint_triggering): Remove xfail.
2015-07-27Factor out complex printing code from generic_val_printSimon Marchi2-23/+39
gdb/ChangeLog: * valprint.c (generic_val_print): Factor out complex printing code to ... (generic_val_print_complex): ... this new function.
2015-07-27Factor out decfloat printing code from generic_val_printSimon Marchi2-6/+23
gdb/ChangeLog: * valprint.c (generic_val_print): Factor out decfloat printing code to ... (generic_val_print_decfloat): ... this new function.
2015-07-27Factor out float printing code from generic_val_printSimon Marchi2-9/+27
gdb/ChangeLog: * valprint.c (generic_val_print): Factor out float printing code to ... (generic_val_print_float): ... this new function.
2015-07-27Factor out char printing code from generic_val_printSimon Marchi2-20/+40
gdb/ChangeLog: * valprint.c (generic_val_print): Factor out char printing code to ... (generic_val_print_char): ... this new function.
2015-07-27Factor out int printing code from generic_val_printSimon Marchi2-11/+29
gdb/ChangeLog: * valprint.c (generic_val_print): Factor out integer printing code to ... (generic_val_print_int): ... this new function.
2015-07-27Factor out bool printing code from generic_val_printSimon Marchi2-18/+39
gdb/ChangeLog: * valprint.c (generic_val_print): Factor out bool printing code to ... (generic_val_print_bool): ... this new function.
2015-07-27Factor out function/method printing code from generic_val_printSimon Marchi2-15/+37
gdb/ChangeLog: * valprint.c (generic_val_print): Factor out function/method printing code to ... (generic_val_print_func): ... this new function.
2015-07-27Factor out flags printing code from generic_val_printSimon Marchi2-6/+24
gdb/ChangeLog: * valprint.c (generic_val_print): Factor out flags printing code to ... (generic_val_print_flags): ... this new function.
2015-07-27Factor out enum printing code from generic_val_printSimon Marchi2-57/+77
gdb/ChangeLog: * valprint.c (generic_val_print): Factor out enum printing code to ... (generic_val_print_enum): ... this new function.
2015-07-27Factor out reference printing code from generic_val_printSimon Marchi2-37/+56
gdb/ChangeLog: * valprint.c (generic_val_print): Factor out reference printing code to ... (generic_val_print_ref): ... this new function.
2015-07-27Factor out memberptr printing code from generic_val_printSimon Marchi2-2/+21
gdb/ChangeLog: * valprint.c (generic_val_print): Factor out memberptr printing code to ... (generic_val_print_memberptr): ... this new function.
2015-07-27Factor out pointer printing code from generic_val_printSimon Marchi2-12/+32
gdb/ChangeLog: * valprint.c (generic_val_print): Factor out pointer printing code to ... (generic_val_print_ptr): ... this new function.
2015-07-27Factor out array printing code from generic_val_printSimon Marchi2-25/+47
gdb/ChangeLog: * valprint.c (generic_val_print): Factor out array printing code to ... (generic_val_print_array): ... this new function.
2015-07-27Factor out print_unpacked_pointer from generic_val_printSimon Marchi2-17/+37
gdb/ChangeLog: * valprint.c (generic_val_print): Factor out print_unpacked_pointer code to ... (print_unpacked_pointer): ... this new function.
2015-07-27Check address of versined symbolH.J. Lu3-5/+19
Since GCC 5 folds symbol address comparison, assuming each symbol has a different address, &foo == &bar is always false for GCC 5. This patch adds check_ptr_eq if 2 addresses are the same and uses it to check the address of versined symbol. PR ld/18718 * ld-elf/check-ptr-eq.c: New file. * ld-elf/pr18718.c (main): Call check_ptr_eq. * ld-elf/shared.exp: Add check-ptr-eq.c to PR ld/18718 tests.
2015-07-27Have SIGTERM promptly quit GDB even when the dummy target is activePatrick Palka4-9/+46
GDB currently does not promptly quit after receiving a SIGTERM while no proper target is active. This is because in handle_sigterm we currently look at target_can_async_p to determine whether to asynchronously quit GDB using an async signal handler or to asynchronously quit using the quit flag. However, target_can_async_p is always false under the dummy target, so under this target we always use the quit flag and not the async signal handler to signal that GDB should quit. So GDB won't quit until a code path that checks the quit flag is executed. To fix this issue, this patch makes the SIGTERM handler no longer inspect target_can_async_p, and instead makes the handler unconditionally set the quit flag _and_ mark the corresponding async signal handler, so that if the target is async (or if it's the dummy target) then we will likely quit through the async signal handler, and if it's not async then we will likely quit through the quit flag. This redundant approach is similar to how we handle SIGINT. gdb/ChangeLog: * event-top.c (handle_sigterm): Don't inspect target_can_async_p. Always set the quit flag and always mark the async signal handler. gdb/testsuite/ChangeLog: * gdb.base/gdb-sigterm-2.exp: New test.
2015-07-27[gdbserver] Don't set srv_linux_usrregs for aarch64*-*-linux*Yao Qi2-1/+5
We don't use PTRACE_PEEKUSR/PTRACE_POKEUSR on aarch64-linux, so don't need to set srv_linux_usrregs. This patch removes that line. gdb/gdbserver: 2015-07-27 Yao Qi <yao.qi@linaro.org> * configure.srv (case aarch64*-*-linux*): Don't set srv_linux_usrregs.
2015-07-27Fix ChangeLog entryYao Qi2-4/+4
2015-07-27Remove REMOTE_EXAMPLES from gdb/Makefile.inYao Qi2-2/+4
I happen to see REMOTE_EXAMPLES isn't used anywhere, so this patch removes it. REMOTE_EXAMPLES was added in the following commit in 1991, commit 86bbb439c8fa01fd55d6cbce102483a471ffd0c4 Author: John Gilmore <gnu@cygnus> Date: Fri May 3 19:57:13 1991 +0000 There should be a Makefile in the cvs main directory, configured for "./config.gdb none", so that things like "make tags" and "make tar" will work. and it was used like: TARFILES = ${TAGFILES_MAINDIR} ${OTHERS} ${REMOTE_EXAMPLES} However TARFILES was removed by the change latter in 1994, Tue Aug 16 15:24:03 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * symtab.c (decode_line_1): If funfirstline and we get a non-LOC_BLOCK symbol (e.g. variable or type), then error(). * Makefile.in (TARFILES, NONSRC, SFILES_STAND, SFILES_KGDB): Remove; unused. Since then, REMOTE_EXAMPLES is not used any more. gdb: 2015-07-27 Yao Qi <yao.qi@linaro.org> * Makefile.in (REMOTE_EXAMPLES): Remove it.
2015-07-27Regenerate configure filesH.J. Lu14-14/+42
bfd/ * configure: Regenerated. binutils/ * configure: Regenerated. gas/ * configure: Regenerated. gold/ * configure: Regenerated. gprof/ * configure: Regenerated. ld/ * configure: Regenerated. opcodes/ * configure: Regenerated.
2015-07-27Sync toplevel files with GCCH.J. Lu4-11/+21
Sync with GCC 2015-07-24 Michael Darling <darlingm@gmail.com> PR other/66259 * config-ml.in: Reflects renaming of configure.in to configure.ac * configure: Likewise * configure.ac: Likewise
2015-07-27Sync config with GCCH.J. Lu5-7/+18
Sync with GCC 2015-07-24 Micahel Darling <darlingm@gmail.com> PR other/66259 * gettext.m4: Reflects renaming of configure.in to configure.ac * po.m4: Likewise * stdint.m4: Likewise * tcl.m4: Likewise
2015-07-27Fix the address size computation for the MSP430 port.Nick Clifton2-0/+28
* elf32-msp430.c (uses_large_model): New function. (msp430_elf_eh_frame_address_size): New function. (elf_backend_eh_frame_address_size): Define.
2015-07-27Append $PLT_CFLAGS to CC/CXX for S-records testsH.J. Lu2-0/+22
S-records tests don't work with -fno-plt. This path appends $PLT_CFLAGS to CC and CXX for S-records tests. * ld-srec/srec.exp (CC): Save and restore. Append $PLT_CFLAGS. (CXX): Likewise.
2015-07-27Pass $PLT_CFLAGS to ld_compileH.J. Lu2-3/+8
Some linker shard library tests without PIC expect PLT. This patch passes $PLT_CFLAGS to ld_compile. * ld-shared/shared.exp: Pass $PLT_CFLAGS to ld_compile.
2015-07-27Append $PLT_CFLAGS to CC for NOCROSSREFS testsH.J. Lu2-0/+15
NOCROSSREFS tests don't work with -fno-plt. This path appends $PLT_CFLAGS to CC for NOCROSSREFS tests. * ld-scripts/crossref.exp (CC): Save and restore. Append $PLT_CFLAGS.