404

[ Avaa Bypassed ]




Upload:

Command:

botdev@3.14.251.36: ~ $
/* gdb-stub.h: FRV GDB stub
 *
 * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
 * Written by David Howells (dhowells@redhat.com)
 * - Derived from asm-mips/gdb-stub.h (c) 1995 Andreas Busse
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version
 * 2 of the License, or (at your option) any later version.
 */
#ifndef __ASM_GDB_STUB_H
#define __ASM_GDB_STUB_H

#undef GDBSTUB_DEBUG_IO
#undef GDBSTUB_DEBUG_PROTOCOL

#include <asm/ptrace.h>

/*
 * important register numbers in GDB protocol
 * - GR0,  GR1,  GR2,  GR3,  GR4,  GR5,  GR6,  GR7,
 * - GR8,  GR9,  GR10, GR11, GR12, GR13, GR14, GR15,
 * - GR16, GR17, GR18, GR19, GR20, GR21, GR22, GR23,
 * - GR24, GR25, GR26, GR27, GR28, GR29, GR30, GR31,
 * - GR32, GR33, GR34, GR35, GR36, GR37, GR38, GR39,
 * - GR40, GR41, GR42, GR43, GR44, GR45, GR46, GR47,
 * - GR48, GR49, GR50, GR51, GR52, GR53, GR54, GR55,
 * - GR56, GR57, GR58, GR59, GR60, GR61, GR62, GR63,
 * - FR0,  FR1,  FR2,  FR3,  FR4,  FR5,  FR6,  FR7,
 * - FR8,  FR9,  FR10, FR11, FR12, FR13, FR14, FR15,
 * - FR16, FR17, FR18, FR19, FR20, FR21, FR22, FR23,
 * - FR24, FR25, FR26, FR27, FR28, FR29, FR30, FR31,
 * - FR32, FR33, FR34, FR35, FR36, FR37, FR38, FR39,
 * - FR40, FR41, FR42, FR43, FR44, FR45, FR46, FR47,
 * - FR48, FR49, FR50, FR51, FR52, FR53, FR54, FR55,
 * - FR56, FR57, FR58, FR59, FR60, FR61, FR62, FR63,
 * - PC, PSR, CCR, CCCR,
 * - _X132, _X133, _X134
 * - TBR, BRR, DBAR0, DBAR1, DBAR2, DBAR3,
 * - SCR0, SCR1, SCR2, SCR3,
 * - LR, LCR,
 * - IACC0H, IACC0L,
 * - FSR0,
 * - ACC0, ACC1, ACC2, ACC3, ACC4, ACC5, ACC6, ACC7,
 * - ACCG0123, ACCG4567,
 * - MSR0, MSR1,
 * - GNER0, GNER1,
 * - FNER0, FNER1,
 */
#define GDB_REG_GR(N)	(N)
#define GDB_REG_FR(N)	(64+(N))
#define GDB_REG_PC	128
#define GDB_REG_PSR	129
#define GDB_REG_CCR	130
#define GDB_REG_CCCR	131
#define GDB_REG_TBR	135
#define GDB_REG_BRR	136
#define GDB_REG_DBAR(N)	(137+(N))
#define GDB_REG_SCR(N)	(141+(N))
#define GDB_REG_LR	145
#define GDB_REG_LCR	146
#define GDB_REG_FSR0	149
#define GDB_REG_ACC(N)	(150+(N))
#define GDB_REG_ACCG(N)	(158+(N)/4)
#define GDB_REG_MSR(N)	(160+(N))
#define GDB_REG_GNER(N)	(162+(N))
#define GDB_REG_FNER(N)	(164+(N))

#define GDB_REG_SP	GDB_REG_GR(1)
#define GDB_REG_FP	GDB_REG_GR(2)

#ifndef _LANGUAGE_ASSEMBLY

/*
 * Prototypes
 */
extern void show_registers_only(struct pt_regs *regs);

extern void gdbstub_init(void);
extern void gdbstub(int type);
extern void gdbstub_exit(int status);

extern void gdbstub_io_init(void);
extern void gdbstub_set_baud(unsigned baud);
extern int gdbstub_rx_char(unsigned char *_ch, int nonblock);
extern void gdbstub_tx_char(unsigned char ch);
extern void gdbstub_tx_flush(void);
extern void gdbstub_do_rx(void);

extern asmlinkage void __debug_stub_init_break(void);
extern asmlinkage void __break_hijack_kernel_event(void);
extern asmlinkage void __break_hijack_kernel_event_breaks_here(void);

extern asmlinkage void gdbstub_rx_handler(void);
extern asmlinkage void gdbstub_rx_irq(void);
extern asmlinkage void gdbstub_intercept(void);

extern uint32_t __entry_usertrap_table[];
extern uint32_t __entry_kerneltrap_table[];

extern volatile u8	gdbstub_rx_buffer[PAGE_SIZE];
extern volatile u32	gdbstub_rx_inp;
extern volatile u32	gdbstub_rx_outp;
extern volatile u8	gdbstub_rx_overflow;
extern u8		gdbstub_rx_unget;

extern void gdbstub_printk(const char *fmt, ...);
extern void debug_to_serial(const char *p, int n);
extern void console_set_baud(unsigned baud);

