User forums > Using Code::Blocks
remote ip in cb project file
MortenMacFly:
--- Quote from: renega_666 on August 29, 2012, 09:21:25 pm ---
--- Quote ---What you haven't stated, which is perhaps what some of the replies have missed, is whether you are setting the IP in "Project->Properties->Debugger".
--- End quote ---
Yes that's exactly what I do. I should have said that, my bad.
--- End quote ---
Ah - I missed that, to.
Well this should be simple: We could introduce a macro replacement for these fields in gdb_commands.h:
--- Code: ---class GdbCmd_RemoteTarget : public DebuggerCmd
--- End code ---
[...]
--- Code: --- case RemoteDebugging::TCP:
{
if (!rd->ip.IsEmpty() && !rd->ipPort.IsEmpty())
m_Cmd << targetRemote << _T("tcp:") << rd->ip << _T(":") << rd->ipPort;
}
--- End code ---
It should be a 1-3 liner actually... I wonder what oBFusCATed has to tell...
MortenMacFly:
--- Quote from: MortenMacFly on August 30, 2012, 06:58:25 am ---It should be a 1-3 liner actually... I wonder what oBFusCATed has to tell...
--- End quote ---
Well here it is: a two-liner. :-)
It does the macro replacement specifically for remote debugging only.
@oBFusCATed: An alternative would be to generally replace macros in commands when they are sent to the debugger. Do you think this is a wise thing to do (i.e. in DebuggerDriver::RunQueue())?
oBFusCATed:
I don't know how wise it is, but if it works why not, generally playing with the RunQueue is not pretty safe.
But please separate the patch. One patch for the formatting and one to fix the problem. Pretty please.
MortenMacFly:
--- Quote from: oBFusCATed on August 30, 2012, 08:08:52 am ---But please separate the patch. One patch for the formatting and one to fix the problem. Pretty please.
--- End quote ---
Oh dear... this just came from the fact that there was one additional line where I indented an if-statement. Isn't your request a little over-done therefore? Notice that the #includes had to change, so this is part of the patch to work.
MortenMacFly:
--- Quote from: oBFusCATed on August 30, 2012, 08:08:52 am ---generally playing with the RunQueue is not pretty safe.
--- End quote ---
That was my feeling, too. So I'd rather keep the patch as it is.
Navigation
[0] Message Index
[*] Previous page
Go to full version