User forums > Using Code::Blocks

GDB command

(1/3) > >>

electrolot:
How use GDB command after start debugger? Is it possible? I can't find this option. GDB console is also not available.

mariocup:
Hi electrolot,

a GDB console is not available in CB.
For setting debugger options select: Project->Properties and go to the tab Debugger. In this view select additional commands tab and insert your commands.

Bye,

Mario

electrolot:
Hi Mario,

Thank you.
I set only one additional command After connection:

--- Code: ---target sim
--- End code ---
and GDB always close after start:

--- Code: ---Debugger finished with status 1
--- End code ---
.
When I use the same command in GDB console it works fine.

mariocup:
Hi electrolot,

I think you must specify also the parameters for the e.g. remote protocol <IP>:<Port> like this


--- Code: ---target sim localhost:6785
b main

--- End code ---

Bye,

Mario

electrolot:
Hi Mario,

I tried with parameters of remote protocol.
Still the same  :(

I don't know why it does not work because in GDB console it works OK.

I try to make visible GDB console in C::B and I change DebuggerGDB::LaunchProcess function:

   
--- Code: ---m_Pid = wxExecute(cmd, wxEXEC_ASYNC, m_pProcess);
--- End code ---
to
   
--- Code: ---m_Pid = wxExecute(cmd, wxEXEC_ASYNC | wxEXEC_NOHIDE, m_pProcess);
--- End code ---

now I see GDB console but without commands line.

Navigation

[0] Message Index

[#] Next page

Go to full version