summaryrefslogtreecommitdiffstats
path: root/src/sysdeps/i686/error.c
blob: 9aaa9765991cbf8a8fcc27804f0c86fb47e2b942 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

#include <strings.h>

#include "config.h"

int lt_error_set_retval(struct lt_config_audit *cfg,
                        unsigned long ret, La_retval *outregs)
{
	bzero(outregs, sizeof(*outregs));

	outregs->lrv_edx = 0;
	outregs->lrv_eax = (uint32_t) ret;

	return 0;
}

void lt_error_get_retaddr(struct lt_config_audit *cfg,
                          void **ret_addr, const La_regs *inregs)
{
	void **stack = (void**) inregs->lr_esp;
	*ret_addr = *stack;
}