Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] debug using eclipse

 

OK but what do you mean by CDT GDB console ? Is it a dos console ? or is it
included in eclipse ?
The only thing io had to understand is why i'm going to read address
0x00000000 whereas I should read 0x21b10d90. (where this adress is given ?)
Is it gdb-insight which give this adress ? and how gdb-insight find this
address ?

All i can say is that i give you the *.bat file and this bat file is working
with only 3 step :
- launch Execute.exe
- lanuch Gdbserver.exe 
- and launch Gdb insight. 

And i would only replace Gdb-insight by Eclipse Debug.

But it's not so easy !



-----Message d'origine-----
De : cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] De la
part de Dmitry Smirnov
Envoyé : mardi 17 mars 2009 17:16
À : CDT General developers list.
Objet : Re: [cdt-dev] debug using eclipse

I suppose you can remove "target remote tcp:127.0.0.1:12345" either from
commands or from Debugger configuration.
Unfortunately, I do not sure when this connection will happen (before or
after command execution). I would check this first.
Moreover, you can try to remove both and enter this command in console when
all other commands are executed (you can enter any GDB command in CDT GDB
console).
Perhaps this could give us some hints...


2009/3/17 DUCHASSIN Frédéric <duchassin@xxxxxxxxx>:
> This is my .gdbinit file:
>
> set remote hardware-breakpoint-limit  5 set remote 
> hardware-breakpoint-packet on set remote hardware-watchpoint-limit  2 
> set can-use-hw-watchpoints            2 set remote 
> memory-write-packet-size   8192 set remote memory-write-packet        
> fixed set remote memory-read-packet-size    8192 set remote 
> memory-read-packet         limit set remote X-packet                   
> off set remote P-packet                   on set remote p-packet          
        
> off set remote Z-packet                   on set remote 
> set-register-packet        on set remoteaddresssize                 32 
> handle SIGALRM                        nopass handle SIGALRM              
         
> nostop handle SIGALRM                        noprint handle SIGSTOP      
                 
> stop handle SIGSTOP                        nopass handle SIGSTOP          
             
