Giter Site home page Giter Site logo

m65dbg's Introduction

m65dbg

An enhanced remote serial debugger/monitor for the mega65 project

  • Provide disassembly of output from remote serial output
  • Can display your source-code as you debug
  • allows uploading of a local file directly into mega65 memory via the load command
  • allows dumping out of data to a local file via the save command
  • Use the back command to get a backstrace of the stack, then use up and down to navigate through the stack
  • Many commands can take symbolic references if you tell the Ophis compiler to save out a .map files

Future Wishlist

  • How about live assembly, direct into the mega65's memory?

The raw monitor

The m65dbg app adds enhanced commands on-top of the existing commands provided by the raw monitor.

Documentation for this raw monitor exists for it in the following locations:

The source for the m65dbg app is available here:

Building

  • You will need to install a few pre-requisite libraries (via apt-get/yum/zypper, or cygwin's setup.exe)
    • libreadline-devel
  • git clone https://github.com/MEGA65/m65dbg
  • cd m65dbg
  • make
    • This will produce the “m65dbg” executable (or, “m65dbg.exe”, in Cygwin's case)

Walkthrough

For a youtube video walkthrough, please visit:

Here's some written points below:

  • Should build fine in Windows+Cygwin and Linux.
  • Mac OSX presently doesn't support the 2,000,000 bps serial speed. So as an alternative, you can make m65dbg instead talk to the xemu mega65 emulator via a unix socket.
    • More info at:
  • Specify your serial port with the "-l" (or "--device) parameter, E.g., "m65dbg -l /dev/ttyUSB1"

Try the following steps:

  • ./m65dbg -l /dev/ttyUSB1
  • r (to print out current registers)
  • b = a raw command to set a hardware breakpoint
  • t1 (to turn trace mode on, a bit like ctrl-c breaking inside gdb)
  • t0 (to turn trace mode off, a bit like doing 'c'/continue in gdb)
  • n (my 'next'/step-over command, which uses the hardware's step-into command multiple times, can be very slow)
  • s (my 'step-into' command, which just calls the hardware's step-into)
  • [ENTER] key will repeat the last command
  • finish (my 'step-out-of' command, which calls 'n'/next multiple times, can be very slow, depending on how busy the current function is)
  • pb/pw/pd/ps = prints byte/word/dword/string values at the given address
  • typing “help” will give you the list of m65dbg commands, while typing “?” will give you the list of raw commands.

m65dbg's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

mega65

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.