Colin Cross | cffbe78 | 2014-04-02 18:42:13 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2014 Google, Inc. |
| 3 | * Author: Colin Cross <ccross@android.com> |
| 4 | * |
| 5 | * This software is licensed under the terms of the GNU General Public |
| 6 | * License version 2, as published by the Free Software Foundation, and |
| 7 | * may be copied, distributed, and modified under those terms. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | */ |
| 15 | |
| 16 | #ifndef _FIQ_DEBUGGER_PRIV_H_ |
| 17 | #define _FIQ_DEBUGGER_PRIV_H_ |
| 18 | |
| 19 | #define THREAD_INFO(sp) ((struct thread_info *) \ |
| 20 | ((unsigned long)(sp) & ~(THREAD_SIZE - 1))) |
| 21 | |
Arve Hjønnevåg | e073df6 | 2014-05-02 19:52:54 -0700 | [diff] [blame] | 22 | struct fiq_debugger_output { |
| 23 | void (*printf)(struct fiq_debugger_output *output, const char *fmt, ...); |
| 24 | }; |
| 25 | |
Colin Cross | cffbe78 | 2014-04-02 18:42:13 -0700 | [diff] [blame] | 26 | struct pt_regs; |
| 27 | |
Arve Hjønnevåg | e073df6 | 2014-05-02 19:52:54 -0700 | [diff] [blame] | 28 | void fiq_debugger_dump_pc(struct fiq_debugger_output *output, |
Colin Cross | cffbe78 | 2014-04-02 18:42:13 -0700 | [diff] [blame] | 29 | const struct pt_regs *regs); |
Arve Hjønnevåg | e073df6 | 2014-05-02 19:52:54 -0700 | [diff] [blame] | 30 | void fiq_debugger_dump_regs(struct fiq_debugger_output *output, |
Colin Cross | cffbe78 | 2014-04-02 18:42:13 -0700 | [diff] [blame] | 31 | const struct pt_regs *regs); |
Arve Hjønnevåg | e073df6 | 2014-05-02 19:52:54 -0700 | [diff] [blame] | 32 | void fiq_debugger_dump_allregs(struct fiq_debugger_output *output, |
Colin Cross | cffbe78 | 2014-04-02 18:42:13 -0700 | [diff] [blame] | 33 | const struct pt_regs *regs); |
Arve Hjønnevåg | e073df6 | 2014-05-02 19:52:54 -0700 | [diff] [blame] | 34 | void fiq_debugger_dump_stacktrace(struct fiq_debugger_output *output, |
Colin Cross | cffbe78 | 2014-04-02 18:42:13 -0700 | [diff] [blame] | 35 | const struct pt_regs *regs, unsigned int depth, void *ssp); |
| 36 | |
| 37 | #endif |