Recent Posts

Pages: 1 2 [3] 4 5 6 7 8 ... 10
Additional GDB commands tab has two windows. "Before connection" and "After connection"
Commands in those windows are issued (as described) before or after a good connection to a gdb server.

monitor reset

Commands in the "Additional Shells" tab also have two windows entitled Before connection and after connection. These command are wrapped by a "Shell " command and queued Before or after connection to the gdb server.
cmd /c start "GdbServer" "c:\usrPrograms\st-util.exe" -v

In setting/debugger/common, turn on full (debug) log.
You will then see when commands are issued in the Debugger log.
Look for the keyword "connected" in the log.

Example log:
Code: [Select]
Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Adding source dir: C:\User\icc programs\iccv9cortex\CGnuExamples\ArmGnuPrj\
Adding source dir: C:\User\icc programs\iccv9cortex\CGnuExamples\ArmGnuPrj\
Adding file: C:\User\icc programs\iccv9cortex\CGnuExamples\ArmGnuPrj\bin\Debug\ArmGnuPrj.elf
Changing directory to: C:/User/ICCPRO~1/ICCV9C~1/CGNUEX~1/ARMGNU~1/.
Set variable: PATH=.;c:\User\icc programs\iccv9cortex\lib;c:\User\icc programs\iccv9cortex\GnuArm\bin;c:\User\icc programs\iccv9cortex\GnuArm;c:\User\icc programs\iccv9cortex\GnuArm\lib\gcc\arm-none-eabi\6.3.1;C:\User\icc programs\iccv9cortex\GnuArm\lib\gcc\arm-none-eabi\6.3.1;C:\User\icc programs\iccv9cortex\GnuArm\arm-none-eabi\bin;c:\User\icc programs\iccv9cortex\GnuArm\arm-none-eabi\bin;C:\User\Programs\SubVersion\SubversionClient;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\usr\bin;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Hewlett-Packard\HP Performance Advisor;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;c:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\AMD\ATI.ACE\Core-Static;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT

[debug]Command-line: C:\usr\MinGW492\bin\gdb.exe -nx -fullname -quiet  -args C:/User/ICCPRO~1/ICCV9C~1/CGNUEX~1/ARMGNU~1/bin/Debug/ARMGNU~1.ELF
[debug]Working dir : C:\User\ICCPRO~1\ICCV9C~1\CGNUEX~1\ARMGNU~1

Starting debugger: C:\usr\MinGW492\bin\gdb.exe -nx -fullname -quiet  -args

[debug]> set prompt >>>>>>cb_gdb:

Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Connecting to remote target
Setting breakpoints

[debug]Reading symbols from C:\User\ICCPRO~1\ICCV9C~1\CGNUEX~1\ARMGNU~1\bin\Debug\ARMGNU~1.ELF...done.
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 7.6.1
[debug]Copyright (C) 2013 Free Software Foundation, Inc.
[debug]License GPLv3+: GNU GPL version 3 or later <>
[debug]This is free software: you are free to change and redistribute it.
[debug]There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
[debug]and "show warranty" for details.
[debug]This GDB was configured as "mingw32".
[debug]For bug reporting instructions, please see:
[debug]> set confirm off

Debugger name and version: GNU gdb (GDB) 7.6.1

[debug]> set width 0
[debug]> set height 0
[debug]> set breakpoint pending on
[debug]> set print asm-demangle on
[debug]> set unwindonsignal on
[debug]> set print elements 0
[debug]> set new-console on
[debug]> set disassembly-flavor att
[debug]> catch throw
[debug]Function "__cxa_throw" not defined.
[debug]Catchpoint 1 (throw)
[debug]> source c:\User\icc programs\iccv9cortex\bin\ImageCraftCB\share\codeblocks/scripts/stl-views-1.0.3.gdb
[debug]> directory C:/User/ICCPRO~1/ICCV9C~1/CGNUEX~1/ARMGNU~1/
[debug]Source directories searched: C:/User/ICCPRO~1/ICCV9C~1/CGNUEX~1/ARMGNU~1;$cdir;$cwd
[debug]> shell cmd /c start "STLink Gdb Server" "c:\User\icc programs\iccv9cortex\STUtilCyg\st-util.exe"
[debug]> target remote tcp:localhost:4242
[debug]Remote debugging using tcp:localhost:4242
[debug]0x00000000 in ?? ()


[debug]> monitor reset

In ?? () ()

