OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [libstdc++-v3/] [doc/] [html/] [manual/] [debug_mode.html] - Blame information for rev 841

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 424 jeremybenn
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 30. Debug Mode</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /><meta name="keywords" content="&#10;      C++&#10;    , &#10;      library&#10;    , &#10;      debug&#10;    " /><meta name="keywords" content="&#10;      ISO C++&#10;    , &#10;      library&#10;    " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII.  Extensions" /><link rel="prev" href="ext_compile_checks.html" title="Chapter 29. Compile Time Checks" /><link rel="next" href="bk01pt12ch30s02.html" title="Semantics" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 30. Debug Mode</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_compile_checks.html">Prev</a> </td><th width="60%" align="center">Part XII. 
4
  Extensions
5
 
6
</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch30s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" title="Chapter 30. Debug Mode"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.debug_mode"></a>Chapter 30. Debug Mode</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="debug_mode.html#manual.ext.debug_mode.intro">Intro</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch30s02.html">Semantics</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch30s03.html">Using</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch30s03.html#debug_mode.using.mode">Using the Debug Mode</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s03.html#debug_mode.using.specific">Using a Specific Debug Container</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch30s04.html">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch30s04.html#debug_mode.design.goals">Goals</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s04.html#debug_mode.design.methods">Methods</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s04.html#debug_mode.design.other">Other Implementations</a></span></dt></dl></dd></dl></div><div class="sect1" title="Intro"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.debug_mode.intro"></a>Intro</h2></div></div></div><p>
7
    By default, libstdc++ is built with efficiency in mind, and
8
    therefore performs little or no error checking that is not
9
    required by the C++ standard. This means that programs that
10
    incorrectly use the C++ standard library will exhibit behavior
11
    that is not portable and may not even be predictable, because they
12
    tread into implementation-specific or undefined behavior. To
13
    detect some of these errors before they can become problematic,
14
    libstdc++ offers a debug mode that provides additional checking of
15
    library facilities, and will report errors in the use of libstdc++
16
    as soon as they can be detected by emitting a description of the
17
    problem to standard error and aborting the program.  This debug
18
    mode is available with GCC 3.4.0 and later versions.
19
  </p><p>
20
    The libstdc++ debug mode performs checking for many areas of the
21
    C++ standard, but the focus is on checking interactions among
22
    standard iterators, containers, and algorithms, including:
23
  </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="emphasis"><em>Safe iterators</em></span>: Iterators keep track of the
24
    container whose elements they reference, so errors such as
25
    incrementing a past-the-end iterator or dereferencing an iterator
26
    that points to a container that has been destructed are diagnosed
27
    immediately.</p></li><li class="listitem"><p><span class="emphasis"><em>Algorithm preconditions</em></span>: Algorithms attempt to
28
    validate their input parameters to detect errors as early as
29
    possible. For instance, the <code class="code">set_intersection</code>
30
    algorithm requires that its iterator
31
    parameters <code class="code">first1</code> and <code class="code">last1</code> form a valid
32
    iterator range, and that the sequence
33
    [<code class="code">first1</code>, <code class="code">last1</code>) is sorted according to
34
    the same predicate that was passed
35
    to <code class="code">set_intersection</code>; the libstdc++ debug mode will
36
    detect an error if the sequence is not sorted or was sorted by a
37
    different predicate.</p></li></ul></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ext_compile_checks.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt12ch30s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 29. Compile Time Checks </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Semantics</td></tr></table></div></body></html>

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.