[DynInst_API:] [dyninst/dyninst] 3112ed: Revised MemoryAccessAdapter.C


Date: Thu, 07 Mar 2019 10:30:53 -0800
From: Tim Haines <noreply@xxxxxxxxxx>
Subject: [DynInst_API:] [dyninst/dyninst] 3112ed: Revised MemoryAccessAdapter.C
  Branch: refs/heads/dev
  Home:   https://github.com/dyninst/dyninst
  Commit: 3112edc1d2ca587ee27df180db826c3900d253f9
      https://github.com/dyninst/dyninst/commit/3112edc1d2ca587ee27df180db826c3900d253f9
  Author: Yuhan Xie <xie75@xxxxxxxx>
  Date:   2019-02-01 (Fri, 01 Feb 2019)

  Changed paths:
    M dyninstAPI/src/BPatch_memoryAccessAdapter.C

  Log Message:
  -----------
  Revised MemoryAccessAdapter.C


  Commit: 1666a9a9e21d0fdbf21b401a1bbe15549a4d73e1
      https://github.com/dyninst/dyninst/commit/1666a9a9e21d0fdbf21b401a1bbe15549a4d73e1
  Author: ScorpionXiezi <qan9677@xxxxxx>
  Date:   2019-02-01 (Fri, 01 Feb 2019)

  Changed paths:
    M dyninstAPI/src/BPatch_memoryAccessAdapter.C
    M dyninstAPI/src/BPatch_memoryAccessAdapter.h
    M dyninstAPI/src/inst-aarch64.C

  Log Message:
  -----------
  Fixed the decode of operands in load/store instructions, the number of SP register is needed to fix


  Commit: 7382d5adb563daa16a5654793ab498a8861a4170
      https://github.com/dyninst/dyninst/commit/7382d5adb563daa16a5654793ab498a8861a4170
  Author: ScorpionXiezi <qan9677@xxxxxx>
  Date:   2019-02-06 (Wed, 06 Feb 2019)

  Changed paths:
    M common/h/dyn_regs.h
    M dyninstAPI/src/BPatch_memoryAccessAdapter.C
    M dyninstAPI/src/inst-aarch64.C

  Log Message:
  -----------
  Fixed AST visitor


  Commit: 013382f3348dd6915d51bf4fa6ad6b8d47d71d5f
      https://github.com/dyninst/dyninst/commit/013382f3348dd6915d51bf4fa6ad6b8d47d71d5f
  Author: ScorpionXiezi <qan9677@xxxxxx>
  Date:   2019-02-11 (Mon, 11 Feb 2019)

  Changed paths:
    M dyninstAPI/src/inst-aarch64.C

  Log Message:
  -----------
  Realized Effective address calculation. Add & shift instruction might need further debug


  Commit: 154e41f7923ce7a15ca58b4b2fae6b5ce15160de
      https://github.com/dyninst/dyninst/commit/154e41f7923ce7a15ca58b4b2fae6b5ce15160de
  Author: ScorpionXiezi <qan9677@xxxxxx>
  Date:   2019-02-13 (Wed, 13 Feb 2019)

  Changed paths:
    M dyninstAPI/src/BPatch_memoryAccessAdapter.C
    M dyninstAPI/src/inst-aarch64.C

  Log Message:
  -----------
  Effective Address calculation implemented, debug prints removed.


  Commit: 4f4418cd2cd9252bdf6f84e16d16e3a1be31a0ed
      https://github.com/dyninst/dyninst/commit/4f4418cd2cd9252bdf6f84e16d16e3a1be31a0ed
  Author: Sasha @leela <sasha@xxxxxxxxxxx>
  Date:   2019-02-13 (Wed, 13 Feb 2019)

  Changed paths:
    M .gitignore
    R .travis.yml
    M CMakeLists.txt
    R appveyor.yml
    M common/src/addrtranslate-linux.C
    M common/src/addrtranslate-sysv.C
    M common/src/pathName.C
    M common/src/pathName.h
    M common/src/serialize-bin.C
    M dataflowAPI/rose/semantics/DispatcherPowerpc.C
    M dataflowAPI/rose/util/Message.C
    M dataflowAPI/rose/util/Message.h
    M dwarf/h/dwarfFrameParser.h
    M dwarf/src/dwarfFrameParser.C
    M dyninstAPI/src/codegen-aarch64.C
    M dyninstAPI/src/codegen-x86.C
    M dyninstAPI/src/emit-x86.h
    M dyninstAPI/src/freebsd.C
    M dyninstAPI/src/inst-x86.C
    M dyninstAPI/src/parse-power.C
    M dyninstAPI_RT/src/RTcommon.c
    M dyninstAPI_RT/src/RTstatic_ctors_dtors-ppc64.c
    M instructionAPI/src/InstructionDecoder-aarch64.h
    M parseAPI/h/CFG.h
    M parseAPI/src/Parser.C
    M proccontrol/src/linux.C
    M proccontrol/src/loadLibrary/codegen-freebsd.C
    M proccontrol/src/process.C
    M symtabAPI/src/Object-elf.C
    M symtabAPI/src/Symtab-edit.C
    M symtabAPI/src/dwarfWalker.C
    M symtabAPI/src/emitElf.C
    M symtabAPI/src/emitElfStatic-ppc64.C
    M symtabAPI/src/emitElfStatic-x86.C
    M symtabAPI/src/emitElfStatic.C

  Log Message:
  -----------
  Merge branch 'ARMv8' into ARM_effcAddr


  Commit: 8871efe5daa1dec718ed86ced6b62e4fc8c236c1
      https://github.com/dyninst/dyninst/commit/8871efe5daa1dec718ed86ced6b62e4fc8c236c1
  Author: Sasha @leela <sasha@xxxxxxxxxxx>
  Date:   2019-02-14 (Thu, 14 Feb 2019)

  Changed paths:
    M instructionAPI/src/InstructionDecoder-aarch64.h
    M instructionAPI/src/aarch64_opcode_tables.C

  Log Message:
  -----------
  Fix unnecessary multiple calls to buildSysRegMap.

