Package: gdb-avr
Version: 6.4.90.dfsg-3
Severity: normal
Tags: squeeze

When using avr-gdb with eclipse to debug an avr-program from the IDE, gdb
encounters an internal error. This makes debugging directly from eclipse
impossible.

Steps to reproduce:
Install eclipse
Install CDC and AVR plugins
Setup avarice as external program in eclipse with following options:
        arguments:
        -2 --ignore-intr --jtag usb localhost:4242 -B 1500KHz
Setup avr-gdb as hardware debugger in eclipse with following options:
        Protocol version: mi
        Verbose console mode
        Use remote target
        Reset and delay = 3
        Halt
        Load symbols
        Set breakpoint at: main
        Resume
Connect JTAG ICE mkII
Compile some example program for the avr and flash it
Start avarice from eclipse
Start gdb from eclipse

The output produced by eclipse is a follows:

146-gdb-set confirm off
146^done
(gdb)
147-gdb-set width 0
147^done
(gdb)
148-gdb-set height 0
148^done
(gdb)
149-interpreter-exec console echo
149^done
(gdb)
150-gdb-show prompt
150^done,value="(gdb) "
(gdb)
151-gdb-set new-console on
&"No symbol \"new\" in current context.\n"
151^error,msg="No symbol \"new\" in current context."
No symbol "new" in current context.
(gdb)
152 target remote localhost:4242
&"target remote localhost:4242\n"
target remote localhost:4242
~"0x00000000 in __vectors ()\n"
0x00000000 in __vectors ()
152^done
(gdb)
153
&"\n"

153^done
(gdb)
154 add-sym /home/andi/eclipse-workspace/test-avr/Debug/test-avr.elf 0x
&"add-sym /home/andi/eclipse-workspace/test-avr/Debug/test-avr.elf 0x\n"
add-sym /home/andi/eclipse-workspace/test-avr/Debug/test-avr.elf 0x
~"add symbol table from file \"/home/andi/eclipse-workspace/test-avr/Debug
/test-avr.elf\" at\n"
add symbol table from file "/home/andi/eclipse-workspace/test-avr/Debug/test-
avr.elf" at
&"Invalid number \"0x\".\n"
Invalid number "0x".
154^done
(gdb)
155-environment-directory -r /home/andi/eclipse-workspace/test-avr /home/andi
/eclipse-workspace/test-avr/.settings /home/andi/eclipse-workspace/test-
avr/Debug
155^done,source-path="/home/andi/eclipse-workspace/test-avr:/home/andi/eclipse-
workspace/test-avr/.settings:/home/andi/eclipse-workspace/test-
avr/Debug:$cdir:$cwd"
(gdb)
156 info threads
&"info threads\n"
&"warning: RMT ERROR : failed to get remote thread list.\n"
156^done
(gdb)
157-data-list-register-names
157^done,register-
names=["r0","r1","r2","r3","r4","r5","r6","r7","r8","r9","r10","r11","r12","r13","r14","r15","r16","r17","r18","r19","r20","r21","r22","r23","r24","r25","r26","r27","r28","r29","r30","r31","SREG","SP","PC"]
(gdb)
158-break-insert lauflicht.c:23
158^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x00000118",func="main",file="../lauflicht.c",line="23",times="0"}
(gdb)
159-break-insert lauflicht.c:20
159^done,bkpt={number="2",type="breakpoint",disp="keep",enabled="y",addr="0x000000f8",func="main",file="../lauflicht.c",line="20",times="0"}
(gdb)
160 tbreak main
tbreak main
&"tbreak main\n"
~"Breakpoint 3 at 0xea: file ../lauflicht.c, line 17.\n"
Breakpoint 3 at 0xea: file ../lauflicht.c, line 17.
160^done
(gdb)
161 continue
&"continue\n"
continue
~"main (argc=5711, argv=0x804081) at ../lauflicht.c:17\n"
main (argc=5711, argv=0x804081) at ../lauflicht.c:17
~"17\t\tDDRB = 0xFF;\n"
17              DDRB = 0xFF;
161^done
(gdb)
162
&"\n"

