Re: Debugging Under DDD

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

 



On Mon, Jul 12, 2004 at 12:09:30 -0700, Talib Alim wrote:
> This may be a trivial question, but I hope that someone can answer me.
> I am bring up u-boot on 8xx.
> 
> While doing source level debugging under ddd, whenever I do step,
> stepi, next or nexti I see green instruction pointer jump all over the
> code. e.g. it would go to first line, than third line, than 7 line. If
> I look at machine code window, it is running in normal predictable way.

This often happens if you compile the code with optimisations. Have you
ran the compiler with -On for n >= 1?

With many compilers debugging (-g) and optimization (-O) options are
mutualy exclusive, but GCC allows you to specify them both. But it can
do lot of funny things when you do. IIRC there are some comment in gcc
manual concerning the issue (somewhere around description of -g option,
I believe).

-------------------------------------------------------------------------------
						 Jan 'Bulb' Hudec <bulb@ucw.cz>

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux