---
name: "pmParseDebug"
section: "3"
platform: "linux"
package: "libpcp3-dev"
version: "6.3.8-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/pmParseDebug"
---

# pmParseDebug(3)

manipulate old-style PCP debugging control bit-fields

## NAME

**\_\_pmParseDebug**, **\_\_pmSetDebugBits** - manipulate old-style PCP debugging control bit-fields

## C SYNOPSIS

**#include \<pcp/pmapi.h\>**\
 **#include \<pcp/deprecated.h\>**

**int \_\_pmParseDebug(const char \****spec***);**\
 **void \_\_pmSetDebugBits(int value);**

**cc ... -lpcp**

## DESCRIPTION

These routine have been deprecated and may be removed in a future Performance Co-Pilot (PCP) release. Please refer to [**pmSetDebug**(3)](/pmSetDebug/3.md) and [**pmClearDebug**(3)](/pmClearDebug/3.md) for replacement functionality.

**\_\_pmParseDebug** parses *spec* assuming it to be a comma separated list of PCP debug flags.

Each flag may be specified as an integer or the trailing portion of the symbolic name of the corresponding flag as reported by [**pmdbg**(1)](/pmdbg/1.md). Symbolic names are stripped of the \`\`DBG\_TRACE\_'' prefix and may appear in either case.

As a special case, the values \`\`-1'' and \`\`ALL'' are treated as synonyms for turning on all bits except the sign bit in the result, i.e. **INT\_MAX** from *\<limits.h\>*.

For example the debug option **fetch** is defined in the output from **pmdbg**(3) with the **-L** option and may be specified in *spec* as **2**, **FETCH** or **fetch**.

**\_\_pmSetDebugBits** may be used to set the bit-fields directly using the encoding in *value*. The effect is additive, so consecutive calls to **\_\_pmSetDebugBits** will set the conjunction of the bits in the *value* arguments.  To clear the bit-fields, see [**pmClearDebug**(3)](/pmClearDebug/3.md).

## DIAGNOSTICS

If successful, **\_\_pmParseDebug** returns the value computed by the bit-wise \`\`or'' of each flag in the *spec*, suitable for assigning to the global debug trace control variable **pmDebug**. Otherwise the return value is less than 0 to indicate a parsing error.

## SEE ALSO

[**pmdbg**(1)](/pmdbg/1.md), [**pmSetDebug**(3)](/pmSetDebug/3.md) and [**pmClearDebug**(3)](/pmClearDebug/3.md).
