English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 04 October 2020, 00:43   #161
Hannibal
Registered User
 
Join Date: May 2015
Location: Kirkland, Washington, USA
Posts: 56
Yeah, it is understandable that the debugging exe is bigger due to extra debug info, but that wouldn’t affect the actual code in the executable, I just didn’t think the emulator itself would run that much slower.

Sounds good that you are pushing for this to be in a WinUAE fork also - I have no allegiance to neither FS-UAE nor WinUAE, I just use whatever gets the job done :-) and I will happily wait if this is the first step before trying to optimize this.

Thanks for the reply
Hannibal is offline  
Old 04 October 2020, 15:42   #162
prb28
Registered User
 
Join Date: May 2018
Location: France
Posts: 246
Quote:
Originally Posted by Hannibal View Post
Yeah, it is understandable that the debugging exe is bigger due to extra debug info, but that wouldn’t affect the actual code in the executable, I just didn’t think the emulator itself would run that much slower.
You're right, I think it's the debugging code of FS-UAE that make it slower. I don't know if it is the remote protocol addition or the core debug functions that must be optimized.



The choice of winuae is more to enter in a classic merging path from winuae to fs-uae and getting an IDE agnostic remote protocol useful in the future.



If you are interested, I'll certainly make a test release to get some feedback (sometime in the future).


I'll tell you if it is faster, next time I run it on winuae ;-).
prb28 is offline  
Old 07 October 2020, 08:52   #163
Hannibal
Registered User
 
Join Date: May 2015
Location: Kirkland, Washington, USA
Posts: 56
I have one small bug report:
I couldn't place breakpoints in my code. Similar symptoms to github issue #115. I verified that my paths in the debug executable were actually absolute (as recommended), however, they contained ".." to go to parent path. For example: c:\code\source\mycode.s looked fine but c:\code\source\..\includes\musicplayer.i didn't. For me this was something that either VAsm or VLink put in.
I wonder if this is something you could make your extension deal with? It's technically not wrong for VAsm to leave the paths unflattened, though it is a waste of bytes, so it would be better if your debug info loader cleans the paths

I personally worked around it, but thought you would want to know. It also makes me wonder if the plugin deals properly with upper/lower case inconsistencies in file paths, but I didn't test that.
Hannibal is offline  
Old 07 October 2020, 23:45   #164
prb28
Registered User
 
Join Date: May 2018
Location: France
Posts: 246
Quote:
Originally Posted by Hannibal View Post
I wonder if this is something you could make your extension deal with?
I must look at it, I think it's from the include mechanism of vasm. I'll add a feature issue in github to remember it when I'll get my head out of winuae.


Quote:
Originally Posted by Hannibal View Post
It also makes me wonder if the plugin deals properly with upper/lower case inconsistencies in file paths
Well... Yes and no, there are some workaround in the extension but vscode had some issues on windows with case sensitivity.
prb28 is offline  
Old 08 October 2020, 11:13   #165
defor
Registered User
 
Join Date: Jun 2020
Location: Brno
Posts: 90
Amiga-Assembly is such a great tool. Thank you prb28 for it!
Honestly, I think I wouldn't return to Amiga coding without it. After 20 years long break, for me, it was too intimidating to code in ASMOne back again as I am too much accustomed to other IDEs and editors. To sit down by my computer after work, start VSCode with your addon, write in 68k assembler and easily test it in FS-UAE is such a pleasure! Thank you!
P.S.: Sorry for spamming this thread. I just had to write it.
defor is offline  
Old 08 October 2020, 21:08   #166
prb28
Registered User
 
Join Date: May 2018
Location: France
Posts: 246
Quote:
Originally Posted by defor View Post
Amiga-Assembly is such a great tool. Thank you prb28 for it!
Thanks !
prb28 is offline  
Old 12 October 2020, 00:17   #167
Hannibal
Registered User
 
Join Date: May 2015
Location: Kirkland, Washington, USA
Posts: 56
By the way, I worked with Frank Wille to add a new feature into the next version of vasm, which will make source-level debugging even more useful (at least useful for me) - make it optional per macro if the source-level debug information should point at the instructions of the macro or the parent line+file where the macro was invoked.

This is extremely useful if you use a ton of small macros, and you really care about following the flow of the larger functions using the macros, rather than each instruction inside the macro. On the other hand, for the larger or more important macros you may want to debug into the macros.


This is controlled using a new directive, msource on/msource off, which you would wrap around the macros you want to show the parent line+file.

Know that stepping in the debugger only steps an assembly instruction, not to a new source line. I like the way it works, but I found it useful to also look at the disassembly window in parallel, so I can watch what is going on.


I may start another thread to share some of the macros I use, but i found this useful for a lot of cases, such as
* beginfunc/endfunc - i write all my assembly code within these functions macros, adn they can do certain checks at beginning/end of every function. But I never care about debugging into the checks - i care about the actual function, and want to be able to set breakpoints on each function rather than on the beginfunc macro.
* push <registerlist>/pop - macros for pushing register to the stack, and a macro for popping - pop doesn't need a list of registers, so it will always match up with the push. And it will fail to compile if pushes and pops don't match up inside functions
* assert - creates an infinite loop that flashes the screen. If I stop the debugger I see the source file that triggered the assert, not the assert flashing code.
* waitblit
Plus I made a simple scripting language using macros, and it is amazing to be able to put breakpoints on specific lines rather than in the underlying macros.
Hannibal is offline  
Old 12 October 2020, 21:26   #168
prb28
Registered User
 
