Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » I want to know how to export assembly files(I want to export all the assembly codes running to a file when Debug Hotspot)
I want to know how to export assembly files [message #1856162] Wed, 23 November 2022 20:55 Go to next message
Eclipse UserFriend
When the Debug C/C ++ code, I can see that there are assembly code during the execution process, but I want to export to a certain text file for easy viewing. How to do it?
Re: I want to know how to export assembly files [message #1856175 is a reply to message #1856162] Thu, 24 November 2022 04:35 Go to previous messageGo to next message
Eclipse UserFriend
The GNU compiler uses the -Wa option to send options to the assembler.
Assuming that your setup uses the standard GNU toolset, add

-Wa,-adhlns=path_to_listing_file

to the compiler command line. Substitute path_to_listing_file with the required
target file path.

If the setup uses the GNU make program, you can generate a listing file matching
the object file produced, but with .lst file extension:

-Wa,-adhlns=(@:.o=.lst)

For the individual options under -Wa, see the GNU assembler manual.
Re: I want to know how to export assembly files [message #1858240 is a reply to message #1856175] Fri, 24 March 2023 02:54 Go to previous messageGo to next message
Eclipse UserFriend
The GNU compiler uses the -Wa option to send options to the assembler.
Assuming that your setup uses the standard GNU toolset, add

-Wa,-adhlns=path to listing file

to the compiler command line. Replace path to listing file with the required target file path.

You can create a listing file that matches the object file created, but with the.lst file extension if the setup utilizes the GNU build program:
Re: I want to know how to export assembly files [message #1858470 is a reply to message #1858240] Tue, 04 April 2023 07:44 Go to previous message
Eclipse UserFriend
To export assembly code during the debugging process to a text file, you can use the following steps in Visual Studio:

Start debugging your C/C++ code in Visual Studio.
Go to the Debug menu and select the Windows submenu.
Select the Disassembly option to open the Disassembly window.
In the Disassembly window, select the assembly code that you want to export.
Right-click on the selected code and choose the Export Code to File option.
In the Export Code to File dialog box, specify the file name and location where you want to save the exported code.
Click on the Export button to save the assembly code to the specified file.
Alternatively, you can use the DUMPBIN tool to generate a text file of the assembly code. To do this, follow these steps:

Open the Developer Command Prompt for Visual Studio.

Navigate to the folder containing the compiled executable file.

Run the following command:

arduino
Copy code
dumpbin /DISASM myprogram.exe > myprogram.asm
Replace "myprogram.exe" with the name of your compiled executable file and "myprogram.asm" with the name you want to give to the exported assembly code file.

This will generate a text file containing the assembly code of your program that you can view and analyze easily.

https://bloggingheros.com/what-are-the-roles-of-a-fire-marshal/
Previous Topic:Eclipse and gmake issue with OpenGL tutorial
Next Topic:build log print in an external file
Goto Forum:
  


Current Time: Thu Jul 03 19:27:27 EDT 2025

Powered by FUDForum. Page generated in 0.04822 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top