Source level debugger

ZX80, ZX 81, ZX Spectrum, TS2068 and other clones
Post Reply
desertkun
New member
Posts: 4
Joined: Sat Dec 05, 2020 12:39 am

Source level debugger

Post by desertkun »

I am making an attempt to extend the z88dk's toolset to be able to debug C code (at least in Fuse) on source level.

This python package takes a set of *.lis files and a *.map file and allows you to pinpoint to which C line a certain machine code address corresponds:
https://github.com/desertkun/z88dk-sym

While this could be useful on it's own, I would like to explore the possibility into shoveling this into Fuse, to gain a couple of features:
  • Place a breakpoint by source file and line
  • Show which file and line the current machine instruction corresponds to
The way I think this could work, is when user generates a db file using the tool above, and Fuse, having a copy of that tool inside, somehow via python as well, or by duplicated C code, resolve machine addresses using that db file.

I guess the question is, is there a market for this? Dot not want to spend effort polishing something only me is going to use.
derekfountain
Member
Posts: 121
Joined: Mon Mar 26, 2018 1:49 pm

Re: Source level debugger

Post by derekfountain »

You might be interested in this post I put on Spectrum Computing a couple of years ago:

https://spectrumcomputing.co.uk/forums/ ... use#p14046

It sort of does what you have in mind. Watch the video I made, you'll get the idea.

I haven't touched the concept since, TBH, I don't use Z88DK a great deal at the moment.
siggi
Well known member
Posts: 344
Joined: Thu Jul 26, 2007 9:06 am

Re: Source level debugger

Post by siggi »

A feature request does already exist:
https://z88dk.org/forum/viewtopic.php?f=8&t=2372
;)
Siggi
User avatar
jorgegv
Well known member
Posts: 287
Joined: Wed Nov 18, 2020 5:08 pm

Re: Source level debugger

Post by jorgegv »

Hi,

not strictly related to Z88DK, but I just stumbled upon this:

https://sourceforge.net/p/fuse-emulator ... /?limit=25

I see the PR is done by the very creator of this thread (desertkun), and it states that it has been rejected a few weeks ago, but no reason is shown. Does anybody know why is has been rejected? Does the PR really add support for gdbserver in FUSE?

I also have read viewtopic.php?f=13&t=9644, but since it is almost 5 years old and the PR seems to have been rejected, say, yesterday, I presume there may be some news on this front?

Why was the PR rejected?
User avatar
dom
Well known member
Posts: 2076
Joined: Sun Jul 15, 2007 10:01 pm

Re: Source level debugger

Post by dom »

Desertkun has been very busy with the debugger and there's broadly source level debugging both within ticks and also within emulators that support gdbserver - the best example of this is Mame.

I believe he's been having trouble getting in contact with any of the fuse maintainers so the PR was closed by himself.
derekfountain
Member
Posts: 121
Joined: Mon Mar 26, 2018 1:49 pm

Re: Source level debugger

Post by derekfountain »

dom wrote: Mon Sep 13, 2021 6:42 pm I believe he's been having trouble getting in contact with any of the fuse maintainers so the PR was closed by himself.
I pulled his Fuse tree for a look, but it was based off an older version of Fuse and was MacOS only. It didn't build on Linux, so it was hardly surprising there wasn't much interest. After I reported this to him he added a new comment saying he'd done some more work with it and asked me to have another look. Real life has got in the way, but I intend to do so at some point.
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Re: Source level debugger

Post by stefano »

As usual on the consolidated projects, the FUSE team (as well as the MAME one) is very cautious in accepting pulls.
MAME even require precise cosmetic rules, despite the lot of historical mess :)

In general, if you propose new features, they must be cool and portable (I remember a cool FDD3000 emulation which sadly wasn't portable). For the fixes things might be easier.
Post Reply