From 14c0fd431165f3a8eca97ee263aff0a2ad0f86f8 Mon Sep 17 00:00:00 2001 From: tamches Date: Thu, 30 Jan 1997 18:30:02 +0000 Subject: [PATCH] replace use of getMaxBranch1Insn() with offsetWithinRangeOfBranchInsn() --- dyninstAPI/src/inst-sparc-sunos.C | 3 ++- paradynd/src/inst-sparc-sunos.C | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dyninstAPI/src/inst-sparc-sunos.C b/dyninstAPI/src/inst-sparc-sunos.C index ea0837e..03785f9 100644 --- a/dyninstAPI/src/inst-sparc-sunos.C +++ b/dyninstAPI/src/inst-sparc-sunos.C @@ -286,7 +286,8 @@ void relocateInstruction(instruction *insn, u_int origAddr, u_int targetAddr, // heap for a call instruction to branch target. The base tramp // will branch to this new inferior heap code, which will call the // target of the branch - if (ABS(newOffset) > getMaxBranch1Insn()) { + if (!offsetWithinRangeOfBranchInsn(newOffset)) { +// if (ABS(newOffset) > getMaxBranch1Insn()) { int ret = inferiorMalloc(proc,3*sizeof(instruction), textHeap); u_int old_offset = insn->branch.disp22 << 2; // TODO: this is the wrong branch offset diff --git a/paradynd/src/inst-sparc-sunos.C b/paradynd/src/inst-sparc-sunos.C index ea0837e..03785f9 100755 --- a/paradynd/src/inst-sparc-sunos.C +++ b/paradynd/src/inst-sparc-sunos.C @@ -286,7 +286,8 @@ void relocateInstruction(instruction *insn, u_int origAddr, u_int targetAddr, // heap for a call instruction to branch target. The base tramp // will branch to this new inferior heap code, which will call the // target of the branch - if (ABS(newOffset) > getMaxBranch1Insn()) { + if (!offsetWithinRangeOfBranchInsn(newOffset)) { +// if (ABS(newOffset) > getMaxBranch1Insn()) { int ret = inferiorMalloc(proc,3*sizeof(instruction), textHeap); u_int old_offset = insn->branch.disp22 << 2; // TODO: this is the wrong branch offset -- 1.8.3.1