This function should be called only once, but was being called for every
instruction to be decoded. As a result, dyninst would take a long time
to execute. Now to simply run test1_1 on create mode takes 28 seconds,
as opposed to 58 before this fix, and now closer to 20 seconds for x86_64.


  Commit: fe7edc0422987d26ccc45fd1bad689d32a97d110
      https://github.com/dyninst/dyninst/commit/fe7edc0422987d26ccc45fd1bad689d32a97d110
  Author: Sasha @leela <sasha@xxxxxxxxxxx>
  Date:   2019-02-15 (Fri, 15 Feb 2019)

  Changed paths:
    M common/h/dyn_regs.h
    M dyninstAPI/src/BPatch_memoryAccessAdapter.C
    M dyninstAPI/src/BPatch_memoryAccessAdapter.h
    M dyninstAPI/src/inst-aarch64.C

  Log Message:
  -----------
  Merge branch 'ARM_effcAddr' into ARMv8


  Commit: 3303009b24f60bf415f0500a152c0d80891f7d6f
      https://github.com/dyninst/dyninst/commit/3303009b24f60bf415f0500a152c0d80891f7d6f
  Author: Xiaozhu Meng <xmeng@xxxxxxxxxxx>
  Date:   2019-02-18 (Mon, 18 Feb 2019)

  Changed paths:
    M dyninstAPI/src/BPatch_snippet.C
    M dyninstAPI/src/dynProcess.h
    M dyninstAPI/src/mapped_object.C
    M dyninstAPI/src/pdwinnt.C
    M dyninstAPI/src/unix.C
    M dyninstAPI/src/vxworks.C

  Log Message:
  -----------
  In dynamic instrumentation for PIE, finding variables's locations needs to add the load base of the PIE.

Get rid of wrong, special handling of finding the load base of PIE.


  Commit: 2724e2766a047d2bb071b79dff764cd42e7467e5
      https://github.com/dyninst/dyninst/commit/2724e2766a047d2bb071b79dff764cd42e7467e5
  Author: Xiaozhu Meng <xmeng@xxxxxxxxxxx>
  Date:   2019-02-18 (Mon, 18 Feb 2019)

  Changed paths:
    M dyninstAPI/src/Relocation/Widgets/PCWidget.C

  Log Message:
  -----------
  On x86-64, when emulating call with push & jmp, the push needs to push all 64-bit of the callee addresses.


  Commit: 9e5ee0412f789014125b1552c1117a0569b10384
      https://github.com/dyninst/dyninst/commit/9e5ee0412f789014125b1552c1117a0569b10384
  Author: Xiaozhu Meng <xmeng@xxxxxxxxxxx>
  Date:   2019-02-18 (Mon, 18 Feb 2019)

  Changed paths:
    M dyninstAPI/src/inst-power.C

  Log Message:
  -----------
  A few fixes for PIC instrumentation on power

1. Fix PC-relative load and store of variables
2. The preamble of PIE uses R12 to set up R2. However,
when generating intra-module calls, Dyninst does not
set up R12 and will call the global entry, causing R2 to
be incorrect. Since there is no need to change R2 for
intra-module calls, we should call the local entry


  Commit: c4e7266d3486498a32d09134a4cb31078e01003b
      https://github.com/dyninst/dyninst/commit/c4e7266d3486498a32d09134a4cb31078e01003b
  Author: Xiaozhu Meng <xmeng@xxxxxxxxxxx>
  Date:   2019-02-18 (Mon, 18 Feb 2019)

  Changed paths:
    M dyninstAPI/src/Relocation/Widgets/CFWidget-ppc.C

  Log Message:
  -----------
  Fix function call replacment on power for PIC.

