dyninst.git
4 years agoClean compiler warnings
Matthew LeGendre [Wed, 18 Mar 2015 21:51:42 +0000 (14:51 -0700)]
Clean compiler warnings

4 years agoClean stderr printfs out of libsymtabAPI
Matthew LeGendre [Wed, 18 Mar 2015 18:49:15 +0000 (11:49 -0700)]
Clean stderr printfs out of libsymtabAPI

4 years agoTailcall fix: if target block is known but is not func entry, not tail call
Emily Gember-Jacobson [Thu, 5 Mar 2015 16:55:58 +0000 (10:55 -0600)]
Tailcall fix: if target block is known but is not func entry, not tail call

4 years agoVarious slicing fixes.
Alex Morris [Tue, 17 Mar 2015 02:51:18 +0000 (21:51 -0500)]
Various slicing fixes.
This commit fixes recursion in the backwards case with multiple
assignments of interest from the same instruction. The mechanism
of using control-flow edges to control recursion and access cached
edges has been removed. Also, duplicate nodes are not created for
initial assignments that are in loops, and non-processor flag nodes
without outgoing edges are no longer erroneously deleted.

4 years agoHandle missing DW_FRAME_UNDEFINED_VAL case correctly.
Bill Williams [Wed, 4 Mar 2015 19:30:56 +0000 (13:30 -0600)]
Handle missing DW_FRAME_UNDEFINED_VAL case correctly.

4 years agoDead thread fix.
Bill Williams [Thu, 26 Feb 2015 20:15:33 +0000 (14:15 -0600)]
Dead thread fix.

4 years agoFix register operand size issue
Xiaozhu Meng [Mon, 23 Feb 2015 03:17:22 +0000 (21:17 -0600)]
Fix register operand size issue

4 years agoAdd error checking to verify that libraries passed to thread local functions belong...
Matthew LeGendre [Fri, 20 Feb 2015 19:45:44 +0000 (11:45 -0800)]
Add error checking to verify that libraries passed to thread local functions belong to the appropriate process.

4 years agoIn ProcControlAPI int_library objects, add an up pointer to track which mem_state...
Matthew LeGendre [Fri, 20 Feb 2015 19:44:14 +0000 (11:44 -0800)]
In ProcControlAPI int_library objects, add an up pointer to track which mem_state they belong to.

4 years agoForce frame pointers in stackwalker, no matter the optimization level
Bill Williams [Thu, 12 Feb 2015 18:47:34 +0000 (12:47 -0600)]
Force frame pointers in stackwalker, no matter the optimization level

4 years agoFix missing parameter name from inline wrapper
Bill Williams [Thu, 12 Feb 2015 17:43:24 +0000 (11:43 -0600)]
Fix missing parameter name from inline wrapper

4 years agoTLS-based tramp guards and cleanup
Bill Williams [Wed, 11 Feb 2015 19:13:16 +0000 (13:13 -0600)]
TLS-based tramp guards and cleanup

Ensure tramp guard gets unlocked by DYNINSTBaseInit so that static binaries work

4 years agoUpdated addBlocks to extend blocks to include as many NOPs as possible.
Emily Gember-Jacobson [Thu, 12 Feb 2015 22:59:57 +0000 (16:59 -0600)]
Updated addBlocks to extend blocks to include as many NOPs as possible.

4 years agoUpdated generatePush64 to 14-byte sequence (from 17)
Emily Gember-Jacobson [Mon, 9 Feb 2015 23:04:49 +0000 (17:04 -0600)]
Updated generatePush64 to 14-byte sequence (from 17)

4 years agoIn AddressSpace::relocate, add functions with overlapping blocks
Emily Gember-Jacobson [Fri, 6 Feb 2015 20:46:46 +0000 (14:46 -0600)]
In AddressSpace::relocate, add functions with overlapping blocks
to the list of modified functions.
Search per-block (func might contain shared blocks) rather than
just entry block (func might be contained in other funcs).

