Thursday, April 21, 2011

Eclipse CDT Debugger Issue, v. .metadata does not exist

I am attempting to use the gdb/mi debugger in the Eclipse CDT version 6.02. While I am debugging I can step through the program with ease up until I reach the following snippet of a block of code.

ENUM_START_TYPE My_Class::some_function( const char * c, const char * e)
{
    ENUM_START_TYPE result = GENERIC_ENUM_VALUE;

    if ( c[0] == '<' )
    {
        result = do_something()
    }

    ...
    MORE CODE
    ...

    return result;
}

When the debugger reaches this line.

if ( c[0] == '<' )

It starts exploring sections of code that it can not find until it opens a tab containing the /projectname/.metadata and simply declares:

"Resource '/project_name/.metadata' does not exist.

At which point the debugger terminates the program with no reason as to why.

All I wish to do is step over this line of code because it really is as trivial as comparing characters.

My question is: Why is this happening? Is it something to do with the debugger, or does it have something to do with my code, or what. Additionally, what is the .metadata and why can't the file be located and opened when it clearly exists (I can locate and open the .metafile without a problem).

Other info that may be pertinent: The files are located on a clearcase snapshot view, but are not checked into source control. I don't think that would cause an error like this, but clear case has caused so many random errors for me that I thought it would be worth mentioning.

Thanks in advance

From stackoverflow
  • As I am not aware of any side-effect a snapshot view might have in the process.
    A dynamic view could consider part of the directories as "non-selected" (and then non-readable).
    You have also the issue of symlink to dynamic view set on drive.

    But a snapshot view is nothing more than a working tree on the hard drive.

    To rule out any "ClearCase interference", you could try and debug your project entirely copied outside of any view of any sort (based on the content of your current snapshot view), and see if the problem persists.

    dp : Thanks for the advice on clearcase, I tested the program outside of the snapshot view and the error still occurs, so we can pretty much rule that out as a possible problem.

0 comments:

Post a Comment