User forums > Using Code::Blocks

GDB

<< < (6/8) > >>

oBFusCATed:
Project -> properties -> build targets -> type -> console

scarphin:

--- Quote from: oBFusCATed on February 13, 2011, 10:12:17 am ---Project -> properties -> build targets -> type -> console

--- End quote ---
Oh sry I though it was something related with the debugger. ;) Switched to console saved the project options and everything and restarted cb and the same result, it doesn't work. But there is something wrong though. While debugging that project gdb stops at 'main' at the start which is a result of execution of the 'break main' command. But I can't also see that being executed on the log. I guess the problem might be something related with gdb being connected to the gdb-server or not. I'm going to check that tomorrow at work where I have the equipment to debug.

cbuser405:

--- Quote from: oBFusCATed on February 11, 2011, 03:53:00 pm ---
--- Quote from: cbuser405 on February 11, 2011, 03:37:22 pm ---OK. It works.

--- End quote ---
What do you prefer, combined list or two separe lists (probably I should check CDB) ?

--- End quote ---

I think one list is enough


--- Quote from: oBFusCATed on February 11, 2011, 03:53:00 pm ---
--- Quote from: cbuser405 on February 11, 2011, 03:37:22 pm ---Could you add a check box "use extended-remote" to configuration page for GDB RemoteConnection:
if not checked - works as before (send target remote)
if checked - send target extended-remote.

--- End quote ---
Is this per project or global setting?

--- End quote ---

It is right be done at the project level.

scarphin:
Sry for the delay. I think the problem was the target type, when I switched to 'debug' from 'release' it worked, don't know why? Unfortunately there are other problems which are much more worse imo. Here is the log:

--- Code: ---Command-line: C:\GNU\WinAVR\bin\avr-gdb.exe -nx -fullname  -quiet -args bin/Debug/RmCont
Working dir : D:\Electronics\Projects\RmCont\source\
> set prompt >>>>>>cb_gdb:
(gdb) >>>>>>cb_gdb:
> show version
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-pc-mingw32 --target=avr".
>>>>>>cb_gdb:
> set confirm off
>>>>>>cb_gdb:
> set width 0
>>>>>>cb_gdb:
> set height 0
>>>>>>cb_gdb:
> set breakpoint pending on
>>>>>>cb_gdb:
> set print asm-demangle on
>>>>>>cb_gdb:
> set unwindonsignal on
>>>>>>cb_gdb:
> set print elements -1
>>>>>>cb_gdb:
> set debugevents on
No symbol "debugevents" in current context.
>>>>>>cb_gdb:
> set disassembly-flavor att
No symbol "disassembly" in current context.
>>>>>>cb_gdb:
> catch throw
Function "__cxa_throw" not defined.
>>>>>>cb_gdb:
> source C:\GNU\CodeBlocks\share\codeblocks/scripts/stl-views-1.0.3.gdb
>>>>>>cb_gdb:
> directory D:/Electronics/Projects/RmCont/source/
>>>>>>cb_gdb:
> shell avarice -g -j USB -P attiny2313 -j usb localhost:4242
AVaRICE version 2.9, Jan  7 2010 22:42:57
Defaulting JTAG bitrate to 250 kHz.
avarice -g -j USB -P attiny2313 -j usb localhost:4242 exited with status 1
read error from AVaRICE: Connection reset by peer
>>>>>>cb_gdb:
> target remote tcp:localhost:4242
tcp:localhost:4242: No connection could be made because the target machine actively refused it.
>>>>>>cb_gdb:
> break main
Breakpoint 1 at 0x486: file RmCont.c, line 216.
>>>>>>cb_gdb:
> continue
The program is not being run.
>>>>>>cb_gdb:
> quit

--- End code ---
As u can see the gdbserver is launched with the line 'shell avarice -g -j USB -P attiny2313 -j usb localhost:4242'. Server is there waiting for connection but gdb doesn't resume till shell command exits so I had to kill avarice (exited with status 1) to make gdb resume its initialization and as u can guess it couldn't connect to server (which I had to kill to make gdb resume ;)) and quit.
Macros also doesn't work. I had to replace my '$MCU' with its actual value to make it work. In the tools menu I can use '$MCU' without a problem. And the working dir, is there any way to define the working dir, it might be needed.

oBFusCATed:
1. You can make a shell script which uses "avarice  .... & "
2. Macros could be implemented, I think

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version