By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,308 Members | 2,141 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,308 IT Pros & Developers. It's quick & easy.

how to print vector<bool> value in gdb?

P: n/a
in gdb, when print an element of vector<bool>, it returns the offset of
the bi
t
instead of the value.
e.g: (visible is of type vector<bool>)
(gdb) p layout._visible[3]
$15 = {_M_p = 0x9817d00, _M_mask = 8}
(gdb) p layout._visible[3] & 0x80
Structure has no component named operator&.
(gdb)
How to display its real value?

No such problem when debugging on VC
thanks a lot

Apr 28 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
hu*******@gmail.com wrote:
in gdb,


Off-topic. This newsgroup is about the C++ language, not about debuggers.
Try gnu.utils.help.

Apr 28 '06 #2

P: n/a
Thank you very much and sorry for that.

May 3 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.