Skip to content

Commit

Permalink
Add dyninstAPI/src/BPatch_thread.C
Browse files Browse the repository at this point in the history
  • Loading branch information
hainest committed Apr 3, 2024
1 parent 1c0c356 commit 64ca263
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 28 deletions.
4 changes: 4 additions & 0 deletions docs/dyninstAPI/developer/BPatch_thread.h.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ BPatch_thread.h
.. cpp:function:: protected bool madeExitCallback()
.. cpp:function:: protected void setMadeExitCallback()

.. cpp:function:: unsigned long os_handle()

Paradynd sometimes wants handles to the OS threads for reading timing information. Not sure if
this should become a part of the public, supported interface.
5 changes: 1 addition & 4 deletions docs/dyninstAPI/public/BPatch_thread.h.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ BPatch_thread.h

.. cpp:function:: void getCallStack(std::vector<BPatch_frame>& stack)

This function fills the given vector with current information about the
call stack of the thread.
Returns in ``stack`` the current information about the call stack of the thread.

.. cpp:function:: BPatch_process * getProcess()

Expand Down Expand Up @@ -55,8 +54,6 @@ BPatch_thread.h

.. cpp:function:: ~BPatch_thread()

.. cpp:function:: unsigned long os_handle()

.. cpp:function:: void * oneTimeCode(const BPatch_snippet &expr, bool *err = NULL)

Cause the snippet expr to be evaluated by the process immediately. This
Expand Down
24 changes: 0 additions & 24 deletions dyninstAPI/src/BPatch_thread.C
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,6 @@
#include "dynProcess.h"
#include "debug.h"

/*
* BPatch_thread::getCallStack
*
* Returns information about the frames currently on the thread's stack.
*
* stack The vector to fill with the stack trace information.
*/
bool BPatch_thread::getCallStack(BPatch_Vector<BPatch_frame>& stack)
{
std::vector<Frame> stackWalk;
Expand Down Expand Up @@ -144,22 +137,11 @@ BPatch_thread::~BPatch_thread()
}
}

/**
* Paradynd sometimes wants handles to the OS threads for reading timing
* information. Not sure if this should become a part of the public,
* supported interface.
**/
unsigned long BPatch_thread::os_handle()
{
return (unsigned long)-1;
}

/*
* BPatch_thread::oneTimeCode
*
* Have the mutatee execute specified code expr once. Wait until done.
*
*/
void *BPatch_thread::oneTimeCode(const BPatch_snippet &expr, bool *err) {
if( !llthread->isLive() ) {
if ( err ) *err = true;
Expand All @@ -176,12 +158,6 @@ void *BPatch_thread::oneTimeCode(const BPatch_snippet &expr, bool *err) {
return proc->oneTimeCodeInternal(expr, this, NULL, NULL, true, err, true);
}

/*
* BPatch_thread::oneTimeCodeAsync
*
* Have the mutatee execute specified code expr once. Don't wait until done.
*
*/
bool BPatch_thread::oneTimeCodeAsync(const BPatch_snippet &expr,
void *userData,
BPatchOneTimeCodeCallback cb)
Expand Down

0 comments on commit 64ca263

Please sign in to comment.