westerndigitalcorporation / swerv-ISS

Western Digital’s Open Source RISC-V SweRV Instruction Set Simulator
200 stars 41 forks source link

Query regarding usage of GDB command line option #1

Closed AmeyaVSingh closed 5 years ago

AmeyaVSingh commented 5 years ago

Hello,

I have a query regarding the command line option: --gdb. How do I use the option to enable remote GDB session?

Currently I have observed the GDB output on stdout. I have written a script which redirect the whisper simulator stdout and stdin through netcat.

But it is an inelegant solution since, I lose any stdout prints from riscv binaries linked with newlib.

Thank you for the assistance. -Ameya Vikram Singh

jrahmeh commented 5 years ago

Hi Ameya,

I apologize for not documenting how to use the --gdb option. I will do so later today. Meanwhile, here's a quick howto:

  1. You need to use gdb from the riscv toolchain.
  2. If your target riscv program is xyz, then you would issue the command: gdb xyz
  3. Then you would issue the gdb command: target remote | whisper --gdb xyz

Joe

On Thu, Jan 3, 2019 at 5:00 AM Ameya Vikram Singh notifications@github.com wrote:

Hello,

I have a query regarding the command line option: --gdb. How do I use the option to enable remote GDB session?

Currently I have observed the GDB output on stdout. I have written a script which redirect the whisper simulator stdout and stdin through netcat.

But it is an inelegant solution since, I lose any stdout prints from riscv binaries linked with newlib.

Thank you for the assistance. -Ameya Vikram Singh

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/westerndigitalcorporation/swerv-ISS/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/ACR4X397S6zlllBXcmGl8mo_h979AC-oks5u_eLNgaJpZM4Zn5ir .

jrahmeh commented 5 years ago

Documented --gdb