Skip to content

Instantly share code, notes, and snippets.

@emoon
Last active May 18, 2018 21:58
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emoon/f4cc058dd2a23c6cb9bce16b2548339a to your computer and use it in GitHub Desktop.
Save emoon/f4cc058dd2a23c6cb9bce16b2548339a to your computer and use it in GitHub Desktop.

Notice that this is early, things may or may not work at all.

  1. Clone https://github.com/emoon/fs-uae and build according to instructions. (Mac tested in my case)
  2. Clone ProDBG to this commit https://github.com/emoon/ProDBG/commit/a4a5c264a57b15d0325c585ff7995c31bb9216d4 and build according to instructions.
  3. Configure ProDBG Amiga UAE Settings so it looks something like this https://www.dropbox.com/s/a87dpxdf273bi6i/config.png?dl=0 (Config can be left empty)
  4. Make a test program and build it with vasm (or some other tool that can produce linedebug info)

Compile with these options (make sure to keep paths absolute) for vasm

vasm -m68000 -Fhunk -allhunksyms -linedebug /abs/path/to/file/HelloWorldTest.s -o hello.o
vlink -bamigahunk -Bstatic hello.o -o hello
_LVOCloseLibrary   EQU     -414
_LVOOpenLibrary    EQU     -552
_LVOOutput         EQU     -60
_LVOWrite          EQU     -48

                section code,code
start:
                move.l  $4.w,ExecBase

; open DOS.library

                move.l  ExecBase,a6
                lea     DosName,a1
                moveq   #0,d0
                jsr     _LVOOpenLibrary(a6)
                move.l  d0,DosBase

; Print "Hello World" message to standard output

                move.l  DosBase,a6
                jsr     _LVOOutput(a6)
                move.l  d0,d1
                move.l  #HelloWorldMessage,d2
                move.l  #HelloWorldMessageEnd-HelloWorldMessage,d3
                jsr     _LVOWrite(a6)

; Close dos.library

                move.l  DosBase,a1
                move.l  $4.w,a6
                jsr     _LVOCloseLibrary(a6)

                moveq   #0,d0
                rts

                section data,data

HelloWorldMessage
                dc.b    "Hello World!",10
HelloWorldMessageEnd

DosName         dc.b    "dos.library",0

                section bss,bss

ExecBase        ds.l    1
DosBase         ds.l    1

  1. Open the source file in ProDBG (File -> Open)
  2. Set a breakpoint at a valid line (F9)
  3. Run the program using File -> Debug Amiga Executable... Select the generated hello above.
  4. You should now be able to step in the program using F11 it should look something like this https://www.dropbox.com/s/18b3dzajv04rmro/debugging.png
@emoon
Copy link
Author

emoon commented Jan 23, 2018

Thanks!

I'm unsure. It looks like the headers aren't included for some reason in you Qt5 installation which sounds odd.

@emoon
Copy link
Author

emoon commented Jan 23, 2018

Unfortunately sharing the binary isn't that easy as it requires packing up the Qt5 frameworks to point to the correct location inside a bundle :/ This is something I haven't done yet. What you can try is to run bin/macosx/tundra/tundra2 -v macosx-clang-debug to get the full commandline displayed and see if it's actually trying to use the correct directories when it's compiling.

@emoon
Copy link
Author

emoon commented Jan 23, 2018

You wrote this btw: export QT5=/Users/fabricerobinet/Qt/5.7/clang_64 and then you did a listing in ~/Qt57/5.7/clang_64 those two directories doesn't match.

@emoon
Copy link
Author

emoon commented Jan 24, 2018

No idea what is going on here :( I would guess there is a miss-match between some potentially different Qt versions being installed but I don't know really.

@fabrobinet
Copy link

fabrobinet commented Jan 26, 2018

Problem was missing include path pointing to QT5 in tundra.lua.

@emoon
Copy link
Author

emoon commented Jan 27, 2018

Oh really. That is interesting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment