RISC-V Porting Wiki
  • RVPortingTools
  • RVSmartPorting
  • 简体中文
  • English (US)
View on Gitee
  • RVPortingTools
  • RVSmartPorting
  • 简体中文
  • English (US)
View on Gitee
  • Welcome
    • Contributing Guideline
  • Introduction
    • Memory Consistency Model of RISC-V
    • Difference between RV Dev Boards
    • Modules of RISC-V ISA
  • Common Adjustment
    • Check Whether Project is Ready for Multi-arch
    • File Structure Adjustment
    • Directory Structure Adjustment
    • Testcase Adjustment
  • C/C++ Program
    • Inline ASM
    • Macro Definition and Directive
    • Hex Constant
    • Intrinsic Function
    • Function Multiversioning
  • Configuration File
    • rpmbuild
    • Makefile
    • CMake
    • Autoconf
    • QMake
    • Others
  • Other Programming Language
    • Rust
    • Go
    • Python
    • Others

File Structure Adjustment

Example: Add support files for RISC-V in lldb

Project URL: https://gitee.com/src-openeuler/lldb
RISC-V Patch file URL:0006-add-some-reg-info-for-RISC-V.patch

Partial list of the original project files:

/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp
/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.h
/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h
/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp
/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.h
/source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.cpp
/source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.h
/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.cpp
/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.h
/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp
/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h

Based on the highlighted architecture keywords, the following additional files are required to support the RISC-V 64-bit architecture.

/source/Plugins/Process/Linux/NativeRegisterContextLinux_riscv64.cpp
/source/Plugins/Process/Linux/NativeRegisterContextLinux_riscv64.h
Edit this page
Last Updated:
Contributors: LightningRS
Prev
Check Whether Project is Ready for Multi-arch
Next
Directory Structure Adjustment

This knowledge base is licensed under a Mulan OWL BY-SA v1.0

Copyright © 2025 RVSmartPorting. | 京ICP备20005262号 | beian京公网安备11010802043677号