Age | Commit message (Collapse) | Author | Files | Lines |
|
gdb/ChangeLog:
Update year range in copyright notice of all files.
|
|
ppc64le loses control when stepping between two PLT-called functions inside
a shared library:
29 shlib_second (); /* first-hit */^M
(gdb) PASS: gdb.base/solib-intra-step.exp: first-hit
step^M
^M
Program received signal SIGABRT, Aborted.^M
0x00003fffb7cbe578 in __GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56^M
56 return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);^M
(gdb) FAIL: gdb.base/solib-intra-step.exp: second-hit
->
29 shlib_second (); /* first-hit */^M
(gdb) PASS: gdb.base/solib-intra-step.exp: first-hit
step^M
shlib_second () at ./gdb.base/solib-intra-step-lib.c:23^M
23 abort (); /* second-hit */^M
(gdb) PASS: gdb.base/solib-intra-step.exp: second-hit
This is because gdbarch_skip_trampoline_code() will resolve the final function
as shlib_second+0 and place there the breakpoint, but ld.so will jump after
the breakpoint - at shlib_second+8 - as it is ELFv2 local symbol optimization:
Dump of assembler code for function shlib_second:
0x0000000000000804 <+0>: addis r2,r12,2
0x0000000000000808 <+4>: addi r2,r2,30668
0x000000000000080c <+8>: mflr r0
Currently gdbarch_skip_entrypoint() has been called in skip_prologue_sal() and
fill_in_stop_func() but that is not enough. I believe
gdbarch_skip_entrypoint() should be called after every
gdbarch_skip_trampoline_code().
gdb/ChangeLog
2015-09-15 Jan Kratochvil <jan.kratochvil@redhat.com>
* linespec.c (minsym_found): Call gdbarch_skip_entrypoint.
* ppc64-tdep.c (ppc64_skip_trampoline_code): Rename to ...
(ppc64_skip_trampoline_code_1): ... here.
(ppc64_skip_trampoline_code): New wrapper function.
* symtab.c (find_function_start_sal): Call gdbarch_skip_entrypoint.
gdb/testsuite/ChangeLog
2015-09-15 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.opt/solib-intra-step-lib.c: New file.
* gdb.opt/solib-intra-step-main.c: New file.
* gdb.opt/solib-intra-step.exp: New file.
|
|
gdb/ChangeLog:
* ppc-linux-tdep.c (ppc_skip_trampoline_code,
ppc_canonicalize_syscall, ppc_linux_syscall_record,
ppc_linux_record_signal, ppc_init_linux_record_tdep): Add comments.
* ppc64-tdep.c (ppc64_skip_trampoline_code): Likewise.
* rs6000-tdep.c (rs6000_epilogue_frame_cache,
rs6000_epilogue_frame_this_id, rs6000_epilogue_frame_prev_register,
rs6000_epilogue_frame_sniffer, ppc_record_vsr, ppc_process_record_op4,
ppc_process_record_op19, ppc_process_record_op31,
ppc_process_record_op59, ppc_process_record_op60,
ppc_process_record_op63): Likewise.
|
|
|
|
gdb/ChangeLog:
Update year range in copyright notice of all files.
|
|
Power8 fuses addis,addi and addis,ld sequences when the target of the
addis is the same as the addi/ld. Thus
addis r12,r2,xxx@ha
addi r12,r12,xxx@l / ld r12,xxx@l(r12)
is faster than
addis r11,r2,xxx@ha
addi r12,r11,xxx@l / ld r12,xxx@l(r11)
So use the form that allows fusion in plt call and branch stubs.
bfd/
* elf64-ppc.c (ADDIS_R12_R2): Define.
(build_plt_stub): Support fusion on ELFv2 stub.
(ppc_build_one_stub): Likewise for plt branch stubs.
gold/
* powerpc.cc (addis_12_2): Define.
(Stub_table::do_write): Support fusion on ELFv2 stubs.
ld/testsuite/
* ld-powerpc/elfv2exe.d: Update for changed plt call stubs.
gdb/
* ppc64-tdep.c (ppc64_standard_linkage8): New.
(ppc64_skip_trampoline_code): Recognise ELFv2 stub supporting fusion.
|
|
The ppc64_standard_linkage7 pattern added by Alan's recent patch:
https://sourceware.org/ml/gdb-patches/2013-11/msg00274.html
contains a typo: the ELFv2 TOC slot offset is 24, not 40.
This was correct in the comment, but not the actual code.
ChangeLog:
* ppc64-tdep.c (ppc64_standard_linkage7): Fix typo.
|
|
|
|
ELFv2 needs different plt call stubs to ELFv1, register usage differs
too. When I added these to ld I changed register usage in the ELFv1
stubs as well, simplifying the linker code and (perhaps) future
maintenance. All well and good, but this means gdb needs to cope with
more stub variants. This patch also handles skipping over addis/addi
setting up r2 in ELFv2 global entry code. We want breakpoints to be
set past this point to catch calls via the local entry point.
* ppc64-tdep.c (ppc64_plt_entry_point): Renamed from..
(ppc64_desc_entry_point): ..this. Update comments here and at
call points.
(ppc64_standard_linkage1, ppc64_standard_linkage2,
ppc64_standard_linkage3): Update comments.
(ppc64_standard_linkage4, ppc64_standard_linkage5,
(ppc64_standard_linkage6, ppc64_standard_linkage7): New insn
patterns.
(ppc64_standard_linkage4_target): New function.
(ppc64_skip_trampoline_code): Skip ELFv2 patterns too.
* rs6000-tdep.c (skip_prologue): Skip ELFv2 r2 setup. Correct
nop match. Fix comment wrap.
|
|
target_section.bfd deleted.
* ppc64-tdep.c (ppc64_convert_from_func_ptr_addr): Ditto.
* s390-tdep.c (s390_load): Ditto.
* solib-aix.c (solib_aix_relocate_section_addresses): Ditto.
|
|
* rs6000-tdep.c (read_insn): Add frame param, don't assume big-endian.
(ppc_insns_match_pattern): Add frame param. Avoid multiple
target mem reads on optional insns.
* ppc-linux-tdep.c (ppc_skip_trampoline_code): Update
ppc_insns_match_pattern calls.
* ppc64-tdep.c (ppc64_standard_linkage2, ppc64_standard_linkage3):
Add match for power7 thread safety insns, and new order of
std 2,40(1) insn. Correct code shown for _dl_runtime_resolve
invocation in comment, and update rest of comment.
(PPC64_STANDARD_LINKAGE1_LEN, PPC64_STANDARD_LINKAGE2_LEN,
PPC64_STANDARD_LINKAGE3_LEN): Delete.
(ppc64_standard_linkage2_target): Update insn offsets.
(ppc64_skip_trampoline_code): Use a single insn buffer. Match newer
stubs first. Update calls.
|
|
symbol size.
* ppc64-tdep.c (ppc64_elf_make_msymbol_special): New function.
* ppc64-tdep.h (ppc64_elf_make_msymbol_special): Declare.
* ppc-linux-tdep.c (ppc_linux_init_abi): Set up to use the above.
* ppcfbsd-tdep.c (ppcfbsd_init_abi): Likewise.
|
|
|