Need to call local entry when doing an intra-module call


  Commit: 0ef48ba3d4bbcf4c6b0f5c9d6ee01c0d32c3a5ec
      https://github.com/dyninst/dyninst/commit/0ef48ba3d4bbcf4c6b0f5c9d6ee01c0d32c3a5ec
  Author: Xiaozhu Meng <xmeng@xxxxxxxxxxx>
  Date:   2019-02-18 (Mon, 18 Feb 2019)

  Changed paths:
    M symtabAPI/src/emitElfStatic-x86.C

  Log Message:
  -----------
  Handle relocation type R_X86_64_REX_GOTPCRELX for binary rewriting of
statically linked binaries on x86-64


  Commit: 558b8b3a36504491a1a9697cbbdae497a52ef697
      https://github.com/dyninst/dyninst/commit/558b8b3a36504491a1a9697cbbdae497a52ef697
  Author: Bill Williams <bill@xxxxxxxxxxx>
  Date:   2019-02-19 (Tue, 19 Feb 2019)

  Changed paths:
    M stackwalk/src/linux-aarch64-swk.C

  Log Message:
  -----------
  Add ucontext based sighandler stepper implementation

Update list of default steppers


  Commit: cf1c071c6676a00e6ea1d9a09650432464c7c581
      https://github.com/dyninst/dyninst/commit/cf1c071c6676a00e6ea1d9a09650432464c7c581
  Author: Bill Williams <bill@xxxxxxxxxxx>
  Date:   2019-02-19 (Tue, 19 Feb 2019)

  Changed paths:
    M stackwalk/src/linux-swk.C

  Log Message:
  -----------
  Add aarch64 sigreturn names


  Commit: 5bba5bd63c8f03a4f26b027da15a842ec8033758
      https://github.com/dyninst/dyninst/commit/5bba5bd63c8f03a4f26b027da15a842ec8033758
  Author: Xiaozhu Meng <xmeng@xxxxxxxxxxx>
  Date:   2019-02-19 (Tue, 19 Feb 2019)

  Changed paths:
    M stackwalk/src/dbginfo-stepper.C

  Log Message:
  -----------
  Should continue to apply other steppers when the DebugStepper cannot find corresponding libraries. This could happen for a signal handler frame.


  Commit: fb1b826e30c0f491d21022a4e507fad5c682ed40
      https://github.com/dyninst/dyninst/commit/fb1b826e30c0f491d21022a4e507fad5c682ed40
  Author: Xiaozhu Meng <xmeng@xxxxxxxxxxx>
  Date:   2019-02-19 (Tue, 19 Feb 2019)

  Changed paths:
    M stackwalk/src/aarch64-swk.C
    M stackwalk/src/linux-aarch64-swk.C
    M stackwalk/src/linux-swk.C

  Log Message:
  -----------
  For ARMv8 stack walking,
1. the signal return trampoline code is in the vsyscall page (vdso)
2. the ucontext_t structure is not on the top of the stack, but a specific offset. May need to find a better way to determine its location.
3. the FrameFuncStepper needs to check whether it should be applied


  Commit: 7425ef1b7fc7d4c1f6fa70649501580354491b3c
      https://github.com/dyninst/dyninst/commit/7425ef1b7fc7d4c1f6fa70649501580354491b3c
  Author: Xiaozhu Meng <xmeng@xxxxxxxxxxx>
  Date:   2019-02-19 (Tue, 19 Feb 2019)

  Changed paths:
    M stackwalk/src/dbginfo-stepper.C
    M stackwalk/src/walker.C

  Log Message:
  -----------
  1. A function that does a system may not save x30 onto stack, such as raise. For these functions, the return address is not on the stack and should be found in the ucontext