> stop ################################ # Only for GDB Version < 6.7.1 # 
> ################################ set download-write-size               
> 2048 target remote tcp:127.0.0.1:12345 set prompt (FME-Gdb) set prompt 
> (FME-Gdb) ################################ # Insight Tcl Variables        
> # ################################ tk pref setd gdb/load/main 1 tk 
> pref setd gdb/load/exit 1 tk pref setd gdb/load/gdbservertcp-runlist 
> "1 1 0 1"
> tk pref setd gdb/load/gdbservertcp-hostname "127.0.0.1"
> tk pref setd gdb/load/gdbservertcp-portname 12345 tk pref setd 
> gdb/load/gdbservertcp-verbose 0 tk pref setd 
> gdb/load/remotetcp-runlist "1 1 0 1"
> tk pref setd gdb/load/remotetcp-hostname "127.0.0.1"
> tk pref setd gdb/load/remotetcp-portname 12345 tk pref setd 
> gdb/load/remotetcp-verbose 0 tk WarningDlg tk set 
> WarningDlg::ignore(signal) 1 tk pref setd 
> gdb/session/[pwd]/build/MB86H60/M-arm11-winarm/hello_arm-g.elf/run_loa
> d 1 tk pref setd 
> gdb/session/[pwd]/build/MB86H60/M-arm11-winarm/hello_arm-g.elf/executa
> ble "[pwd]/build/MB86H60/M-arm11-winarm/hello_arm-g.elf"
> tk pref setd
> gdb/session/[pwd]/build/MB86H60/M-arm11-winarm/hello_arm-g.elf/run_att
> ach 1 tk pref setd 
> gdb/session/[pwd]/build/MB86H60/M-arm11-winarm/hello_arm-g.elf/run_run 
> 0 tk pref setd 
> gdb/session/[pwd]/build/MB86H60/M-arm11-winarm/hello_arm-g.elf/all-key
> s "run_cont run_run executable target_cmd run_attach run_load args 
> target"
> tk pref setd
> gdb/session/[pwd]/build/MB86H60/M-arm11-winarm/hello_arm-g.elf/target_
> cmd
> "remote 127.0.0.1:12345"
> tk pref setd
> gdb/session/[pwd]/build/MB86H60/M-arm11-winarm/hello_arm-g.elf/target
> "gdbservertcp"
>
>
>
>
>
> And this is the output of gdb:
>
> 767^done
> (gdb)
> 768-gdb-set width 0
> 768^done
> (gdb)
> 769-gdb-set height 0
> 769^done
> (gdb)
> 770-interpreter-exec console echo
> 770^done
> (gdb)
> 771-gdb-show prompt
> 771^done,value="(gdb) "
> 772-gdb-set new-console on
> (gdb)
> &"No symbol \"new\" in current context.\n"
> 772^error,msg="No symbol \"new\" in current context."
> (gdb)
> 773-target-select remote 127.0.0.1:12345 No symbol "new" in current 
> context.
> 773^connected,thread-id="0",frame={addr="0x00000838",func="??",args=[]
> }
> (gdb)
> 774
> &"\n"
> 774^done
> (gdb)
> 775-target-download
> C:\\HDTV\\applications\\hello_arm\\build\\MB86H60\\M-arm11-winarm\\hel
> lo_arm
> -g.elf
>
> 775+download,{section=".text",section-size="105196",total-size="389759
> 775+87"}
>
>
>
>
> With this configuration, i only write 191 bytes by 191 bytes when 
> *.elf is send.
>
>
>
> So i add this in the "startup tab", in "Initialization command":
>
> set remote hardware-breakpoint-limit  5 set remote 
> hardware-breakpoint-packet on set remote hardware-watchpoint-limit  2 
> set can-use-hw-watchpoints            2 set remote 
> memory-write-packet-size   8192 set remote memory-write-packet        
> fixed set remote memory-read-packet-size    8192 set remote 
> memory-read-packet         limit set remote X-packet                   
> off set remote P-packet                   on set remote p-packet          
        
> off set remote Z-packet                   on set remote 
> set-register-packet        on set remoteaddresssize                 32 
> handle SIGALRM                        nopass handle SIGALRM              
         
> nostop handle SIGALRM                        noprint handle SIGSTOP      
                 
> stop handle SIGSTOP                        nopass handle SIGSTOP          
             
> stop
>
> set download-write-size               2048 target remote 
> tcp:127.0.0.1:12345
>
> And now, i send 2048 bytes bt 2048 bytes.
>
> But after this step, the gdbserver is going to read address 0x00000000 
> whereas in working version , it should read 0x21b10d90.
>
> Thanks.
>
>
>
> -----Message d'origine-----
> De : cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] 
> De la part de Dmitry Smirnov Envoyé : mardi 17 mars 2009 16:36 À : CDT 
> General developers list.
> Objet : Re: [cdt-dev] debug using eclipse
>
> what was in your .gdbinit and how did you configured Initialization?
>
> Also, can you turn on 'verbose console mode' and provide the ouput 
> from eclipse GDB console?
>
>
> 2009/3/17 DUCHASSIN Frédéric <duchassin@xxxxxxxxx>:
>>
>> No it's a specific hardware register.
>> I only know that debug is working when i launch .bat i give on 
>> mailling list.
>>
>>
>>
>> -----Message d'origine-----
>> De : cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
>> De la part de Elena Laskavaia Envoyé : mardi 17 mars 2009 16:12 À :
>> CDT General developers list.
>> Objet : Re: [cdt-dev] debug using eclipse
>>
>> Is it $pc register?
>>
>> DUCHASSIN Frédéric wrote:
>>>  Hello,
>>>
>>> Thanks for your help.
>>>
>>> I try to run manually Execute.exe and GdbServer.exe.
>>> I've downloaded Eclipse GDB hardware debugging.
>>> But it seems this plugin don't use .gdbinit script (since i have put 
>>> this script in "GDB init File"). So i put these commands in 
>>> Initialization command and it seems to work. All The code seems to 
>>> be send
>> to my hardware.
>>> (like in original application)
>>>
>>> But at the end of the download, my GdbServer tell me:
>>> - Read at address 0x00000000  4 bytes
>>>
>>> Whereas it should be --> Read at address 0x21b10d90   4 bytes (with 
>>> original application using insight debugger).
>>>
>>> I don't know where is the problem but it wasn't working.
>>> (read at address 0x00000000 is blocking)
>>>
>>> Is it possible to enter an offset ? or have you an idea about my
problem.
>>>
>>> Thanks in advance.
>>>
>>> Fred
>>>
>>>
>>> -----Message d'origine-----
>>> De : cdt-dev-bounces@xxxxxxxxxxx 
>>> [mailto:cdt-dev-bounces@xxxxxxxxxxx]
>>> De la part de Elena Laskavaia Envoyé : mardi 17 mars 2009 15:04 À :
>>> CDT General developers list.
>>> Objet : Re: [cdt-dev] debug using eclipse
>>>
>>> The other stuff (besides last debugger launch) you can put into 
>>> external launch configuration.
>>>
>>>
>>> DUCHASSIN Frédéric wrote:
>>>> Hello Everybody,
>>>>
>>>> I'm asking for help because i didn't find any help for using debug 
>>>> in Eclipse.
>>>> I would like to use eclipse as debug IDE in my project.
>>>> I'm using WinARM and it's working quite well as compiler in eclipse.
>>>>
>>>> Now i would use eclipse debug but it's not working whereas it's 
>>>> possible to debug using inline command.
>>>> This is my .bat file which allow to DEBUG in inline command :
>>>>
>>>>
>>>> Code :
>>>>
>>>>  rem ###############Config Execute + USB port 
>>>> 2####################### ..\..\env\bin\M-win32\execute.exe -verbose 
>>>> -dll=..\..\env\bin\M-win32\usbdbgport.dll
>>>> -port=USB2:SYSFREQ=324000000:STARTBAUD=38400:BAUDRATE=3000000:RAMBA
>>>> S E = 0x02004000 -reg=..\..\env\execute\ddr_init.rvs -quiet
>>>>
>>>>  rem ###############gdbserver + USB port 1####################### 
>>>> cmd /C start /high ..\..\env\bin\M-win32\gdbserver.exe -verbose 
>>>> -dll=..\..\env\bin\M-win32\jtagport.dll -port=USB1
>>>> -IP=127.0.0.1:12345 -verbose
>>>>
>>>>  rem ###############Lance insight####################### 
>>>> c:\WinARM\utils\insight\bin\arm-elf-insight.exe
>>>> --directory=build\MB86H60\M-arm11-winarm
>>>> --command=build\MB86H60\M-arm11-winarm\.gdbinit --nx 
>>>> "./build/MB86H60/M-arm11-winarm/hello_arm-g.elf"
>>>>
>>>> /Code :
>>>>
>>>> So my question is: How can i integrate this debug in Eclipse ? Help 
>>>> me please !
>>>>
>>>> Thanks in advance.
>>>>
>>>> ++++
>>>>
>>>>
>>>> Fred
>>>>
>>>>
>>>>
>>>> -------------------------------------------------------------------
>>>> -
>>>> -
>>>> -
>>>> --
>>>>
>>>> _______________________________________________
>>>> cdt-dev mailing list
>>>> cdt-dev@xxxxxxxxxxx
>>>> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>>> _______________________________________________
>>> cdt-dev mailing list
>>> cdt-dev@xxxxxxxxxxx
>>> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>>>
>>> _______________________________________________
>>> cdt-dev mailing list
>>> cdt-dev@xxxxxxxxxxx
>>> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>> _______________________________________________
>> cdt-dev mailing list
>> cdt-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>>
>> _______________________________________________
>> cdt-dev mailing list
>> cdt-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>>
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev



Back to the top