Author Topic: Can't display contents of boost::shared_ptr  (Read 2096 times)

lambertia

  • Senior Community Member
  • Posts: 382
  • Hero Points: 14
  • I have nothing sufficiently witty to say.
Can't display contents of boost::shared_ptr
« on: September 25, 2014, 04:01:40 am »
Hi,

The locals debug window can't display the contents of a boost::shared_ptr. This has been an issue bugging me for a long time.

The ".px" needs to be added to the watch window to get the information.

Does anyone else have this issue?

Cheers,
--
Greg.

SlickEdit 2014 (v19.0.0.8 32-bit)

Serial number: FE10194_BETA
License type: Beta License
License expiration: 2014-10-23 12:17:00
License file: /opt/slickedit-19.0.0.8/bin/slickedit.lic

Build Date: September 16, 2014
Emulation: Brief

OS: Linux
OS Version: Ubuntu 10.04.4 LTS
Kernel Level: 3.13.0-35-generic
Build Version: #62-Ubuntu SMP Fri Aug 15 01:58:42 UTC 2014
Processor Architecture: i686

X Server Vendor: The X.Org Foundation
Memory: 64% Load, 7510MB/11699MB Virtual
Shell Info: /opt/slickedit-19.0.0.8/bin/secsh -i
Screen Size: 1920 x 1080, 1920 x 1080

Project Type: Cpp
Language: .cpp (C/C++)

Installation Directory: /opt/slickedit-19.0.0.8/
Configuration Directory: /space/gbarron/work/mo-strategy/se/sc/19.0.0/


Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3604
  • Hero Points: 480
Re: Can't display contents of boost::shared_ptr
« Reply #1 on: September 25, 2014, 10:36:37 pm »
If you have SlickEdit configured to use your local version of GDB, *and*, you have that GDB configured to do Python pretty printing for the Boost libraries, *and*, you set the following options in SlickEdit:

Macros > Set Macro Variable... > def_debug_enable_pretty_printing (1)
Macros > Set Macro Variable... > def_debug_disable_auto_load (0)

Then, pretty printing of Boost types *might* work, but I'm not going to bother having any optimism about it.

Why doesn't it work out of the box ?

1) We don't ship Python pretty printing scripts for Boost, because the pretty printing scripts for STL barely work, and Boost is a aging library being replaced by TR1.  We had do make extensive changes to the scripts for the STL to prevent them from blindly locking up GDB in infinite loops.  It wasn't any fun.

2) Because of the issue with pretty printing scripts blindly going into infinite loops, we only trust the scripts for the STL that we ship, and disable the auto-loading of pretty printing scripts that GDB does.  It's this or forever be fielding problems from users where GDB locks up constantly for no apparent reason (When GDB locks up, people think SlickEdit locks up, but it's just waiting for GDB to respond or time out).

I really wish I had better news for you on this front.  Seriously, I understand how frustrating it is.

lambertia

  • Senior Community Member
  • Posts: 382
  • Hero Points: 14
  • I have nothing sufficiently witty to say.
Re: Can't display contents of boost::shared_ptr
« Reply #2 on: September 28, 2014, 11:02:56 pm »
Hi!

Thanks for that Dennis. This should motivate me to move over to TRI/C++ 11 faster :)

I'll give it a go.