/*
* 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 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Routines for manipulating the kmdb-specific aspects of dmods.
*/
#include <mdb/mdb_target_impl.h>
#include <kmdb/kmdb_module.h>
#include <mdb/mdb_debug.h>
typedef struct kmod_symarg {
void
{
}
void
{
}
static kmdb_modctl_t *
{
mdb_var_t *v;
return (NULL);
kmc = MDB_NV_COOKIE(v);
return (NULL);
return (kmc);
}
/*
* Given an address, try to match it up with a dmod symbol.
*/
int
{
mdb_var_t *v;
const char *name;
continue;
continue;
if (flags & MDB_TGT_SYM_EXACT) {
goto found;
}
/*
* If this is the first match we've found, or if this symbol is
* closer to the specified address than the last one we found,
* use it.
*/
}
}
return (set_errno(EMDB_NOSYMADDR));
/*
* Once we've found something, copy the final name into the caller's
* buffer, prefixed with a marker identifying this as a dmod symbol.
*/
}
return (0);
}
/*
* Locate a given dmod symbol
*/
int
{
return (set_errno(EMDB_NOSYMADDR));
return (0);
}
return (set_errno(EMDB_NOSYM));
}
{
mdb_var_t *v;
continue;
(void) set_errno(EMDB_NOCTF);
return (NULL);
}
return (ctfp);
}
}
(void) set_errno(EMDB_NOMAP);
return (NULL);
}
{
(void) set_errno(EMDB_NOOBJ);
return (NULL);
}
(void) set_errno(EMDB_NOCTF);
return (NULL);
}
return (ctfp);
}
static int
{
}
return (0);
}
int
void *p)
{
mdb_var_t *v;
return (set_errno(EMDB_NOMOD));
kmc = MDB_NV_COOKIE(v);
return (set_errno(EMDB_NOMOD));
return (0);
}