Skip to content

Commit

Permalink
add development script
Browse files Browse the repository at this point in the history
Signed-off-by: vsoch <vsoch@users.noreply.github.com>
  • Loading branch information
vsoch committed Feb 18, 2022
1 parent 52774bd commit 2356842
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions development.md
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
```

0 comments on commit 2356842

Please sign in to comment.