4 years agoHandle non-returning system calls.
Emily Gember-Jacobson [Thu, 12 Feb 2015 22:20:36 +0000 (16:20 -0600)]
Handle non-returning system calls.

4 years agoImproved PC error return codes when doing operations on exited threads.
Matthew LeGendre [Thu, 12 Feb 2015 18:09:13 +0000 (10:09 -0800)]
Improved PC error return codes when doing operations on exited threads.

4 years agoIn PC, don't do the "stopped threads don't throw events" asserts for exiting threads...
Matthew LeGendre [Thu, 12 Feb 2015 18:08:49 +0000 (10:08 -0800)]
In PC, don't do the "stopped threads don't throw events" asserts for exiting threads on Linux.  Cause they can.

4 years agoAdd .note.GNU-stack sections to RT assembly files to allow for non-executable stacks...
Matthew LeGendre [Thu, 12 Feb 2015 18:03:48 +0000 (10:03 -0800)]
Add .note.GNU-stack sections to RT assembly files to allow for non-executable stacks in rewritten binaries.

4 years agoAllow SymtabAPI to find ELF TLS variables in variable lookup interface
Matthew LeGendre [Mon, 29 Dec 2014 22:11:30 +0000 (14:11 -0800)]
Allow SymtabAPI to find ELF TLS variables in variable lookup interface

4 years agoProcControlAPI support for reading and writing TLS variables
Matthew LeGendre [Mon, 29 Dec 2014 17:57:31 +0000 (09:57 -0800)]
ProcControlAPI support for reading and writing TLS variables

4 years agoMerge branch 'symtab_opt'
Bill Williams [Thu, 5 Feb 2015 16:54:23 +0000 (10:54 -0600)]
Merge branch 'symtab_opt'

4 years agoCodeObject::findBlocks forces a full parse. Just look in the current function.
Bill Williams [Wed, 4 Feb 2015 18:02:31 +0000 (12:02 -0600)]
CodeObject::findBlocks forces a full parse. Just look in the current function.

4 years agoAdd last-demangle caching in P_cplus_demangle.
Bill Williams [Wed, 4 Feb 2015 17:18:45 +0000 (11:18 -0600)]
Add last-demangle caching in P_cplus_demangle.

4 years agoSwitch to hashed indexes for faster access
Bill Williams [Fri, 30 Jan 2015 17:37:05 +0000 (11:37 -0600)]
Switch to hashed indexes for faster access

4 years agoTurned off excess debugging statements in RoseInsnFactory::convert
Emily Gember-Jacobson [Tue, 27 Jan 2015 21:59:49 +0000 (15:59 -0600)]
Turned off excess debugging statements in RoseInsnFactory::convert

4 years agoAdd DATAFLOW_EXPORT to the SliceNode class
Emily Gember-Jacobson [Tue, 27 Jan 2015 21:08:18 +0000 (15:08 -0600)]
Add DATAFLOW_EXPORT to the SliceNode class

4 years agoVarious fixes
Bill Williams [Thu, 22 Jan 2015 19:10:42 +0000 (13:10 -0600)]
Various fixes

4 years agoUse more space-efficient form of interval tree (most intervals non-overlapping) for...
Bill Williams [Thu, 15 Jan 2015 19:46:27 +0000 (13:46 -0600)]
Use more space-efficient form of interval tree (most intervals non-overlapping) for parsing

4 years agoPlug a DWARF leak. milestone_4
Bill Williams [Wed, 14 Jan 2015 01:31:01 +0000 (19:31 -0600)]
Plug a DWARF leak.

4 years agoCode cleanup.
Bill Williams [Tue, 13 Jan 2015 22:27:24 +0000 (16:27 -0600)]
Code cleanup.

4 years agoInitial implementation of lazy demangling
Bill Williams [Fri, 9 Jan 2015 18:12:41 +0000 (12:12 -0600)]
Initial implementation of lazy demangling

