aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-03-08[ARC] Allow non-instruction relocations within .text sectionsClaudiu Zissulescu8-86/+147
bfd/ 2016-03-08 Cupertino Miranda <Cupertino.Miranda@synopsys.com> Andrew Burgess <andrew.burgess@embecosm.com> * elf32-arc.c (arc_bfd_get_32): Becomes an alias for bfd_get_32. (arc_bfd_put_32): Becomes an alias for bfd_put_32. (arc_elf_howto_init): Added assert to validate relocations. (get_middle_endian_relocation): Delete. (middle_endian_convert): New function. (ME): Redefine, now does nothing. (IS_ME): New define. (arc_do_relocation): Extend the attached 'ARC_RELOC_HOWTO' definition to call middle_endian_convert. Add a new local variable and make use of this throughout. Added call to arc_bfd_get_8 and arc_bfd_put_8 for 8 bit relocations. gas/ 2016-03-08 Andrew Burgess <andrew.burgess@embecosm.com> * testsuite/gas/arc/inline-data-1.d: New file. * testsuite/gas/arc/inline-data-1.s: New file. include/ 2016-03-08 Cupertino Miranda <Cupertino.Miranda@synopsys.com> Andrew Burgess <andrew.burgess@embecosm.com> * elf/arc-reloc.def: Add a call to ME within the formula for each relocation that requires middle-endian correction.
2016-03-08Automatic date update in version.inGDB Administrator1-1/+1
2016-03-07[ARM] Add support for Cortex-R8Thomas Preud'homme3-0/+9
2016-03-07 Andre Vieira <andre.simoesdiasvieira@arm.com> gas/ * config/tc-arm.c (arm_cpus): Add cortex-r8. * doc/c-arm.texi: Add cortex-r8.
2016-03-07Allow zero length archive elements.Nick Clifton5-1/+54
bfd PR binutils/19775 * archive.c (bfd_generic_openr_next_archived_file): Allow zero length elements in the archive. binutils PR binutils/19775 * testsuite/binutils-all/ar.exp (proc empty_archive): New proc. Run the new proc. * testsuite/binutils-all/empty: New, empty, file.
2016-03-07Support --as-needed in i386/x86-64 testsH.J. Lu3-14/+47
Since compiler may pass --as-needed to ld by default, link .o file before .so file in i386/x86-64 tests. PR ld/19774 * testsuite/ld-i386/i386.exp: Link tmpdir/pr18900.o before tmpdir/pr18900.so and test --as-needed. Link tmpdir/gotpc1.o before tmpdir/got1d.so and test --as-needed. * testsuite/ld-x86-64/x86-64.exp: Link tmpdir/pr18900.o before tmpdir/pr18900.so and test --as-needed.
2016-03-07Fix "set architecture mips:10000" crashPedro Alves2-1/+7
Fix this GDB crash: $ gdb -ex "set architecture mips:10000" Segmentation fault (core dumped) Backtrace: Program received signal SIGSEGV, Segmentation fault. 0x0000000000495b1b in mips_gdbarch_init (info=..., arches=0x0) at /home/pedro/gdb/mygit/cxx-convertion/src/gdb/mips-tdep.c:8436 8436 if (bfd_get_flavour (info.abfd) == bfd_target_elf_flavour (top-gdb) bt #0 0x0000000000495b1b in mips_gdbarch_init (info=..., arches=0x0) at .../src/gdb/mips-tdep.c:8436 #1 0x00000000007348a6 in gdbarch_find_by_info (info=...) at .../src/gdb/gdbarch.c:5155 #2 0x000000000073563c in gdbarch_update_p (info=...) at .../src/gdb/arch-utils.c:522 #3 0x0000000000735585 in set_architecture (ignore_args=0x0, from_tty=1, c=0x26bc870) at .../src/gdb/arch-utils.c:496 #4 0x00000000005f29fd in do_sfunc (c=0x26bc870, args=0x0, from_tty=1) at .../src/gdb/cli/cli-decode.c:121 #5 0x00000000005fd3f3 in do_set_command (arg=0x7fffffffdcdd "mips:10000", from_tty=1, c=0x26bc870) at .../src/gdb/cli/cli-setshow.c:455 #6 0x0000000000836157 in execute_command (p=0x7fffffffdcdd "mips:10000", from_tty=1) at .../src/gdb/top.c:460 #7 0x000000000071abfb in catch_command_errors (command=0x835f6b <execute_command>, arg=0x7fffffffdccc "set architecture mips:10000", from_tty=1) at .../src/gdb/main.c:368 #8 0x000000000071bf4f in captured_main (data=0x7fffffffd750) at .../src/gdb/main.c:1132 #9 0x0000000000716737 in catch_errors (func=0x71af44 <captured_main>, func_args=0x7fffffffd750, errstring=0x106b9a1 "", mask=RETURN_MASK_ALL) at .../src/gdb/exceptions.c:240 #10 0x000000000071bfe6 in gdb_main (args=0x7fffffffd750) at .../src/gdb/main.c:1164 #11 0x000000000040a6ad in main (argc=4, argv=0x7fffffffd858) at .../src/gdb/gdb.c:32 (top-gdb) We already check whether info.abfd is NULL before all other bfd_get_flavour calls in the same function. Just this one case was missing. (This was exposed by a WIP test that tries all "set architecture ARCH" values.) gdb/ChangeLog: 2016-03-07 Pedro Alves <palves@redhat.com> * mips-tdep.c (mips_gdbarch_init): Check whether info.abfd is NULL before calling bfd_get_flavour.
2016-03-07[AArch64] Create .got section if _GLOBAL_OFFSET_TABLE_ referencedJiong Wang6-0/+37
2016-03-07 Jiong Wang <jiong.wang@arm.com> bfd/ * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Always create .got section if the symbol "_GLOBAL_OFFSET_TABLE_" referenced. ld/ * testsuite/ld-aarch64/implicit_got_section_1.s: New test source file. * testsuite/ld-aarch64/implicit_got_section_1.d: New test expected result. * testsuite/ld-aarch64/aarch64-elf.exp: Run new test.
2016-03-07Add const qualifiers at various places.Trevor Saunders30-171/+200
opcodes * mcore-opc.h: Add const qualifiers. * microblaze-opc.h (struct op_code_struct): Likewise. * sh-opc.h: Likewise. * tic4x-dis.c (tic4x_print_indirect): Likewise. (tic4x_print_op): Likewise. include * opcode/dlx.h (struct dlx_opcode): Add const qualifiers. * opcode/h8300.h (struct h8_opcode): Likewise. * opcode/hppa.h (struct pa_opcode): Likewise. * opcode/msp430.h: Likewise. * opcode/spu.h (struct spu_opcode): Likewise. * opcode/tic30.h (struct _register): Likewise. * opcode/tic4x.h (struct tic4x_register): Likewise. (struct tic4x_cond): Likewise. (struct tic4x_indirect): Likewise. (struct tic4x_inst): Likewise. * opcode/visium.h (struct reg_entry): Likewise. gas * config/tc-arc.c: Add const qualifiers. * config/tc-h8300.c (md_begin): Likewise. * config/tc-ia64.c (print_prmask): Likewise. * config/tc-msp430.c (msp430_operands): Likewise. * config/tc-nds32.c (struct suffix_name): Likewise. (struct nds32_parse_option_table): Likewise. (struct nds32_set_option_table): Likewise. (do_pseudo_pushpopm): Likewise. (do_pseudo_pushpop_stack): Likewise. (nds32_relax_relocs): Likewise. (nds32_flag): Likewise. (struct nds32_hint_map): Likewise. (nds32_find_reloc_table): Likewise. (nds32_match_hint_insn): Likewise. * config/tc-s390.c: Likewise. * config/tc-sh.c (get_specific): Likewise. * config/tc-tic30.c: Likewise. * config/tc-tic4x.c (tic4x_inst_add): Likewise. (tic4x_indirect_parse): Likewise. * config/tc-vax.c (vax_cons): Likewise. * config/tc-z80.c (struct reg_entry): Likewise. * config/tc-epiphany.c (md_assemble): Adjust. (epiphany_assemble): New function. (epiphany_elf_section_rtn): Call do_align directly. (epiphany_elf_section_text): Likewise. * config/tc-ip2k.c (ip2k_elf_section_rtn): Likewise. (ip2k_elf_section_text): Likewise. * read.c (do_align): Make it not static. * read.h (do_align): New prototype.
2016-03-07Automatic date update in version.inGDB Administrator1-1/+1
2016-03-06Set executable bit on analyze-racy-logs.pySergio Durigan Junior2-0/+4
I forgot to do it in my previous commit. This is necessary because we execute the script directly on gdb/testsuite/Makefile.in. gdb/testsuite/ChangeLog: 2016-03-06 Sergio Durigan Junior <sergiodj@redhat.com> * analyze-racy-logs.py: Set executable bit.
2016-03-06Link tmpdir/copyreloc-main.o before tmpdir/copyreloc-lib.soH.J. Lu3-12/+34
Since compiler may pass --as-needed to ld by default, link tmpdir/copyreloc-main.o before tmpdir/copyreloc-lib.so. * testsuite/ld-i386/i386.exp: Link tmpdir/copyreloc-main.o before tmpdir/copyreloc-lib.so and test --as-needed. * testsuite/ld-x86-64/x86-64.exp: Likewise.
2016-03-05Improve analysis of racy testcasesSergio Durigan Junior4-3/+298
This is an initial attempt to introduce some mechanisms to identify racy testcases present in our testsuite. As can be seen in previous discussions, racy tests are really bothersome and cause our BuildBot to pollute the gdb-testers mailing list with hundreds of false-positives messages every month. Hopefully, identifying these racy tests in advance (and automatically) will contribute to the reduction of noise traffic to gdb-testers, maybe to the point where we will be able to send the failure messages directly to the authors of the commits. I spent some time trying to decide the best way to tackle this problem, and decided that there is no silver bullet. Racy tests are tricky and it is difficult to catch them, so the best solution I could find (for now?) is to run our testsuite a number of times in a row, and then compare the results (i.e., the gdb.sum files generated during each run). The more times you run the tests, the more racy tests you are likely to detect (at the expense of waiting longer and longer). You can also run the tests in parallel, which makes things faster (and contribute to catching more racy tests, because your machine will have less resources for each test and some of them are likely to fail when this happens). I did some tests in my machine (8-core i7, 16GB RAM), and running the whole GDB testsuite 5 times using -j6 took 23 minutes. Not bad. In order to run the racy test machinery, you need to specify the RACY_ITER environment variable. You will assign a number to this variable, which represents the number of times you want to run the tests. So, for example, if you want to run the whole testsuite 3 times in parallel (using 2 cores), you will do: make check RACY_ITER=3 -j2 It is also possible to use the TESTS variable and specify which tests you want to run: make check TEST='gdb.base/default.exp' RACY_ITER=3 -j2 And so on. The output files will be put at the directory gdb/testsuite/racy_outputs/. After make invokes the necessary rules to run the tests, it finally runs a Python script that will analyze the resulting gdb.sum files. This Python script will read each file, and construct a series of sets based on the results of the tests (one set for FAIL's, one for PASS'es, one for KFAIL's, etc.). It will then do some set operations and come up with a list of unique, sorted testcases that are racy. The algorithm behind this is: for state in PASS, FAIL, XFAIL, XPASS...; do if a test's state in every sumfile is $state; then it is not racy else it is racy (The algorithm is actually a bit more complex than that, because it takes into account other things in order to decide whether the test should be ignored or not). IOW, a test must have the same state in every sumfile. After processing everything, the script prints the racy tests it could identify on stdout. I am redirecting this to a file named racy.sum. Something else that I wasn't sure how to deal with was non-unique messages in our testsuite. I decided to do the same thing I do in our BuildBot: include a unique identifier in the end of message, like: gdb.base/xyz.exp: non-unique message gdb.base/xyz.exp: non-unique message <<2>> This means that you will have to be careful about them when you use the racy.sum file. I ran the script several times here, and it did a good job catching some well-known racy tests. Overall, I am satisfied with this approach and I think it will be helpful to have it upstream'ed. I also intend to extend our BuildBot and create new, specialized builders that will be responsible for detecting the racy tests every X number of days. 2016-03-05 Sergio Durigan Junior <sergiodj@redhat.com> * Makefile.in (DEFAULT_RACY_ITER): New variable. (CHECK_TARGET_TMP): Likewise. (check-single-racy): New rule. (check-parallel-racy): Likewise. (TEST_TARGETS): Adjust rule to account for RACY_ITER. (do-check-parallel-racy): New rule. (check-racy/%.exp): Likewise. * README (Racy testcases): New section. * analyze-racy-logs.py: New file.
2016-03-06Automatic date update in version.inGDB Administrator1-1/+1
2016-03-05Fix argument passing for callDenis Chertykov2-7/+16
When calling function with argument of size more than 8 bytes fails with an error "That operation is not available on integers of more than 8 bytes.". avr-gdb considers only 8 bytes (sizeof(long long)) in case of passing the argument in registers. When the argument is of size more than 8 byte then the utility function to extract bytes failed with the above error. gdb/ * avr-tdep.c (AVR_LAST_ARG_REGNUM): Define. (avr_push_dummy_call): Correct last needed argument register. Write MSB of argument into register and subsequent bytes into other registers in decreasing order.
2016-03-05Automatic date update in version.inGDB Administrator1-1/+1
2016-03-04Fix datestamps on ChangeLog entries to read 2015 instead of 2016.Cary Coutant2-3/+3
2016-03-04Add missing ChangeLog entries for commit 82838H.J. Lu3-0/+23
Fix gold/testsuite/plugin_layout_with_alignment.sh permission.
2016-03-04Fix undefined symbol errors introduced with previous commit.Cary Coutant2-0/+37
gold/ PR gold/19019 PR gold/19763 * symtab.cc: Instantiate Sized_symbol::init_constant and Sized_symbol::init_undefined.
2016-03-04ARM process record: VMOVYao Qi2-11/+7
ARM process record gets the wrong register number for VMOV (from core register to single-precision register). That is, we should record the D register rather than the S pseudo register. The patch also removes the condition "bit (arm_insn_r->arm_insn, 20)" check, which has been checked above. It fixes the following internal error, (gdb) PASS: gdb.reverse/finish-precsave.exp: BP at end of main continue^M Continuing.^M ../../binutils-gdb/gdb/regcache.c:649: internal-error: regcache_raw_read: Assertion `regnum >= 0 && regnum < regcache->descr->nr_raw_registers' failed.^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-03-04 Yao Qi <yao.qi@linaro.org> * arm-tdep.c (arm_record_vdata_transfer_insn): Simplify the condition check. Record the right D register number.
2016-03-04Tweak ARM process recordYao Qi2-32/+29
This patch removes the printing "Process record does not support", and do the print by calling arm_record_unsupported_insn in the caller. Also, call arm_record_extension_space only when condition is 0xf. gdb: 2016-03-04 Yao Qi <yao.qi@linaro.org> * arm-tdep.c (arm_record_extension_space): Remove code printing "Process record does not support". (arm_record_data_proc_misc_ld_str): Likewise. (decode_insn): Call arm_record_extension_space if condition is 0xf. Call arm_record_unsupported_insn if ret isn't ARM_RECORD_SUCCESS. Use 'ret' instead of 'insn_id' to hold the value of thumb2_record_decode_insn_handler.
2016-03-04feature_to_c.sh: Print help when passing no argumentsSimon Marchi2-4/+9
I found that odd that passing no arguments to feature_to_c.sh produces this: $ ./feature_to_c.sh ./feature_to_c.sh: 23: shift: can't shift that many but passing one argument shows the help: $ ./feature_to_c.sh hello Usage: ./feature_to_c.sh OUTPUTFILE INPUTFILE... This patch changes the script to show the help in both cases. gdb/ChangeLog: * features/feature_to_c.sh: Print the help when passing no argument.
2016-03-04Fix a ChangeLog entryH.J. Lu1-1/+1
2016-03-04Treat common symbol in executable as definitionH.J. Lu6-1/+71
Common symbol in executable is a definition, which overrides definition from shared objects. When linker sees a new definition from a shared object, the new dynamic definition should be overridden by the previous common symbol in executable. bfd/ PR ld/19579 * elflink.c (_bfd_elf_merge_symbol): Treat common symbol in executable as definition if the new definition comes from a shared library. ld/ PR ld/19579 * testsuite/ld-elf/pr19579a.c: New file. * testsuite/ld-elf/pr19579b.c: Likewise. * testsuite/ld-elf/shared.exp: Run PR ld/19579 test.
2016-03-04[ARM] Build attributes for ARMv8.1-A AdvSIMDMatthew Wahab6-2/+52
binutils/ 2016-03-04 Matthew Wahab <matthew.wahab@arm.com> * readelf.c (arm_attry_tag_FP_arch): Add "NEON for ARMv8.1". gas/ 2016-03-04 Matthew Wahab <matthew.wahab@arm.com> * config/tc-arm.c (aeabi_set_public_attributes): Emit attribute for ARMv8.1 AdvSIMD use. * testsuite/gas/arm/attr-march-armv8-a+rdma.d: New. * testsuite/gas/arm/attr-march-armv8_1-a+simd.d: New. Change-Id: I3c356e0681b97df2f9c0dabd7c0fd1b441cc2755
2016-03-04[ARM] Add feature check for ARMv8.1 AdvSIMD instructions.Matthew Wahab9-49/+262
gas/ 2016-03-04 Matthew Wahab <matthew.wahab@arm.com> * config/gas/tc-arm.c (fpu_neon_ext_v8_1): Restrict to the ARMv8.1 RDMA feature. (record_feature_use): New. (mark_feature_used): Use record_feature_use. (do_neon_qrdmlah): New. (insns): Use do_neon_qrdmlah for vqrdmlah and vqrdmlsh and variants. (arm_extensions): Put into alphabetical order. Re-indent "simd" and "rdma" entries. Fix the incorrect merge value for "+rdma". * testsuite/gas/arm/armv8-a+rdma-warning.d: New. * testsuite/gas/arm/armv8-a+rdma.d: Add assembler command line options. Make source file explicit. * testsuite/gas/arm/armv8-a+rdma.l: New. * testsuite/gas/arm/armv8-a+rdma.s: Remove .arch and .arch_extension directives. Fix white-space. * testsuite/gas/arm/armv8_1-a+simd.d: New. include/opcode 2016-03-04 Matthew Wahab <matthew.wahab@arm.com> * arm.h (ARM_ARCH_V8_1A): Add FPU_NEON_EXT_RDMA. (ARM_CPU_HAS_FEATURE): Add comment. Change-Id: Ie19250e8fa50aed44e44ab40ff30b04b38bc1a3d
2016-03-03Add support for STT_SPARC_REGISTER symbols.Cary Coutant8-20/+236
gold/ PR gold/19019 * layout.h (Layout::add_target_specific_dynamic_tag): New function. * layout.cc (Layout::add_target_specific_dynamic_tag): New function. * mips.cc (Target_mips::make_symbol): Adjust function signature. * sparc.cc (Target_sparc::Target_sparc): Initialize register_syms_. (Target_sparc::do_is_defined_by_abi): Remove test for STT_SPARC_REGISTER. (Target_sparc::Register_symbol): New struct type. (Target_sparc::register_syms_): New data member. (Target_sparc<64, true>::sparc_info): Set has_make_symbol to true. (Target_sparc::make_symbol): New function. (Target_sparc::do_finalize_sections): Add register symbols and new dynamic table entries. * symtab.h (Sized_symbol::init_undefined): Add value parameter. (Symbol_table::add_target_global_symbol): New function. (Symbol_table::target_symbols_): New data member. * symtab.cc (Sized_symbol::init_undefined): Add value parameter. (Symbol_table::Symbol_table): Initialize target_symbols_. (Symbol_table::add_from_object): Pass additional parameters to Target::make_symbol. (Symbol_table::define_special_symbol): Likewise. (Symbol_table::add_undefined_symbol_from_command_line): Pass 0 for undefined symbol value. (Symbol_table::set_dynsym_indexes): Process target-specific symbols. (Symbol_table::sized_finalize): Likewise. (Symbol_table::sized_write_globals): Likewise. * target.h (Sized_target::make_symbol): Add name, st_type, object, st_shndx, and value parameters.
2016-03-04Automatic date update in version.inGDB Administrator1-1/+1
2016-03-03Don't handle every plugin symbol as defined.Rafael Ávila de Espíndola2-0/+7
Gold was fetching --start-lib/--end-lib members if that member defined or used a currently undefined symbol.
2016-03-03Add new plugin hooks to support querying section alignment and size.Cary Coutant7-5/+530
include/ 2016-03-03 Than McIntosh <thanm@google.com> * plugin-api.h: Add new hooks to the plugin transfer vector to to support querying section alignment and section size. (ld_plugin_get_input_section_alignment): New hook. (ld_plugin_get_input_section_size): New hook. (ld_plugin_tag): Add LDPT_GET_INPUT_SECTION_ALIGNMENT and LDPT_GET_INPUT_SECTION_SIZE. (ld_plugin_tv): Add tv_get_input_section_alignment and tv_get_input_section_size. gold/ 2016-03-03 Than McIntosh <thanm@google.com> * plugin.cc (Plugin::load): Include hooks for get_input_section_size and get_input_section_alignment in transfer vector. (get_input_section_alignment): New function. (get_input_section_size): New function. * testsuite/Makefile.am: Add plugin_layout_with_alignment.sh test. * testsuite/Makefile.in: [Regenerate.] * testsuite/plugin_section_alignment.cc: New test file. * testsuite/plugin_layout_with_alignment.cc: New test file. * testsuite/plugin_layout_with_alignment.sh: New test file.
2016-03-03get_symbols() plugin API tweak to support --start-lib/--end-lib.Evgenii Stepanov10-18/+175
Let the plugin know that a file is not being included in the link by returning LDPS_NO_SYMS from get_symbols(). include/ * plugin-api.h (enum ld_plugin_tag): Add LDPT_GET_SYMBOLS_V3. gold/ * plugin.h (Pluginobj::get_symbol_resolution_info): Add version parameter. * plugin.cc (get_symbols_v3): New function. (Plugin::load): Add LDPT_GET_SYMBOLS_V3. (Pluginobj::get_symbol_resolution_info): Return LDPS_NO_SYMS when using new version.
2016-03-03gdb.base/skip.exp: Use with_test_prefix.Doug Evans2-126/+147
gdb/testsuite/ChangeLog: * gdb.base/skip.exp: Use with_test_prefix.
2016-03-03Fix bugs in the simulation of the AArch64's ADDP, FADDP, LD1, CCMP and CCMP ↵Nick Clifton2-44/+93
instructions. * simulator.c (set_flags_for_sub32): Correct type of signbit. (CondCompare): Swap interpretation of bit 30. (DO_ADDP): Delete macro. (do_vec_ADDP): Copy source registers before starting to update destination register. (do_vec_FADDP): Likewise. (do_vec_load_store): Fix computation of sizeof_operation. (rbit64): Fix type of constant. (aarch64_step): When displaying insn value, display all 32 bits.
2016-03-03Update comments to start_step_overYao Qi2-12/+8
I happen to see that comments to start_step_over isn't in sync with code, so this patch is to update the comments. gdb/gdbserver: 2016-03-03 Yao Qi <yao.qi@linaro.org> * linux-low.c: Update comments to start_step_over.
2016-03-03New test about step over clone syscallYao Qi3-0/+82
This patch adds a new test for stepping over clone syscall. 2016-03-03 Yao Qi <yao.qi@linaro.org> * gdb.base/step-over-syscall.exp (step_over_syscall): Kfail. Invoke step_over_syscall "clone" and break_cond_on_syscall "clone". * gdb.base/step-over-clone.c: New file.
2016-03-03Reformat gdb.base/step-over-syscall.expYao Qi2-30/+34
gdb/testsuite: 2016-03-03 Yao Qi <yao.qi@linaro.org> * gdb.base/step-over-syscall.exp (disp_step_cross_syscall): Fix code format.
2016-03-03Rename disp-step-syscall.exp to step-over-syscall.expYao Qi4-7/+18
disp-step-syscall.exp is extended for stepping over syscall instruction in different cases, with or without displaced stepping, and stepping over by GDBserver. This patch rename disp-step-syscall.exp to step-over-syscall.exp to reflect this. gdb/testsuite: 2016-03-03 Yao Qi <yao.qi@linaro.org> * gdb.base/disp-step-fork.c: Rename to ... * gdb.base/step-over-fork.c: ... it. New file. * gdb.base/disp-step-vfork.c: Rename to ... * gdb.base/step-over-vfork.c: ... it. New file. * gdb.base/disp-step-syscall.exp: Rename to ... * gdb.base/step-over-syscall.exp: ... it. New file. (disp_step_cross_syscall): Rename to ... (step_over_syscall): ... it.
2016-03-03Step over fork/vfork syscall insn in gdbserverYao Qi2-0/+63
We can also extend disp-step-syscall.exp to test GDBserver step over breakpoint on syscall instruction. That is, we set a breakpoint with a false condition on syscall instruction, so that GDBserver will step over it. This test triggers a GDBserver internal error, which can be fixed by this series. (gdb) PASS: gdb.base/disp-step-syscall.exp: fork: break cond on target: break on syscall insns continue^M Continuing.^M Remote connection closed^M (gdb) FAIL: gdb.base/disp-step-syscall.exp: fork: break cond on target: continue to fork again In GDBserver, there is an internal error, /home/yao/SourceCode/gnu/gdb/git/gdb/gdbserver/linux-low.c:1922: A problem internal to GDBserver has been detected. unsuspend LWP 25554, suspended=-1 the simplified reproducer is like, $ ./gdb ./testsuite/outputs/gdb.base/disp-step-syscall/disp-step-fork (gdb) b main (gdb) c (gdb) disassemble fork // in order to find the address of insn 'syscall' .... 0x00007ffff7ad6023 <+179>: syscall (gdb) b *0x00007ffff7ad6023 if main == 0 (gdb) c gdb/testsuite: 2016-03-03 Yao Qi <yao.qi@linaro.org> * gdb.base/disp-step-syscall.exp (break_cond_on_syscall): New. If target supports condition evaluation on target, invoke break_cond_on_syscall for fork and vfork.
2016-03-03Step over syscalll insn with disp-step on and offYao Qi2-6/+14
disp-step-syscall.exp was added to test displaced stepping over syscall instructions, in which we set breakpoint on syscall instruction, and step over it. In fact, we can extend the test to non-displaced-stepping case. This patch wraps the test with displaced stepping on and off. Note that the indentation and format isn't adjusted here to make this patch easy to read. The following patch will fix the format separately. gdb/testsuite: 2016-03-03 Yao Qi <yao.qi@linaro.org> * gdb.base/disp-step-syscall.exp: Don't invoke support_displaced_stepping. (disp_step_cross_syscall): Test with displaced stepping off and on if supported.
2016-03-03Refactor gdb.base/disp-step-syscall.exp for general step over testYao Qi2-66/+91
This patch moves some code out of disp_step_cross_syscall to a new proc check_pc_after_cross_syscall and setup. Procedure setup is to start a fresh GDB and compute the syscall instruction address. gdb/testsuite: 2016-03-03 Yao Qi <yao.qi@linaro.org> * gdb.base/disp-step-syscall.exp (check_pc_after_cross_syscall): New proc. (setup): New proc. (disp_step_cross_syscall): Move code to check_pc_after_cross_syscall and setup.
2016-03-03[GDBserver] Leave child suspended when step over parentYao Qi2-5/+17
I see the following GDBserver internal error in two cases, gdb/gdbserver/linux-low.c:1922: A problem internal to GDBserver has been detected. unsuspend LWP 17200, suspended=-1 1. step over a breakpoint on fork/vfork syscall instruction, 2. step over a breakpoint on clone syscall instruction and child threads hits a breakpoint, the stack backtrace is #0 internal_error (file=file@entry=0x44c4c0 "gdb/gdbserver/linux-low.c", line=line@entry=1922, fmt=fmt@entry=0x44c7d0 "unsuspend LWP %ld, suspended=%d\n") at gdb/gdbserver/../common/errors.c:51 #1 0x0000000000424014 in lwp_suspended_decr (lwp=<optimised out>, lwp=<optimised out>) at gdb/gdbserver/linux-low.c:1922 #2 0x000000000042403a in unsuspend_one_lwp (entry=<optimised out>, except=0x66e8c0) at gdb/gdbserver/linux-low.c:2885 #3 0x0000000000405f45 in find_inferior (list=<optimised out>, func=func@entry=0x424020 <unsuspend_one_lwp>, arg=arg@entry=0x66e8c0) at gdb/gdbserver/inferiors.c:243 #4 0x00000000004297de in unsuspend_all_lwps (except=0x66e8c0) at gdb/gdbserver/linux-low.c:2895 #5 linux_wait_1 (ptid=..., ourstatus=ourstatus@entry=0x665ec0 <last_status>, target_options=target_options@entry=0) at gdb/gdbserver/linux-low.c:3632 #6 0x000000000042a764 in linux_wait (ptid=..., ourstatus=0x665ec0 <last_status>, target_options=0) at gdb/gdbserver/linux-low.c:3770 #7 0x0000000000411163 in mywait (ptid=..., ourstatus=ourstatus@entry=0x665ec0 <last_status>, options=options@entry=0, connected_wait=connected_wait@entry=1) at gdb/gdbserver/target.c:214 #8 0x000000000040b1f2 in resume (actions=0x66f800, num_actions=1) at gdb/gdbserver/server.c:2757 #9 0x000000000040f660 in handle_v_cont (own_buf=0x66a630 "vCont;c:p45e9.-1") at gdb/gdbserver/server.c:2719 when GDBserver steps over a thread, other threads have been suspended, the "stepping" thread may create new thread, but GDBserver doesn't set it suspend count to 1. When GDBserver unsuspend threads, the child's suspend count goes to -1, and the assert is triggered. In fact, GDBserver has already taken care of suspend count of new thread when GDBserver is suspending all threads except the one GDBserver wants to step over by https://sourceware.org/ml/gdb-patches/2015-07/msg00946.html + /* If we're suspending all threads, leave this one suspended + too. */ + if (stopping_threads == STOPPING_AND_SUSPENDING_THREADS) + { + if (debug_threads) + debug_printf ("HEW: leaving child suspended\n"); + child_lwp->suspended = 1; + } but that is not enough, because new thread is still can be spawned in the thread which is being stepped over. This patch extends the condition that GDBserver set child's suspend count to one if it is suspending threads or stepping over the thread. gdb/gdbserver: 2016-03-03 Yao Qi <yao.qi@linaro.org> PR server/19736 * linux-low.c (handle_extended_wait): Set child suspended if event_lwp->bp_reinsert isn't zero.
2016-03-02Skip ld-elf/pr19162.d for hppa-*-*H.J. Lu2-1/+6
ld-elf/pr19162.d fails for hppa-*-* since Dave Anglin's fix for PR 12376 makes the data segment always start on a page boundary. * testsuite/ld-elf/pr19162.d: Skip hppa-*-*.
2016-03-03Correct fr30 commentAlan Modra2-3/+10
* fr30.cpu (f.m4): Replace bogus comment with a better guess at what is really going on.
2016-03-03Automatic date update in version.inGDB Administrator1-1/+1
2016-03-02Xfail mix_pic_and_non_pic on arm and aarch64H.J. Lu2-3/+12
* testsuite/ld-elf/shared.exp (mix_pic_and_non_pic): Add xfails. Xfail mix_pic_and_non_pic on "arm*-*-*" "aarch64*-*-*".
2016-03-02Call enqueue_pending_signal in linux_resume_one_lwp_throwYao Qi2-11/+6
Replace the code which is exactly what enqueue_pending_signal does. gdb/gdbserver: 2016-03-02 Yao Qi <yao.qi@linaro.org> * linux-low.c (linux_resume_one_lwp_throw): Replace code with enqueue_pending_signal.
2016-03-02[OBV] gdbserver: Only write ipa_tdesc_idx if agent is actually loaded.Marcin Kościelnicki2-4/+12
Fixes rather embarassing gdb.trace regressions. gdb/gdbserver/ChangeLog: * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent is actually loaded.
2016-03-02testsuite: Remove unnecessary code in fortran vla-history test.Bernhard Heckel2-3/+4
testsuite: Remove unnecessary code in fortran vla-history test. 2016-03-02 Bernhard Heckel <bernhard.heckel@intel.com> gdb/testsuite/Changelog: * gdb.fortran/vla-history.exp: Remove breakpoint.
2016-03-02testsuite: Fix timeout issues during print of vla-arrays.bernhard.heckel2-5/+13
Printing and resolving of dynamic array's causes sporadic timeout issues on loaded systems. 2016-03-02 Bernhard Heckel <bernhard.heckel@intel.com> gdb/testsuite/Changelog: * gdb.fortran/vla-history.exp: Lookup array elements and printing exceeds timeout.
2016-03-02testsuite: Fix run to main issue introduced by GCC 5.x.bernhard.heckel2-0/+5
Adding a dummy assignment as a new breakpoint anchor because breakpoint on return statement doesn't work for GCC 5.x. 2016-03-02 Bernhard Heckel <bernhard.heckel@intel.com> gdb/testsuite/Changelog: * gdb.cp/vla-cxx.cc: Insert dummy assignment as anchor for an breakpoint.
2016-03-02testsuite: Nullify pointers before first usage.Bernhard Heckel2-0/+5
Nullify pointers to avoid an undefined association status. 2016-03-02 Bernhard Heckel <bernhard.heckel@intel.com> gdb/testsuite/Changelog: * gdb.mi/vla.f90: Nullify pointer after declaration.