Commit Graph

2 Commits

Author SHA1 Message Date
Song Fangyuan 98e6aff913
feat(pdb): add CI support and batch mode for XSPdb (#4994)
EMU Test / Changes Detection (push) Has been cancelled Details
Release Jobs / build-xsdev-image (push) Has been cancelled Details
Release Jobs / build-xspdb (push) Has been cancelled Details
EMU Test / Generate Verilog (push) Has been cancelled Details
EMU Test / EMU - Basics (push) Has been cancelled Details
EMU Test / EMU - CHI (push) Has been cancelled Details
EMU Test / Docker Build (push) Has been cancelled Details
EMU Test / EMU - Performance (push) Has been cancelled Details
EMU Test / EMU - MC (push) Has been cancelled Details
EMU Test / SIMV - Basics (push) Has been cancelled Details
EMU Test / Upload Artifacts (push) Has been cancelled Details
EMU Test / Check Submodules (push) Has been cancelled Details
EMU Test / Check Format (push) Has been cancelled Details
Nightly Regression / Nightly Regression(master) - Checkpoints (push) Has been cancelled Details
Nightly Regression / Nightly Regression(kunminghu-v3) - Checkpoints (push) Has been cancelled Details
This PR adds two major enhancements for `XSPdb`:
1. **Continuous Integration (CI) Pipeline:** Automates build XSPdb
package using GitHub Actions and upload it to the repo
[Releases](https://github.com/OpenXiangShan/XiangShan/releases).
2. **Batch Mode (`--batch` ):** Enables non-interactive execution,
allowing the tool to run from scripts.

---------

Co-authored-by: Zhicheng Yao <yaozhicheng@ict.ac.cn>
2025-11-05 10:46:04 +08:00
SFangYy db3800c43f
feat(pdb): Add XSPdb, a GDB-like interactive debugger for XiangShan (#4906)
### 1. Purpose of this Pull Request 
XSPdb is a specialized Python pdb-based debugging tool for RISC-V IP
cores, customized for Xiangshan's difftest interface. It provides
GDB-like interactive debugging capabilities, integrating: Terminal
command-line interface, RTL-level waveform toggling, Automated script
replay, System snapshot save/restore, Register initialization
configuration

### 2. Changes Made

* **New Tool (`XSPdb`)**: The core Python scripts for XSPdb have been
added under `scripts/xspdb/`. This tool provides an interactive
debugging console with standard pdb commands (e.g., breakpoints, step,
continue, register inspection).
* **Build System Integration**: A new Makefile, `pdb.mk`, has been
created to define the build targets and logic required for XSPdb.
* **Makefile Modification**: The root Makefile has been updated to
include `pdb.mk`, integrating the new `pdb` target into the main build
system.

### 3. Usage 

The new tool can be built and used via a new `make` target.
1. **Build the XSPdb package**: 
```bash
    make pdb NOOP_HOME=$(pwd)
 ```
2.  **Run a simulation with the XSPdb**:
```bash
   make pdb-run NOOP_HOME=$(pwd)
 ```

---------

Co-authored-by: Zhicheng Yao <yaozhicheng@ict.ac.cn>
2025-08-23 00:59:13 +08:00