4 years agoLazy demangling of symbol names (per use, not cached at all). Shifted to boost multi...
Bill Williams [Fri, 2 Jan 2015 21:17:49 +0000 (15:17 -0600)]
Lazy demangling of symbol names (per use, not cached at all). Shifted to boost multi-index containers.
TODO: CMake check for multi-index containers in boost, remove dead member variables, evaluate at real scale.

4 years agoCode cleanup for STABS/PE line info milestone_3
Bill Williams [Mon, 12 Jan 2015 19:06:51 +0000 (13:06 -0600)]
Code cleanup for STABS/PE line info

4 years agoPer-CU line info parsing. Will break horribly on Windows.
Bill Williams [Fri, 12 Dec 2014 21:27:30 +0000 (15:27 -0600)]
Per-CU line info parsing. Will break horribly on Windows.

4 years agoRemove some leaks from DwarfWalker.
Bill Williams [Wed, 10 Dec 2014 22:15:15 +0000 (16:15 -0600)]
Remove some leaks from DwarfWalker.

4 years agoRead ELF machine field for architecture
Bill Williams [Wed, 12 Nov 2014 19:32:34 +0000 (13:32 -0600)]
Read ELF machine field for architecture

5 years agoUse makeSizeType instead of address width
Emily Gember-Jacobson [Fri, 21 Nov 2014 17:44:11 +0000 (11:44 -0600)]
Use makeSizeType instead of address width
for calculating LEA size in makeModRMExpression.

5 years agoFixed typo and signed/unsigned comparsion in handleNormalCall
Emily Gember-Jacobson [Thu, 20 Nov 2014 15:16:57 +0000 (09:16 -0600)]
Fixed typo and signed/unsigned comparsion in handleNormalCall

5 years agoCleaned up some old commentary in InstructionDecoder-x86.C
Emily Gember-Jacobson [Thu, 20 Nov 2014 14:59:08 +0000 (08:59 -0600)]
Cleaned up some old commentary in InstructionDecoder-x86.C

5 years agoBottom callee-written registers in StackAnalysis::handleNormalCall
Emily Gember-Jacobson [Wed, 19 Nov 2014 19:48:01 +0000 (13:48 -0600)]
Bottom callee-written registers in StackAnalysis::handleNormalCall

5 years agoFix switch of u64/u32 in makeModRMExpression
Emily Gember-Jacobson [Fri, 14 Nov 2014 17:07:27 +0000 (11:07 -0600)]
Fix switch of u64/u32 in makeModRMExpression

5 years agoMerge branch 'master' into LoopAnalysis
Xiaozhu Meng [Tue, 4 Nov 2014 19:23:06 +0000 (13:23 -0600)]
Merge branch 'master' into LoopAnalysis

5 years agoMerge branch 'v8.2'
Bill Williams [Tue, 4 Nov 2014 19:21:04 +0000 (13:21 -0600)]
Merge branch 'v8.2'

Conflicts:
common/CMakeLists.txt

5 years agoMerge branch 'master' of ssh://git.dyninst.org/pub/dyninst
Bill Williams [Tue, 4 Nov 2014 19:19:43 +0000 (13:19 -0600)]
Merge branch 'master' of ssh://git.dyninst.org/pub/dyninst

5 years agoMerge branch 'v8.2' of ssh://git.dyninst.org/pub/dyninst into v8.2 v8.2.1
Bill Williams [Thu, 30 Oct 2014 15:49:43 +0000 (10:49 -0500)]
Merge branch 'v8.2' of ssh://git.dyninst.org/pub/dyninst into v8.2

5 years agoAnother fix for op_v/op_lea/op_z in makeSizeType
Emily Gember-Jacobson [Wed, 29 Oct 2014 16:29:49 +0000 (11:29 -0500)]
Another fix for op_v/op_lea/op_z in makeSizeType

5 years agoKill spurious printfs
Bill Williams [Wed, 29 Oct 2014 15:50:03 +0000 (10:50 -0500)]
Kill spurious printfs

