Skip to content

Commit

Permalink
sh: Add a simple code dumper for SUPERH32 show_regs().
Browse files Browse the repository at this point in the history
This implements a simple show_code() that is in turn plugged in to
show_regs() to provide minimal code dumping at the end of the trace.

Built on top of a simple instruction disassembler derived from the
binutils opcode table.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Paul Mundt committed Dec 22, 2008
1 parent edfd6da commit 9cfc9a9
Show file tree
Hide file tree
Showing 4 changed files with 579 additions and 3 deletions.
1 change: 1 addition & 0 deletions arch/sh/include/asm/processor_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ static __inline__ void enable_fpu(void)

void show_trace(struct task_struct *tsk, unsigned long *sp,
struct pt_regs *regs);
void show_code(struct pt_regs *regs);
extern unsigned long get_wchan(struct task_struct *p);

#define KSTK_EIP(tsk) (task_pt_regs(tsk)->pc)
Expand Down
7 changes: 4 additions & 3 deletions arch/sh/kernel/Makefile_32
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ ifdef CONFIG_FUNCTION_TRACER
CFLAGS_REMOVE_ftrace.o = -pg
endif

obj-y := debugtraps.o io.o io_generic.o irq.o machvec.o process_32.o \
ptrace_32.o setup.o signal_32.o sys_sh.o sys_sh32.o \
syscalls_32.o time_32.o topology.o traps.o traps_32.o
obj-y := debugtraps.o disassemble.o io.o io_generic.o irq.o \
machvec.o process_32.o ptrace_32.o setup.o signal_32.o \
sys_sh.o sys_sh32.o syscalls_32.o time_32.o topology.o \
traps.o traps_32.o

obj-y += cpu/ timers/
obj-$(CONFIG_VSYSCALL) += vsyscall/
Expand Down
Loading

0 comments on commit 9cfc9a9

Please sign in to comment.