Avr-gdb output

From AVR-Eclipse

Jump to: navigation, search

This is the verbose output of avr-gdb for a single debugging session, using the GDB Hardware Debugging configuration. Use this if you have some problems with debugging.


This log was generated on an Windows XP system, with winAVR-20081124rc3, Eclipse 3.4.1 and the AVR Eclipse Plugin 2.3.1. Target Hardware was an AVR Butterfly, connected via JTAG to an AVR Dragon.


The only open view was the Registers view. All other views like Memory or Disassembly were closed initially to reduce the size of the log. The log is continuous (as seen by the sequence numbers) but has been broken up into segments to better follow the action.


As a short guideline for reading this:

  • Everything that starts with a new sequence number is a command sent by the Eclipse Debugger to avr-gdb.
  • Everything that starts with a character like '^', '&', '~' and '*' is a response generated by avr-gdb.
  • Everything else is just the non-verbose output from avr-gdb that gets intermixed with verbose output. This is the stuff you would see when switching the verbose mode off.


Contents

From the start of the session until hitting the breakpoint at main()

1-gdb-set confirm off
1^done
(gdb) 
2-gdb-set width 0
2^done
3-gdb-set height 0
(gdb) 
3^done
4-interpreter-exec console echo
(gdb) 
4^done
5-gdb-show prompt
(gdb) 
5^done,value="(gdb) "
(gdb) 
6-gdb-set new-console on
No symbol "new" in current context.
&"No symbol \"new\" in current context.\n"
6^error,msg="No symbol \"new\" in current context."
(gdb) 
7 target remote localhost:4242
&"target remote localhost:4242\n"
target remote localhost:4242
~"0x00000000 in __vectors ()\n"
0x00000000 in __vectors ()
7^done
(gdb) 
8 
&"\n"

