Coder Social home page Coder Social logo

riscv-gdb-paging's Introduction

RISCV-GDB-Paging

SV39 Paging Debug tool for GDB using python and guile

Reference: riscv-privileged-v1.10.pdf

Usage:

Place paging_debug.py or all the .scm files inside your project root.

Inside gdb console:

(gdb) so paging_debug.py

or

(gdb) so paging_debug.scm

Then you can type help paging or help v2p to show the help message.

If you have any question, please search for GDB Extension.

Note: I have no SV48 codes and emulator, so SV48.scm is not tested.

Paging Table Inspector

> (gdb) help paging
 
RISC-V SV39 MMU Paging Debugging tool.
Usage: 
    paging           : The shortcut of `paging satp` 
    paging satp      : Show page table from satp register.
    paging addr      : Show page table at addr.
Example:
    (gdb) paging
    (gdb) paging satp
    (gdb) paging 0x12340000

Virtual Address To Physical Address

(gdb) help v2p

RISC-V SV39 MMU Paging Debugging tool.
Usage: 
    v2p add          : Get Physical address of a virtual address from pagetable at satp.
    v2p pg_addr addr : Get Physical address of a virtual address from pagetable at pg_addr.
Example:
    (gdb) v2p 0x12345678
    (gdb) v2p 0x81230000 0x12345678

Example

paging:

paging

v2p:

v2p

Todo

After finished oscomp (or a debug routine is hard for me), I may implement features list below:

  1. Processes debug for custom os (flexible via user defines debug symbol, like FreeRTOS GDB).
  2. Ecall tracing
  3. named bitfield for register

riscv-gdb-paging's People

Contributors

oyami-srk 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.