-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gdb debugging #320
Comments
Here are the steps which seem to work fine for me. Looks like $ gdb-multiarch --symbols=bazel-bin/salus After the breakpoint if I go to the TUI mode (Ctrl-x + a) I can see main.rs. |
I'm using the below commands to build salus and debug, is there anything wrong ? By the way I can debug one riscv hello world application written by rust. so now I guess it should not the gdb issue. Are there any build options to force to build a debug version of salus ? or somthing related to rust toolchain ? Thanks $ git clone https://github.com/rivosinc/salus.git |
Oh, it is caused by the --compilation_mode, with the below change, I can debug the salus now ! Thanks $ vim ./.bazelrc |
By the way, I can also debug the guest application by using the following steps: $ gdb-multiarch --symbols=bazel-bin/salus |
You can avoid all this by using |
ok, thanks ! |
I'm trying to use gdb to debug with the bazel-bin/salus, some steps are as below, but it looks like the gdb can't find the the source code for example main.rs based on symbol file bazel-bin/salus. Has anyone one worked with gdb ? Thanks
$ gdb-multiarch bazel-bin/salus
$ set architecture riscv:rv64
$ target remote localhost:1234
$ set directories ./src/
$ add-symbol-file ./bazel-bin/test-workloads/guestvm
$ add-symbol-file ./bazel-bin/test-workloads/tellus
The text was updated successfully, but these errors were encountered: