Skip to content

Commit

Permalink
Update DDR doc with new paths
Browse files Browse the repository at this point in the history
Signed-off-by: Robert Young <[email protected]>
  • Loading branch information
rwy7 committed May 4, 2017
1 parent e2c1038 commit 0c9a654
Showing 1 changed file with 21 additions and 31 deletions.
52 changes: 21 additions & 31 deletions doc/ddr.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,7 @@
(c) Copyright IBM Corp. 2016
# DDR: The Data Dump Reader

This program and the accompanying materials are made available
under the terms of the Eclipse Public License v1.0 and
Apache License v2.0 which accompanies this distribution.
## Building DDR

The Eclipse Public License is available at
http://www.eclipse.org/legal/epl-v10.html

The Apache License v2.0 is available at
http://www.opensource.org/licenses/apache2.0.php

Contributors:
Multiple authors (IBM Corp.) - initial implementation and documentation

DDR: The Data Dump Reader
=========================

Building DDR
------------
On Linux, DDR depends on libdwarf and libelf. For more instructions on
obtaining these packages, see INSTALL.

Expand All @@ -29,40 +13,46 @@ the default. DDR will be built after the main files are built.
make
```

Running the DDR tests and samples
---------------------------------
## Running the DDR tests and samples

How to run new ddrgen on the test samples:

1. Run the macros script from the top directory:
```tools/ddrgen/src/macros/getMacros.sh "tools/ddrgen/test"```
```sh
./ddr/tools/getmacros "ddr/test"
```
2. Run ddrgen with the files to scan and macro list as parameters
```./ddrgen ./ddrgentest --macrolist test/macroList```
```sh
./ddrgen ./ddrgentest --macrolist ./ddr/test/macrolist
```
3. Print the generated blob
```./blob_reader blob.dat > blob.dat.strings```
```sh
./blob_reader blob.dat >blob.dat.strings
```
4. Compare the output to the expected output. For linux x86 (Note that ubuntu has slightly different results):
```diff superset.out tools/ddrgen/test/expected_output/xa64```
```diff tools/ddrgen/test/expected_output/xa64/blob.dat.strings```
```sh
diff superset.out ddr/test/expected_output/xa64
diff ddr/test/expected_output/xa64/blob.dat.strings
```

Using DDR for OMR
-----------------
## Using DDR for OMR
Make sure that OMR was configured to output debug information (Enabled by
default, or pass --enable-debug as above)

```sh
find -name "*.dbg" > filelist
find -name "*.dbg" >filelist
make -f ddr_artifacts.mk TOP_SRCDIR=. DBG_FILE_LIST=./filelist
```

Using DDR for other projects
----------------------------
## Using DDR for other projects
The project must be compiled with debug symbols. You must populate a file with
a list of all files with debug information. If you are building a single
executable, then that is all you have to list in that file. If you build any
other artifacts, such as libraries, you will need to add them as well.

You need to call a special makefile, which will run ddrgen on your project.

```bash
```sh
make -f omr/ddr_artifacts.mk TOP_SRCDIR=. DBG_FILE_LIST=./<filelist>
```

0 comments on commit 0c9a654

Please sign in to comment.