unwind.h revision 117467
1117267Smarcel/*
2117267Smarcel * Copyright (c) 2003 Marcel Moolenaar
385685Sdfr * All rights reserved.
485685Sdfr *
585685Sdfr * Redistribution and use in source and binary forms, with or without
685685Sdfr * modification, are permitted provided that the following conditions
785685Sdfr * are met:
8117267Smarcel *
985685Sdfr * 1. Redistributions of source code must retain the above copyright
1085685Sdfr *    notice, this list of conditions and the following disclaimer.
1185685Sdfr * 2. Redistributions in binary form must reproduce the above copyright
1285685Sdfr *    notice, this list of conditions and the following disclaimer in the
1385685Sdfr *    documentation and/or other materials provided with the distribution.
1485685Sdfr *
15117267Smarcel * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16117267Smarcel * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17117267Smarcel * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18117267Smarcel * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19117267Smarcel * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20117267Smarcel * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21117267Smarcel * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22117267Smarcel * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23117267Smarcel * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24117267Smarcel * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2585685Sdfr *
2685685Sdfr * $FreeBSD: head/sys/ia64/include/unwind.h 117467 2003-07-12 04:35:09Z marcel $
2785685Sdfr */
2885685Sdfr
29115084Smarcel#ifndef _MACHINE_UNWIND_H_
30115084Smarcel#define	_MACHINE_UNWIND_H_
3185685Sdfr
32115084Smarcelstruct uwx_env;
33115084Smarcel
34115084Smarcelstruct unw_regstate {
35115084Smarcel	struct trapframe *frame;
36115084Smarcel	struct uwx_env	*env;
37115084Smarcel	uint64_t	keyval[8];
38115084Smarcel};
39115084Smarcel
40115084Smarcelint unw_create(struct unw_regstate *s, struct trapframe *tf);
41117267Smarcelvoid unw_delete(struct unw_regstate *s);
42115084Smarcelint unw_step(struct unw_regstate *s);
43115084Smarcel
44115084Smarcelint unw_get_bsp(struct unw_regstate *s, uint64_t *r);
45115084Smarcelint unw_get_cfm(struct unw_regstate *s, uint64_t *r);
46115084Smarcelint unw_get_ip(struct unw_regstate *s, uint64_t *r);
47117467Smarcelint unw_get_sp(struct unw_regstate *s, uint64_t *r);
48115084Smarcel
49115084Smarcelint unw_table_add(uint64_t, uint64_t, uint64_t);
50115084Smarcelvoid unw_table_remove(uint64_t);
51115084Smarcel
52115084Smarcel#endif /* _MACHINE_UNWIND_H_ */
53