Skip to content
This repository was archived by the owner on Mar 8, 2020. It is now read-only.

Commit 795e2b8

Browse files
committed
doc: code review improvements
Signed-off-by: Alexander Bezzubov <[email protected]>
1 parent 716a3c0 commit 795e2b8

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

CONTRIBUTING.md

+7-8
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,10 @@ $ g++ -shared -Wall -g -std=c++11 -O0 \
3838
To run a single test from CLI one can:
3939

4040
```
41-
./sbt "testOnly org.bblfsh.client.v2.libuast.IteratorNativeTest -- -z \"Native UAST iterator should return non-empty results on decoded objects\""
41+
./sbt 'testOnly org.bblfsh.client.v2.libuast.IteratorNativeTest -- -z "Native UAST iterator should return non-empty results on decoded objects"'
4242
```
4343

44-
When using `lldb`, this would become a bit more involved as the classpath needs to be
45-
manually setup for `java` executable:
44+
When using `lldb`, the classpath needs to be manually set for the `java` executable:
4645

4746
```
4847
PATH="/usr/bin:$PATH" lldb -- java -ea -Xcheck:jni -Djava.library.path=src/main/resources -cp "target/classes:target/test-classes:src/main/resources:${HOME}/.ivy2/cache/org.scalatest/scalatest_2.11/bundles/scalatest_2.11-3.0.1.jar:${HOME}/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.11.11.jar:${HOME}/.ivy2/cache/org.scala-lang.modules/scala-xml_2.11/bundles/scala-xml_2.11-1.0.5.jar:${HOME}/.ivy2/cache/org.scalactic/scalactic_2.11/bundles/scalactic_2.11-3.0.1.jar:${HOME}/.ivy2/cache/commons-io/commons-io/jars/commons-io-2.5.jar:build/bblfsh-client-assembly-2.0.0-SNAPSHOT.jar:target/*" \
@@ -55,7 +54,7 @@ Actual test output will be saved in `iterator-native-test.txt`.
5554

5655
## When inside the debugger
5756

58-
This is somhow `lldb` specific, but the idea will be the same in GDB.
57+
These instructions are for `lldb`, but the steps should be similar in `gdb`.
5958
To load the debug symbols do:
6059

6160
```
@@ -65,10 +64,10 @@ continue
6564
target symbols add src/main/resources/lib/libscalauast.dylib.dSYM
6665
```
6766

68-
If that does not load the symbols, you have to make sure libscalauast library has
67+
If that does not load the symbols, you have to make sure `libscalauast` library has
6968
already been loaded to the process by `target modules list`.
70-
On rare occasions, the library can be loaded but the symbols will still refuse
71-
to load, it most probably mean that the library is from a different fs path.
69+
If the library loads but symbols are not correctly displayed, it probably means
70+
the library is at the wrong filesystem path.
7271
Stop the debugger and do `rm -rf ./target/classes/lib/libscalauast.dylib*`
7372

7473
To actually debug, set a breakpoint like:
@@ -96,7 +95,7 @@ A small curated list of really useful resources on Go&JNI debugging:
9695

9796
## JNI details
9897

99-
Here are some resources to understand the JNI machinery and it's best practices:
98+
Here are some resources to understand the JNI machinery and its best practices:
10099
- https://docs.oracle.com/javase/8/docs/technotes/guides/jni/spec/design.html
101100
- https://docs.oracle.com/javase/8/docs/technotes/guides/jni/spec/functions.html
102101
- https://developer.android.com/training/articles/perf-jni

0 commit comments

Comments
 (0)