/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Immediate Value Target
*
* The immediate value target is used when the '=' verb is used to
* format an immediate value, or with ::print -i. The target is
* initialized with a specific value, and then simply copies bytes from
* this integer in its read routine. Two notes:
*
* (1) the address parameter of value_read is treated as an offset into
* the immediate value.
*
* (2) on big-endian systems, we need to be careful about the place we
* copy data from. If the caller specified a typesize in the argv array
* we use that for offsetting, otherwise we use the read size.
* If the user didn't specify the typesize, then 'addr' is ignored,
* and all reads are at an offset of 0 into the immediate value. This
* covers both the usage of ::print -i, and the semantics of adb
* commands like "0x1234=X", which should produce 0x1234 as a result;
* the adb model is for it to act like a cast down to the smaller
* integer type; this is handled as mentioned.
*/
#include <mdb/mdb_target_impl.h>
#include <mdb/mdb_types.h>
#include <mdb/mdb_conf.h>
#include <sys/isa_defs.h>
#include <strings.h>
void mdb_value_tgt_destroy(mdb_tgt_t *);
typedef struct mdb_value_data {
static ssize_t
{
/*
* If no output size was specified, use the current read size.
* In this case, "addr" is not an offset into the mvd_data,
* so we ignore it.
*/
if (size == 0) {
addr = 0;
} else {
}
#ifdef _BIG_ENDIAN
#endif
return (0);
if (nbytes != 0)
return (nbytes);
}
/*ARGSUSED*/
static ssize_t
{
return (nbytes); /* We allow writes to silently fail */
}
(int (*)()) mdb_tgt_notsup, /* t_setflags */
(int (*)()) mdb_tgt_notsup, /* t_setcontext */
(void (*)()) mdb_tgt_nop, /* t_activate */
(void (*)()) mdb_tgt_nop, /* t_deactivate */
(void (*)()) mdb_tgt_nop, /* t_periodic */
mdb_value_tgt_destroy, /* t_destroy */
(const char *(*)()) mdb_tgt_null, /* t_name */
(const char *(*)()) mdb_conf_isa, /* t_isa */
(const char *(*)()) mdb_conf_platform, /* t_platform */
(int (*)()) mdb_tgt_notsup, /* t_uname */
(int (*)()) mdb_tgt_notsup, /* t_dmodel */
value_read, /* t_vread */
value_write, /* t_vwrite */
value_read, /* t_fread */
value_write, /* t_fwrite */
value_read, /* t_ioread */
value_write, /* t_iowrite */
(int (*)()) mdb_tgt_notsup, /* t_vtop */
(int (*)()) mdb_tgt_notsup, /* t_lookup_by_name */
(int (*)()) mdb_tgt_notsup, /* t_lookup_by_addr */
(int (*)()) mdb_tgt_notsup, /* t_symbol_iter */
(int (*)()) mdb_tgt_notsup, /* t_mapping_iter */
(int (*)()) mdb_tgt_notsup, /* t_object_iter */
(int (*)()) mdb_tgt_notsup, /* t_status */
(int (*)()) mdb_tgt_notsup, /* t_run */
(int (*)()) mdb_tgt_notsup, /* t_step */
(int (*)()) mdb_tgt_notsup, /* t_step_out */
(int (*)()) mdb_tgt_notsup, /* t_step_branch */
(int (*)()) mdb_tgt_notsup, /* t_next */
(int (*)()) mdb_tgt_notsup, /* t_cont */
(int (*)()) mdb_tgt_notsup, /* t_signal */
(int (*)()) mdb_tgt_null, /* t_add_vbrkpt */
(int (*)()) mdb_tgt_null, /* t_add_sbrkpt */
(int (*)()) mdb_tgt_null, /* t_add_pwapt */
(int (*)()) mdb_tgt_null, /* t_add_vwapt */
(int (*)()) mdb_tgt_null, /* t_add_iowapt */
(int (*)()) mdb_tgt_null, /* t_add_sysenter */
(int (*)()) mdb_tgt_null, /* t_add_sysexit */
(int (*)()) mdb_tgt_null, /* t_add_signal */
(int (*)()) mdb_tgt_null, /* t_add_fault */
(int (*)()) mdb_tgt_notsup, /* t_getareg */
(int (*)()) mdb_tgt_notsup, /* t_putareg */
(int (*)()) mdb_tgt_nop, /* t_stack_iter */
(int (*)()) mdb_tgt_notsup /* t_auxv */
};
int
{
if (argc > 2)
if (argc == 2)
return (0);
}
void
{
}