Date: Sun, 22 Jul 2001 13:56:27 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Sterten AT aol DOT com cc: djgpp AT delorie DOT com Subject: Re: assembly translation of a single C-command In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Sat, 21 Jul 2001 Sterten AT aol DOT com wrote: > >If you want to see the C code together with the assembly it was converted to, > >use a command line like this: > > > > gcc -c -Wa,-a,-ad [other GCC options] foo.c > foo.lst > > > >which will output the combined C/assembly listing to the file `foo.lst'. > > not with GCC 2.03 on my computer. > The C-code is not in it. Sorry, the FAQ fails to tell that you need to use -g as well: gcc -c -g -Wa,-a,-ad [other GCC options] foo.c > foo.lst Without -g, the assembler won't have enough info to output the source lines. I will fix that in the next release of the FAQ. (In general, whenever you have problems like that, it is advisable to look up the relevant switches in the docs. In this case, the node in the Gas manual ("info as") which describes the -a switch tells you that -g is required.)