Skip to content

Commit

Permalink
Add dyninstAPI/BPatch_dll.h
Browse files Browse the repository at this point in the history
  • Loading branch information
hainest committed Apr 3, 2024
1 parent db839a3 commit bdb2e60
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 14 deletions.
7 changes: 4 additions & 3 deletions docs/dyninstAPI/developer/API.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
===========
==========
DyninstAPI
===========
==========

.. toctree::
:caption: Developer API
:name: dyninstapi-developer-api
:hidden:
:maxdepth: 1

addressSpace.h
arch-forward-decl.h
ast.h
Expand All @@ -18,6 +18,7 @@ DyninstAPI
BPatch_basicBlock.h
BPatch_basicBlockLoop.h
BPatch_collections.h
BPatch_dll.h
BPatch_libInfo.h
BPatch_memoryAccessAdapter.h
BPatch_private.h
Expand Down
37 changes: 37 additions & 0 deletions docs/dyninstAPI/developer/BPatch_dll.h.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
.. _`sec-dev:BPatch_dll.h`:

BPatch_dll.h
############


**TEMPORARY PARADYND FLOWGRAPH KLUGE**

If we are building BPatch classes into paradynd we want BPATCH_DLL_EXPORT
to be defined as the empty string (for all platforms). This currently tests
SHM_SAMPLING because it is defined for paradynd and not for the dyninst
dll or dyninst clients.

.. code:: cpp
#ifdef SHM_SAMPLING
# define BPATCH_DLL_EXPORT
#else
# if defined(_MSC_VER)
# ifdef BPATCH_DLL_BUILD
// we are building the dyninstAPI DLL
# define BPATCH_DLL_EXPORT __declspec(dllexport)
# else
// we are not building the dyninstAPI DLL
# define BPATCH_DLL_EXPORT __declspec(dllimport)
# if _MSC_VER >= 1300
# define BPATCH_DLL_IMPORT 1
# endif
# endif
#else
// we are not building for a Windows target
# define BPATCH_DLL_EXPORT __attribute__((visibility ("default")))
#endif
.. cpp:var:: const char V_libdyninstAPI[]

Declare our version string
1 change: 0 additions & 1 deletion docs/dyninstAPI/public/API.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Documentation for the DyninstAPI toolkit.
BPatch_basicBlockLoop.h
BPatch_binaryEdit.h
BPatch_callbacks.h
BPatch_dll.h
BPatch_edge.h
BPatch_enums.h
BPatch_flowGraph.h
Expand Down
5 changes: 0 additions & 5 deletions docs/dyninstAPI/public/BPatch_dll.h.rst

This file was deleted.

6 changes: 1 addition & 5 deletions dyninstAPI/h/BPatch_dll.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,7 @@
#ifndef _BPatch_dll_h_
#define _BPatch_dll_h_

// TEMPORARY PARADYND FLOWGRAPH KLUGE
// If we are building BPatch classes into paradynd we want BPATCH_DLL_EXPORT
// to be defined as the empty string (for all platforms). This currently tests
// SHM_SAMPLING because it is defined for paradynd and not for the dyninst
// dll or dyninst clients, read '#if PARADYND'.

#ifdef SHM_SAMPLING
#define BPATCH_DLL_EXPORT
#else
Expand Down

0 comments on commit bdb2e60

Please sign in to comment.