www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/16/22:25:29

Sender: nate AT cartsys DOT com
Message-ID: <35871E1A.E42F93B0@cartsys.com>
Date: Tue, 16 Jun 1998 18:38:34 -0700
From: Nate Eldredge <nate AT cartsys DOT com>
MIME-Version: 1.0
To: Javier Calleja <dismuntel AT apdo DOT com>
CC: djgpp AT delorie DOT com
Subject: Re: How can I create a source code file for assembler debugging
References: <01bd9876$6184d4e0$0100a8c0 AT dismuntel DOT ctv DOT es>

> Javier Calleja wrote:
> 
> Hi world:
> 
>   I am programming and I want to create an assembler source file.
> 
>   I know, I know, I must use the '-S' option in the gcc, but I need to
> know if it exists an option that in the file I compile I am be allowed
> to see the C source and the assembler that is created in each block of
> C.

There is no option to intersperse the assembler output with the C source
that generated it.  However, you can do:

gcc -c -g -Wa,-a,-ad [other options] foo.c

which will compile and assemble foo.c, and generate on stdout a listing
file which includes the C source and assembler.

Btw, please do not post in HTML.
-- 

Nate Eldredge
nate AT cartsys DOT com


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019