ddd
[Top][All Lists]
Advanced

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

Re: Breakpoints not visible.


From: Erik Christiansen
Subject: Re: Breakpoints not visible.
Date: Thu, 13 Nov 2003 19:03:08 +1100
User-agent: Mutt/1.3.28i

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?

> Second: do you have a small test-case that will help us to re-create
> this problem?

You'd have to be fairly keen. ;-) I'm running ddd with avr-gdb,
connected to simulavr. (The latter simulates the Atmel AVR
microcontroller.) Building them from sources is not difficult, and I
invoke the tool configuration with the briefest of scripts, but it would
be quite a diversion from your prime focus.

I could run some tests, if my description of the symptoms suggests lines
of investigation.

Now that you've mentioned that variations in the gdb output might
confuse ddd, I'll see what the broader experience is on the avr-gcc
mailing list. (Yep, there's bunches of people doing this stuff.)

Erik




reply via email to

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