Code Monkey home page Code Monkey logo

riscv-gdbserver's Introduction

riscv-gdbserver

GDB Server for interacting with RISC-V models, boards and FPGAs

Status

This repository is part of the complete Embecosm RISCV tool chain.

How to build

This tool should be built using the scripts in the RISCV tool chain repo. Check that out using:

git clone https://github.com/embecosm/riscv-toolchain.git

or if you have write permission to the repo, you can use SSH:

git clone [email protected]:embecosm/riscv-toolchain.git

Then follow the instructions in the README for that repo. If you wish to just build the gdbserver, then you can disentangle the individual commands from the scripts in the riscv-toolchain repo.

Example GDB session interacting with riscv-gdbserver

Start the riscv-gdbserver, specifying the core to use and the port on which to connect:

riscv-gdbserver -c ri5cy 51000

In a separate terminal, invoke gdb with the binary you wish to run:

riscv32-unknown-elf-gdb dhry.elf

At the gdb prompt, enter the following:

target remote :51000
load
display /i $pc
stepi

This connects to the gdbserver, loads the dhry.elf binary and executes the first instruction.

You can now continue stepping through with the stepi command.

To see the RSP packets being sent and received, type the following at the gdb prompt:

set debug remote 1

If you wish to set a breakpoint at main and continue until you hit it:

break main
continue

After the breakpoint has been hit, you can continue running until the end of the program or just do further stepi commands first.

Notes on documentation

Since this is being developed from the ground up, it does not yet have a doc directory. It will be added in the future

riscv-gdbserver's People

Contributors

t-j-teru avatar jeremybennett avatar ibolton avatar gmarkall avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.