简体   繁体   English

在 Visual Studio 代码中运行 asm

[英]Run asm in Visual Studio code

Is there some sort of plugin in Visual Studio code (mac) that can run basic assembly, for example the following: Visual Studio 代码 (mac) 中是否有某种插件可以运行基本程序集,例如以下内容:

.section .text
.globl _start
_start:
    movl $1, %eax
    movl $0, %ebx
    int $0x80

As it is, currently I am ssh'ing into a linux server in order to run this assembly but I was hoping it would be possible to build/link/execute this assembly from within VS code, perhaps with a plugin.事实上,目前我正在 ssh'ing 到 linux 服务器以运行此程序集,但我希望可以从 VS 代码中构建/链接/执行此程序集,也许使用插件。

You can make a task to assemble and link your code, after that, you can use the gdb extension to debug your code.您可以创建一个任务来组装和链接您的代码,之后,您可以使用gdb 扩展来调试您的代码。

To make this process faster, if you don't know how to do it, you can use the .vscode folder .为了让这个过程更快,如果你不知道怎么做,你可以使用.vscode 文件夹

As you are using AT&T syntax, you'll need to use the gas option to run the code.当您使用 AT&T 语法时,您需要使用 gas 选项来运行代码。

If you still don't have gdb, you can install it opening a terminal and executing: brew install gdb .如果您仍然没有 gdb,您可以打开终端安装它并执行: brew install gdb

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Visual Studio C ++:看到ASM代码? - Visual Studio C++: Seeing the ASM code? 为什么Visual Studio可以识别__asm {}但不能识别汇编代码? - Why visual studio recognizes __asm {} but can't recognize assembly code? 如何在C ++和Visual Studio 2008中使用asm代码 - How to use asm code in C++ & Visual Studio 2008 为什么godbolt生成不同的asm输出而不是我在Visual Studio中的实际asm代码? - Why godbolt generate different asm output than my actual asm code in Visual Studio? SOS Visual Studio 无法运行 go 文件,go: no such tool "asm" - S.O.S. Visual Studio can't run go file, go: no such tool "asm" 在Visual Studio中显示asm语法高亮显示和asm文件 - asm syntax highlight AND asm file display in visual studio IDA反汇编会为Visual Studio 2017中编译的exe生成与ASM文件完全不同的代码 - IDA disassembly produces completely different code to ASM file for exe compiled in Visual Studio 2017 AT&T将在Visual Studio 2017中内联asm - AT&T to inline asm in Visual Studio 2017 调试器跳过断点(Visual Studio 2013-.asm) - Debugger skips breakpoint (Visual Studio 2013 - .asm) 使用 Visual Studio 调试 ASM - 注册内容不会显示 - Debugging ASM with Visual Studio - Register content will not display
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM