checkwps: harden filename extension checking.
[maemo-rb.git] / lib / unwarminder / unwarminder.c
blob68bd9f39867fe5c9d63aa017f9d8d5e2dfca0843
1 /***************************************************************************
2 * ARM Stack Unwinder, Michael.McTernan.2001@cs.bris.ac.uk
4 * This program is PUBLIC DOMAIN.
5 * This means that there is no copyright and anyone is able to take a copy
6 * for free and use it as they wish, with or without modifications, and in
7 * any context, commercially or otherwise. The only limitation is that I
8 * don't guarantee that the software is fit for any purpose or accept any
9 * liability for it's use or misuse - this software is without warranty.
10 ***************************************************************************
11 * File Description: Implementation of the interface into the ARM unwinder.
12 **************************************************************************/
14 #define MODULE_NAME "UNWARMINDER"
16 /***************************************************************************
17 * Include Files
18 **************************************************************************/
20 #include "types.h"
21 #include <stdio.h>
22 #include <string.h>
23 #include "unwarminder.h"
24 #include "unwarm.h"
27 /***************************************************************************
28 * Manifest Constants
29 **************************************************************************/
32 /***************************************************************************
33 * Type Definitions
34 **************************************************************************/
37 /***************************************************************************
38 * Variables
39 **************************************************************************/
42 /***************************************************************************
43 * Macros
44 **************************************************************************/
47 /***************************************************************************
48 * Local Functions
49 **************************************************************************/
52 /***************************************************************************
53 * Global Functions
54 **************************************************************************/
56 UnwResult UnwindStart(Int32 pcValue,
57 Int32 spValue,
58 const UnwindCallbacks *cb,
59 void *data)
61 UnwState state;
63 /* Initialise the unwinding state */
64 UnwInitState(&state, cb, data, pcValue, spValue);
66 /* Check the Thumb bit */
67 if(pcValue & 0x1)
69 return UnwStartThumb(&state);
71 else
73 return UnwStartArm(&state);
77 /* END OF FILE */