summaryrefslogtreecommitdiff
path: root/drivers/staging/android/fiq_debugger/fiq_debugger_priv.h
blob: 746cf1b5d55b7134c48fdd86115865184b583790 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*
 * Copyright (C) 2014 Google, Inc.
 * Author: Colin Cross <ccross@android.com>
 *
 * This software is licensed under the terms of the GNU General Public
 * License version 2, as published by the Free Software Foundation, and
 * may be copied, distributed, and modified under those terms.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 */

#ifndef _FIQ_DEBUGGER_PRIV_H_
#define _FIQ_DEBUGGER_PRIV_H_

#define THREAD_INFO(sp) ((struct thread_info *) \
		((unsigned long)(sp) & ~(THREAD_SIZE - 1)))

struct fiq_debugger_state;
struct pt_regs;

int fiq_debugger_printf(void *cookie, const char *fmt, ...);

void fiq_debugger_dump_pc(struct fiq_debugger_state *state,
		const struct pt_regs *regs);
void fiq_debugger_dump_regs(struct fiq_debugger_state *state,
		const struct pt_regs *regs);
void fiq_debugger_dump_allregs(struct fiq_debugger_state *state,
		const struct pt_regs *regs);
void fiq_debugger_dump_stacktrace(struct fiq_debugger_state *state,
		const struct pt_regs *regs, unsigned int depth, void *ssp);

#endif