2. The stackwalk vector in Walker::walkStackFromFrame is used as an output parameter. When new frames are pushed into the vector, the vector may realloc spaces. Each frame has a prev_frame pointer points to the previous frame. This prev_frame pointer has to be updated for frames, when the vector reallocation happened.


  Commit: 9e2c3e99cb072f521d9b7f0975570d5a9c713892
      https://github.com/dyninst/dyninst/commit/9e2c3e99cb072f521d9b7f0975570d5a9c713892
  Author: Xiaozhu Meng <xmeng@xxxxxxxxxxx>
  Date:   2019-02-19 (Tue, 19 Feb 2019)

  Changed paths:
    M stackwalk/src/dbginfo-stepper.C

  Log Message:
  -----------
  The previous fix should only be compiled on arm


  Commit: 335da1ccb3c1bc5ac9b4f974a0820b82012298f0
      https://github.com/dyninst/dyninst/commit/335da1ccb3c1bc5ac9b4f974a0820b82012298f0
  Author: Sasha @leela <sasha@xxxxxxxxxxx>
  Date:   2019-02-19 (Tue, 19 Feb 2019)

  Changed paths:
    M stackwalk/src/aarch64-swk.C
    M stackwalk/src/dbginfo-stepper.C

  Log Message:
  -----------
  Including sys/ucontext.h for ucontext_t;
Adding debug print at aarch64-sw.C


  Commit: 8e4f8ccf90c97eeeb5f64c1d30f889fcdb4ec25a
      https://github.com/dyninst/dyninst/commit/8e4f8ccf90c97eeeb5f64c1d30f889fcdb4ec25a
  Author: Xiaozhu Meng <xmeng@xxxxxxxxxxx>
  Date:   2019-02-27 (Wed, 27 Feb 2019)

  Changed paths:
    M dyninstAPI/src/stackwalk-aarch64.C
    M stackwalk/src/aarch64-swk.C
    M stackwalk/src/dbginfo-stepper.C
    M stackwalk/src/framestepper.C
    M stackwalk/src/linux-aarch64-swk.C

  Log Message:
  -----------
  Start to fix stackwalk on ARM
1. Fix signal handler stepper (assumes that ucontext is the first object of the frame)
2. Extend the function prologue matching range in FrameFuncStepper and delete unused previous frame check
3. Temporarily disable debug stepper because its implementation is wrong

Also DyninstAPI does propertly use stackwalkAPI:
1. DyninstAPI's own FrameFuncStepperHelper is wrong. Do not use it and use the default one in stackwalkAPI
2. DyninstAPI should also use SigHandlerStepper and BottomOfStackStepper


  Commit: c926d33bfd2cb3275aa0fc2cc9428dd6267cc068
      https://github.com/dyninst/dyninst/commit/c926d33bfd2cb3275aa0fc2cc9428dd6267cc068
  Author: Xiaozhu Meng <xmeng@xxxxxxxxxxx>
  Date:   2019-03-02 (Sat, 02 Mar 2019)

  Changed paths:
    M dyninstAPI/src/inst-aarch64.C
    M dyninstAPI/src/inst-aarch64.h
    M dyninstAPI/src/stackwalk-aarch64.C
    M stackwalk/src/aarch64-swk.C

  Log Message:
  -----------
  Fix stackwalk for instrumentation on ARM


  Commit: 672f269b3a1966ee4fec3400286fb7d0bcdae172
      https://github.com/dyninst/dyninst/commit/672f269b3a1966ee4fec3400286fb7d0bcdae172
  Author: Xiaozhu Meng <xmeng@xxxxxxxxxxx>
  Date:   2019-03-05 (Tue, 05 Mar 2019)

  Changed paths:
    M stackwalk/src/aarch64-swk.C
    M stackwalk/src/frame.C

  Log Message:
  -----------
  Handle special case of stackwalking involving non-returning functions


  Commit: b71b35c760ea1e97ea41702b184c105bdaa576ee
      https://github.com/dyninst/dyninst/commit/b71b35c760ea1e97ea41702b184c105bdaa576ee
  Author: Tim <thaines.astro@xxxxxxxxx>
  Date:   2019-03-07 (Thu, 07 Mar 2019)

  Changed paths:
    M common/h/dyn_regs.h
    M dyninstAPI/src/BPatch_memoryAccessAdapter.C
    M dyninstAPI/src/BPatch_memoryAccessAdapter.h
    M dyninstAPI/src/inst-aarch64.C
    M dyninstAPI/src/inst-aarch64.h
    M dyninstAPI/src/stackwalk-aarch64.C
    M instructionAPI/src/InstructionDecoder-aarch64.h
    M instructionAPI/src/aarch64_opcode_tables.C
    M stackwalk/src/aarch64-swk.C
    M stackwalk/src/dbginfo-stepper.C
    M stackwalk/src/frame.C
    M stackwalk/src/framestepper.C
    M stackwalk/src/linux-aarch64-swk.C
    M stackwalk/src/linux-swk.C
    M stackwalk/src/walker.C

  Log Message:
  -----------
  Merge remote-tracking branch 'dyninst/ARMv8_stackwalk' into dev


Compare: https://github.com/dyninst/dyninst/compare/3354e6fcee5a...b71b35c760ea
[← Prev in Thread] Current Thread [Next in Thread→]