8^done
(gdb) 
9-environment-directory F:/java/ganymede/runtime-EclipseApplication/ButterflyLCDTest F:/java/ganymede/runtime-EclipseApplication/ButterflyLCDTest/.settings F:/java/ganymede/runtime-EclipseApplication/ButterflyLCDTest/Debug
9^done,source-path="F:/java/ganymede/runtime-EclipseApplication/ButterflyLCDTest;F:/java/ganymede/runtime-EclipseApplication/ButterflyLCDTest/.settings;F:/java/ganymede/runtime-EclipseApplication/ButterflyLCDTest/Debug;$cdir;$cwd"
(gdb) 
10 info threads
&"info threads\n"
&"warning: RMT ERROR : failed to get remote thread list.\n"
10^done
(gdb) 
11-data-list-register-names
11^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) 
12-break-insert main.c:42
12^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0000076c",func="main",file="../main.c",fullname="F:/java/ganymede/runtime-EclipseApplication/ButterflyLCDTest/.settings/../main.c",line="42",times="0"}
(gdb) 
13 tbreak main
tbreak main
&"tbreak main\n"
~"Breakpoint 2 at 0x756: file ../main.c, line 33.\n"
Breakpoint 2 at 0x756: file ../main.c, line 33.
13^done
(gdb) 
14 continue
&"continue\n"
continue
~"main () at ../main.c:33\n"
main () at ../main.c:33
~"33\t{    \n"
33	{    
14^done
(gdb) 
15 
&"\n"

15^done
(gdb) 
16-break-list
16^done,BreakpointTable={nr_rows="1",nr_cols="6",hdr=[{width="7",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="0x0000076c",func="main",file="../main.c",fullname="F:/java/ganymede/runtime-EclipseApplication/ButterflyLCDTest/.settings/../main.c",line="42",times="0"}]}
(gdb) 
17 info proc
&"info proc\n"
&"Undefined info command: \"proc\".  Try \"help info\".\n"
17^error,msg="Undefined info command: \"proc\".  Try \"help info\"."
(gdb) 
18 info program
&"info program\n"
~"Debugging a target over a serial line.\n"
~"Program stopped at 0x756.\n"
~"It stopped at a breakpoint that has since been deleted.\n"
~"Type \"info stack\" or \"info registers\" for more information.\n"
18^done
(gdb) 
19 info threads
&"info threads\n"
&"warning: RMT ERROR : failed to get remote thread list.\n"
19^done
(gdb) 
20-stack-info-depth
20^done,depth="1"
(gdb) 
21-stack-list-frames 0 1
21^done,stack=[frame={level="0",addr="0x00000756",func="main",file="../main.c",fullname="F:/java/ganymede/runtime-EclipseApplication/ButterflyLCDTest/.settings/../main.c",line="33"}]
(gdb) 
22-data-list-changed-registers
22^done,changed-registers=["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34"]
(gdb) 
23 info sharedlibrary
&"info sharedlibrary\n"
~"No shared libraries loaded at this time.\n"
23^done
(gdb) 


Single 'step over' in the C source

224-exec-next 1
24^running
(gdb) 
24*stopped,reason="end-stepping-range",thread-id="0",frame={addr="0x00000760",func="main",args=[],file="../main.c",fullname="F:/java/ganymede/runtime-EclipseApplication/ButterflyLCDTest/.settings/../main.c",line="38"}
(gdb) 
25 info threads
&"info threads\n"
&"warning: RMT ERROR : failed to get remote thread list.\n"
25^done
(gdb) 
26-stack-info-depth
26^done,depth="1"
(gdb) 
27-stack-list-frames 0 1
27^done,stack=[frame={level="0",addr="0x00000760",func="main",file="../main.c",fullname="F:/java/ganymede/runtime-EclipseApplication/ButterflyLCDTest/.settings/../main.c",line="38"}]
(gdb) 
28-data-list-changed-registers
28^done,changed-registers=["28","33","34"]
(gdb) 
29 info sharedlibrary
&"info sharedlibrary\n"
~"No shared libraries loaded at this time.\n"
29^done
(gdb) 


Opening the Disassembly view

30-data-disassemble -f F:/java/ganymede/runtime-EclipseApplication/ButterflyLCDTest/.settings/../main.c -l 38 -n 100 -- 1
30^done,asm_insns=[src_and_asm_line={line="33",file="../main.c",line_asm_insn=[{address="0x00000756",func-name="main",offset="0",inst="push\tr29"},{address="0x00000758",func-name="main",offset="2",inst="push\tr28"},{address="0x0000075a",func-name="main",offset="4",inst="rcall\t.+0      \t;  0x75c <main+6>"},{address="0x0000075c",func-name="main",offset="6",inst="in\tr28, 0x3d\t; 61"},{address="0x0000075e",func-name="main",offset="8",inst="in\tr29, 0x3e\t; 62"}]},src_and_asm_line={line="34",file="../main.c",line_asm_insn=[]},src_and_asm_line={line="35",file="../main.c",line_asm_insn=[]},src_and_asm_line={line="36",file="../main.c",line_asm_insn=[]},src_and_asm_line={line="37",file="../main.c",line_asm_insn=[]},src_and_asm_line={line="38",file="../main.c",line_asm_insn=[{address="0x00000760",func-name="main",offset="10",inst="ldi\tr24, 0xC8\t; 200"},{address="0x00000762",func-name="main",offset="12",inst="ldi\tr25, 0x00\t; 0"},{address="0x00000764",func-name="main",offset="14",inst="std\tY+2, r25\t; 0x02"},{address="0x00000766",func-name="main",offset="16",inst="std\tY+1, r24\t; 0x01"}]},src_and_asm_line={line="39",file="../main.c",line_asm_insn=[]},src_and_asm_line={line="40",file="../main.c",line_asm_insn=[]},src_and_asm_line={line="41",file="../main.c",line_asm_insn=[{address="0x00000768",func-name="main",offset="18",inst="call\t0x78c\t;  0x78c <Initialization>"}]},src_and_asm_line={line="42",file="../main.c",line_asm_insn=[{address="0x0000076c",func-name="main",offset="22",inst="sei"}]},src_and_asm_line={line="43",file="../main.c",line_asm_insn=[]},src_and_asm_line={line="44",file="../main.c",line_asm_insn=[]},src_and_asm_line={line="45",file="../main.c",line_asm_insn=[]},src_and_asm_line={line="46",file="../main.c",line_asm_insn=[{address="0x0000076e",func-name="main",offset="24",inst="ldd\tr24, Y+1\t; 0x01"},{address="0x00000770",func-name="main",offset="26",inst="ldd\tr25, Y+2\t; 0x02"},{address="0x00000772",func-name="main",offset="28",inst="sbiw\tr24, 0x00\t; 0"},{address="0x00000774",func-name="main",offset="30",inst="breq\t.-8      \t;  0x76e <main+24>"}]},src_and_asm_line={line="47",file="../main.c",line_asm_insn=[]},src_and_asm_line={line="48",file="../main.c",line_asm_insn=[{address="0x00000776",func-name="main",offset="32",inst="ldd\tr24, Y+1\t; 0x01"},{address="0x00000778",func-name="main",offset="34",inst="ldd\tr25, Y+2\t; 0x02"},{address="0x0000077a",func-name="main",offset="36",inst="ldi\tr22, 0x01\t; 1"},{address="0x0000077c",func-name="main",offset="38",inst="call\t0x536\t;  0x536 <LCD_puts_f>"}]},src_and_asm_line={line="49",file="../main.c",line_asm_insn=[{address="0x00000780",func-name="main",offset="42",inst="ldi\tr24, 0x00\t; 0"},{address="0x00000782",func-name="main",offset="44",inst="call\t0x6fa\t;  0x6fa <LCD_Colon>"}]},src_and_asm_line={line="50",file="../main.c",line_asm_insn=[{address="0x00000786",func-name="main",offset="48",inst="std\tY+2, r1\t; 0x02"},{address="0x00000788",func-name="main",offset="50",inst="std\tY+1, r1\t; 0x01"},{address="0x0000078a",func-name="main",offset="52",inst="rjmp\t.-30     \t;  0x76e <main+24>"}]}]
(gdb) 


Single 'step over' in the assembly code

31-exec-next-instruction 1
31^running
(gdb) 
31*stopped,reason="end-stepping-range",thread-id="0",frame={addr="0x00000762",func="main",args=[],file="../main.c",fullname="F:/java/ganymede/runtime-EclipseApplication/ButterflyLCDTest/.settings/../main.c",line="38"}
(gdb) 
32 info threads
&"info threads\n"
&"warning: RMT ERROR : failed to get remote thread list.\n"
32^done
(gdb) 
33-stack-info-depth
33^done,depth="1"
(gdb) 
34-stack-list-frames 0 1
34^done,stack=[frame={level="0",addr="0x00000762",func="main",file="../main.c",fullname="F:/java/ganymede/runtime-EclipseApplication/ButterflyLCDTest/.settings/../main.c",line="38"}]
(gdb) 
35-data-list-changed-registers
35^done,changed-registers=["24","34"]
(gdb) 
36 info sharedlibrary
&"info sharedlibrary\n"
~"No shared libraries loaded at this time.\n"
36^done
(gdb) 


Setting a new Breakpoint

37-break-insert main.c:41
37^done,bkpt={number="3",type="breakpoint",disp="keep",enabled="y",addr="0x00000768",func="main",file="../main.c",fullname="F:/java/ganymede/runtime-EclipseApplication/ButterflyLCDTest/.settings/../main.c",line="41",times="0"}
(gdb) 


Run Program to the next Breakpoint

38-exec-continue
38^running
(gdb) 
38*stopped,reason="breakpoint-hit",bkptno="3",thread-id="0",frame={addr="0x00000768",func="main",args=[],file="../main.c",fullname="F:/java/ganymede/runtime-EclipseApplication/ButterflyLCDTest/.settings/../main.c",line="41"}
(gdb) 
39 info threads
&"info threads\n"
&"warning: RMT ERROR : failed to get remote thread list.\n"
39^done
(gdb) 
40-stack-info-depth
40^done,depth="1"
(gdb) 
41-stack-list-frames 0 1
41^done,stack=[frame={level="0",addr="0x00000768",func="main",file="../main.c",fullname="F:/java/ganymede/runtime-EclipseApplication/ButterflyLCDTest/.settings/../main.c",line="41"}]
(gdb) 
42-data-list-changed-registers
42^done,changed-registers=["34"]
(gdb) 
43 info sharedlibrary
&"info sharedlibrary\n"
~"No shared libraries loaded at this time.\n"
43^done
(gdb) 
Personal tools