This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ccs v3.3 and breakpointing c++ template instantiations

 

I am using ccs v3.3 12.1 with cgtools 6.1.19 and when I place a breakpoint in a template

the breakpoint is only placed in one instantiation of the template(usually not the one I want) - Is

there something I've misconfigured or a work around?  Typical debugger behavior is to place

a template breakpoint in all instantiations so you are at least guaranteed to hit it eventually and

not miss it completely.

 

Regards, Jason Kalin

  • Jason,

    Are you referring to template classes and its instantiations? I am not sure if the version of CCS you have fully supported this at the time it was released (3.3.12.1 is rather old).

    Would you mind sending an example where this happens?

    Thank you,

    Rafael

  •  

    If I debug - set breakpoints and mouse over display variable values -  in a small example file with a couple small

    templates ccsv3.3 12.1 seems to behave OK.  The problem is occuring in a much larger(>100MBytes with debug

    symbols) program with thousands of template instantiations.  I am unable to link this program without using the

    --no_sym_merge option as it takes forever and eventually the linker hits the windows 2GB process limit and is

    killed.  In this case, breakpoints will get set in the wrong template instance(or not all instances) and when I

    mouse over a template variable ccs hangs for a while(minutes, sometimes) and then just pops up the variable

    type without its current value(like when a variable is out of scope) - My guess given this behavior is that ccs is

    unable to, quickly, resolve the templated symbols - possibly because --no_sym_merge is having to be used, and

    then debugging becomes unworkable?

     

    Regards, Jason Kalin

  •  

    I have tested this same large load with ccs 4.2.3.00004(using elf format) and breakpoints and mouse overs and

    the other debug functions work within templates as well as elsewhere - so I have to guess ccs 3.3 12.1's debugging

    doesn't scale well for this size of application.

     

    Anyway, I do have a follow-on, different, problem with the load aboe built under 4.2.3, with cgtools 7.2.0 - try{} catch{} exceptions

    as handled by rts6400_elf_eh.lib are not returning to the correct location/catch instance, especially when unwound within

    these large templates - Is this a known problem with this build and is there a fix?

     

    Regards, Jason Kalin

  • Jason,

    Thanks for reporting your results with CCSv4.2.3. That would be my next step of testing this. 

    I was going to split your post and put your question about try/catch on the compiler forum, but thanks for reposting it.

    Cheers,

    Rafael