ddd
[Top][All Lists]
Advanced

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

Re: Breakpoints not visible.


From: apgaylard
Subject: Re: Breakpoints not visible.
Date: Thu, 13 Nov 2003 10:27:00 GMT

Erik,

Thanks for your detailed response.

> On Thu, Nov 13, 2003 at 06:35:59AM +0000, address@hidden wrote:
> > This is an interesting problem that I'd like to sort out.
> 
> Thanks for allowing your curiosity to be piqued. Hopefully it's still
> interesting after learning that I'm debugging embedded code, written in
> assembler. :-)
> 
> > First: does gdb handle code in other sections any differently?
> > I suspect that gdb's output may differ slightly from the .text case,
> > and ddd's parser isn't getting what it expects.
> 
> Any section other than .text seems to freeze the Source Window. Here's
> how things proceed from start-up:
> 
> Source Window:  (No green cursor. Execution doesn't start here.)
> ---------------------------------
>    .section .text,"ax"
> IDLE:
>    push  r18
>    ldi   r16,1
> ---------------------------------
> 
> Machine Window:  (No green cursor. Execution doesn't start here.)
> ----------------------------------
> Dump of assembler code for function IDLE:
>    0x0000019c <IDLE+0>:    push    r18
>    0x0000019e <IDLE+2>:    ldi     r16, 0x01       ; 1
> ----------------------------------
> 
> GDB Window:
> ----------------------------------
> Copyright banner stuff ...
> (gdb) target remote localhost:12120x00000000 in ?? ()
> (gdb) loadLoading section .text, size 0x6f8 lma 0x0
> Loading section .data, size 0x6a lma 0x6f8
> Start address 0x0, load size 1890
> Transfer rate: 15120 bits in <1 sec, 31 bytes/write.
> 0x000000ce in _start ()
> (gdb) 
> ----------------------------------
> 
> ### After doing an "si", we have:
> 
> Source Window: Unchanged
> ----------------------------------
> 
> Machine Window: (Green cursor at 0x000000d0, as expected.)
> ----------------------------------
> Dump of assembler code for function _start:
>    0x000000ce <_start+0>:  ldi     r16, 0x10       ; 16
>    0x000000d0 <_start+2>:  out     0x3e, r16       ; 62
> ----------------------------------
> 
> GDB Window:
> ----------------------------------
> ....
> (gdb) si
> 0x000000d0 in _start ()
> (gdb) 
> ----------------------------------
> 
> The code which was executed on the "si" is in another source file:
> 
>   .section .vectors,"ax",@progbits
> ; Interrupt Vector Table
>    .org  0x00           ; Reset-Address
>    jmp  _start
> 
> The Source Window remains frozen in its initial state while we step
> through .init0 , init2 , etc. sections. Once in a .text section, it
> synchronises. If we call a function in an idiosyncratically named
> section, it freezes again while stepping through it.
> 
> There is nothing called "main". Would this upset ddd's assumptions?

Yes... indeed it might.

Erik, can you send me your ~/.ddd/log file, from the start of a session
where the source window doesn't work and your code is in .init sections,
up to the point where a couple of lines in your .text section is executed?

Alternatively, does gdb's "list" work in a non-.text section?

This information should help track down whether this problem's due to either
(a) gdb not providing the information at all, or
(b) gdb providing it, but in a format different from what ddd expects.

Thanks,
Andrew

PS: I'm glad to hear that you aren't the only guy using this combination
of ddd + vendor-specific-gdb; it makes it all the more worthwhile to
follow this problem as far as we can.  I can't make promises, though...


---------------------------------------------
This message was sent using M-Web Airmail - JUST LIKE THAT
Get an SMS sent to your phone when you receive an email and save time and money.
M-Web members only. http://www.mweb.co.za/mobile .






reply via email to

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