English Amiga Board


Go Back   English Amiga Board > News

 
 
Thread Tools
Old 27 October 2022, 23:07   #1
Bartman
Registered User
 
Join Date: Feb 2019
Location: Munich, Germany
Posts: 63
vscode-amiga-debug now supports Linux, MacOS

New version 1.6.2 of vscode-amiga-debug available https://marketplace.visualstudio.com...ss.amiga-debug
**Linux & MacOS now supported** Thanks to @PetMac#8708 and Graham Bates
Please do test it out and report issues on the GitHub page!
Bartman is offline  
Old 28 October 2022, 11:02   #2
walkero
Registered User
 
walkero's Avatar
 
Join Date: May 2012
Location: Dublin/Ireland
Posts: 358
That's really awesome news. Does it use a modified FS-UAE for this?
Also, is it necessary to use the GCC 12 that comes with the package or we can use any gcc compiler, like for example, the ones from bebbo?

Thank you to everyone involved.
walkero is offline  
Old 28 October 2022, 11:51   #3
Bartman
Registered User
 
Join Date: Feb 2019
Location: Munich, Germany
Posts: 63
Yep, Graham ported all the required changes from WinUAE to FS-UAE.
I strongly recommend using the included gcc12, as it produces vastly faster code than the old gcc6. The whole workflow requires ELF files, and bebbo's directly uses amiga hunk files, so that won't work.
Bartman is offline  
Old 30 October 2022, 18:29   #4
walkero
Registered User
 
walkero's Avatar
 
Join Date: May 2012
Location: Dublin/Ireland
Posts: 358
@Bartman
Do you have somewhere how do you create that gcc version for linux, and how someone could create his own setup? I am asking because I would like to use it inside a docker container. I tried bebbo's and I had some issues and I wonder if it would be possible to test again with your setup.
walkero is offline  
Old 30 October 2022, 20:13   #5
Bartman
Registered User
 
Join Date: Feb 2019
Location: Munich, Germany
Posts: 63
sure, here are the scripts: https://github.com/BartmanAbyss/vsco...tree/master/ci
Bartman is offline  
Old 31 October 2022, 18:30   #6
girv
Mostly Harmless
 
girv's Avatar
 
Join Date: Aug 2004
Location: Northern Ireland
Posts: 1,109
I've ported my project from bebbo/vasm over to gcc12/gas on macOS (also 12). A fresh sample project launches and debugs OK. Mine did for a while and then has seemingly stopped launching fsuae at all.

There's no indication why it might be failing that I can find. I can launch the included fsuae from command line or Finder, but vscode just hangs after you press F5 and the build completes. After some poking around I noticed it's not getting to the part where it updates the dh0/s/startup-sequence with my exe name, FWIW.

Any suggestions?
girv is offline  
Old 31 October 2022, 19:17   #7
gigabates
Registered User
 
Join Date: Jan 2021
Location: Watford, UK
Posts: 57
Quote:
Originally Posted by girv View Post
After some poking around I noticed it's not getting to the part where it updates the dh0/s/startup-sequence with my exe name, FWIW.

Any suggestions?
The step right before that is building the symbol table using the output from objdump. You could try running the command yourself to see if it's failing e.g.

Code:
~/.vscode/extensions/bartmanabyss.amiga-debug-1.6.4/bin/darwin/opt/bin/m68k-amiga-elf-objdump --section-header out/a.elf
gigabates is offline  
Old 31 October 2022, 23:17   #8
girv
Mostly Harmless
 
girv's Avatar
 
Join Date: Aug 2004
Location: Northern Ireland
Posts: 1,109
Seems to run OK?

Code:
22:14 girv ~/projects/RDeclan: ~/.vscode/extensions/bartmanabyss.amiga-debug-1.6.4/bin/darwin/opt/bin/m68k-amiga-elf-objdump --section-header build-debug-bartman/RDeclan.elf

build-debug-bartman/RDeclan.elf:     file format elf32-m68k

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         0000a7c4  00000000  00000000  00002000  2**2
                  CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
  1 .rodata       00001768  0000a7c4  0000a7c4  0000c7c4  2**1
                  CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
  2 .mbind.rodata 00000270  0000c000  0000c000  0000e000  2**13
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  3 .data         00000a50  0000e270  0000e270  0000e270  2**2
                  CONTENTS, ALLOC, LOAD, RELOC, DATA
  4 .bss          000025e4  0000ecc0  0000ecc0  0000ecc0  2**2
                  ALLOC
  5 .comment      00000012  00000000  00000000  0000ecc0  2**0
                  CONTENTS, READONLY
  6 .debug_aranges 00000940  00000000  00000000  0000ecd2  2**0
                  CONTENTS, RELOC, READONLY, DEBUGGING, OCTETS
  7 .debug_info   00036a62  00000000  00000000  0000f612  2**0
                  CONTENTS, RELOC, READONLY, DEBUGGING, OCTETS
  8 .debug_abbrev 000073b0  00000000  00000000  00046074  2**0
                  CONTENTS, READONLY, DEBUGGING, OCTETS
  9 .debug_line   0002142f  00000000  00000000  0004d424  2**0
                  CONTENTS, RELOC, READONLY, DEBUGGING, OCTETS
 10 .debug_frame  0000647c  00000000  00000000  0006e854  2**2
                  CONTENTS, RELOC, READONLY, DEBUGGING, OCTETS
 11 .debug_str    0000115b  00000000  00000000  00074cd0  2**0
                  CONTENTS, READONLY, DEBUGGING, OCTETS
 12 .debug_loclists 00007bce  00000000  00000000  00075e2b  2**0
                  CONTENTS, RELOC, READONLY, DEBUGGING, OCTETS
 13 .debug_rnglists 00001a76  00000000  00000000  0007d9f9  2**0
                  CONTENTS, RELOC, READONLY, DEBUGGING, OCTETS
girv is offline  
Old 01 November 2022, 10:36   #9
gigabates
Registered User
 
Join Date: Jan 2021
Location: Watford, UK
Posts: 57
Probably not that then. One other thing to check: are you sure the build is completing? I was having an issue where GCC was hanging on the linking stage for a particular bad object file. Maybe try running the make command in the terminal.

Other than that, I think the next thing would be to run a local build of the extension and step through the code.
gigabates is offline  
Old 01 November 2022, 12:40   #10
girv
Mostly Harmless
 
girv's Avatar
 
Join Date: Aug 2004
Location: Northern Ireland
Posts: 1,109
I'd converted the task to cmake so I didn't have to port everything to makefile, but a clean and build shows no errors and regenerates the elf and exe so I guess it's working.

Any guides on running a local copy of the extension? Not something I've messed with.
girv is offline  
Old 01 November 2022, 13:22   #11
gigabates
Registered User
 
Join Date: Jan 2021
Location: Watford, UK
Posts: 57
Quote:
Originally Posted by girv View Post
Any guides on running a local copy of the extension? Not something I've messed with.
Sure, check out or download the project from Github, run 'npm install' and open it in VS Code. You can click the 'Run Extension' task from the Run and Debug tab to open a local build of the extension in a new window [Extension Development Host]. You can then open your project in this window and use the extension as normal, but it will hit any breakpoints that you set in the extension source. I'd maybe set a breakpoint at the start of launchRequest in amigaDebug.ts and step through line by line to see where it's getting stuck.

Alternatively I'm happy to look into it if you're able to share your project source.
gigabates is offline  
Old 01 November 2022, 14:30   #12
girv
Mostly Harmless
 
girv's Avatar
 
Join Date: Aug 2004
Location: Northern Ireland
Posts: 1,109
Got the extension debugging, thanks. That was unexpectedly easy!

It -is- failing at the objdump bit after all.

It's throwing this at symbols.ts:100:
Code:
if(sectionName !== "*ABS*" && section === undefined)
    throw new Error(`Section ${sectionName} not found. Symbol: ${name}`);
sectionName == ".mbind.rodata"
name == ".mbind.rodata"

edit 1:
'.mbind.rodata' is not in this.sections so I guess it's not being parsed by getSections().

edit 2:
The line
" 2 .mbind.rodata 00000270 0000c000 0000c000 0000e000 2**13" is not matched by SECTION_REGEX1

edit 3:
Changed the final clause to '2\*\*([0-9]+)' and fsuae launches