162^done
(gdb)
163-break-list
163^done,BreakpointTable={nr_rows="2",nr_cols="6",hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"},{width="14",alignment="-1",col_name="type",colhdr="Type"},{width="4",alignment="-1",col_name="disp",colhdr="Disp"},{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},{width="10",alignment="-1",col_name="addr",colhdr="Address"},{width="40",alignment="2",col_name="what",colhdr="What"}],body=[bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x00000118",func="main",file="../lauflicht.c",line="23",times="0"},bkpt={number="2",type="breakpoint",disp="keep",enabled="y",addr="0x000000f8",func="main",file="../lauflicht.c",line="20",times="0"}]}
(gdb)
164 info proc
&"info proc\n"
&"Undefined info command: \"proc\".  Try \"help info\".\n"
164^done
(gdb)
165 info program
&"info program\n"
~"Debugging a target over a serial line.\n"
~"Program stopped at 0xea.\n"
~"It stopped at a breakpoint that has since been deleted.\n"
~"Type \"info stack\" or \"info registers\" for more information.\n"
165^done
(gdb)
166 info threads
&"info threads\n"
&"warning: RMT ERROR : failed to get remote thread list.\n"
166^done
167-stack-info-depth
(gdb)
167^done,depth="1"
168-stack-list-frames 0 1
(gdb)
168^done,stack=[frame={level="0",addr="0x000000ea",func="main",file="../lauflicht.c",fullname="/home/andi
/eclipse-workspace/test-avr/lauflicht.c",line="17"}]
169-data-list-changed-registers
(gdb)
169^done,changed-
registers=["2","3","4","5","6","8","9","10","11","12","13","14","15","17","20","21","22","23","24","25","27","28","29","30","31","33","34"]
170 info sharedlibrary
(gdb)
&"info sharedlibrary\n"
171-gdb-exit


When entering the last command "info sharedlibrary" directly in avr-gdb,
following error is encountered:

GNU gdb 6.4
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "--host=i486-linux-gnu --target=avr".
(gdb) file Debug/test-avr.elf
Reading symbols from /home/andi/eclipse-workspace/test-avr/Debug/test-
avr.elf...done.
(gdb) target remote localhost:4242
Remote debugging using localhost:4242
0x00000000 in __vectors ()
(gdb) break main
Breakpoint 1 at 0xea: file ../lauflicht.c, line 17.
(gdb) c
Continuing.

Breakpoint 1, main (argc=21940, argv=0x804081) at ../lauflicht.c:17
17              DDRB = 0xFF;
(gdb) info sharedlibrary
.../../src/gdb/solib.c:707: internal-error: TARGET_PTR_BIT returned unknown size
16
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) y
.../../src/gdb/solib.c:707: internal-error: TARGET_PTR_BIT returned unknown size
16
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) y



The system used is running Squeeze with following Software versions:
libc-2.10.2
Eclipse 3.5.2.
CDC Eclipse Plugin 6.0.0.201002161416
AVR Eclipse Plugin 2.3.1.20081204PRD
avarice 2.10-3
avr-gdb 6.4.90.dfsg-3

uname -a: Linux Delphin 2.6.32-3-686 #1 SMP Thu Feb 25 06:14:20 UTC 2010 i686
GNU/Linux


A solution to the problem is updating avr-gdb to version 7.1, which can be
built from source.



-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (750, 'testing'), (700, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-3-686 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages gdb-avr depends on:
ii  libc6                     2.10.2-6       Embedded GNU C Library: Shared lib
ii  libncurses5               5.7+20100313-2 shared libraries for terminal hand

gdb-avr recommends no packages.

Versions of packages gdb-avr suggests:
pn  gdb-doc                       <none>     (no description available)

-- no debconf information



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to