On Fri, Sep 05, 2008 at 01:46:33PM -0500, Annamalai Gurusami wrote:
After printing the vector object, I obtain the start address of the data. Then I access the elements using the offsets. But this approach seems to be tedious. Is there any better approach? Ideally speaking, gdb should be able to work with "print bra.at(0)" or "print bra[0]". But currently that is not working. Maybe newer versions of gdb will improve C++ support!
Try using better development tools: Intel compiler includes also a debugger and is free for non-commercial use on Linux. You can also try SunStudio and dbx debugger for Linux. (dbx is different than gdb, but after using it for a while on Solaris, together with other Solaris powerful monitoring features, I have never looked back to Linux. If you have time and willpower, I'd certainly recommend you to switch your development to Solaris and take some time to learn it... in my case, the invested time has been repaid multiple times by just by the availability of superior diagnostic tools and superb documentation that accompanies them.)