/*
* 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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <mdb/mdb_modapi.h>
typedef struct combined_walk {
void *cw_data;
typedef struct combined_walk_data {
/*
* Initialize a combined walk to
* A) present a single concatenated series of elements from different
* structures, or
* B) select from several possible walks at runtime.
* Multiple walks are done in the same order passed to combined_walk_add(). Each
* walk is initialized with the same wsp->walk_addr.
*/
void
{
}
/*
* If a sub-walker's walk_step() is interrupted (by Ctrl-C or entering 'q' when
* prompted for the next screenful of data), there won't be an opportunity to
* switch wsp->walk_data from the sub-walker's data back to the combined walk
* data, since control will not return from walk_step(). Since mdb is
* single-threaded, we can save the combined walk data for combined_walk_fini()
* to use in case it was reached from an interrupted walk_step(). To allow for
* the possibility of nested combined walks, we'll save them on a list tagged by
* the sub-walker's data.
*/
static void
{
}
}
static void
{
} else {
}
}
}
static combined_walk_data_t *
{
return (NULL);
}
return (cwd);
}
}
return (NULL);
}
static void
{
} else {
}
}
static combined_walk_t *
{
return (NULL);
}
}
return (cw);
}
void
int (*walk_init)(mdb_walk_state_t *),
int (*walk_step)(mdb_walk_state_t *),
void (*walk_fini)(mdb_walk_state_t *))
{
}
int
{
int status;
return (WALK_DONE);
}
if (cw->cw_initialized) {
} else {
goto done;
}
/* save cwd for fini() in case step() is interrupted */
/* control may never reach here */
goto done;
return (status);
done:
(void) combined_walk_remove_current(cwd);
if (cw->cw_initialized)
return (combined_walk_step(wsp));
return (status);
}
void
{
/*
* If walk_step() was interrupted, wsp->walk_data will be the
* sub-walker's data, not the combined walker's data, so first check to
* see if there is saved combined walk data tagged by the presumed
* sub-walker's walk data.
*/
/*
* walk_step() was not interrupted, so wsp->walk_data is
* actually the combined walk data.
*/
} else {
}
if (cw->cw_initialized) {
}
}
}