Skip to content

Commit

Permalink
Add dyninstAPI/InstWidget.h
Browse files Browse the repository at this point in the history
  • Loading branch information
hainest committed Apr 3, 2024
1 parent dc48218 commit 6dff10a
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 6 deletions.
38 changes: 38 additions & 0 deletions docs/dyninstAPI/developer/Relocation/Widgets/InstWidget.h.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,41 @@ InstWidget.h
############

.. cpp:namespace:: Dyninst::Relocation

.. cpp:class:: InstWidget : public Widget

.. cpp:type:: boost::shared_ptr<InstWidget> Ptr
.. cpp:function:: static Ptr create(instPoint *i)

I believe I can patch in the current code generation system here...

.. cpp:function:: InstWidget(instPoint *i)

This sucks. It seriously sucks. But hey... this points to all the baseTramps
with instrumentation at this point. This can be 0, 1, or 2 - 2 if we have post
instruction + pre instruction instrumentation.

.. cpp:function:: bool empty() const
.. cpp:function:: bool generate(const codeGen &, const RelocBlock *, CodeBuffer &)
.. cpp:function:: TrackerElement *tracker() const
.. cpp:function:: virtual ~InstWidget()
.. cpp:function:: virtual std::string format() const
.. cpp:member:: private instPoint *point_


.. cpp:struct:: InstWidgetPatch : public Patch

.. cpp:function:: private InstWidgetPatch(baseTramp *a)
.. cpp:function:: private virtual bool apply(codeGen &gen, CodeBuffer *buf)
.. cpp:function:: private virtual unsigned estimate(codeGen &templ)
.. cpp:function:: private virtual ~InstWidgetPatch()
.. cpp:member:: private baseTramp *tramp


.. cpp:struct:: RemovedInstWidgetPatch : public Patch

.. cpp:function:: private RemovedInstWidgetPatch(baseTramp *a)
.. cpp:function:: private virtual bool apply(codeGen &gen, CodeBuffer *)
.. cpp:function:: private virtual unsigned estimate(codeGen &templ)
.. cpp:function:: private virtual ~RemovedInstWidgetPatch()
.. cpp:member:: private baseTramp *tramp
6 changes: 0 additions & 6 deletions dyninstAPI/src/Relocation/Widgets/InstWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,10 @@ class InstWidget : public Widget {
public:
typedef boost::shared_ptr<InstWidget> Ptr;

// I believe I can patch in the current code generation
// system here...
static Ptr create(instPoint *i);

InstWidget(instPoint *i) : point_(i) {}

// This sucks. It seriously sucks. But hey...
// this points to all the baseTramps with instrumentation
// at this point. This can be 0, 1, or 2 - 2 if we have
// post instruction + pre instruction instrumentation.

bool empty() const;

Expand Down

0 comments on commit 6dff10a

Please sign in to comment.