[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] memset does not show up in AVR Studio V4
From: |
Joerg Wunsch |
Subject: |
Re: [avr-gcc-list] memset does not show up in AVR Studio V4 |
Date: |
Fri, 3 Jan 2003 10:59:00 +0100 (MET) |
"Mike Bechtold" <address@hidden> wrote:
> I using GCC v3.2 objtool v0.5b. the code for memset does not show
> up in avr Studio v.4.
Disclaimer: i don't have Windows, thus don't know much about
AVRstudio.
My guess is that this is due to the fact that gcc, when using any
level of optimization > 0, and when not using -ffreestanding,
generally inlines memset() into a few assembler instructions. Of
course, from a souce-code point of view, it then doesn't descend into
a function you could single-step through, since it's just a single
line of C source (containing the "call" to memset()) that expands into
some assembler statements.
Single-stepping by CPU instruction should work.
For a quick test, here's what gcc expands for a call to
memset(functionarg#1, 0, 23); :
ldi r18,lo8(23)
movw r30,r24
st Z+,__zero_reg__
dec r18
brne .-6
--
J"org Wunsch Unix support engineer
address@hidden http://www.interface-systems.de/~j/
avr-gcc-list at http://avr1.org