debugger.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* Kernel debugger for MN10300
  2. *
  3. * Copyright (C) 2011 Red Hat, Inc. All Rights Reserved.
  4. * Written by David Howells (dhowells@redhat.com)
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public Licence
  8. * as published by the Free Software Foundation; either version
  9. * 2 of the Licence, or (at your option) any later version.
  10. */
  11. #ifndef _ASM_DEBUGGER_H
  12. #define _ASM_DEBUGGER_H
  13. #if defined(CONFIG_KERNEL_DEBUGGER)
  14. extern int debugger_intercept(enum exception_code, int, int, struct pt_regs *);
  15. extern int at_debugger_breakpoint(struct pt_regs *);
  16. #ifndef CONFIG_MN10300_DEBUGGER_CACHE_NO_FLUSH
  17. extern void debugger_local_cache_flushinv(void);
  18. extern void debugger_local_cache_flushinv_one(u8 *);
  19. #else
  20. static inline void debugger_local_cache_flushinv(void) {}
  21. static inline void debugger_local_cache_flushinv_one(u8 *addr) {}
  22. #endif
  23. #else /* CONFIG_KERNEL_DEBUGGER */
  24. static inline int debugger_intercept(enum exception_code excep,
  25. int signo, int si_code,
  26. struct pt_regs *regs)
  27. {
  28. return 0;
  29. }
  30. static inline int at_debugger_breakpoint(struct pt_regs *regs)
  31. {
  32. return 0;
  33. }
  34. #endif /* CONFIG_KERNEL_DEBUGGER */
  35. #endif /* _ASM_DEBUGGER_H */