5 years agoApply patch to skip vdso and linux-gate by name; they shouldn't show up in link maps...
Bill Williams [Tue, 28 Oct 2014 20:41:08 +0000 (15:41 -0500)]
Apply patch to skip vdso and linux-gate by name; they shouldn't show up in link maps but do

5 years agoMerge branch 'v8.2' into LoopAnalysis
Xiaozhu Meng [Tue, 28 Oct 2014 15:54:05 +0000 (10:54 -0500)]
Merge branch 'v8.2' into LoopAnalysis

5 years agoFix in makeSizeType for op_v/op_lea/op_z
Emily Gember-Jacobson [Mon, 27 Oct 2014 18:09:29 +0000 (13:09 -0500)]
Fix in makeSizeType for op_v/op_lea/op_z

5 years agoFix for typo in if statement
Bill Williams [Thu, 23 Oct 2014 19:00:54 +0000 (14:00 -0500)]
Fix for typo in if statement

5 years agoMerge branch 'v8.2' of ssh://git.dyninst.org/pub/dyninst into v8.2
Bill Williams [Wed, 22 Oct 2014 17:53:59 +0000 (12:53 -0500)]
Merge branch 'v8.2' of ssh://git.dyninst.org/pub/dyninst into v8.2

5 years agoTreat branches at function entry points as tail calls (handles Windows incremental...
Bill Williams [Tue, 21 Oct 2014 20:47:42 +0000 (15:47 -0500)]
Treat branches at function entry points as tail calls (handles Windows incremental linking stubs correctly)

5 years agoClean up indentation, and discard line information that points to junk addresses.
Bill Williams [Fri, 17 Oct 2014 16:16:08 +0000 (11:16 -0500)]
Clean up indentation, and discard line information that points to junk addresses.

5 years agoTransform asserts into graceful failure if things are inconsistent, and fix debug...
Bill Williams [Fri, 17 Oct 2014 16:14:54 +0000 (11:14 -0500)]
Transform asserts into graceful failure if things are inconsistent, and fix debug output.

5 years agocmake: Properly extend BUG_DEFINES on ppc linux
Josh Stone [Fri, 17 Oct 2014 00:42:58 +0000 (17:42 -0700)]
cmake: Properly extend BUG_DEFINES on ppc linux

Both ppc32_linux and ppc64_linux set -Dbug_registers_after_exit in
BUG_DEFINES, but in doing so they clobbered the general linux bugs.  In
particular, -Dbug_syscall_changepc_rewind is still needed.  This patch
lets ppc just add its definition while keeping the others.

Our RHEL7 QA noticed this as a regression from 8.1.2, so I believe it
just broke as part of the transition to cmake.  In their smoke test, a
mutatee process in sleep() is attached, and it promptly crashes SIGILL
on the first iRPC.  I found that the iRPC was at 0x3fffb1f70000, and
proccontrol is setting that pc, but the crash is at 0x3fffb1f6fffc.  So
that appears to be the rewind issue, and a full BUG_DEFINES fixes it.

Reported-by: Michael Petlan <mpetlan@redhat.com>
Signed-off-by: Josh Stone <jistone@redhat.com>
5 years agoFix to makeSIBExpression so we don't double-count the displacement
Emily Gember-Jacobson [Wed, 15 Oct 2014 19:17:00 +0000 (14:17 -0500)]
Fix to makeSIBExpression so we don't double-count the displacement

5 years agoDecode immediates in makeSIB as signed
Emily Gember-Jacobson [Mon, 13 Oct 2014 18:25:52 +0000 (13:25 -0500)]
Decode immediates in makeSIB as signed

5 years agoUpdate PatchAPI manual and clean some code comments
Xiaozhu Meng [Tue, 14 Oct 2014 18:53:56 +0000 (13:53 -0500)]
Update PatchAPI manual and clean some code comments

5 years ago1. Update ParseAPI, PatchAPI, and DyninstAPI Loop interface.
Xiaozhu Meng [Tue, 14 Oct 2014 03:27:25 +0000 (22:27 -0500)]
1. Update ParseAPI, PatchAPI, and DyninstAPI Loop interface.
2. Update DyninstAPI loop instrumentation point code

5 years agoAdd loop interface documentation in ParseAPI
Xiaozhu Meng [Mon, 13 Oct 2014 22:44:48 +0000 (17:44 -0500)]
Add loop interface documentation in ParseAPI

5 years agoFix DWARF location list parsing to handle base address selection entries, which are...
Matthew LeGendre [Fri, 10 Oct 2014 19:01:32 +0000 (12:01 -0700)]
Fix DWARF location list parsing to handle base address selection entries, which are documented in section 2.6.2 of the DWARF4 standard.

5 years agoMerge branch 'v8.2' of ssh://git.dyninst.org/pub/dyninst into v8.2
Bill Williams [Wed, 8 Oct 2014 19:34:48 +0000 (14:34 -0500)]
Merge branch 'v8.2' of ssh://git.dyninst.org/pub/dyninst into v8.2

5 years agoFix for tailcall parsing crash
Bill Williams [Mon, 6 Oct 2014 19:00:34 +0000 (14:00 -0500)]
Fix for tailcall parsing crash

5 years agoImplement WMZC loop detection algorithm in ParseAPI
Xiaozhu Meng [Tue, 30 Sep 2014 01:24:01 +0000 (20:24 -0500)]
Implement WMZC loop detection algorithm in ParseAPI

5 years agoUpdate patch version for 8.2.1
Bill Williams [Tue, 23 Sep 2014 16:58:57 +0000 (11:58 -0500)]
Update patch version for 8.2.1

5 years agoFix incorrect variable reference
Bill Williams [Mon, 22 Sep 2014 21:40:41 +0000 (16:40 -0500)]
Fix incorrect variable reference

5 years agoTail call parsing fix: properly create new functions as the targets of tail calls.
Bill Williams [Mon, 22 Sep 2014 16:41:55 +0000 (11:41 -0500)]
Tail call parsing fix: properly create new functions as the targets of tail calls.

5 years agoUpdate FindLibIberty to use consistent names and logic with other packages.
Bill Williams [Mon, 22 Sep 2014 16:11:37 +0000 (11:11 -0500)]
Update FindLibIberty to use consistent names and logic with other packages.

5 years agoAny base tramp that makes a call with FPRs live and FPR saves enabled should check...
Bill Williams [Mon, 15 Sep 2014 19:04:58 +0000 (14:04 -0500)]
Any base tramp that makes a call with FPRs live and FPR saves enabled should check liveness and save XMM/all registers as appropriate; do not assume call/entry/exit are safe.

5 years agoTail call parsing fix: properly create new functions as the targets of tail calls.
Bill Williams [Mon, 22 Sep 2014 16:41:55 +0000 (11:41 -0500)]
Tail call parsing fix: properly create new functions as the targets of tail calls.

5 years agoUpdate FindLibIberty to use consistent names and logic with other packages.
Bill Williams [Mon, 22 Sep 2014 16:11:37 +0000 (11:11 -0500)]
Update FindLibIberty to use consistent names and logic with other packages.

5 years agoFix incomplete initialization of class PatchFunction
Xiaozhu Meng [Thu, 18 Sep 2014 20:58:08 +0000 (15:58 -0500)]
Fix incomplete initialization of class PatchFunction

5 years agoFix typos in calculating post dominator info
Xiaozhu Meng [Tue, 16 Sep 2014 15:36:03 +0000 (10:36 -0500)]
Fix typos in calculating post dominator info

5 years agoMerge branch 'master' into LoopAnalysis
Xiaozhu Meng [Tue, 16 Sep 2014 02:56:50 +0000 (21:56 -0500)]
Merge branch 'master' into LoopAnalysis

5 years agoFix bugs in copying loop tree info
Xiaozhu Meng [Tue, 16 Sep 2014 02:55:03 +0000 (21:55 -0500)]
Fix bugs in copying loop tree info

5 years agochange dyninstAPI loop interface and dominator info interface to use PatchAPI
Xiaozhu Meng [Tue, 16 Sep 2014 02:06:33 +0000 (21:06 -0500)]
change dyninstAPI loop interface and dominator info interface to use PatchAPI

5 years agoAny base tramp that makes a call with FPRs live and FPR saves enabled should check...
Bill Williams [Mon, 15 Sep 2014 19:04:58 +0000 (14:04 -0500)]
Any base tramp that makes a call with FPRs live and FPR saves enabled should check liveness and save XMM/all registers as appropriate; do not assume call/entry/exit are safe.

5 years agoAdd loop interface and dominator info interface to PatchAPI
Xiaozhu Meng [Mon, 15 Sep 2014 18:24:16 +0000 (13:24 -0500)]
Add loop interface and dominator info interface to PatchAPI

5 years agoDecouple calculation for loops, loop nesting structure, and dominator information
Xiaozhu Meng [Fri, 12 Sep 2014 19:44:14 +0000 (14:44 -0500)]
Decouple calculation for loops, loop nesting structure, and dominator information

5 years agoFix problem where struct/union types didn't get size info from DWARF, which could...
Matthew LeGendre [Wed, 10 Sep 2014 22:18:41 +0000 (15:18 -0700)]
Fix problem where struct/union types didn't get size info from DWARF, which could lead to inaccurate heuristics failing to calculate their size.

5 years agoA large inode number could roll the struct map_entries's signed int and cause a fault.
Matthew LeGendre [Wed, 10 Sep 2014 22:14:26 +0000 (15:14 -0700)]
A large inode number could roll the struct map_entries's signed int and cause a fault.

5 years agoRevert "Fix issue with frames having an unset walker member variable, which caused...
Matthew LeGendre [Wed, 10 Sep 2014 20:32:48 +0000 (13:32 -0700)]
Revert "Fix issue with frames having an unset walker member variable, which caused problems during name/line lookups."

This reverts commit 7b09a435cef926ab93313d24268bbec1023ea110.

5 years agoMerge tag 'v8.2.0.1'
Bill Williams [Fri, 5 Sep 2014 16:53:00 +0000 (11:53 -0500)]
Merge tag 'v8.2.0.1'

Release 8.2, final fixes

5 years agoMerge branch 'master' of ssh://git.dyninst.org/pub/dyninst
Bill Williams [Fri, 5 Sep 2014 16:52:56 +0000 (11:52 -0500)]
Merge branch 'master' of ssh://git.dyninst.org/pub/dyninst

Conflicts:
cmake/optimization.cmake

5 years agoCopy natural loop analysis to ParseAPI and create loop interfaces in ParseAPI
Xiaozhu Meng [Fri, 29 Aug 2014 15:42:48 +0000 (10:42 -0500)]
Copy natural loop analysis to ParseAPI and create loop interfaces in ParseAPI

5 years agoFix issue with frames having an unset walker member variable, which caused problems...
Matthew LeGendre [Tue, 19 Aug 2014 21:42:56 +0000 (14:42 -0700)]
Fix issue with frames having an unset walker member variable, which caused problems during name/line lookups.

5 years agoFixes for RTlib 32 bit option to behave correctly. v8.2.0.1
Bill Williams [Tue, 19 Aug 2014 19:59:44 +0000 (14:59 -0500)]
Fixes for RTlib 32 bit option to behave correctly.

5 years agoCMake changes for better/safer RTlib assembly building. v8.2.0
Bill Williams [Tue, 19 Aug 2014 17:46:18 +0000 (12:46 -0500)]
CMake changes for better/safer RTlib assembly building.

5 years agoExport the extern declaration too
Bill Williams [Mon, 18 Aug 2014 16:54:55 +0000 (11:54 -0500)]
Export the extern declaration too

5 years agoBetter error message for unset RTlib name
Bill Williams [Mon, 18 Aug 2014 16:06:36 +0000 (11:06 -0500)]
Better error message for unset RTlib name

5 years agoStackwalker fix from Matt
Bill Williams [Mon, 18 Aug 2014 16:06:20 +0000 (11:06 -0500)]
Stackwalker fix from Matt

5 years agoUpdated manuals.
Bill Williams [Mon, 18 Aug 2014 15:59:28 +0000 (10:59 -0500)]
Updated manuals.

5 years agoAdded Makefile.doc files for latex-based manuals.
Emily Gember-Jacobson [Mon, 18 Aug 2014 15:37:25 +0000 (10:37 -0500)]
Added Makefile.doc files for latex-based manuals.

5 years agodyninstAPI_RT: add DLLEXPORT to DYNINSTstaticMode
Josh Stone [Tue, 12 Aug 2014 01:20:43 +0000 (18:20 -0700)]
dyninstAPI_RT: add DLLEXPORT to DYNINSTstaticMode

This variable is used by the mutator now, and it needs to be fully
exported to remain visible in a distro-packager stripped binary.

5 years agoparseAPI: return size_t from Function::num_blocks()
Josh Stone [Mon, 11 Aug 2014 19:38:50 +0000 (12:38 -0700)]
parseAPI: return size_t from Function::num_blocks()

Changing to size_t from int better matches the size of the underlying type,
and also allows comparison to other sizes without any "signed vs. unsigned"
warnings.  This function is new to 8.2, so API/ABI isn't a concern.

A few places which used num_blocks() in dyninstAPI are also updated to
size_t, but none of these are in public headers.

5 years agoSpringboard: revert a kludge from conflictInRelocated
Josh Stone [Mon, 11 Aug 2014 19:29:54 +0000 (12:29 -0700)]
Springboard: revert a kludge from conflictInRelocated

The root problem in springboards from relocated code should be solved by
commit de280f74f40e, so we can now allow this to return false again when
no reasons for conflict are found.

5 years agoproccontrol: correct the format string of a debug printf
Josh Stone [Mon, 11 Aug 2014 19:24:53 +0000 (12:24 -0700)]
proccontrol: correct the format string of a debug printf

5 years agodyninstAPI: Match EdgePredicateAdapter::pred_impl to its parent
Josh Stone [Mon, 21 Apr 2014 17:47:44 +0000 (10:47 -0700)]
dyninstAPI: Match EdgePredicateAdapter::pred_impl to its parent

GCC 4.8.2 says:

parseAPI/h/ParseContainers.h:58:15: warning: ‘bool Dyninst::ParseAPI::iterator_predicate<VALUE, REFERENCE>::pred_impl(REFERENCE) const [with VALUE = edge_instance*; REFERENCE = edge_instance*]’ was hidden [-Woverloaded-virtual]
  virtual bool pred_impl(const REFERENCE) const
               ^
dyninstAPI/src/block.h:75:17: warning:   by ‘virtual bool EdgePredicateAdapter::pred_impl(const edge_instance*) const’ [-Woverloaded-virtual]
    virtual bool pred_impl(const edge_instance *e) const { return int_->pred_impl(e->edge()); };
                 ^

In this case, "REFERENCE" is "edge_instance *", and since the const
applies to the template type as a whole, the parameter at the base class
is effectively "edge_instance * const".  Derived EdgePredicateAdapter
needs to match that signature to avoid the warning.

Note: in iterator_predicate, with "REFERENCE = VALUE &", the effective
type of "const REFERENCE" is "VALUE & const", which is not a useful
thing to say since references are always unchanging.  The intent was
probably to arrive at "const VALUE &", equivalently "VALUE const &".
But since this is in a public interface, I'll leave it alone for now.