# Hurricane Documentation

# Hurricane VLSI Database

List of all members | Static Public Member Functions
Hurricane::DebugSession Class Reference

Enable/Disable trace information (`API`). More...

## Static Public Member Functions

static bool | isTraced (const void *symbol)
static void | addToTrace (const void *symbol)
static void | addToTrace (const Cell *, const Name &)
static void | open (int minLevel, int maxLevel)
static void | open (const void *symbol, int minLevel, int maxLevel)
static void | close ()

## Detailed Description

Enable/Disable trace information (`API`).

DebugSession provide a way to control what and when text send through the cdebug stream is printed. cdebug display selectively the trace/debug messages between a `minLevel` and a `maxLevel` :

DebugSession manage a stack of ``(min,max) pairs so multiple session can be opened. On opening a new session the ``(min,max) pair is pushed on the top of the stack and define the active range of trace levels. On closing, the pair is removed from the top and the previous range became active again. Do not forget to match any opening with a closing.

In addition to the levels, a DebugSession also can be triggered by a symbol (i.e. a ``(void*) pointer). The DebugSession has contains a user managed table of symbols. When, in opening a session, you give a symbol, the session will actually changes the trace levels only if the symbol is in the internal table. Otherwise a session is still opened but it will keep the current trace levels. So, in any case the session must be closed.

# Trace Levels

To avoid mixing messages between different parts of the software, the following allotments have been done:

Trace/Debug level allotments (provisional)
C++ / Coriolis
Tool/Library | Minimum | Maximum
--- | --- | ---
Hurricane | `0` | `19`
CRL Core | `100` | `110`
Anabatic | `110` | `120`
Etesian | `120` | `130`
Knik | `130` | `140`
Katabatic | `140` | `150`
Kite | `150` | `160`
Solstice | `160` | `170`
Equinox | `170` | `180`
Unicorn | `180` | `190`
C++ / Analog
Tool/Library | Minimum | Maximum
Analog | `500` | `510`
oroshi | `510` | `520`
Python Wrappers / Coriolis
Tool/Library | Minimum | Maximum
Isobar | `20` | `30`
CRL Core/Python | `30` | `32`
Anabatic/Python | `32` | `34`
Etesian/Python | `34` | `36`
Knik/Python | `36` | `38`
Katabatic/Python | `38` | `40`
Kite/Python | `40` | `42`
Solstice/Python | `42` | `44`
Equinox/Python | `44` | `46`
Unicorn/Python | `46` | `48`
Python Wrappers / Analog
Tool/Library | Minimum | Maximum
Analog | `48` | `50`
oroshi/ÿthon | `50` | `51`
Special levels
Determinim check | `9000` | `9001`
JSON parsers/drivers | `19` | `20`

## Member Function Documentation

## ◆ isTraced()

bool Hurricane::DebugSession::isTraced | ( | const void * | symbol | ) |

inlinestatic

true if the `symbol` is in the DebugSession symbol table.

## ◆ addToTrace() [1/2]

void Hurricane::DebugSession::addToTrace | ( | const void * | symbol | ) |

inlinestatic

Adds the `symbol` to the table of traced symbols.

## ◆ addToTrace() [2/2]

void Hurricane::DebugSession::addToTrace | ( | const Cell * | cell,
|  | const Name & | name
| ) |  |

inlinestatic

Adds the Net `name` from `Cell` to the table of traced symbols.

## ◆ open() [1/2]

void Hurricane::DebugSession::open | ( | int | minLevel,
|  | int | maxLevel
| ) |  |

inlinestatic

Parameters

  minLevel | minimum debug/tracelevel (>=).
  maxLevel | maximum debug/tracelevel (<).

Change the current debug level to (minLevel,maxLevel). The previous range is stacked and will be restored when this session will be closed.

References tstream::getMaxLevel(), tstream::getMinLevel(), tstream::setMaxLevel(), and tstream::setMinLevel().

## ◆ open() [2/2]

void Hurricane::DebugSession::open | ( | const void * | symbol,
|  | int | minLevel,
|  | int | maxLevel
| ) |  |

inlinestatic

Parameters

  symbol | symbol to match.
  minLevel | minimum debug/tracelevel (>=).
  maxLevel | maximum debug/tracelevel (<).

Change the current debug level to (minLevel,maxLevel) only if `symbol` is traced. If the `symbol` is traced, then the new levels pair is stacked, otherwise the current level are stacked (we duplicate the top of the stack). This session, successful or not, must be closed as any other.

References tstream::getMaxLevel(), tstream::getMinLevel(), tstream::setMaxLevel(), and tstream::setMinLevel().

## ◆ close()

void Hurricane::DebugSession::close | ( |  | ) |

inlinestatic

Close a DebugSession and restore the previous trace levels.

References tstream::setMaxLevel(), and tstream::setMinLevel().

The documentation for this class was generated from the following files:

- DebugSession.h
- DebugSession.dox