|
Boost : |
From: Christopher Woods (cwoods_eol_at_[hidden])
Date: 2007-05-23 10:02:37
"Jeffrey Faust" <jefffaust_at_[hidden]> wrote in message
news:op.tsr4k6sq5emtmi_at_goliath...
> Ulrich Eckhardt wrote:
>> Other than that, I know that at least GDB and MS debugger can be
>> scripted and that it might be a different approach that is non-intrusive.
>
> I have tried to modify autoexp.dat in the past, but have failed. I'll
> give it another try before looking for another solution.
>
Jeff,
Since you are using the Visual Studio products there is an option might get
you where you want to be w/out requiring *any* intrusive modification in
your code (or to boost). It is possible to write custom 'Add-in' DLLs to
help the debugger display values in the IDE.
I'm attaching a sample that I pieced together from a couple different posts.
Much of the code comes from Jason Shirk in response to a problem displaying
std::string in the debugger correctly (search for "autoexp.dat is wrong for
std:basic_string"). I had to make some changes and piece some information
together from a few other sources as well but I got the example file
working. At the bottom of the file you'll find some comments from the
author(s), a link to the threads that discuss the problem, and some of my
own comments based on actually trying to use it and see how it works.
With a little elbow grease you should be able to put together one for your
use with boost::optional.
HTH,
-Chris
begin 666 EEStdString.cpp
M+R\@17AP<F5S<VEO;B!%=F%L=6%T;W(@061D+4EN(&9O<B!T:&4_at_5FES=6%L
M($,K*R!D96)U9V=E<BX*+R\*+R\@5&AI<R!S;VQV97,@=&AE('!R;V)L96T@
M=&AA="!T:&4_at_5FES=6%L(%-T=61I;R N3D54(&1E8G5G9V5R(&1O97,@;F]T
M('!R;W!E<FQY"B\O(&1I<W!L87D@<W1D.CIS=')I;F<@97AP<F5S<VEO;G,@
M=VAE;B!T:&4@<W1R:6YG(&AA<R!M;W)E('1H86X@,34_at_8VAA<F%C=&5R<RX*
M+R\@1V%R8F%G92!I<R!D:7-P;&%Y960_at_9F]R(&QO;F=E<B!S=')I;F=S+B @
M*$5X<&%N9&EN9R!T:&4@<W1R=6-T=7)E('=O<FMS"B\O(&-O<G)E8W1L>2!I
M;B!A;&P_at_8V%S97,N*0HO+PHO+R!4:&ES(&-O9&4@:&%S(&)E96X@=&5S=&5D
M('=I=&@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]("AV;VED*BDP
M>&-C8V-C8V-C8V-C8V-C8V,I*2!R971U<FX["B @(" @(" @:'(@/2!P2&5L
M<&5R+3Y296%D1&5B=6=G965-96UO<GE%>"AP2&5L<&5R+" H1%=/4D1,3TY'
M*6%D9')E<W,L('-I>F5/9D1S="P@<$1S="P@)FY296%D*3L*(" @('T*"@DO
M+R!#;VUM;VX_at_97)R;W(@8VAE8VMI;F<*(" @(&EF("AH<B A/2!37T]+*2![
M"B @(" @(" @4F%I<V5%>&-E<'1I;VXH4U1!5%537T%#0T534U]624],051)
M3TXL(# L(# L(# I.PH@(" @(" @(')E='5R;CL*(" @('T*"B @("!I9B H
M;E)E860@(3T@<VEZ94]F1'-T*2!["B @(" @(" @4F%I<V5%>&-E<'1I;VXH
M4U1!5%537T%#0T534U]624],051)3TXL(# L(# L(# I.PH@(" @(" @(')E
M='5R;CL*(" @('T*?0H*+R\@1G5N8W1I;VX@=&AA="!I<R!C86QL960@*&)Y
M('1H92!D96)U9V=E<BD@=&\@979A;'5A=&4@=&AE('-T<FEN9PIE>'1E<FX@
M(D,B"DA215-53%0_at_7U]D96-L<W!E8RAD;&QE>'!O<G0I(%=)3D%022!!=71O
M17AP4W1D4W1R:6YG* H)1%=/4D0_at_9'=!9&1R97-S+ D)"2\O(&QO=R S,BUB
M:71S(&]F('1H92!D96)U9V=E92!A9&1R97-S(&]F('1H92!S=')I;F<*"41%
M0E5'2$5,4$52("IP2&5L<&5R+ D)+R\@8V%L;&)A8VL@<&]I;G1E<B!T;R!A
M8V-E<W,@:&5L<&5R(&9U;F-T:6]N<PH):6YT(&Y"87-E+ D)"0D)+R\@9&5C
M:6UA;"!O<B!H97@*"4)/3TP_at_8E5N:5-T<FEN9W,L"0D)+R\@<W1R:6YG(&ES
M(%5N:6-O9&4@*"!O;FQI;F4_at_9&]C('-A>7,@;F]T('5S960@*0H)8VAA<B J
M<%)E<W5L="P)"0D)+R\@=VAE<F4@=&AE(')E<W5L="!N965D<R!T;R!G;PH)
M<V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2!P<F]V:61E9#H*+R\)"2 @('-T9#HZ8F%S:6-?<W1R:6YG/&-H87(L<W1D
M.CIC:&%R7W1R86ET<SQC:&%R/BQS=&0Z.F%L;&]C871O<CQC:&%R/B ^/21!
M1$1)3BA%15-T9%-T<FEN9RYD;&PL7T%U=&]%>'!3=&13=')I;F= ,C_at_I"B\O
M"B\O"0DJ*2!4:&4_at_96YT<GD@<&]I;G0@;F%M92!M=7-T(&UA=&-H(&5X86-T
M;'DL(&EN8VQU9&EN9R!C87-E+"!T:&%T(&=I=F5N(&)Y._at_HO+PD)"0ED=6UP
M8FEN("UE>'!O<G1S($5%4W1D4W1R:6YG+F1L; H*+R\@5&AE<F4@:7,@5FES
M=6%L($,K*R!H96QP(&9O<B!M86MI;F<@86X_at_861D+6EN($1,3"X@(%-E92 B
M145!9&1);B!S86UP;&4@*&1E8G5G9VEN9RDB+@HO+R!4:&4@=&]P:6,@:&%S
M(&)O=&@@82!D97-C<FEP=&EO;B!A;F0@<V%M<&QE(&-O9&4N("!!="!T:&4@
M=&]P+"!I="!M96YT:6]N<R!T:&4_at_861D+6EN"B\O($1,3"!B96EN9R!I;B!T
M:&4@<V%M92!D:7)E8W1O<GD_at_87,@875T;V5X<"YD870@+2T@:6=N;W)E('1H
M870N("!!="!T:&4_at_8F]T=&]M+"!I= HO+R!S87ES('1H92!S86UE('1H:6YG
+(&%S("@R*2X*"@H`
`
end
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk