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

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

Re[3]: [avr-gcc-list] Debugging with simulavr/gdb/ddd


From: Theodore A. Roth
Subject: Re[3]: [avr-gcc-list] Debugging with simulavr/gdb/ddd
Date: Tue, 3 Sep 2002 11:50:37 -0700 (PDT)

On Tue, 3 Sep 2002, Andreas Schwarz wrote:

:) Monday, September 02, 2002, 9:04:53 PM, you wrote:
:)
:) > :) Thank you, this works, but gcrt1.s is still missing. And I've got 
another
:)
:) > You will have to tell gdb where the source file is located in this case.
:)
:) In the windows version of avr-gcc I always had a gcrt1.s in the
:) project directory. Is there a compiler option for generating this
:) file or do I have to copy it from the libc-source?

I would think you should only have to tell gdb where it lives with the dir
command.

:)
:) 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 ;-).

Ted Roth

avr-gcc-list at http://avr1.org



reply via email to

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