#ifdef GDBSTUB_DEBUG_IO
#define gdbstub_io(FMT,...) gdbstub_printk(FMT, ##__VA_ARGS__)
#else
#define gdbstub_io(FMT,...) ({ 0; })
#endif

#ifdef GDBSTUB_DEBUG_PROTOCOL
#define gdbstub_proto(FMT,...) gdbstub_printk(FMT,##__VA_ARGS__)
#else
#define gdbstub_proto(FMT,...) ({ 0; })
#endif

/*
 * we dedicate GR31 to keeping a pointer to the gdbstub exception frame
 * - gr31 is destroyed on entry to the gdbstub if !MMU
 * - gr31 is saved in scr3 on entry to the gdbstub if in !MMU
 */
register struct frv_frame0 *__debug_frame0 asm("gr31");

#define __debug_frame		(&__debug_frame0->regs)
#define __debug_user_context	(&__debug_frame0->uc)
#define __debug_regs		(&__debug_frame0->debug)
#define __debug_reg(X)		((unsigned long *) ((unsigned long) &__debug_frame0 + (X)))

struct frv_debug_status {
	unsigned long		bpsr;
	unsigned long		dcr;
	unsigned long		brr;
	unsigned long		nmar;
};

extern struct frv_debug_status __debug_status;

#endif /* _LANGUAGE_ASSEMBLY */
#endif /* __ASM_GDB_STUB_H */

Filemanager

Name Type Size Permission Actions
Kbuild File 290 B 0644
asm-offsets.h File 35 B 0644
atomic.h File 4.97 KB 0644
atomic_defs.h File 4.66 KB 0644
ax88796.h File 751 B 0644
barrier.h File 720 B 0644
bitops.h File 7.12 KB 0644
bug.h File 1.36 KB 0644
bugs.h File 445 B 0644
busctl-regs.h File 2.02 KB 0644
cache.h File 727 B 0644
cacheflush.h File 3.05 KB 0644
checksum.h File 4.53 KB 0644
cmpxchg.h File 4.56 KB 0644
cpu-irqs.h File 2.59 KB 0644
current.h File 685 B 0644
delay.h File 1.28 KB 0644
div64.h File 31 B 0644
dm9000.h File 1.12 KB 0644
dma-mapping.h File 448 B 0644
dma.h File 3.63 KB 0644
elf.h File 5.18 KB 0644
emergency-restart.h File 149 B 0644
fpu.h File 261 B 0644
ftrace.h File 12 B 0644
futex.h File 416 B 0644
gdb-stub.h File 4.47 KB 0644
gpio-regs.h File 3.64 KB 0644
hardirq.h File 666 B 0644
highmem.h File 4.09 KB 0644
hw_irq.h File 484 B 0644
io.h File 9.75 KB 0644
irc-regs.h File 1.78 KB 0644
irq.h File 760 B 0644
irq_regs.h File 764 B 0644
irqflags.h File 3.71 KB 0644
kdebug.h File 32 B 0644
kmap_types.h File 123 B 0644
linkage.h File 114 B 0644
local.h File 140 B 0644
local64.h File 33 B 0644
math-emu.h File 6.38 KB 0644
mb-regs.h File 6.94 KB 0644
mb86943a.h File 1.84 KB 0644
mb93091-fpga-irqs.h File 1.06 KB 0644
mb93093-fpga-irqs.h File 789 B 0644
mb93493-irqs.h File 1.69 KB 0644
mb93493-regs.h File 12.46 KB 0644
mem-layout.h File 2.21 KB 0644
mmu.h File 1.26 KB 0644
mmu_context.h File 1.38 KB 0644
module.h File 617 B 0644
page.h File 2.08 KB 0644
pci.h File 1.23 KB 0644
percpu.h File 147 B 0644
perf_event.h File 487 B 0644
pgalloc.h File 1.87 KB 0644
pgtable.h File 16.02 KB 0644
processor.h File 2.85 KB 0644
ptrace.h File 1.2 KB 0644
sections.h File 1.1 KB 0644
segment.h File 1.08 KB 0644
serial-regs.h File 1.63 KB 0644
serial.h File 308 B 0644
setup.h File 641 B 0644
shmparam.h File 183 B 0644
signal.h File 141 B 0644
smp.h File 139 B 0644
spinlock.h File 516 B 0644
spr-regs.h File 17.93 KB 0644
string.h File 1.36 KB 0644
switch_to.h File 1.07 KB 0644
syscall.h File 2.73 KB 0644
termios.h File 425 B 0644
thread_info.h File 3.48 KB 0644
timer-regs.h File 3.63 KB 0644
timex.h File 720 B 0644
tlb.h File 615 B 0644
tlbflush.h File 1.88 KB 0644
topology.h File 229 B 0644
types.h File 595 B 0644
uaccess.h File 6.79 KB 0644
ucontext.h File 281 B 0644
unaligned.h File 694 B 0644
unistd.h File 928 B 0644
user.h File 3.29 KB 0644
vga.h File 464 B 0644
virtconvert.h File 1.09 KB 0644
xor.h File 29 B 0644