forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

GCC Question

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development
View previous topic :: View next topic  
Author Message
linverse



Joined: 09 Nov 2004
Posts: 1

PostPosted: Tue Nov 09, 2004 8:40 am    Post subject: GCC Question Reply with quote

Is there a way to output c++ code and it's final assembled version like Visual Studio can do. x86 ex:

Code:

; 41   : void statsClose() {

   sub   esp, 8
   push   esi
   push   edi

; 42   :    time_t t;
; 43   :    FILE *f;
; 44   :
; 45   :    t = time(NULL) - vsyncTime;

   push   0
   call   _time
   mov   edi, eax
   sub   edi, DWORD PTR _vsyncTime


LInverse
Back to top
View user's profile Send private message
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Tue Nov 09, 2004 9:06 am    Post subject: Reply with quote

To spit out unassembled code, use:

gcc -S

I think. :)
Back to top
View user's profile Send private message Visit poster's website
pixel



Joined: 30 Jan 2004
Posts: 791

PostPosted: Tue Nov 09, 2004 9:54 am    Post subject: Reply with quote

Well, this won't "interlace" source code...
_________________
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
Back to top
View user's profile Send private message
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Tue Nov 09, 2004 10:43 am    Post subject: Reply with quote

Stop that! You make me sad!
Back to top
View user's profile Send private message Visit poster's website
Guest






PostPosted: Tue Nov 09, 2004 1:45 pm    Post subject: Reply with quote

pixel wrote:
Well, this won't "interlace" source code...


This actually sounds like it could be a cool feature, but I guess that GCC doesn't have it ?

Of course, optimization would wreak havoc, but the same issues exist for and haven't stopped optimization being used in conjunction with debugging turned on.

Objdump lets debugging information be printed along with disassembly, including sourcefile names and line numbers, and also I think including source code, but thats done on already compiled binaries that hopefully had debug turned on and source files laying around.

My advice to the original poster - check the objdump command. It comes with the gcc distribution.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group