Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Trunk executes wrong debugger

(1/1)

Pecan:
In DebuggerManager::FindTargetsDebugger
If attempting to debug a gcc virtual target (say codeblocks All target)
and the default compiler is set to Visual C++, FindTargetsDebugger will set the debugger to CDB because the virtual target address is returned as 0x0.

Something like the following may work.


--- Code: ---void DebuggerManager::FindTargetsDebugger()
    . . .
    if (project)
    {
        const wxString &targetName = project->GetActiveBuildTarget();
        if (project->BuildTargetValid(targetName))
            target = project->GetBuildTarget(targetName);
    }
    // The above fails to find actual target for virtual targets  //(pecan 2012/04/11)

    Compiler *compiler = nullptr;
    if (!target)
    {
        if (project)                                                             //(pecan 2012/04/11)
            compiler = CompilerFactory::GetCompiler(project->GetCompilerID());   //(pecan 2012/04/11)
        if (not compiler)                                                        //(pecan 2012/04/11)
        compiler = CompilerFactory::GetDefaultCompiler();
        if (!compiler)
  . . .


--- End code ---

Would be better if we could find a way to identify the actual target.
But I couldn't find one.

oBFusCATed:

--- Quote from: Pecan on April 11, 2012, 07:56:50 pm ---Would be better if we could find a way to identify the actual target.
But I couldn't find one.

--- End quote ---
Hm, as far as I know C::B ask you to choose the target at the start of the debugging session. What have you chosen in the Target select dialog?


p.s. using not instead of ! hurts my eyes pretty badly :)

oBFusCATed:
I've committed you patch (with little modifications), but I don't know how can we solve the real problem...

Navigation

[0] Message Index

Go to full version