This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] debug mode


Hello

I received the notification that my assignment process is completed so here is my first patch to the debug mode.

I have applied the so long promised enhancement to debug container to limit performance impact by removing the safe iterator wrapper when possible before passing them to not debug methods. I noticed while doing my tests that directly using debug container by using #include <debug/vector> for instance was not giving the same result as when using debug thanks to the _GLIBCXX_DEBUG macro, I fixed this problem.

I haven't been able to check with dejaGNU that a test failed with an expected output. It would be useful to check debug mode behavior like what I have done with all the tests I proposed to add to the testsuite. Is this form of tests based on generic test case applied to the different containers ok ?

2010-07-26 François Dumont <francois.cppdevs@free.fr>

* include/debug/functions.h: Fix behavior of __check_valid_range,
__check_string, __check_sorted debug functions that used to depend on
_GLIBCXX_DEBUG macro. Include formatter.h and use formatting macros
for a consistent debug result.
* include/debug/formatter.h: Remove debug.h include, add __check_singular
declaration.
* include/debug/debug.h: Remove formatter.h include that is now
included by functions.h.
* include/debug/safe_iterator.h: _Safe_iterator::_Base_Iterator
renamed in interator_type to make it usable by _Iter_base helper
struct. __gnu_debug::__base introduced.
* include/debug/set.h: Use __gnu_debug::__base once iterator range
valided.
* include/debug/unordered_map: Same.
* include/debug/multiset.h: Same.
* include/debug/vector: Same.
* include/debug/unordered_set: Same.
* include/debug/deque: Same.
* include/debug/map.h: Same.
* include/debug/string: Same.
* include/debug/list: Same.
* include/debug/multimap.h: Same.
* testsuite/23_containers/util/debug/assign_neg.h: New test cases on
debug checks performed on container assign operation.
* testsuite/23_containers/util/debug/construct_neg.h: New test cases
on debug checks on constructors.
* testsuite/23_containers/util/debug/insert_neg.h: New test cases on
debug checks performed on container insert operations.
* testsuite/23_containers/unordered_map/debug/cont_traits.h,
debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
insert3_neg.cc, insert4_neg.cc: New, debug test cases on
unordered_map.
* testsuite/23_containers/multimap/debug/cont_traits.h,
debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
insert3_neg.cc, insert4_neg.cc: New, debug test cases on
multimap.
* testsuite/23_containers/set/debug/cont_traits.h,
debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
insert3_neg.cc, insert4_neg.cc: New, debug test cases on
set.
* testsuite/23_containers/unordered_multimap/debug/cont_traits.h,
debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
insert3_neg.cc, insert4_neg.cc: New, debug test cases on
unordered_multimap.
* testsuite/23_containers/unordered_set/debug/cont_traits.h,
debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
insert3_neg.cc, insert4_neg.cc: New, debug test cases on
unordered_set.
* testsuite/23_containers/multiset/debug/cont_traits.h,
debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
insert3_neg.cc, insert4_neg.cc: New, debug test cases on
multiset.
* testsuite/23_containers/unordered_multiset/debug/cont_traits.h,
debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
insert3_neg.cc, insert4_neg.cc: New, debug test cases on
unordered_multiset.
* testsuite/23_containers/map/debug/cont_traits.h,
debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
insert3_neg.cc, insert4_neg.cc: New, debug test cases on
map.
* testsuite/23_containers/vector/debug/cont_traits.h,
debug_cont_traits.h, assign1_neg.cc, assign2_neg.cc, assign3_neg.cc,
assign4_neg.cc, construct1_neg.cc, construct2_neg.cc,
construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
insert3_neg.cc, insert4_neg.cc: New, debug test cases on
vector.
* testsuite/23_containers/deque/debug/cont_traits.h,
debug_cont_traits.h, assign1_neg.cc, assign2_neg.cc, assign3_neg.cc,
assign4_neg.cc, construct1_neg.cc, construct2_neg.cc,
construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
insert3_neg.cc, insert4_neg.cc: New, debug test cases on
deque.
* testsuite/23_containers/list/debug/cont_traits.h,
debug_cont_traits.h, assign1_neg.cc, assign2_neg.cc, assign3_neg.cc,
assign4_neg.cc, construct1_neg.cc, construct2_neg.cc,
construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
insert3_neg.cc, insert4_neg.cc: New, debug test cases on
list.


debug.patch contains the patch of the debug mode and debug_tests.patch contains the new tests. Some of them will failed if the patch is not applied.

Regards

Attachment: debug.patch
Description: Text document

Attachment: debug_tests.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]