Skip to content

Commit

Permalink
AsmDude2 v2.0.0.4 (#147)
Browse files Browse the repository at this point in the history
Initial version of AsmDude2 (v2.0.0.4) for Visual Studio 2022
  • Loading branch information
HJLebbink authored Oct 1, 2023
1 parent 1e1e3dc commit e81ab4e
Show file tree
Hide file tree
Showing 455 changed files with 47,027 additions and 154,434 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ VS/CSHARP/asm-dude-vsix/Resources/Performance/instruction_tables.ods

#VS/CSHARP/asm-sim-lib/libs/*
**/.idea/*
/VS/CSHARP/asm-dude2-vsix/vsix/**
Binary file removed Images/AsmDude-code-completion.png
Binary file not shown.
Binary file removed Images/AsmDude-disassembly-popup.png
Binary file not shown.
Binary file removed Images/AsmDude-label-clash.png
Binary file not shown.
Binary file removed Images/AsmDude-label-usage.png
Binary file not shown.
Binary file removed Images/AsmDude-redundant-instruction.png
Binary file not shown.
Binary file removed Images/AsmDude-register-content-completions.png
Binary file not shown.
Binary file removed Images/AsmDude-register-content.png
Binary file not shown.
Binary file removed Images/AsmDude-syntax-errors.png
Binary file not shown.
Binary file removed Images/AsmDude-undefined-labels.png
Binary file not shown.
Binary file removed Images/AsmDude-unreachable-instruction.png
Binary file not shown.
Binary file removed Images/AsmDude-using-undefined.png
Binary file not shown.
Binary file added Images/AsmDude2-code-completion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/AsmDude2-descriptions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/AsmDude2-signature-help.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/AsmDude2-syntax-highlighting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed Images/Disassembly-Window.png
Binary file not shown.
191 changes: 53 additions & 138 deletions README.md

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions VS/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[*.cs]

# CS0162: Unreachable code detected
dotnet_diagnostic.CS0162.severity = warning
330 changes: 95 additions & 235 deletions VS/AsmDude.sln

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions VS/CPP/ConsoleTest/ConsoleTest/ConsoleTest.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down Expand Up @@ -146,6 +146,9 @@
<ItemGroup>
<ClCompile Include="Main.cpp" />
</ItemGroup>
<ItemGroup>
<None Include="..\example_semantic_analysis2.asm" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
Expand Down
5 changes: 5 additions & 0 deletions VS/CPP/ConsoleTest/ConsoleTest/ConsoleTest.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,9 @@
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="..\example_semantic_analysis2.asm">
<Filter>Source Files</Filter>
</None>
</ItemGroup>
</Project>
3 changes: 2 additions & 1 deletion VS/CPP/ConsoleTest/ConsoleTest/Main.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// 'Hello World!' program

#include <iostream>
#include <intrin.h>
#include <cstdio>
#include <immintrin.h>

// 1] set a breakpoint at line 16.
// 2] hit Local Windows Debugger to run this program,
Expand Down
2 changes: 1 addition & 1 deletion VS/CSHARP/asm-annotate/ParserXed.cs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ static Tuple<Mnemonic, List<IformRegister>, int, bool, float, float> ParseLine(s
Console.WriteLine("ERROR: could not parse " + line);
}
var y = x[0].Split('_');
Mnemonic mnemonic = AsmSourceTools.ParseMnemonic(y[0], true);
Mnemonic mnemonic = AsmTools.AsmSourceTools.ParseMnemonic(y[0], true);

List<IformRegister> args = new List<IformRegister>();
for (int i = 1; i<y.Length; ++i)
Expand Down
13 changes: 9 additions & 4 deletions VS/CSHARP/asm-annotate/asm-annotate.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net8.0-windows8.0</TargetFramework>
<RootNamespace>asm_annotate</RootNamespace>
<Platforms>AnyCPU</Platforms>
<SupportedOSPlatformVersion>8.0</SupportedOSPlatformVersion>
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
<EnableNETAnalyzers>True</EnableNETAnalyzers>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="3.3.2">
<PackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="3.3.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="5.0.3">
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="7.0.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
// Copyright (c) 2021 Henk-Jan Lebbink
// Copyright (c) 2023 Henk-Jan Lebbink
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
// Copyright (c) 2021 Henk-Jan Lebbink
// Copyright (c) 2023 Henk-Jan Lebbink
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion VS/CSHARP/asm-dude-vsix/AsmDoc/AsmDocKeyProcessor.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
// Copyright (c) 2021 Henk-Jan Lebbink
// Copyright (c) 2023 Henk-Jan Lebbink
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
// Copyright (c) 2021 Henk-Jan Lebbink
// Copyright (c) 2023 Henk-Jan Lebbink
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 3 additions & 3 deletions VS/CSHARP/asm-dude-vsix/AsmDoc/AsmDocMouseHandler.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
// Copyright (c) 2021 Henk-Jan Lebbink
// Copyright (c) 2023 Henk-Jan Lebbink
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -81,12 +81,12 @@ public AsmDocMouseHandler(
// Some other points to clear the highlight span:
this.view_.LostAggregateFocus += (sender, args) =>
{
AsmDudeToolsStatic.Output_INFO(string.Format(AsmDudeToolsStatic.CultureUI, "{0}:event: LostAggregateFocus", this.ToString()));
//AsmDudeToolsStatic.Output_INFO(string.Format(AsmDudeToolsStatic.CultureUI, "{0}:event: LostAggregateFocus", this.ToString()));
this.Set_Highlight_Span(null);
};
this.view_.VisualElement.MouseLeave += (sender, args) =>
{
AsmDudeToolsStatic.Output_INFO(string.Format(AsmDudeToolsStatic.CultureUI, "{0}:event: MouseLeave", this.ToString()));
//AsmDudeToolsStatic.Output_INFO(string.Format(AsmDudeToolsStatic.CultureUI, "{0}:event: MouseLeave", this.ToString()));
this.Set_Highlight_Span(null);
};
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
// Copyright (c) 2021 Henk-Jan Lebbink
// Copyright (c) 2023 Henk-Jan Lebbink
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion VS/CSHARP/asm-dude-vsix/AsmDoc/AsmDocUnderlineTagger.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
// Copyright (c) 2021 Henk-Jan Lebbink
// Copyright (c) 2023 Henk-Jan Lebbink
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
// Copyright (c) 2021 Henk-Jan Lebbink
// Copyright (c) 2023 Henk-Jan Lebbink
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion VS/CSHARP/asm-dude-vsix/AsmDoc/CtrlKeyState.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
// Copyright (c) 2021 Henk-Jan Lebbink
// Copyright (c) 2023 Henk-Jan Lebbink
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down
8 changes: 6 additions & 2 deletions VS/CSHARP/asm-dude-vsix/AsmDudePackage.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
// Copyright (c) 2021 Henk-Jan Lebbink
// Copyright (c) 2023 Henk-Jan Lebbink
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -30,6 +30,7 @@ namespace AsmDude
using System.Threading;
using AsmDude.OptionsPage;
using AsmDude.Tools;

using Microsoft.VisualStudio.Shell;

[PackageRegistration(UseManagedResourcesOnly = true, AllowsBackgroundLoading = true)]
Expand Down Expand Up @@ -61,8 +62,11 @@ public AsmDudePackage()

protected override async System.Threading.Tasks.Task InitializeAsync(CancellationToken cancellationToken, IProgress<ServiceProgressData> progress)
{
await base.InitializeAsync(cancellationToken, progress).ConfigureAwait(true);
//await base.InitializeAsync(cancellationToken, progress).ConfigureAwait(true);

await this.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
ClearMefCache.ClearMefCache.Initialize(this);
//await MyToolWindowCommand.InitializeAsync(this);
}

#region Disassembly window experiments
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
// Copyright (c) 2021 Henk-Jan Lebbink
// Copyright (c) 2023 Henk-Jan Lebbink
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
// Copyright (c) 2021 Henk-Jan Lebbink
// Copyright (c) 2023 Henk-Jan Lebbink
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion VS/CSHARP/asm-dude-vsix/ClearMefCache/ClearMefCache.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
// Copyright (c) 2021 Henk-Jan Lebbink
// Copyright (c) 2023 Henk-Jan Lebbink
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
// Copyright (c) 2021 Henk-Jan Lebbink
// Copyright (c) 2023 Henk-Jan Lebbink
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
// Copyright (c) 2021 Henk-Jan Lebbink
// Copyright (c) 2023 Henk-Jan Lebbink
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
// Copyright (c) 2021 Henk-Jan Lebbink
// Copyright (c) 2023 Henk-Jan Lebbink
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
// Copyright (c) 2021 Henk-Jan Lebbink
// Copyright (c) 2023 Henk-Jan Lebbink
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
// Copyright (c) 2021 Henk-Jan Lebbink
// Copyright (c) 2023 Henk-Jan Lebbink
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion VS/CSHARP/asm-dude-vsix/CodeFolding/CodeFoldingTagger.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
// Copyright (c) 2021 Henk-Jan Lebbink
// Copyright (c) 2023 Henk-Jan Lebbink
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
// Copyright (c) 2021 Henk-Jan Lebbink
// Copyright (c) 2023 Henk-Jan Lebbink
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
// Copyright (c) 2021 Henk-Jan Lebbink
// Copyright (c) 2023 Henk-Jan Lebbink
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
// Copyright (c) 2021 Henk-Jan Lebbink
// Copyright (c) 2023 Henk-Jan Lebbink
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion VS/CSHARP/asm-dude-vsix/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2021 Henk-Jan Lebbink
Copyright (c) 2023 Henk-Jan Lebbink

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
// Copyright (c) 2021 Henk-Jan Lebbink
// Copyright (c) 2023 Henk-Jan Lebbink
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 3 additions & 1 deletion VS/CSHARP/asm-dude-vsix/OptionsPage/AsmDudeOptionsPage.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System.Runtime.InteropServices;
// The MIT License (MIT)
//
// Copyright (c) 2021 Henk-Jan Lebbink
// Copyright (c) 2023 Henk-Jan Lebbink
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -125,6 +126,7 @@ public enum PropertyEnum // NOTE: the enum elements should be precisely equal to
}

[Guid(Guids.GuidOptionsPageAsmDude)]
[ComVisible(true)]
public class AsmDudeOptionsPage : UIElementDialogPage
{
private readonly AsmDudeOptionsPageUI asmDudeOptionsPageUI_;
Expand Down
2 changes: 1 addition & 1 deletion VS/CSHARP/asm-dude-vsix/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
// Copyright (c) 2021 Henk-Jan Lebbink
// Copyright (c) 2023 Henk-Jan Lebbink
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down
9 changes: 3 additions & 6 deletions VS/CSHARP/asm-dude-vsix/QuickInfo/AsmQuickInfoController.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
// Copyright (c) 2021 Henk-Jan Lebbink
// Copyright (c) 2023 Henk-Jan Lebbink
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand All @@ -20,8 +20,6 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

// thib is a typppo

namespace AsmDude.QuickInfo
{
using System;
Expand All @@ -39,8 +37,7 @@ namespace AsmDude.QuickInfo
internal sealed class AsmQuickInfoController : IIntellisenseController
{
private readonly IList<ITextBuffer> subjectBuffers_;
private readonly IQuickInfoBroker quickInfoBroker_; //XYZZY OLD
//private readonly IAsyncQuickInfoBroker quickInfoBroker_; //XYZZY NEW
private readonly IAsyncQuickInfoBroker quickInfoBroker_;
private readonly ITagAggregator<AsmTokenTag> aggregator_;
private ITextView textView_;

Expand All @@ -50,7 +47,7 @@ internal sealed class AsmQuickInfoController : IIntellisenseController
internal AsmQuickInfoController(
ITextView textView,
IList<ITextBuffer> subjectBuffers,
IQuickInfoBroker quickInfoBroker,
IAsyncQuickInfoBroker quickInfoBroker,
IBufferTagAggregatorFactoryService aggregatorFactory)
{
AsmDudeToolsStatic.Output_INFO(string.Format(AsmDudeToolsStatic.CultureUI, "{0}:constructor; file={1}", this.ToString(), AsmDudeToolsStatic.GetFilename(textView.TextBuffer)));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
// Copyright (c) 2021 Henk-Jan Lebbink
// Copyright (c) 2023 Henk-Jan Lebbink
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -41,7 +41,7 @@ internal sealed class AsmQuickInfoControllerProvider : IIntellisenseControllerPr
private readonly IBufferTagAggregatorFactoryService aggregatorFactory_ = null;

[Import]
private readonly IQuickInfoBroker quickInfoBroker_ = null;
private readonly IAsyncQuickInfoBroker quickInfoBroker_ = null;

public IIntellisenseController TryCreateIntellisenseController(ITextView textView, IList<ITextBuffer> subjectBuffers)
{
Expand Down
Loading

0 comments on commit e81ab4e

Please sign in to comment.