[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] How does one get gcc *.lst file with interspersed Sou

From: Ian Caddy
Subject: Re: [avr-gcc-list] How does one get gcc *.lst file with interspersed Source Listing and Assembler?
Date: Fri, 02 Dec 2005 14:23:42 +0800
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050923 Thunderbird/1.0.7 Mnenhy/

Hi Patrick,

I would say that it is the -g as we don't use the -L or -c switches and we get the listings with the high level source interspersed.


Ian Caddy

Patrick Sullivan wrote:
Thanks Ian.  I found out that we need maybe the -L -g or -c switch as
well (since when I ran your recommended command I didn't see the *.c
file lines interspersed.  I successfully ran with 'gcc -Wa,-ahls,-L -g
-c hello.c > hello.lst'

Thanks for responding.


-----Original Message-----
From: Ian Caddy [mailto:address@hidden Sent: Thursday, December 01, 2005 10:12 PM
To: Patrick Sullivan
Cc: address@hidden
Subject: Re: [avr-gcc-list] How does one get gcc *.lst file with
interspersed Source Listing and Assembler?

Hi Patrick,

You can generate the list files you want with

gcc -Wa,-ahlms=hello.lst hello.c

I hope this helps,

Ian Caddy

Patrick Sullivan wrote:


I am using gcc, and am trying to find out how to get a list output of

I Tried "gcc -Wa,-alh hello.c", but it didn't work.  I get output that

looks like the following (it doesn't have the *.c lines interspersed

where it corresponds to chunks of Assember code). Does anyone know a way to get the *.c source lines interspersed within the below output (i.e. what gcc or as options etc...?)?


493                    L142:

494 057c 8B1D0000              movl    _OutFilePtr, %ebx

494      0000

495 0582 0FBEC1                movsbl  %cl,%eax

496 0585 890424                movl    %eax, (%esp)

497 0588 895C2404              movl    %ebx, 4(%esp)

498 058c E8000000              call    _fputc

498      00

499 0591 0FB60D00              movzbl  _C1, %ecx

499      000000

500 0598 80F90A                cmpb    $10, %cl

501 059b 0F95C0                setne   %al

502 059e 31D2                  xorl    %edx, %edx

503 05a0 80F90D                cmpb    $13, %cl

504 05a3 0F95C2                setne   %dl

505 05a6 85D0                  testl   %eax, %edx

506 05a8 0F842CFE              je      L85

506      FFFF

507                    L143:

508 05ae A1000000              movl    _OutFilePtr, %eax

508      00





AVR-GCC-list mailing list

Ian Caddy
Goanna Technologies Pty Ltd
+61 8 9221 1860

reply via email to

[Prev in Thread] Current Thread [Next in Thread]