[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re[4]: [avr-gcc-list] Debugging with simulavr/gdb/ddd
From: |
Andreas Schwarz |
Subject: |
Re[4]: [avr-gcc-list] Debugging with simulavr/gdb/ddd |
Date: |
Wed, 4 Sep 2002 18:51:49 +0200 |
> :) Now everything is looking good, but there is one last (?) problem: I
> :) have a project with a function which is defined in an assembler file.
> :) GDB always steps over this function, but I would like it to step into
> :) the assembler source.
> Did you try the stepi or nexti commands? These step a single instruction
> instead of a line of code. With ddd (unix/linux only) you can view both
> the C source and the machine instructions at the same time.
> If you want to be able to step through the source of an asm file, you have
> to tell gas to generate stabs debugging information (--gstabs). Just be
> sure not to pass --gstabs to the assembler for a C file you have compiled
> with -g or gdb will get _really_ confused (took me about three weeks to
> figure this out ;-).
It still doesn't work, even "nexti" simply steps over the rcall to the
subroutine (in machine code view).
:-(
This is how I compile the program:
avr-gcc -c -g -Os -Wall -Wstrict-prototypes -Wa -mmcu=at90s8515 gcctest1.c -o
gcctest1.o
avr-gcc -c -x assembler-with-cpp -Wa, --gstabs -mmcu=at90s8515 test.s -o test.o
avr-gcc -Wl,-Map=gdb.map,--cref gcctest1.o test.o
test.s contains a function spi(), in gcctest1.c the function prototype
is:
extern void spi(unsigned char);
--
WWW: http://andreas-s.net
ICQ: 83580609
avr-gcc-list at http://avr1.org