{"push_id":629520861,"size":21,"distinct_size":1,"ref":"refs/heads/master","head":"fbed9c2759d43ea6991264c2e963660b5e9202d1","before":"4f0d8f2d9f95ae5620e70c8b490fe6f534ffd5ce","commits":[{"sha":"6166ed9330a9afd41859d5a716cb9019c338a8ca","author":{"email":"64b285df2af30b39a5c8967bdd7812e31d1a9397@gmail.com","name":"Alan Modra"},"message":"Mark _init and _fini for --gc-sections\n\ngold marks _init and _fini via symbol, ld marks them via section\n(default scripts set .init and .fini section KEEP).  This makes it\npossible for people to write their own _init and not bother to put the\nfunction into the right section.\n\n\tPR ld/18223\n\t* ldlang.c (lang_process): Add _init and _fini to gc_sym_list.","distinct":false,"url":"https://api.github.com/repos/bminor/binutils-gdb/commits/6166ed9330a9afd41859d5a716cb9019c338a8ca"},{"sha":"080bb7bbe9d06424be5a989ae87160d655d22e2e","author":{"email":"2a3695df0edcde19d41e033e172c391a56c7af17@redhat.com","name":"Nick Clifton"},"message":"Add documentation about the interation of the ARM assembler's -EB option and the linker's --be8 option.\n\n\tPR binutils/18198\n\t* ld.texinfo (--be8): Add a note about the interaction of this\n\toption with the assembler's -EB option.\n\n\t* doc/c-arm.texi (ARM Options): Add a note about the interaction of\n\tthe -EB option with the linker's --be8 option.","distinct":false,"url":"https://api.github.com/repos/bminor/binutils-gdb/commits/080bb7bbe9d06424be5a989ae87160d655d22e2e"},{"sha":"e7a8570f75694284ea5bc909f095004f4ef938c6","author":{"email":"bb271a05043db396cc975a0c35ecf24f1f8ce1ab@redhat.com","name":"Jan Kratochvil"},"message":"doc patch: compile: missing bits\n\ngdb/doc/ChangeLog\n2015-04-10  Jan Kratochvil  <jan.kratochvil@redhat.com>\n\t    Eli Zaretskii  <eliz@gnu.org>\n\n\t* gdb.texinfo (Compiling and Injecting Code): Describe set debug\n\tcompile, show debug compile.  New subsection Compilation options for\n\tthe compile command.  New subsection Compiler search for the compile\n\tcommand.","distinct":false,"url":"https://api.github.com/repos/bminor/binutils-gdb/commits/e7a8570f75694284ea5bc909f095004f4ef938c6"},{"sha":"8c3fff59dc5cbf86c354770ad66cb146f4fa0143","author":{"email":"64b285df2af30b39a5c8967bdd7812e31d1a9397@gmail.com","name":"Alan Modra"},"message":"Correct setting of elf_list_options\n\n\t* configure.ac: Set elf_list_options etc. in proper case.\n\t* configure: Regenerate.","distinct":false,"url":"https://api.github.com/repos/bminor/binutils-gdb/commits/8c3fff59dc5cbf86c354770ad66cb146f4fa0143"},{"sha":"906d60cf467b2d5a20ff04dbc4805a84ef313229","author":{"email":"c495fe4dba026c81f120733ccce155c132d5c6ba@redhat.com","name":"Pedro Alves"},"message":"PR13858 - Can't do displaced stepping with no symbols\n\nRunning break-interp.exp with the target always in non-stop mode trips\non PR13858, as enabling non-stop also enables displaced stepping.\n\nThe problem is that when GDB doesn't know where the entry point is, it\ndoesn't know where to put the displaced stepping scratch pad.  The\ntest added by this commit exercises this.  Without the fix, we get:\n\n (gdb) PASS: gdb.base/step-over-no-symbols.exp: displaced=on: break *$pc\n set displaced-stepping on\n (gdb) PASS: gdb.base/step-over-no-symbols.exp: displaced=on: set displaced-stepping on\n stepi\n 0x00000000004005be in ?? ()\n Entry point address is not known.\n (gdb) PASS: gdb.base/step-over-no-symbols.exp: displaced=on: stepi\n p /x $pc\n $2 = 0x4005be\n (gdb) PASS: gdb.base/step-over-no-symbols.exp: displaced=on: get after PC\n FAIL: gdb.base/step-over-no-symbols.exp: displaced=on: advanced\n\nThe fix switches all GNU/Linux ports to get the entry point from\nAT_ENTRY in the target auxiliary vector instead of from symbols.  This\nis currently only done by PPC when Cell debugging is enabled, but I\nthink all archs should be able to do the same.  Note that\nppc_linux_displaced_step_location cached the result, I'm guessing to\navoid constantly re-fetching the auxv out of remote targets, but\nthat's no longer necessary nowadays, as the auxv blob is itself cached\nin the inferior object.  The ppc_linux_entry_point_addr global is\nobviously bad for multi-process too nowadays.\n\nTested on x86-64 (-m64/-m32), PPC64 (-m64/-m32) and S/390 GNU/Linux.\nYao tested the new test on ARM as well.\n\ngdb/ChangeLog:\n2015-04-10  Pedro Alves  <palves@redhat.com>\n\n\tPR gdb/13858\n\t* amd64-linux-tdep.c (amd64_linux_init_abi_common): Install\n\tlinux_displaced_step_location as gdbarch_displaced_step_location\n\thook.\n\t* arm-linux-tdep.c (arm_linux_init_abi): Likewise.\n\t* i386-linux-tdep.c (i386_linux_init_abi): Likewise.\n\t* linux-tdep.c (linux_displaced_step_location): New function,\n\tbased on ppc_linux_displaced_step_location.\n\t* linux-tdep.h (linux_displaced_step_location): New declaration.\n\t* ppc-linux-tdep.c (ppc_linux_entry_point_addr): Delete.\n\t(ppc_linux_inferior_created, ppc_linux_displaced_step_location):\n\tDelete.\n\t(ppc_linux_init_abi): Install linux_displaced_step_location as\n\tgdbarch_displaced_step_location hook, even without Cell/B.E..\n\t(_initialize_ppc_linux_tdep): Don't install\n\tppc_linux_inferior_created as inferior_created observer.\n\t* s390-linux-tdep.c (s390_gdbarch_init): Install\n\tlinux_displaced_step_location as gdbarch_displaced_step_location\n\thook.\n\ngdb/testsuite/\n2015-04-10  Pedro Alves  <palves@redhat.com>\n\n\tPR gdb/13858\n\t* gdb.base/step-over-no-symbols.exp: New file.","distinct":false,"url":"https://api.github.com/repos/bminor/binutils-gdb/commits/906d60cf467b2d5a20ff04dbc4805a84ef313229"},{"sha":"ef713951c571c8490ca57c17c88785c6df1ed840","author":{"email":"82697eede7783c80d18ae8c0d02575d32c9ac359@linaro.org","name":"Yao Qi"},"message":"[arm] Fix displaced stepping for thumb alu reg instruction\n\nRecent patch series \"V2 All-stop on top of non-stop\" causes a SIGSEGV\nin the test case,\n\n> -PASS: gdb.base/info-shared.exp: continue to breakpoint: library function #4\n> +FAIL: gdb.base/info-shared.exp: continue to breakpoint: library function #4\n>\n> continue^M\n> Continuing.^M\n> ^M\n> Program received signal SIGSEGV, Segmentation fault.^M\n> 0x40021564 in ?? () gdb/testsuite/gdb.base/info-shared-solib1.so^M\n> (gdb) FAIL: gdb.base/info-shared.exp: continue to breakpoint: library function #4\n\nand an ARM displaced stepping bug is exposed.  It can be reproduced by\nthe modified gdb.arch/arm-disp-step.exp as below,\n\ncontinue^M\nContinuing.^M\n^M\nProgram received signal SIGSEGV, Segmentation fault.^M\n0xa713cfcc in ?? ()^M\n(gdb) FAIL: gdb.arch/arm-disp-step.exp: continue to breakpoint: continue to test_add_rn_pc_end\n\nThis patch is to fix it.\n\ngdb:\n\n2015-04-10  Yao Qi  <yao.qi@linaro.org>\n\n\t* arm-tdep.c (install_alu_reg): Update comment.\n\t(thumb_copy_alu_reg): Remove local variable rn.  Update\n\tdebugging message.  Use r2 instead of r1 in the modified\n\tinstruction.\n\ngdb/testsuite:\n\n2015-04-10  Yao Qi  <yao.qi@linaro.org>\n\n\t* gdb.arch/arm-disp-step.S (main): Call test_add_rn_pc.\n\t(test_add_rn_pc): New function.\n\t* gdb.arch/arm-disp-step.exp (test_add_rn_pc): New proc.\n\t(top level): Invoke test_add_rn_pc.","distinct":false,"url":"https://api.github.com/repos/bminor/binutils-gdb/commits/ef713951c571c8490ca57c17c88785c6df1ed840"},{"sha":"8d707a12ef51ba5f4c3c6a52532e903da7a56b8b","author":{"email":"c495fe4dba026c81f120733ccce155c132d5c6ba@redhat.com","name":"Pedro Alves"},"message":"gdb/18216: displaced step+deliver signal, a thread needs step-over, crash\n\nThe problem is that with hardware step targets and displaced stepping,\n\"signal FOO\" when stopped at a breakpoint steps the breakpoint\ninstruction at the same time it delivers a signal.  This results in\ntp->stepped_breakpoint set, but no step-resume breakpoint set.  When\nthe next stop event arrives, GDB crashes.  Irrespective of whether we\nshould do something more/different to step past the breakpoint in this\nscenario (e.g., PR 18225), it's just wrong to assume there'll be a\nstep-resume breakpoint set (and was not the original intention).\n\ngdb/ChangeLog:\n2015-04-10  Pedro Alves  <palves@redhat.com>\n\n\tPR gdb/18216\n\t* infrun.c (process_event_stop_test): Don't assume a step-resume\n\tis set if tp->stepped_breakpoint is true.\n\ngdb/testsuite/ChangeLog:\n2015-04-10  Pedro Alves  <palves@redhat.com>\n\n\tPR gdb/18216\n\t* gdb.threads/multiple-step-overs.exp: Remove expected eof.","distinct":false,"url":"https://api.github.com/repos/bminor/binutils-gdb/commits/8d707a12ef51ba5f4c3c6a52532e903da7a56b8b"},{"sha":"8d2ea2a80abad66250f2f4a1d38e3b8c796147f8","author":{"email":"64b285df2af30b39a5c8967bdd7812e31d1a9397@gmail.com","name":"Alan Modra"},"message":"Revert \"Add extern_protected_data and set it for x86\"\n\nThis reverts commit ca3fe95e469b9daec153caa2c90665f5daaec2b5.","distinct":false,"url":"https://api.github.com/repos/bminor/binutils-gdb/commits/8d2ea2a80abad66250f2f4a1d38e3b8c796147f8"},{"sha":"d07a1b059d790af3da88b9c750925d5a8db51250","author":{"email":"64b285df2af30b39a5c8967bdd7812e31d1a9397@gmail.com","name":"Alan Modra"},"message":"Downgrade linker error on protected symbols in .dynbss to a warning\n\n\tPR ld/18222\n\t* elflink.c (_bfd_elf_adjust_dynamic_copy): Don't report an error\n\ton adding a protected visibility variable to .dynbss.","distinct":false,"url":"https://api.github.com/repos/bminor/binutils-gdb/commits/d07a1b059d790af3da88b9c750925d5a8db51250"},{"sha":"8f572e5c0f71fd6641768985855b2e0955a78f51","author":{"email":"c495fe4dba026c81f120733ccce155c132d5c6ba@redhat.com","name":"Pedro Alves"},"message":"Fix gdb.base/sigstep.exp with displaced stepping on software single-step targets\n\nTL;DR:\n\nWhen stepping over a breakpoint with displaced stepping, the core must\nbe notified of all signals, otherwise the displaced step fixup code\nconfuses a breakpoint trap in the signal handler for the expected trap\nindicating the displaced instruction was single-stepped\nnormally/successfully.\n\nDetailed version:\n\nRunning sigstep.exp with displaced stepping on, against my x86\nsoftware single-step branch, I got:\n\n FAIL: gdb.base/sigstep.exp: step on breakpoint, to handler: performing step\n FAIL: gdb.base/sigstep.exp: next on breakpoint, to handler: performing next\n FAIL: gdb.base/sigstep.exp: continue on breakpoint, to handler: performing continue\n\nTurning on debug logs, we see:\n\n (gdb) step\n infrun: clear_proceed_status_thread (process 32147)\n infrun: proceed (addr=0xffffffffffffffff, signal=GDB_SIGNAL_DEFAULT)\n infrun: resume (step=1, signal=GDB_SIGNAL_0), trap_expected=1, current thread [process 32147] at 0x400842\n displaced: stepping process 32147 now\n displaced: saved 0x400622: 49 89 d1 5e 48 89 e2 48 83 e4 f0 50 54 49 c7 c0\n displaced: %rip-relative addressing used.\n displaced: using temp reg 2, old value 0x3615eafd37, new value 0x40084c\n displaced: copy 0x400842->0x400622: c7 81 1c 08 20 00 00 00 00 00\n displaced: displaced pc to 0x400622\n displaced: run 0x400622: c7 81 1c 08\n LLR: Preparing to resume process 32147, 0, inferior_ptid process 32147\n LLR: PTRACE_CONT process 32147, 0 (resume event thread)\n linux_nat_wait: [process -1], [TARGET_WNOHANG]\n LLW: enter\n LNW: waitpid(-1, ...) returned 32147, No child processes\n LLW: waitpid 32147 received Alarm clock (stopped)\n LLW: PTRACE_CONT process 32147, Alarm clock (preempt 'handle')\n LNW: waitpid(-1, ...) returned 0, No child processes\n LLW: exit (ignore)\n sigchld\n infrun: target_wait (-1.0.0, status) =\n infrun:   -1.0.0 [process -1],\n infrun:   status->kind = ignore\n infrun: TARGET_WAITKIND_IGNORE\n infrun: prepare_to_wait\n linux_nat_wait: [process -1], [TARGET_WNOHANG]\n LLW: enter\n LNW: waitpid(-1, ...) returned 32147, No child processes\n LLW: waitpid 32147 received Trace/breakpoint trap (stopped)\n CSBB: process 32147 stopped by software breakpoint\n LNW: waitpid(-1, ...) returned 0, No child processes\n LLW: trap ptid is process 32147.\n LLW: exit\n infrun: target_wait (-1.0.0, status) =\n infrun:   32147.32147.0 [process 32147],\n infrun:   status->kind = stopped, signal = GDB_SIGNAL_TRAP\n infrun: TARGET_WAITKIND_STOPPED\n displaced: restored process 32147 0x400622\n displaced: fixup (0x400842, 0x400622), insn = 0xc7 0x81 ...\n displaced: restoring reg 2 to 0x3615eafd37\n displaced: relocated %rip from 0x400717 to 0x400937\n infrun: stop_pc = 0x400937\n infrun: delayed software breakpoint trap, ignoring\n infrun: no line number info\n infrun: stop_waiting\n 0x0000000000400937 in __dso_handle ()\n 1: x/i $pc\n => 0x400937:    and    %ah,0xa0d64(%rip)        # 0x4a16a1\n (gdb) FAIL: gdb.base/sigstep.exp: displaced=on: step on breakpoint, to handler: performing step\n\n\nWhat should have happened is that the breakpoint hit in the signal\nhandler should have been presented to the user.  But note that\n\"preempt 'handle'\" -- what happened instead is that\ndisplaced_step_fixup confused the breakpoint in the signal handler for\nthe expected SIGTRAP indicating the displaced instruction was\nsingle-stepped normally/successfully.\n\nThis should be affecting all software single-step targets in the same\nway.\n\nThe fix is to make sure the core sees all signals when displaced\nstepping, just like we already must see all signals when doing an\nstepping over a breakpoint in-line.  We now get:\n\n infrun: target_wait (-1.0.0, status) =\n infrun:   570.570.0 [process 570],\n infrun:   status->kind = stopped, signal = GDB_SIGNAL_ALRM\n infrun: TARGET_WAITKIND_STOPPED\n displaced: restored process 570 0x400622\n infrun: stop_pc = 0x400842\n infrun: random signal (GDB_SIGNAL_ALRM)\n infrun: signal arrived while stepping over breakpoint\n infrun: inserting step-resume breakpoint at 0x400842\n infrun: resume (step=0, signal=GDB_SIGNAL_ALRM), trap_expected=0, current thread [process 570] at 0x400842\n LLR: Preparing to resume process 570, Alarm clock, inferior_ptid process 570\n LLR: PTRACE_CONT process 570, Alarm clock (resume event thread)\n infrun: prepare_to_wait\n linux_nat_wait: [process -1], [TARGET_WNOHANG]\n LLW: enter\n LNW: waitpid(-1, ...) returned 0, No child processes\n LLW: exit (ignore)\n infrun: target_wait (-1.0.0, status) =\n infrun:   -1.0.0 [process -1],\n infrun:   status->kind = ignore\n sigchld\n infrun: TARGET_WAITKIND_IGNORE\n infrun: prepare_to_wait\n linux_nat_wait: [process -1], [TARGET_WNOHANG]\n LLW: enter\n LNW: waitpid(-1, ...) returned 570, No child processes\n LLW: waitpid 570 received Trace/breakpoint trap (stopped)\n CSBB: process 570 stopped by software breakpoint\n LNW: waitpid(-1, ...) returned 0, No child processes\n LLW: trap ptid is process 570.\n LLW: exit\n infrun: target_wait (-1.0.0, status) =\n infrun:   570.570.0 [process 570],\n infrun:   status->kind = stopped, signal = GDB_SIGNAL_TRAP\n infrun: TARGET_WAITKIND_STOPPED\n infrun: stop_pc = 0x400717\n infrun: BPSTAT_WHAT_STOP_NOISY\n infrun: stop_waiting\n\n Breakpoint 3, handler (sig=14) at /home/pedro/gdb/mygit/src/gdb/testsuite/gdb.base/sigstep.c:35\n 35        done = 1;\n\nHardware single-step targets already behave this way, because the\nLinux backends (both native and gdbserver) always report signals to\nthe core if the thread was single-stepping.\n\nAs mentioned in the new comment in do_target_resume, we can't fix this\nby instead making the displaced_step_fixup phase skip fixing up the PC\nif the single step stopped somewhere we didn't expect.  Here's what\nthe backtrace would look like if we did that:\n\n Breakpoint 3, handler (sig=14) at /home/pedro/gdb/mygit/src/gdb/testsuite/gdb.base/sigstep.c:35\n 35        done = 1;\n 1: x/i $pc\n => 0x400717 <handler+7>:        movl   $0x1,0x200943(%rip)        # 0x601064 <done>\n (gdb) bt\n #0  handler (sig=14) at /home/pedro/gdb/mygit/src/gdb/testsuite/gdb.base/sigstep.c:35\n #1  <signal handler called>\n #2  0x0000000000400622 in _start ()\n (gdb) FAIL: gdb.base/sigstep.exp: displaced=on: step on breakpoint, to handler: backtrace\n\ngdb/ChangeLog:\n2015-04-10  Pedro Alves  <palves@redhat.com>\n\n\t* infrun.c (displaced_step_in_progress): New function.\n\t(do_target_resume): Advise target to report all signals if\n\tdisplaced stepping.\n\ngdb/testsuite/ChangeLog:\n2015-04-10  Pedro Alves  <palves@redhat.com>\n\n\t* gdb.base/sigstep.exp (breakpoint_to_handler)\n\t(breakpoint_to_handler_entry): New parameter 'displaced'.  Use it.\n\tTest \"backtrace\" in handler.\n\t(breakpoint_over_handler): New parameter 'displaced'.  Use it.\n\t(top level): Add new \"displaced\" test axis to\n\tbreakpoint_to_handler, breakpoint_to_handler_entry and\n\tbreakpoint_over_handler.","distinct":false,"url":"https://api.github.com/repos/bminor/binutils-gdb/commits/8f572e5c0f71fd6641768985855b2e0955a78f51"},{"sha":"030aeb759908d7bcf1b87f3599bfa482a90ab6c1","author":{"email":"e6b730070cb8ff71eb70dcaf29e26324d883b33b@gmail.com","name":"H.J. Lu"},"message":"Use bfd_alloc for compressed section contents\n\nCompressed section contents should be bfd_alloced to avoid memory leak.\nThis patch replaces bfd_malloc and free with bfd_alloc and bfd_release\non compressed buffer in bfd_compress_section_contents.  There is still\na very small memory leak when compressed section isn't smaller.\n\n\t* compress.c (bfd_compress_section_contents): Replace bfd_malloc\n\tand free with bfd_alloc and bfd_release on compressed buffer.\n\tRelease buffer if compressed section isn't smaller.","distinct":false,"url":"https://api.github.com/repos/bminor/binutils-gdb/commits/030aeb759908d7bcf1b87f3599bfa482a90ab6c1"},{"sha":"11e6e4c72cce2961f80e282cc4d859e7c266e17d","author":{"email":"e6b730070cb8ff71eb70dcaf29e26324d883b33b@gmail.com","name":"H.J. Lu"},"message":"Add a testcase for PR ld/18223\n\n\tPR ld/18223\n\t* ld-gc/gc.exp: Run pr18223.\n\t* ld-gc/pr18223.d: New file.\n\t* ld-gc/pr18223.s: Likewise.","distinct":false,"url":"https://api.github.com/repos/bminor/binutils-gdb/commits/11e6e4c72cce2961f80e282cc4d859e7c266e17d"},{"sha":"ebc90b50ce6377bf822c918eaf7c55bcd451ba45","author":{"email":"c495fe4dba026c81f120733ccce155c132d5c6ba@redhat.com","name":"Pedro Alves"},"message":"Make gdb.threads/step-over-trips-on-watchpoint.exp effective on !x86\n\nThis test is currently failing like this on (at least) PPC64 and s390x:\n\n FAIL: gdb.threads/step-over-trips-on-watchpoint.exp: no thread-specific bp: step: step\n FAIL: gdb.threads/step-over-trips-on-watchpoint.exp: no thread-specific bp: next: next\n FAIL: gdb.threads/step-over-trips-on-watchpoint.exp: with thread-specific bp: step: step\n FAIL: gdb.threads/step-over-trips-on-watchpoint.exp: with thread-specific bp: next: next\n\ngdb.log:\n\n (gdb) PASS: gdb.threads/step-over-trips-on-watchpoint.exp: no thread-specific bp: step: set scheduler-locking off\n step\n wait_threads () at ../../../src/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.c:49\n 49        return 1; /* in wait_threads */\n (gdb) FAIL: gdb.threads/step-over-trips-on-watchpoint.exp: no thread-specific bp: step: step\n\nThe problem is that the test assumes that both the \"watch_me = 1;\" and\nthe \"other = 1;\" lines compile to a single instruction each, which\nhappens to be true on x86, but no necessarily true everywhere else.\nThe result is that the test doesn't really test what it wants to test.\n\nFix it by looking for the instruction that triggers the watchpoint.\n\ngdb/ChangeLog:\n2015-04-10  Pedro Alves  <palves@redhat.com>\n\n\t* gdb.threads/step-over-trips-on-watchpoint.c (child_function):\n\tRemove comment.\n\t* gdb.threads/step-over-trips-on-watchpoint.exp (do_test): Find\n\tboth the address of the instruction that triggers the watchpoint\n\tand the address of the instruction immediately after, and use\n\tthose addresses for the test.  Fix comment.","distinct":false,"url":"https://api.github.com/repos/bminor/binutils-gdb/commits/ebc90b50ce6377bf822c918eaf7c55bcd451ba45"},{"sha":"c79d856c88fbc58584d811c04b4812618aa6ac7b","author":{"email":"c495fe4dba026c81f120733ccce155c132d5c6ba@redhat.com","name":"Pedro Alves"},"message":"Test step-over-{lands-on-breakpoint|trips-on-watchpoint}.exp with displaced stepping\n\nThese tests exercise the infrun.c:proceed code that needs to know to\nstart new step overs (along with switch_back_to_stepped_thread, etc.).\nThat code is tricky to get right in the multitude of possible\ncombinations (at least):\n\n (native | remote)\n  X (all-stop | all-stop-but-target-always-in-non-stop)\n  X (displaced-stepping | in-line step-over).\n\nThe first two above are properties of the target, but the different\nstep-over-breakpoint methods should work with any target that supports\nthem.  This patch makes sure we always test both methods on all\ntargets.\n\nTested on x86-64 Fedora 20.\n\ngdb/testsuite/ChangeLog:\n2015-04-10  Pedro Alves  <palves@redhat.com>\n\n\t* gdb.threads/step-over-lands-on-breakpoint.exp (do_test): New\n\tprocedure, factored out from ...\n\t(top level): ... here.  Add \"set displaced-stepping\" testing axis.\n\t* gdb.threads/step-over-trips-on-watchpoint.exp (do_test): New\n\tparameter \"displaced\".  Use it.\n\t(top level): Use foreach and add \"set displaced-stepping\" testing\n\taxis.","distinct":false,"url":"https://api.github.com/repos/bminor/binutils-gdb/commits/c79d856c88fbc58584d811c04b4812618aa6ac7b"},{"sha":"cb71640d030500888726d54a310c434a4d23b7b3","author":{"email":"c495fe4dba026c81f120733ccce155c132d5c6ba@redhat.com","name":"Pedro Alves"},"message":"PPC64: Fix step-over-trips-on-watchpoint.exp with displaced stepping on\n\nPPC64 currently fails this test like:\n\n FAIL: gdb.threads/step-over-trips-on-watchpoint.exp: displaced=on: no thread-specific bp: step: step\n FAIL: gdb.threads/step-over-trips-on-watchpoint.exp: displaced=on: no thread-specific bp: next: next\n FAIL: gdb.threads/step-over-trips-on-watchpoint.exp: displaced=on: no thread-specific bp: continue: continue (the program exited)\n FAIL: gdb.threads/step-over-trips-on-watchpoint.exp: displaced=on: with thread-specific bp: step: step\n FAIL: gdb.threads/step-over-trips-on-watchpoint.exp: displaced=on: with thread-specific bp: next: next\n FAIL: gdb.threads/step-over-trips-on-watchpoint.exp: displaced=on: with thread-specific bp: continue: continue (the program exited)\n\nThe problem is that PPC is a non-continuable watchpoints architecture\nand the displaced stepping code isn't coping with that correctly.  On\nsuch targets/architectures, a watchpoint traps _before_ the\ninstruction executes/completes.  On a watchpoint trap, the PC points\nat the instruction that triggers the watchpoint (side effects haven't\nhappened yet).  In order to move past the watchpoint, GDB needs to\nremove the watchpoint, single-step, and reinsert the watchpoint, just\nlike when stepping past a breakpoint.\n\nThe trouble is that if GDB is stepping over a breakpoint with\ndisplaced stepping, and the instruction under the breakpoint triggers\na watchpoint, we get the watchpoint SIGTRAP, expecting a finished\n(hard or software) step trap.  Even though the thread's PC hasn't\nadvanced yet (must remove watchpoint for that), since we get a\nSIGTRAP, displaced_step_fixup thinks the single-step finished\nsuccessfuly anyway, and calls gdbarch_displaced_step_fixup, which then\nadjusts the thread's registers incorrectly.\n\nThe fix is to cancel the displaced step if we trip on a watchpoint.\nhandle_inferior_event then processes the watchpoint event, and starts\na new step-over, here:\n\n...\n      /* At this point, we are stopped at an instruction which has\n         attempted to write to a piece of memory under control of\n         a watchpoint.  The instruction hasn't actually executed\n         yet.  If we were to evaluate the watchpoint expression\n         now, we would get the old value, and therefore no change\n         would seem to have occurred.\n...\n      ecs->event_thread->stepping_over_watchpoint = 1;\n      keep_going (ecs);\n      return;\n...\n\nbut this time, since we have a watchpoint to step over, watchpoints\nare removed from the target, so the step-over succeeds.\n\nThe keep_going/resume changes are necessary because if we're stepping\nover a watchpoint, we need to remove it from the target - displaced\nstepping doesn't help, the copy of the instruction in the scratch pad\nreads/writes to the same addresses, thus triggers the watchpoint\ntoo...  So without those changes we keep triggering the watchpoint\nforever, never making progress.  With non-stop that means we'll need\nto pause all threads momentarily, which we can't today.  We could\navoid that by removing the watchpoint _only_ from the thread that is\nmoving past the watchpoint, but GDB is not prepared for that today\neither.  For remote targets, that would need new packets, so good to\nbe able to step over it in-line as fallback anyway.\n\ngdb/ChangeLog:\n2015-04-10  Pedro Alves  <palves@redhat.com>\n\n\t* infrun.c (displaced_step_fixup): Switch to the event ptid\n\tearlier.  If the thread stopped for a watchpoint and the\n\ttarget/arch has non-continuable watchpoints, cancel the displaced\n\tstep.\n\t(resume): Don't start a displaced step if in-line step-over info\n\tis valid.","distinct":false,"url":"https://api.github.com/repos/bminor/binutils-gdb/commits/cb71640d030500888726d54a310c434a4d23b7b3"},{"sha":"de3db44c87a30c67deb38fa9d43d2db3bc98c161","author":{"email":"82697eede7783c80d18ae8c0d02575d32c9ac359@linaro.org","name":"Yao Qi"},"message":"[arm] watchpoint-reuse-slot.exp: skip setting HW points on some address\n\nHi,\nARM linux kernel has some requirements on the address/length setting\nfor HW breakpoints/watchpoints, but watchpoint-reuse-slot.exp doesn't\nconsider them and sets HW points on various addresses.  Many fails\nare causes as a result:\n\nstepi^M\nWarning:^M\nCould not insert hardware watchpoint 20.^M\nCould not insert hardware breakpoints:^M\nYou may have requested too many hardware breakpoints/watchpoints.^M\n^M\n(gdb) FAIL: gdb.base/watchpoint-reuse-slot.exp: always-inserted off: watch x watch: : width 2, iter 2: base + 1: stepi advanced\n\nwatch *(buf.byte + 2 + 1)@2^M\nHardware watchpoint 388: *(buf.byte + 2 + 1)@2^M\nWarning:^M\nCould not insert hardware watchpoint 388.^M\nCould not insert hardware breakpoints:^M\nYou may have requested too many hardware breakpoints/watchpoints.^M\n^M\n(gdb) FAIL: gdb.base/watchpoint-reuse-slot.exp: always-inserted on: watch x watch: : width 2, iter 2: base + 1: watch *(buf.byte + 2 + 1)@2\n\nThis patch is to reflect kernel requirements in watchpoint-reuse-slot.exp\nin order to skip some tests.\n\ngdb/testsuite:\n\n2015-04-10  Yao Qi  <yao.qi@linaro.org>\n\n\t* gdb.base/watchpoint-reuse-slot.exp (valid_addr_p): Return\n\tfalse for some offset and width combinations which aren't\n\tsupported by linux kernel.","distinct":false,"url":"https://api.github.com/repos/bminor/binutils-gdb/commits/de3db44c87a30c67deb38fa9d43d2db3bc98c161"},{"sha":"f74839702efcea048ac61374b1539ae81e7c86cc","author":{"email":"e6b730070cb8ff71eb70dcaf29e26324d883b33b@gmail.com","name":"H.J. Lu"},"message":"Add extern_protected_data and set it for x86\n\nRe-apply: commit ca3fe95e469b9daec153caa2c90665f5daaec2b5\n\nWith copy relocation, address of protected data defined in the shared\nlibrary may be external.  This patch adds extern_protected_data and\nchanges _bfd_elf_symbol_refs_local_p to return false for protected data\nif extern_protected_data is true.\n\nThis patch will break building shared libraries with protected data\nsymbols using GCCs older than GCC 5 without the bug fix for\n\nhttps://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248\n\nGCC backport request should be made in the GCC bug report above.\n\nTo get correct run-time behavior on Linux, glibc 2.22 or above are\nrequired, which have the bug fix for\n\nhttps://sourceware.org/bugzilla/show_bug.cgi?id=17711\n\nBackports for glibc 2.21, 2.20, 2.19 and 2.18 are on hjl/pr17711/2.21,\nhjl/pr17711/2.20, hjl/pr17711/2.19 and hjl/pr17711/2.18 branches,\nrespectively, at\n\nhttps://sourceware.org/git/?p=glibc.git;a=summary\n\nbfd/\n\n\tPR ld/pr15228\n\tPR ld/pr17709\n\t* elf-bfd.h (elf_backend_data): Add extern_protected_data.\n\t* elf32-i386.c (elf_backend_extern_protected_data): New.\n\tDefined to 1.\n\t* elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.\n\t* elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on\n\tcopy relocs against protected symbols if extern_protected_data\n\tis true.\n\t(_bfd_elf_symbol_refs_local_p): Don't return true on protected\n\tnon-function symbols if extern_protected_data is true.\n\t* elfxx-target.h (elf_backend_extern_protected_data): New.\n\tDefault to 0.\n\t(elfNN_bed): Initialize extern_protected_data with\n\telf_backend_extern_protected_data.\n\nld/testsuite/\n\n\tPR ld/pr15228\n\tPR ld/pr17709\n\t* ld-i386/i386.exp (i386tests): Add a test for PR ld/17709.\n\t* ld-i386/pr17709-nacl.rd: New file.\n\t* ld-i386/pr17709.rd: Likewise.\n\t* ld-i386/pr17709a.s: Likewise.\n\t* ld-i386/pr17709b.s: Likewise.\n\t* ld-i386/protected3.d: Updated.\n\t* ld-i386/protected3.s: Likewise.\n\t* ld-x86-64/pr17709-nacl.rd: New file.\n\t* ld-x86-64/pr17709.rd: Likewise.\n\t* ld-x86-64/pr17709a.s: Likewise.\n\t* ld-x86-64/pr17709b.s: Likewise.\n\t* ld-x86-64/protected3.d: Updated.\n\t* ld-x86-64/protected3.s: Likewise.\n\t* ld-x86-64/x86-64.exp (x86_64tests): Add a test for PR ld/17709.","distinct":false,"url":"https://api.github.com/repos/bminor/binutils-gdb/commits/f74839702efcea048ac61374b1539ae81e7c86cc"},{"sha":"07473109e11e41d979c33b839551ac1c6f8495b9","author":{"email":"c495fe4dba026c81f120733ccce155c132d5c6ba@redhat.com","name":"Pedro Alves"},"message":"step-over-trips-on-watchpoint.exp: Don't put addresses in test messages\n\nDiffing test results, I noticed:\n\n -PASS: gdb.threads/step-over-trips-on-watchpoint.exp: displaced=on: with thread-specific bp: next: b *0x0000000000400811 thread 1\n +PASS: gdb.threads/step-over-trips-on-watchpoint.exp: displaced=on: with thread-specific bp: next: b *0x00000000004007d1 thread 1\n\ngdb/testsuite/ChangeLog:\n2015-04-10  Pedro Alves  <palves@redhat.com>\n\n\t* gdb.threads/step-over-trips-on-watchpoint.exp (do_test): Use\n\ttest messages that don't include the breakpoint address.","distinct":false,"url":"https://api.github.com/repos/bminor/binutils-gdb/commits/07473109e11e41d979c33b839551ac1c6f8495b9"},{"sha":"9ee417720b2f25c56a9738569b63f686cbc8584f","author":{"email":"c495fe4dba026c81f120733ccce155c132d5c6ba@redhat.com","name":"Pedro Alves"},"message":"Cleanup signal-while-stepping-over-bp-other-thread.exp\n\ngdb/testsuite/ChangeLog:\n2015-04-10  Pedro Alves  <palves@redhat.com>\n\n\t* gdb.threads/signal-while-stepping-over-bp-other-thread.exp: Use\n\tgdb_test_sequence and gdb_assert.","distinct":false,"url":"https://api.github.com/repos/bminor/binutils-gdb/commits/9ee417720b2f25c56a9738569b63f686cbc8584f"},{"sha":"3d9499950a94df8577fa01ba98ec0d58f07fd9c0","author":{"email":"e6b730070cb8ff71eb70dcaf29e26324d883b33b@gmail.com","name":"H.J. Lu"},"message":"Check GOTOFF reloc against protected data on x86\n\nR_386_GOTOFF/R_X86_64_GOTOFF64 relocation shouldn't be used against\nprotected data symbol on x86 since with copy relocation, address of\nprotected data defined in the shared library may be external.\n\nThis patch will break building shared libraries with protected data\nsymbols using GCCs older than GCC 5 without the bug fix for\n\nhttps://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248\n\nGCC backport request should be made in the GCC bug report above.\n\nbfd/\n\n\tPR ld/pr17709\n\t* elf32-i386.c (elf_i386_relocate_section): Also check R_386_GOTOFF\n\tagainst protected data symbol when building shared library.\n\t* elf64-x86-64.c (elf_x86_64_relocate_section): Also check\n\tR_X86_64_GOTOFF64 against protected data symbol when building\n\tshared library.\n\nld/testsuite/\n\n\tPR ld/pr17709\n\t* ld-i386/protected6.d: New file.\n\t* ld-i386/protected6.s: Likewise.\n\t* ld-x86-64/protected6.d: Likewise.\n\t* ld-x86-64/protected6.s: Likewise.\n\t* ld-x86-64/protected7.d: Likewise.\n\t* ld-x86-64/protected7.s: Likewise.\n\t* ld-x86-64/protected7a.d: Likewise.\n\t* ld-x86-64/protected7b.d: Likewise.","distinct":false,"url":"https://api.github.com/repos/bminor/binutils-gdb/commits/3d9499950a94df8577fa01ba98ec0d58f07fd9c0"}]}