[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-debug-dev] GDB command file path problem

Hello, I seem to find a problem in Eclipse Debug.
 
I'm using Eclipse Helios (3.6) with AVR Eclipse Plugin for debugging C-programs with avr-gdb and simulavr as AVR MCU simulator.
The bug is connected with gdb preferences which are set in debug configuration preferences page.
I'm using specially compiled gdb for AVR architecture (avr-gdb.exe) but the problem seems to be general for all gdb debuggers.
The problem is connected with "GDB command file" option on the Debugger tab of Debugger Confugurations Window.
When I leave this option empty (not inputing the file path with gdb commands) I have my avr-gdb + simulavr system work fine (although I evidently have to execute all the necessary init commands by myself manually in Eclipse Console View for avr-gdb). When I try to specify the GDB commands file path Eclipse seems to behave uncorrectly. Eclipse behaves uncorrectly if I specify a path to any file: 
1) to a correct file with just one command "load" (when executing load in Eclipse console view everything works fine)
2) to an empty file or 
3) to an unexisting path (wrong file path).
I also can find some strange errors in Eclipse Console log.
You can find two logs attached to the message: ok_log.txt and fail_log.txt.
Consider the beginning of the fail log: it begins with
 
"warning: Can not parse XML target description; XML support was disabled at compile time
hfhhg: No such file or directory" 
 
("hfhhg" was our file path name to an unexsisting file).
 
This message appears after gdb is connected to simulavr via tcp connection and gets from simulavr some XML which can not be parsed.
This error is not the source of my problem because I can see the same message in ok_log and it works fine actually.
 
What is the question?
 
The point is that the above warning can be got after gdb connected to simulavr. To connect gdb to simulavr there should be a command "target remote localhost:1212" (I set the necessary parameters in the Debug configuration tab).
So why does the behaviour of Eclipse differs when the GDB command file path is set and when it's not?
Why when the path is not set the first command to be sent is 
 
<number>-gdb-set confirm off
 
and when the path is set I can see the first command to be set is a connection command (and the above warning as the result)?

Does Eclipse launches gdb with smth like "--eval-command" parameter to perform connection command?
(I suggest Eclipse don't loose any console commands and that is really the first one when file path is specified).
 
If you need I'll specify all the rest settings and actions.
 
Sergey Smirnov
481-gdb-set confirm off
481^done
482-gdb-set width 0
(gdb) 
482^done
(gdb) 
483-gdb-set height 0
483^done
(gdb) 
484-interpreter-exec console echo
484^done
(gdb) 
485-gdb-show prompt
485^done,value="(gdb) "
(gdb) 
486-gdb-set auto-solib-add on
486^done
(gdb) 
487-gdb-set stop-on-solib-events 0
487^done
(gdb) 
488-gdb-set stop-on-solib-events 1
488^done
(gdb) 
489-target-select remote localhost:1212
&"warning: Can not parse XML target description; XML support was disabled at compile time\n"
489^connected,thread-id="0",frame={addr="0x00000000",func="__vectors",args=[]}
(gdb) 
490-environment-cd D:\\Smirnov\\workspace\\main
warning: Can not parse XML target description; XML support was disabled at compile time
490^done
(gdb) 
491-environment-directory D:/Smirnov/workspace/main D:/Smirnov/workspace/main/.settings D:/Smirnov/workspace/main/Debug
491^done,source-path="D:/Smirnov/workspace/main;D:/Smirnov/workspace/main/.settings;D:/Smirnov/workspace/main/Debug;$cdir;$cwd"
(gdb) 
492 info threads
&"info threads\n"
&"warning: RMT ERROR : failed to get remote thread list.\n"
492^done
(gdb) 
493-data-list-register-names
493^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) 
494-break-insert -t main
494^done,bkpt={number="1",type="breakpoint",disp="del",enabled="y",addr="0x00000038",func="main",file="../main.cpp",fullname="D:/Smirnov/workspace/main/.settings/../main.cpp",line="8",times="0"}
(gdb) 
495-stack-info-depth
495^done,depth="1"
(gdb) 
496-stack-list-frames 0 1
496^done,stack=[frame={level="0",addr="0x00000000",func="__vectors"}]
(gdb) 
497-exec-continue
497^running
(gdb) 
@"No program to simulate. Use 'load' to upload it.\n"
497*stopped,reason="signal-received",signal-name="SIGHUP",signal-meaning="Hangup",thread-id="0",frame={addr="0x00000000",func="__vectors",args=[]}
(gdb) 
498 info threads
&"info threads\n"
&"warning: RMT ERROR : failed to get remote thread list.\n"
498^done
(gdb) 
499-stack-info-depth
499^done,depth="1"
(gdb) 
500-stack-list-frames 0 1
500^done,stack=[frame={level="0",addr="0x00000000",func="__vectors"}]
(gdb) 
501-data-list-changed-registers
501^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) 
502 info sharedlibrary
&"info sharedlibrary\n"
~"No shared libraries loaded at this time.\n"
502^done
(gdb) 
503 info signal SIGHUP
&"info signal SIGHUP\n"
~"Signal        Stop\tPrint\tPass to program\tDescription\n"
~"SIGHUP        Yes\tYes\tYes\t\tHangup\n"
503^done
(gdb) 
504-stack-list-arguments 0 0 0
504^done,stack-args=[frame={level="0",args=[]}]
(gdb) 
505-stack-list-locals 0
505^done,locals=[]
(gdb) 
warning: Can not parse XML target description; XML support was disabled at compile time
hfhhg: No such file or directory.
471-gdb-set confirm off
471^done,thread-id="0",frame={addr="0x00000000",func="__vectors",args=[]},address="0x0",load-size="182",transferred-bits="1456",write-rate="182"
(gdb) 
472-gdb-set width 0
472^done
(gdb) 
473-gdb-set height 0
473^done
(gdb) 
474-interpreter-exec console echo
474^done
(gdb) 
475-gdb-show prompt
475^done,value="(gdb) "
(gdb) 
476-gdb-set auto-solib-add on
476^done
(gdb) 
477-gdb-set stop-on-solib-events 0
477^done
(gdb) 
478-gdb-set stop-on-solib-events 1
478^done
(gdb) 
479-target-select remote localhost:1212
~"Ignoring packet error, continuing...\n"
Ignoring packet error, continuing...
&"warning: unrecognized item \"timeout\" in \"qSupported\" response\n"
warning: unrecognized item "timeout" in "qSupported" response
~"Ignoring packet error, continuing...\n"
Ignoring packet error, continuing...
480-gdb-exit