Join Date: May 2018
Location: France
Posts: 246
Really interesting!
For the stepping, having a step over step into for the macros or step until line could be interesting to add.
prb28 is offline  
Old 13 October 2020, 11:18   #169
Quagliarulo
Registered User
 
Quagliarulo's Avatar
 
Join Date: Mar 2010
Location: Napoli, Italia
Posts: 76
Is there anything similar for people who don't use Windows and Visual Studio?
Quagliarulo is offline  
Old 13 October 2020, 11:32   #170
prb28
Registered User
 
Join Date: May 2018
Location: France
Posts: 246
Quote:
Originally Posted by Quagliarulo View Post
Is there anything similar for people who don't use Windows and Visual Studio?
Well, it works on Linux and osx and it uses visual studio code (not visual studio) that runs on these platforms too.
Alternatively you can use the bebbo’s debugging tools with eclipse and gcc.
prb28 is offline  
Old 13 October 2020, 20:53   #171
Antiriad_UK
OCS forever!
 
Antiriad_UK's Avatar
 
Join Date: Mar 2019
Location: Birmingham, UK
Posts: 418
It’s not visual studio by the way. It’s visual studio code which is a free lightweight editor.
Antiriad_UK is offline  
Old 11 December 2020, 14:24   #172
mr.spiv
Registered User
 
mr.spiv's Avatar
 
Join Date: Aug 2006
Location: Finland
Age: 51
Posts: 242
Been playing around with this nice extension (using OSX).. Any idea what's causing probs when trying to run the fs-uae with gdbstub I always get a popup "Unable toi load segments" and the debugging as-is does not work.
mr.spiv is offline  
Old 11 December 2020, 20:02   #173
prb28
Registered User
 
Join Date: May 2018
Location: France
Posts: 246
Quote:
Originally Posted by mr.spiv View Post
Been playing around with this nice extension (using OSX).. Any idea what's causing probs when trying to run the fs-uae with gdbstub I always get a popup "Unable toi load segments" and the debugging as-is does not work.
Does it work with the example workspace ?
https://github.com/prb28/vscode-amig...xample-osx.zip
prb28 is offline  
Old 12 December 2020, 11:45   #174
mr.spiv
Registered User
 
mr.spiv's Avatar
 
Join Date: Aug 2006
Location: Finland
Age: 51
Posts: 242
Quote:
Originally Posted by prb28 View Post
Does it work with the example workspace ?
https://github.com/prb28/vscode-amig...xample-osx.zip
Works like a charm.. hmm, then there's something goofy on my self setup Gotta have a closer look.
mr.spiv is offline  
Old 12 December 2020, 12:12   #175
mr.spiv
Registered User
 
mr.spiv's Avatar
 
Join Date: Aug 2006
Location: Finland
Age: 51
Posts: 242
Quote:
Originally Posted by mr.spiv View Post
Works like a charm.. hmm, then there's something goofy on my self setup Gotta have a closer look.
I had the build & launch etc tweaked in a way that the final exe was located at ${fs-uae}/hd0/c not on the root of ${fs-uae}/hd0. That caused the debugger to err.
mr.spiv is offline  
Old 12 December 2020, 18:34   #176
prb28
Registered User
 
Join Date: May 2018
Location: France
Posts: 246
Quote:
Originally Posted by mr.spiv View Post
I had the build & launch etc tweaked in a way that the final exe was located at ${fs-uae}/hd0/c not on the root of ${fs-uae}/hd0. That caused the debugger to err.

Maybe I need some "file not found error".
prb28 is offline  
Old 12 December 2020, 19:17   #177
mr.spiv
Registered User
 
mr.spiv's Avatar
 
Join Date: Aug 2006
Location: Finland
Age: 51
Posts: 242
Quote:
Originally Posted by prb28 View Post

Maybe I need some "file not found error".
It does find a file and run it in the fs-uae.. debugging just does not work.
mr.spiv is offline  
Old 20 December 2020, 21:38   #178
TRoNi
Registered User
 
Join Date: Dec 2017
Location: Spain
Posts: 1
Lovely extension, prb28, but one question.

Is it possible to have multiple winuae debug configurations, so I can debug into an A500 or A1200? I tried to modify the configuration, but I got nothing.

Thanks
TRoNi is offline  
Old 20 December 2020, 22:33   #179
prb28
Registered User
 
Join Date: May 2018
Location: France
Posts: 246
Quote:
Originally Posted by TRoNi View Post
Is it possible to have multiple winuae debug configurations, so I can debug into an A500 or A1200? I tried to modify the configuration, but I got nothing.
Two elements are used for the configuration :

* the file : bin\default.uae
* the file : .vscode\launch.json
I think you can remove the option "quickstart=a500,1" from the default.uae file and create two different launch configuration with this parameter using a500 or a1200 value.
prb28 is offline  
Old 21 December 2020, 08:11   #180
JoeJoe
Registered User
 
Join Date: Feb 2020
Location: Germany
Posts: 178
I have simple create several configs with WinUAE. With the follow option in the launch.json select them:

Code:
          "options": [
            "-config=A600.uae",
            "-s",
            "debugging_features=gdbserver",
            "...
JoeJoe 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
assembly code to test for assign (2.0+) jotd Coders. System 2 27 December 2017 23:16
very basic C/ASM/Visual Studio hand holding Sephnroth Coders. C/C++ 2 08 March 2016 20:15
Amiga Audio/Visual KhneFr request.Other 6 03 January 2015 10:25
Profiling WinUAE with Visual Studio 2013 mark_k support.WinUAE 3 14 January 2014 20:26
amiga visual editor thinlega request.Apps 1 22 January 2003 15:48

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 09:31.

Top

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