With gomobile, I’m not able to see stack traces for errors in the native
library. For example:
```
02-29 00:50:16.021 10940 0 E Go : panic: runtime error: invalid memory
address or nil pointer dereference
02-29 00:50:16.021 10940 0 E Go : [signal SIGSEGV: segmentation
violation code=0x1 addr=0x0 pc=0x77c124ee40]
```
Is there a way to add stack traces?
My Makefile is below that builds the libs.
```
all: clean build_android build_ios
clean:
rm -rf build
build_android:
mkdir -p build/android
WARP_VERSION=`warpctl ls version`; \
gomobile bind \
-ldflags "-X client.Version=$$WARP_VERSION" \
-target=android -androidapi 19 \
-javapkg com.bringyour \
-trimpath \
-o build/android/BringYourClient.aar \
bringyour.com/client
#...
build_ios:
mkdir -p build/ios
WARP_VERSION=`warpctl ls version`; \
gomobile bind \
-ldflags "-X client.Version=$$WARP_VERSION" \
-target=ios -iosversion 14.0 \
-trimpath \
-o build/ios/BringYourClient.xcframework \
bringyour.com/client
init:
go install golang.org/x/mobile/cmd/gomobile@latest
gomobile init
```
On Android the compiled libs are added in Gradle as:
```
dependencies {
compileOnly fileTree(dir:
"${System.env.HOME}/bringyour/bringyour/client/build/android", include:
['*-sources.jar'])
implementation fileTree(dir:
"${System.env.HOME}/bringyour/bringyour/client/build/android", include:
['*.aar', '*.jar’])
}
```
Best,
Brien
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/9A1EF717-9D22-49E4-A433-E6904A5DC383%40gmail.com.