hjlebbink / asm-dude Goto Github PK
View Code? Open in Web Editor NEWVisual Studio extension for assembly syntax highlighting and code completion in assembly files and the disassembly window
License: MIT License
Visual Studio extension for assembly syntax highlighting and code completion in assembly files and the disassembly window
License: MIT License
Upgraded to 1.4.2 and open a c# project makes VS2015 crashed.
Visual Studio 2015 Update2 CTP
With Resharper & Code for Roslyn installed.
Exception info:
Unhandled exception:
System.Runtime.InteropServices.COMException
The application called an interface That was marshalled for a different thread. (Exception from HRESULT:0x8001010E (RPC_E_WRONG_THREAD))
在 Microsoft.VisualStudio.Shell.Interop.IVsThreadedWaitDialog3.StartWaitDialogWithCallback(String szWaitCaption, String szWaitMessage, String szProgressText, Object varStatusBmpAnim, String szStatusBarText, Boolean fIsCancelable, Int32 iDelayToShowDialog, Boolean fShowProgress, Int32 iTotalSteps, Int32 iCurrentStep, IVsThreadedWaitDialogCallback pCallback)
在 Microsoft.VisualStudio.LanguageServices.Implementation.Utilities.VisualStudioWaitContext.CreateDialog(IVsThreadedWaitDialogFactory dialogFactory)
在 Microsoft.VisualStudio.LanguageServices.Implementation.Utilities.VisualStudioWaitContext..ctor(IGlobalOperationNotificationService notificationService, IVsThreadedWaitDialogFactory dialogFactory, String title, String message, Boolean allowCancel)
在 Microsoft.VisualStudio.LanguageServices.Implementation.Utilities.VisualStudioWaitIndicator.StartWait(String title, String message, Boolean allowCancel)
在 Microsoft.VisualStudio.LanguageServices.Implementation.Utilities.VisualStudioWaitIndicator.Wait(String title, String message, Boolean allowCancel, Action`1 action)
在 Microsoft.CodeAnalysis.Editor.Implementation.TextStructureNavigation.AbstractTextStructureNavigatorProvider.TextStructureNavigator.GetExtentOfWord(SnapshotPoint currentPosition)
在 AsmDude.HighlightWord.HighlightWordTagger.UpdateWordAdornments(Object threadContext)
在 System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
在 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
在 System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
在 System.Threading.ThreadPoolWorkQueue.Dispatch()
在 System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
Full log was too long to paste here, so I attached it as an attachment.
Visual Studio 2015 Update 2
AsmDude version 1.5.0.1
Here's a small asm file:
segment_name SEGMENT USE64
call proc_name
hlt
proc_name PROC
xor rax, rax
ret
proc_name ENDP
segment_name ENDS
Open this file in Visual Studio and AsmDude will report call proc_name
as having an "Undefined Label".
I was told this was supposed to be working and start a new issue here.
INCLUDE Irvine32.inc
TERMMSG EQU < "(Press ENTER to Terminate)">
.data
; Prompts
prompt_Welcome BYTE WELCOMEMSG , 0
.code
main PROC
; Press Enter to Terminate
mov edx, OFFSET prompt_goodBy
call WriteString ; <-- Irvine Library Call
call ReadInt ; <-- Irvine Library Call
call CrLf; <-- Irvine Library Call
exit
main ENDP
You can see there is a red squiggly line under WriteString, ReadInt, and CrLf
I like to add green squiggles (similar to the red ones for errors) to indicate that the value of a register has been determined by my assembly simulator, which I'm planning for AsmDude 2.0. Sadly I don't know how to make those bloody squiggles... thus I asked some questions on SO and MSDN, see here. Sadly, still no solutions...
I don't have much reputation on SO, thus, if some of you have a bit of reputation to invest in my questions, in return I will make nicely colored squiggles with register contents.
Regards HJ!
Steps to reproduce:
Typical workaround involves disabling the plugin, restarting VS2015, enabling the plugin, and finally restarting VS2015, version 14.0.25421.03 Update 3.
Other than that I'm absolutely loving this plug-in. Thank you for taking the time to develop it!
JUMP:
This option stays at a dark blue color no matter what I set it to. The others seem to be working.
MISC:
Doesn't seem to pick up signed data types like. SDWORD, SWORD, etc
Overall really cool project and look forward to seeing how it progresses. Thanks.
local labels begin with . and they should not be marked as error
When I try to use the #region keyword and the #endregion the code folds properly, when building it won't build producing an invalid character build-fail error at the line of #region.
Note:
_It was working fine but suddenly it stopped, I tried enabling and disabling the code folding but it didn't solve the issue_
Thank You
It would be really nice to allow custom file extensions (e.g. "*.iasm") to be opened with AsmDude.
The Visual Studio Way of doing that usually is going to Tools -> Options -> Text Editor -> File Extension, then typing in the extension and which editor to open it with. However, I have no clue how much effort it is to make Visual Studio recognize AsmDude as an "editor".
Steps to reproduce:
Visual Studio's Error List will continuously add the same warning. The only way I can find for clearing the Error List is closing and reopening Visual Studio, which feels like a subpar solution.
Same thing happens with the "Is the Tools>Options>AsmDude options pane not visible?" message. Continuously gets duplicated in the Error List until you close Visual Studio.
Currently there is only an option to customize the background color for keyword highlighting. Due to the inability to customize the font color for highlighted keywords, this can make it difficult to read highlighted keywords when using certain color schemes (as seen in the picture below).
I'm requesting the addition of a "Font Color" customizer in the "Keyword Highlighting" section of the AsmDude plugin options, as seen in the following picture (and marked with a red arrow):
To make the feature extra convenient, I think it would be best to also include an "Inherit color" option for the highlighted keyword font color. This (default?) option would leave the font color of highlighted keywords unchanged from the normal font color used by the current color scheme.
Example file:
segment_name SEGMENT USE64
FOO EQU 0x00
jmp FOO
segment_name ENDS
Example file:
segment_name SEGMENT USE64
jmp dword ptr [eax]
segment_name ENDS
"dword" is considered an undefined label.
The options menu (Tools > Options > AsmDude) disappears after restarting Visual Studio Community 2015 on Windows 10. Does not appear to be related to changing or using different themes.
100% repeatable
Workaround: Disable AsmDude, restart, enable AsmDude, restart. This workaround is rather inconvenient since VS must be restarted to apply changes to some options.
Please support VS 2017
It's common for us to write "breakpoints" in using jump instructions to $. Example file:
segment_name SEGMENT USE64
jmp $
segment_name ENDS
This shows up in the error list as an undefined label.
I'm pretty sure this is an asm-dude glitch... I hunted all over the internet for these preprocessor directives and it looks like it's linked to the type of editor (i.e. c# or C++) so when no editor base is chosen then it doesn't recognize the caracter... (i.e. I don't think they are stripped out prior to compiling)
For some reason my highlighting is gone... I have fiddled around with opening / closing VS with different settings. I cannot find a file extension that asm is associated with.. so I don't think that is the issue.
I see there was an update a couple days ago.. Is it related? Next step is to uninstall / re-install the plugin.
Similar to #15 but inversed:
include "a.inc"
segment_name SEGMENT USE64
on_fail:
hlt
segment_name ENDS
inc_segment_name SEGMENT USE64
jmp on_fail
inc_segment_name ENDS
I'm guessing the change you made for #15 was just to recurse down include directives when you saw them. This seems a lot trickier as there's no clues where "a.inc" was included into.
Example file:
segment_name SEGMENT USE64
db "This string contains the word jmp inside of it",0
segment_name ENDS
Having syntax coloring inside of these strings is not a huge problem. The bigger issue is that the word "inside" shows up in Visual Studio's error list as "Undefined Label"
does not support vs2013
Example file:
segment_name SEGMENT USE64
jmp mylabel
hlt
mylabel LABEL near
hlt
segment_name ENDS
MSDN documentation: https://msdn.microsoft.com/en-us/library/z7chtfff.aspx
Example:
comment ! [this line is commented]
[multiline comments]
[any symbol can be used as a delimiter, first instance of this symbol marks the end of the comment directive]
! [this line is also commented]
MSDN documentation: https://msdn.microsoft.com/en-us/library/4c9h3x38.aspx
When I attempt to type something like inc
, where there are other potential matches which start with the same letters, the auto-completion logic in ASM Dude seems to favor the longer options over the shorter ones. This makes it difficult to type things like inc
, because when I hit Space it autocompletes to include
. I think it should choose the shortest match instead.
-> Reference NULL Exception
The simple solution is, not to do that. But the problem is symptomatic to multiple error conditions I reduced to this.
(Seen at VS 2015 Enterprise Update 1 on Win10 x64)
As we all know, Visual Studio does not support setting any syntax highlighting explicitly to italic or non-italic.
As this extension sets all comments to italic, I kindly request the option to let the user decide whether he wants his comments to be displayed in italics or not:
When I attempt to type something like inc
, where there are other potential matches which start with the same letters, the auto-completion logic in ASM Dude seems to favor the longer options over the shorter ones. This makes it difficult to type things like inc
, because when I hit Space it autocompletes to include
. I think it should choose the shortest match instead.
I have to force kill Visual Studio when opening .asm that is being parsed by asm-dude
http://imgur.com/a/Qrmiv occurs with ASM.DUDe 1.8.1.1 and 1.8.1.3
http://imgur.com/a/EDaaJ
Example file:
segment_name SEGMENT USE64
ASSUME gs:NOTHING
mov eax, dword ptr gs:[0]
segment_name ENDS
Warning occurs for "gs" being a label clash.
error MSB3325: Cannot import the following key file: AsmToolsListKeyFile.pfx. The key file may be password protected. To correct this, try to import the certificate again or manually install the certificate to the Strong Name CSP with the following key container name: VS_KEY_ABEED75BFE1F832A
1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(2884,5): error MSB3321: Importing key file "AsmToolsListKeyFile.pfx" was canceled.
I am tried
sn.exe -i C:\Users\Lee\Source\Repos\asm-dude\VS\CSHARP\asm-tools-lib\AsmToolsListKeyFile.pfx VS_KEY_ABEED75BFE1F832A
and this doesn't work.
Any help?
In cases where "undefined label" or "label clash" warnings occur where it's too complex to fix or to modify AsmDude to support that usage.
I'm thinking either or both:
#pragma
-like syntax.Possible syntax:
; pragma AsmDude warning disable
jmp undefined_label
; pragma AsmDude warning restore
The little pop ups as you hang a cursor over them are great. But they are in the way too often. Consider putting the offset of the label above the current line of code. I suspect everyone is looking downward in the document anyway. I think that is consistent with other MS Popups.
Constants such as 'COURSE EQU <"CS 271 Winter 2017 Section 400 ">' which occur before the .data segment have 'LABEL' listed as their type in the suggestion popup. This incorrect as these are precompiler directives
If there is no documentation site consider just adding a folder to the GitHub where we can add documentation. I'm really quite new to this github repository but have some familiarity with CVS and have read the gitbook. So maybe my suggestion is not the best location but I think you should understand the intent.
It would nice if user-defined types were highlighted.
The keyword highlighting kinda grabbed single characters, this was annoying because single quotes and double quotes were being grabbed. I think it would be better if keyword highlighting was limited to words that matched keyword requirements of assembly. I just turned it off.
Of course the universe of features in infinite. Still if I may suggest one small feature, If included library can be scanned for available procedures that would be nice to have those highlighted not marked as invalid, and perhaps a hover tooltip made to show where the source of the highlighting comes from.
For Example: INCLUDE Irvine32.inc has procedure WriteString. ASM-Dude currently marks it as invalid (because it doesn't know about objects from the linking). Maybe as a simple work around the Irvine32.lib procedures could just be added to list of words and an option put in the settings.
I'm in my first assembly class so I hope that my comments are appropriate.
Add support for segment registers, extern, nasm macros ,addressing modes and more syntax highlighting
there should be an option in the option menu which will specifies the assembler.
MASM keywords should not be in autocomplete menu if the assembler is NASM and they should not be highlighted.
I have a hunch this will be difficult to get working properly, but let's say you have these files:
include "a.inc"
segment_name SEGMENT USE64
jmp mylabel
segment_name ENDS
inc_segment_name SEGMENT USE64
mylabel:
hlt
inc_segment_name ENDS
"mylabel" is considered an undefined label, even though it will be defined once "a.inc" is included into the file.
We use this a lot and it results in AsmDude writing many "Undefined Label" warnings in Visual Studio's Error List.
Any ideas?
AsmDude support vs 2013?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.