-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: vsoch <vsoch@users.noreply.github.com>
- Loading branch information
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Development for Jim | ||
|
||
First, pull the smeagle container I've built that has the callsite code and | ||
(a not yet compiled) Smeagle: | ||
|
||
```bash | ||
$ docker pull ghcr.io/buildsi/smeagle-dev:callsites | ||
``` | ||
|
||
If you are curious, this was built with the Smeagle add/callsites branch as follows: | ||
|
||
```bash | ||
docker build --build-arg fromimage=ghcr.io/dyninst/dyninst-branch-builder:callsites -t smeagle . | ||
``` | ||
The compilation is commented out in the Dockerfile because our recent changes broke a test that we haven't fixed yet. | ||
Next clone the development branch with callsite stuffs. | ||
|
||
```bash | ||
$ git clone -b add/callsites https://github.com/buildsi/Smeagle | ||
$ cd Smeagle | ||
``` | ||
|
||
Run the smeagle container, binding `/code` so you can make changes locally and build in the container. | ||
|
||
```bash | ||
$ docker run -it -v $PWD:/code --entrypoint bash ghcr.io/buildsi/smeagle-dev:callsites | ||
``` | ||
|
||
You'll be sitting in `/code`, which is the bound source code! You can use `make` | ||
to compile everything: | ||
|
||
```bash | ||
$ make | ||
``` | ||
This generates the Smeagle binary, which you can run on things. Here is an example with the code I sent you: | ||
|
||
```cpp | ||
int foo(int x) { return x + 1; } | ||
double bar(double d) { return d + foo(d); }; | ||
|
||
inline int cube(int s){ | ||
return s*s*s; | ||
} | ||
|
||
int start(double d) { | ||
double dd = bar(d); | ||
return dd + 1; | ||
} | ||
``` | ||
And then run: | ||
```bash | ||
$ ./build/standalone/Smeagle -l libfoo.so | ||
``` |