Last edited by girv; 01 November 2022 at 15:07.
girv is offline  
Old 01 November 2022, 16:26   #13
girv
Mostly Harmless
 
girv's Avatar
 
Join Date: Aug 2004
Location: Northern Ireland
Posts: 1,109
Next problem, the one I was actually looking into when I hit the problem above It's not profiling.

I can debug step all right but on clicking either of the profiling buttons I get a VSCode popup with something like:

Code:
Unable to start profiling:
Error: error parsing UnwindTable in line 2833:
00001d84 r13+8    c-1048 c-1044 c-1040 c-8   c-1036 c-4
girv is offline  
Old 01 November 2022, 16:46   #14
PeterM
Registered User
 
Join Date: Aug 2019
Location: UK
Posts: 3
Hello, "@PetMac#8708" here

Really awesome to see people using and enjoying this on non-Windows machines.

Graham Bates did most of the work I think. I mostly faffed around trying to get GCC to build. I expect the FS-UAE changes were not fun.
PeterM is offline  
Old 01 November 2022, 16:58   #15
girv
Mostly Harmless
 
girv's Avatar
 
Join Date: Aug 2004
Location: Northern Ireland
Posts: 1,109
Quote:
Originally Posted by PeterM View Post
Really awesome to see people using and enjoying this on non-Windows machines.
I've been waiting a year or more for this Since doing my own faffing around getting Bartman's GCC 10 and 11 to build on macOS.

The other thing I'm wondering about - are there any benchmarks comparing bebbo to gcc12 for C99 code? I'd been mostly using bebbo up until now and supporting both in the code is kind of a pain.
girv is offline  
Old 01 November 2022, 17:34   #16
gigabates
Registered User
 
Join Date: Jan 2021
Location: Watford, UK
Posts: 57
Quote:
Originally Posted by girv View Post
Changed the final clause to '2\*\*([0-9]+)' and fsuae launches
Glad you figured this out. I've opened a PR with this change. Let's see what's going on with the other error now.
gigabates is offline  
Old 01 November 2022, 18:07   #17
gigabates
Registered User
 
Join Date: Jan 2021
Location: Watford, UK
Posts: 57
Quote:
Originally Posted by PeterM View Post
Graham Bates did most of the work I think. I mostly faffed around trying to get GCC to build. I expect the FS-UAE changes were not fun.

It was a team effort
gigabates is offline  
Old 01 November 2022, 18:26   #18
girv
Mostly Harmless
 
girv's Avatar
 
Join Date: Aug 2004
Location: Northern Ireland
Posts: 1,109
Quote:
Originally Posted by gigabates View Post
Glad you figured this out. I've opened a PR with this change.


Quote:
Originally Posted by gigabates View Post
Let's see what's going on with the other error now.
I can send you a zip of the cmake build folder if it will help? It would have the exe, elf, data files and so on.
girv is offline  
Old 01 November 2022, 19:23   #19
gigabates
Registered User
 
Join Date: Jan 2021
Location: Watford, UK
Posts: 57
Quote:
Originally Posted by girv View Post
I can send you a zip of the cmake build folder if it will help? It would have the exe, elf, data files and so on.

Just the elf file should be enough for this issue.

edit:
In fact just the output from 'm68k-amiga-elf-objdump --dwarf=frames-interp yourfile.elf' should do it.

Last edited by gigabates; 01 November 2022 at 19:53.
gigabates is offline  
Old 02 November 2022, 10:16   #20
girv
Mostly Harmless
 
girv's Avatar
 
Join Date: Aug 2004
Location: Northern Ireland
Posts: 1,109
Sent in PM.
girv is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Amiga Assembly VSCode extension v1.0 prb28 Coders. Releases 3 28 November 2021 17:00
Games ScummVM Supports on Amiga IvanEBC support.Games 54 22 January 2021 20:35
Pre-release vscode amiga assembly with WinUAE integration prb28 Coders. Asm / Hardware 31 30 November 2020 21:54
Features requests for vscode amiga assembly extension ? prb28 Coders. General 0 27 December 2018 16:19
only one database for all systems(Windows, macOS, Linux ...) Dic_Ray support.FS-UAE 2 28 December 2016 20:22

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 22:56.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.12642 seconds with 15 queries