是否可以启用libc ++调试检查? [英] Possible to enable libc++ debug checks?

查看:183
本文介绍了是否可以启用libc ++调试检查?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在想,是否可以启用任何调试检查libc ++ STL。这是我最喜欢的事情之一关于MSVC的STL,它抓住一些否则很难找到错误的权利(尽管我希望它更容易禁用速度)。查看标头后,我尝试了:

I've been wondering if it is possible to enable any debug checks for libc++ STL. This is one of my favorite things about MSVC's STL, that it catches some otherwise hard to find bugs right from the get go (though I wish it were easier to disable for speed). After peeking in the headers I tried:

#define _LIBCPP_DEBUG_LEVEL 2

但是这会导致构建错误('__get_db undeclared')。

However this leads to build errors ('__get_db undeclared'). Any insights on whether this is a work in progress, or if there is a different expected way to enable these checks?

推荐答案

这个工具正在进行中,或者是否有不同的预期方式肯定是一个正在进行的工作。
有一个(很旧的)状态页面这里,我需要更新。

This is definitely a work in progress. There's a (very old) status page here that I need to update.

这个想法是用户会通过设置预处理符号 _LIBCPP_DEBUG
来进行交互。基本测试,将其设置为大于1的数将给出更广泛的测试。

The idea is that users will interact with it by setting the preprocessor symbol _LIBCPP_DEBUG Just defining it will give basic tests, setting it to a number > 1 will give more extensive tests.

但是,如您所见,它目前无法使用。

However, as you have found, it is currently non-functional.

这篇关于是否可以启用libc ++调试检查?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