• Advertisement
Sign in to follow this  

MSVC 6/2003 assembler output listing

This topic is 4833 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, exists a "trick" or a addin/plugin/macro for visual c++ 6 and 2003 that generates a clear and good for read assembly output file, I mean something without segments info, labels, comments of lines, only name of function and assembler code, and optionaly the C/C++ code in comments.
// fragment of generated code
;	COMDAT ??HFoo@@QBE?BV0@ABV0@@Z
_TEXT	SEGMENT PARA USE32 PUBLIC 'CODE'
_TEXT	ENDS
;	COMDAT ?func@?$A@PAH@@QAEXM@Z
_TEXT	SEGMENT PARA USE32 PUBLIC 'CODE'
_TEXT	ENDS
;	COMDAT ?func@?$A@PAH@@QAEXH@Z
_TEXT	SEGMENT PARA USE32 PUBLIC 'CODE'
_TEXT	ENDS
;	COMDAT ?func@?$A@PAH@@QAEXPAM@Z
_TEXT	SEGMENT PARA USE32 PUBLIC 'CODE'
_TEXT	ENDS
FLAT	GROUP _DATA, CONST, _BSS
	ASSUME	CS: FLAT, DS: FLAT, SS: FLAT
endif
PUBLIC	?mysqrt@@YAMM@Z					; mysqrt
EXTRN	__fltused:NEAR
_TEXT	SEGMENT
_n$ = 8
?mysqrt@@YAMM@Z PROC NEAR				; mysqrt

; 10   : {

	push	ebp
	mov	ebp, esp

; 11   : 	return n;

	fld	DWORD PTR _n$[ebp]

; 12   : }

	pop	ebp
	ret	0
?mysqrt@@YAMM@Z ENDP					; mysqrt
_TEXT	ENDS
PUBLIC	?func@?$A@D@@QAEXH@Z				; A<char>::func
EXTRN	__chkesp:NEAR
EXTRN	_printf:NEAR
_DATA	SEGMENT

I want some like this:
// _n$ = 8
mysqrt PROC NEAR
	push	ebp
	mov	ebp, esp
	fld	DWORD PTR _n$[ebp]
	pop	ebp
	ret	0



thnx

Share this post


Link to post
Share on other sites
Advertisement
To get rid of part of the text after the @, compile C code instead of C++ code. I'm fairly certain that is part of the name mangling

The rest of the stuff you want to get rid of shouldn't be too hard to strup out with a simple regular expression.

As far as I know, there is no way to autmatically make VC generate your clean asm for you.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement