avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] PORTC


From: David Kelly
Subject: Re: [avr-gcc-list] PORTC
Date: Tue, 11 Mar 2008 15:36:23 -0500
User-agent: Mutt/1.4.2.3i

On Tue, Mar 11, 2008 at 08:22:23PM +0100, Joerg Wunsch wrote:
> "Andi" <address@hidden> wrote:
> 
> > I'm still checking where is the problem now.
> 
> Elsewhere.  Don't be fooled by viewing the disassembly listing with
> the interspersed C code.  Look at a plain disassembly or the generated
> assembly code instead.  In my opinion, these diassembly + source code
> list files are much more obfuscating the view rather than clarifying
> anything (even more, the more clever the compiler's optimizations are
> getting).

Or set a breakpoint prior to the PORTC code, run to break, "View
Disassembly" in AVR Studio and then single step through the code. This
is the best way I can think of to be sure one is looking at the real
code generated by the compiler.

I do generate a list file from elf and source in my Makefile because its
often useful. But as Joerg points out it has to be used with a big dose
of distrust. Code sections disassemble quite well but if there is much
else in the file such as constant data then the same "section of code"
may be "disassembled" several times.

"avr-objdump -dS" usually produces very good output. "-DS" does the same
as -dS plus a whole bunch of crap disassembled where its not code. At
least when one uses -O2 to compile.

-- 
David Kelly N4HHE, address@hidden
========================================================================
Whom computers would destroy, they must first drive mad.




reply via email to

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