Code Monkey home page Code Monkey logo

xsdb-gdbserver-stub's Introduction

GDB Server for Xilinx's XSDB (AIEngine)

This is a gdb server implementation over Xilinx's XSDB debugger.

This implementation is specialized for CPU without a native GDB server's implementation (like Microblaze and AI Engines).

AMD/Xilinx hasn't bothered to share a gdb-server for these CPU running in Xilinx's FPGA. Even the LLVM's machine description used in their proprietary compiler (derived from LLVM's compiler) isn't documented. This is very hostile to developers, since it forces to use their hacked and non functional Eclipse environment to develop and debug.

So in order to debug such target, one must use XSDB with its own weird interface. If you need to use a tool that's using either GDB or LLDB underneath (like Visual Studio Code, QTCreator, ...), the only way is to have a software that's converting the gdbserver's remote protocol to XSDB commmands.

This repository implement such a tool.

Usage

Once you've cloned this repository and installed all prerequisite (npm install), run:

$ source /path/to/Vitis/settings.sh
$ hw_server -d 
$ #               [port] [xsdb_executable] [work_dir]
$ node src/index.js 2424 xsdb /path/to/aiengine/Work

You can then connect to this server with LLDB (for example, like this):

$ lldb
(lldb) gdb-remote localhost:2424

Limitations

AIEngines code is stored in Work/aie/core_pos/Release/core_pos ELF file (core_pos is like 23_0). However, this ELF file doesn't specify the CPU architecture, so it's useless for both LLDB and GDB. This means that you can't map PC's address back to source code, nor be able to list the locals variables in your current code. You can refer to the file Work/aie/core_pos/Release/core_pos.lst that contains disassembly of the program (not very convenient).

You can place and remove breakpoints, control CPU execution, fetch and write memory (but not write registers...)

xsdb-gdbserver-stub's People

Contributors

nomtats avatar x-ryl669 avatar

Watchers

 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.