debug.c revision dffec89c701f362367e5e044605265b4dede5a69
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "_debug.h"
#include "msg.h"
static int _Dbg_count = 0;
/*
* Debugging initialization and processing. The options structure defines
* a set of option strings that can be specified using the -D flag or from an
* environment variable. For each option, a class is enabled in the _Dbg_mask
* bit mask.
*/
static DBG_options _Dbg_options[] = {
#ifdef DEMANGLE
#endif
};
/*
* Provide a debugging usage message
*/
static void
{
#ifdef DEMANGLE
#endif
}
/*
* Validate and enable the appropriate debugging classes.
*/
{
/* perform strtok_r() operations. */
char *lasts;
return (0);
/*
* The token should be of the form "-Dtok,tok,tok,...". Separate the
* pieces and build up the appropriate mask, unrecognized options are
* flagged.
*/
do {
if (name[0] == '!') {
name++;
}
opts++) {
else
break;
}
}
}
/*
* If the debug help option was specified dump a usage message. If
* this is the only debug option return an indication that the user
* should exit.
*/
_Dbg_usage();
/* LINTED */
}
_Dbg_count++;
return (_Dbg_mask);
}
/*
* Set the specified flags to _Dbg_mask.
*/
void
{
}
/*
* Messaging support - funnel everything through _dgettext() as this provides
* a stub binding to libc, or a real binding to libintl.
*/
extern char *_dgettext(const char *, const char *);
const char *
{
}