Frustration with template debugging

Using:

Sun Studio IDE 7.4 2005/10/13

Sun Dbx Debugger 7.5 Patch 121023-01 2006/02/09

CC: Sun C++ 5.8 Patch 121017-02 2006/04/19

Problem:

Using Studio 11 debugger GUI, file in which template is defined is not opened when I step into a function belonging to the template.

For example, when I compile the test files below with "CC -g -o testMe testMe.cc", then attempt to step into the t.set(5), testMe.hh is not opened.

However, if I manually open the file, set a breakpoint in it, have the breakpoint triggered, then remove the breakpoint, I can step into the file from then on, even across sunstudio/dbx restarts.

Does anyone else have this problem?

[u]Test files:[/u]

[b]testMe.hh:[/b]

[code]

template <class Type>

class T

{

public:

void set(const Type & copyMe) { myT = copyMe; }

Type myT;

};

[/code]

[b]testMe.cc:[/b]

[code]

#include "testMe.hh"

int main(void)

{

T<int> t;

t.set(5);

return 0;

}

[/code]

[1102 byte] By [IrsaQtc] at [2007-11-26 10:18:50]
# 1

Sun Studio IDE relies on a file extension to determine file's type and it doesn't open files as directed by the debugger if it doesn't know this file type.

Unfortunately, this is not user-configurable in current release, but fortunately .hh was added to recognizable extensions list and this fix is available in the following patches:

- 122142-01 for sparc

- 122143-01 for x86

MaximKartashev at 2007-7-7 2:15:34 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2

Thanks for the fast response -

Seems like I am suffering from bugs 6429245 and 6415655.

So I've installed that patch (and its dependency) on x86, but it hasn't resolved the problem. I even cleaned out the .sunstudio directory and retried.

Any other hints? Logfiles I could cut 'n' paste?

IrsaQtc at 2007-7-7 2:15:34 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 3
Try killing .nbattr file in your project directory
MaximKartashev at 2007-7-7 2:15:34 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 4
OK, problem seems to be resolved. Thanks very much.
IrsaQtc at 2007-7-7 2:15:34 > top of Java-index,Development Tools,Solaris and Linux Development Tools...