/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (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 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* debugger to communicate. These communications take two forms:
*
* 1. kernel to debugger. Interfaces of this type are used by the kernel to
* inform the debugger of changes in the state of the system that need to
* be noted by the debugger. For example, the kernel uses one of these
* interfaces to tell debugger that the set of currently-loaded modules
* has changed.
*
* 2. debugger to kernel. Interfaces of this type are used by the debugger
* to extract information from the kernel that would otherwise be difficult
* to get, or to perform services that are specific to the machine being
* used. An example of the former is the module iterator, which is needed
* to allow symbol resolution, but which needs to resolve symbols prior
* to the iteration. The latter class include machine-specific or
* cpu-type-specific functions, such as the I-cache flusher. By directly
* using the kernel versions of these functions, we avoid the need to
* in kmdb.
*/
#include <sys/kdi_impl.h>
#include <kmdb/kmdb_kdi.h>
#include <kmdb/kmdb_dpi.h>
#include <kmdb/kmdb_kvm.h>
#include <kmdb/kmdb_promif.h>
#include <mdb/mdb_debug.h>
static int kdi_unload_request;
typedef struct mod_interp_data {
void *mid_userarg;
int
kmdb_kdi_mods_changed(void)
{
}
static int
{
int rc;
return (rc);
}
/*
* We need to protect ourselves against any problems that may occur while
* executing the module iterator, currently located in krtld. If, for
* example, one of the next pointers in the module list points to an invalid
* address, we don't want kmdb to explode. As such, we protect ourselves
* with the DPI fault-protection routines. We don't want our fault-protection
* callback to protect the callback that the kmdb consumer provided, so we
* provide our own interposition callback that removes our fault-protector
* before invoking the user's callback.
*/
int
{
int rc;
/* We took a fault while iterating through the modules */
return (-1);
}
return (rc);
}
int
{
}
int
{
}
static ssize_t
physaddr_t, size_t *))
{
int rc;
return (sz);
}
{
}
{
}
void
kmdb_kdi_flush_caches(void)
{
}
int
{
return (kdi_unload_request);
}
void
{
kdi_unload_request = 1;
}
int
kmdb_kdi_get_flags(void)
{
return (flags);
}
{
}
void
kmdb_kdi_system_claim(void)
{
}
void
kmdb_kdi_system_release(void)
{
0, NULL);
}
}
struct cons_polledio *
kmdb_kdi_get_polled_io(void)
{
}
void
kmdb_kdi_kmdb_enter(void)
{
}
int
{
int rc = 0;
int err;
} else {
/* We faulted during the translation */
}
return (rc);
}
{
}
int
{
int err;
return (0);
}
/*
* This function is to be called only during kmdb initialization, as it
* uses the running kernel for symbol translation facilities.
*/
{
}
void
{
kdi_unload_request = 0;
}
void
kmdb_kdi_end_init(void)
{
}