/*
* 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 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Public interface for AMD64 Unwind context
*/
#ifndef _UNWIND_CONTEXT_H
#define _UNWIND_CONTEXT_H
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* implementation of context structure
*
* Register arrays are indexed as specified in reg_num.h
*/
struct _Unwind_Context {
void *fde;
void *lsda;
};
enum register_rule {
};
struct register_state {
unsigned char source_reg;
};
struct eh_frame_fields {
void *cie_ops;
void *cie_ops_end;
int code_align;
int data_align;
int code_enc;
void *fde_ops;
void *fde_ops_end;
};
struct _Unwind_Exception *exception_object,
struct _Unwind_Context *ctx);
/*
* Starting withe an initialized context (from a ucontext)
* the following routines are sufficient to implement a non-destructive
* stack walk if modified to access the target processes memory. These
* routines refer to the local address of an item using names containing
* `data' names containing `reloc' give the correction to get target
* process location.
*/
/* ================== find function ====================== */
/*
* Computes the func and fde fields using pc as the lookup key.
* Return is 0 or address of fde
*
* This is the only function that look into .eh_frame_hdr
*/
/* =================== analyze function ================== */
/*
* Fills in personality_fn and lsda fields of the context based
* the fde entry which must be valid and also partially unpacks
* fde and cie into *f
*
* This is one of two functions that look inside fde's
*/
struct _Unwind_Context *ctx);
/*
* Computes register values at entry to function based on current
* register values, pc and fde values in a context
*
* This is the other function which looks inside fde's and
* the only one to look at CFA operations
*
* If 'f' is NULL (because no fde was found), a default calculation
* assuming an FP is done.
*/
struct _Unwind_Context *ctx);
/* ================= register propagation =============== */
/*
* Fills in the current register context for the caller
* based on computed at-entry state of callee
*/
void
struct _Unwind_Context *new_ctx);
/* ================================================= */
enum operand_desc {
ADDR,
SIZE,
};
enum operand_desc opr,
#endif /* _UNWIND_CONTEXT_H */