[debug]> monitor reset
[debug]> load
[debug]Loading section .text, size 0x274 lma 0x8000000
[debug]Loading section .data, size 0x43c lma 0x800046e
[debug]Start address 0x80000b1, load size 1712
[debug]Transfer rate: 3 KB/sec, 856 bytes/write.
[debug]> break "C:/User/icc programs/iccv9cortex/CGnuExamples/ArmGnuPrj/Src/main.c:28"
[debug]Breakpoint 2 at 0x8000122: file C:\User\icc programs\iccv9cortex\CGnuExamples\ArmGnuPrj\Src\main.c, line 28.
[debug]> continue
[debug]Note: automatically using hardware breakpoints for read-only addresses.
[debug]Program received signal SIGTRAP, Trace/breakpoint trap.
[debug]0x080000b1 in Reset_Handler () at C:\User\icc programs\iccv9cortex\CGnuExamples\ArmGnuPrj\Setup\startup.S:86
[debug]C:\User\icc programs\iccv9cortex\CGnuExamples\ArmGnuPrj\Setup\startup.S:86:3985:beg:0x80000b1

Program received signal SIGTRAP, Trace/breakpoint trap.
At C:\User\icc programs\iccv9cortex\CGnuExamples\ArmGnuPrj\Setup\startup.S:86

[debug]> bt 30
[debug]#0  0x080000b1 in Reset_Handler () at C:\User\icc programs\iccv9cortex\CGnuExamples\ArmGnuPrj\Setup\startup.S:86

General (but related to Code::Blocks) / cbp2make under Windows
« Last post by cacb on April 27, 2017, 03:20:25 pm »
I have a question relating to cbp2make with Code::Blocks projects under Windows. I use the MSVC compiler and my project settings run things like wx-user via backticks.  The general idea is obviously to publish code with NMAKE makefiles.

Now if you try to run cbp2make to create make files for others to use, I find that NMAKE makefiles are unable to run shell commands, so the generated make files are not usable. Is there a recommended alternative approach for something like this?

Hello guys,

Sorry for my poor explanations....

=> my remote host is an embedded linux. I connect to it via SSH.

=> I would like to execute a script before the debugger started in order to copy my binary to the remote target, enable the rights on it and then launch gdbserver for this binary. is that clear enough?

Here is the procedure i followed:
- Configure the remote connection tab with target IP address and gdbserver port
- Enter some command lines on both "additionnal tab" (i did that for both cause i would like to identify when those commands will be executed). I simply populate the fields with a single "pscp command line describe below". For the "GDB" tab i used  shell before the command line.

Command line used : shell C:\cp\od\Putty\pscp.exe -scp -r -pw ....... "C:\Users\mbarril\Documents\Codeblocks project\test command linesw\bin\Debug" user@

Finally, i find out the root cause. it was due to the "$" in the password populated in the pscp command line. But i still have one question:

Could you please tell me when these tabs will execute the command lines populated in there?

Thank you in advance

Using Code::Blocks / Re: save disassemble option 'mixed mode'
« Last post by exchg on April 27, 2017, 12:09:42 pm »
thanks a lot, added as feature request on SF
General (but related to Code::Blocks) / Minor typos in Source formatter
« Last post by Commaster on April 27, 2017, 11:36:02 am »
    Last item has "of" and "#" swapped around.
    "paren" is missing a "t" in items 6 and 7.

Thank you.
Embedded development / Re: Codeblocks wizard script multiple compiler pages
« Last post by anandamu16 on April 27, 2017, 06:16:53 am »
(eg if user has selected development board "A", he will have the option to select only one of "x", and "Y" compilers. Similarly, if the if user has selected development board "B", he will have the option to select only one of "z", and "w" compilers)
Is there anyone who can help me in this?
Using Code::Blocks / Re: save disassemble option 'mixed mode'
« Last post by BlueHazzard on April 27, 2017, 12:09:56 am »
i don't think this is possible at the moment.
Can you add a ticket on sourceforge, so maybe ai can make a patch at the weekend..

A simply won't work is not enough information...

Some logs? Some error descriptions? Some detailed description of what you are doing, what happens and what should happen?

i create this post 'cause i need to copy my binaries to a remote target device (i'm running C::B on windows)and also launch gdbserver from the host.
This sounds like your remote target is not a windows host? Some detailed description of the host, target? What connection are you planning to use?

[EDIT:] Sorry, i over read the title... Your question is to run a script before the debugger on the target? My questions above are still valid.
Using Code::Blocks / save disassemble option 'mixed mode'
« Last post by exchg on April 26, 2017, 10:34:21 pm »
hi to all,
is it possible to save 'mixed mode' flag on disassembly window to be always on and do not toggle it manually every time?
Pages: 1 2 [3] 4 5 6 7 8 ... 10