mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
staging: android: Add generic fiq serial debugger
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com> Change-Id: I6c0e1a17c45f077b45cb29287648e901b62abab0
This commit is contained in:
@@ -27,6 +27,8 @@ config DEBUG_KINFO
|
||||
|
||||
source "drivers/staging/android/ion/Kconfig"
|
||||
|
||||
source "drivers/staging/android/fiq_debugger/Kconfig"
|
||||
|
||||
endif # if ANDROID
|
||||
|
||||
endmenu
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
ccflags-y += -I$(src) # needed for trace events
|
||||
|
||||
obj-y += ion/
|
||||
obj-$(CONFIG_FIQ_DEBUGGER) += fiq_debugger/
|
||||
|
||||
obj-$(CONFIG_ASHMEM) += ashmem.o
|
||||
obj-$(CONFIG_DEBUG_KINFO) += debug_kinfo.o
|
||||
|
||||
@@ -599,7 +599,7 @@ static bool fiq_debugger_fiq_exec(struct fiq_debugger_state *state,
|
||||
unsigned long va_start;
|
||||
|
||||
#ifdef CONFIG_ARM64
|
||||
va_start = VA_START;
|
||||
va_start = PAGE_END;
|
||||
#else
|
||||
va_start = PAGE_OFFSET;
|
||||
#endif
|
||||
|
||||
@@ -212,7 +212,7 @@ static struct frame_tail *user_backtrace(struct fiq_debugger_output *output,
|
||||
struct frame_tail buftail[2];
|
||||
|
||||
/* Also check accessibility of one struct frame_tail beyond */
|
||||
if (!access_ok(VERIFY_READ, tail, sizeof(buftail))) {
|
||||
if (!access_ok(tail, sizeof(buftail))) {
|
||||
output->printf(output, " invalid frame pointer %px\n",
|
||||
tail);
|
||||
return NULL;
|
||||
|
||||
@@ -157,21 +157,18 @@ struct stacktrace_state {
|
||||
unsigned int depth;
|
||||
};
|
||||
|
||||
static int report_trace(struct stackframe *frame, void *d)
|
||||
static bool report_trace(void *data, unsigned long pc)
|
||||
{
|
||||
struct stacktrace_state *sts = d;
|
||||
struct stacktrace_state *sts = data;
|
||||
|
||||
if (sts->depth) {
|
||||
sts->output->printf(sts->output, "%pF:\n", frame->pc);
|
||||
sts->output->printf(sts->output,
|
||||
" pc %016lx fp %016lx\n",
|
||||
frame->pc, frame->fp);
|
||||
sts->output->printf(sts->output, "[<%016lx>] %pS:\n", pc, pc);
|
||||
sts->depth--;
|
||||
return 0;
|
||||
return true;
|
||||
}
|
||||
sts->output->printf(sts->output, " ...\n");
|
||||
|
||||
return sts->depth == 0;
|
||||
return sts->depth != 0;
|
||||
}
|
||||
|
||||
void fiq_debugger_dump_stacktrace(struct fiq_debugger_output *output,
|
||||
|
||||
Reference in New Issue
Block a user