1 | 1 |
new file mode 100755 |
... | ... |
@@ -0,0 +1,22 @@ |
1 |
+#!/bin/sh |
|
2 |
+set -euC |
|
3 |
+ |
|
4 |
+cd "$(dirname "$0")/.." |
|
5 |
+ |
|
6 |
+file="$(basename "$0")" |
|
7 |
+target="gltraits-test-$file" |
|
8 |
+build_dir="_build" |
|
9 |
+in_file="$build_dir/$target" |
|
10 |
+out_file="doc/$file.i" |
|
11 |
+ |
|
12 |
+rm -rf "$build_dir" |
|
13 |
+cmake -B "$build_dir" -DCMAKE_BUILD_TYPE='RelWithDebInfo' |
|
14 |
+cmake --build "$build_dir" --target "$target" |
|
15 |
+ |
|
16 |
+${GDB:-gdb} \ |
|
17 |
+ -n -batch \ |
|
18 |
+ -ex 'set print asm-demangle on' \ |
|
19 |
+ -ex 'disassemble/s main' \ |
|
20 |
+ "$in_file" \ |
|
21 |
+| sed "s|$(pwd)/||;s/^[0-9]\+//" \ |
|
22 |
+>| "$out_file" |