db_var.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /* $OpenBSD: db_var.h,v 1.11 2011/04/03 16:46:19 drahn Exp $ */
  2. /*
  3. * Copyright (c) 1996 Michael Shalayeff. All rights reserved.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions
  7. * are met:
  8. * 1. Redistributions of source code must retain the above copyright
  9. * notice, this list of conditions and the following disclaimer.
  10. * 2. Redistributions in binary form must reproduce the above copyright
  11. * notice, this list of conditions and the following disclaimer in the
  12. * documentation and/or other materials provided with the distribution.
  13. *
  14. * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  15. * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  16. * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  17. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  18. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  19. * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  20. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  21. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  22. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  23. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  24. */
  25. /*
  26. * Different parameters/structures/functions
  27. */
  28. #ifndef _DDB_DB_VAR_H_
  29. #define _DDB_DB_VAR_H_
  30. #ifndef DB_HISTORY_SIZE
  31. #define DB_HISTORY_SIZE 4000
  32. #endif
  33. #define DBCTL_RADIX 1
  34. #define DBCTL_MAXWIDTH 2
  35. #define DBCTL_MAXLINE 3
  36. #define DBCTL_TABSTOP 4
  37. #define DBCTL_PANIC 5
  38. #define DBCTL_CONSOLE 6
  39. #define DBCTL_LOG 7
  40. #define DBCTL_TRIGGER 8
  41. #define DBCTL_MAXID 9
  42. #define CTL_DDB_NAMES { \
  43. { NULL, 0 }, \
  44. { "radix", CTLTYPE_INT }, \
  45. { "max_width", CTLTYPE_INT }, \
  46. { "max_line", CTLTYPE_INT }, \
  47. { "tab_stop_width", CTLTYPE_INT },\
  48. { "panic", CTLTYPE_INT }, \
  49. { "console", CTLTYPE_INT }, \
  50. { "log", CTLTYPE_INT }, \
  51. { "trigger", CTLTYPE_INT }, \
  52. }
  53. #ifdef _KERNEL
  54. extern int db_radix;
  55. extern int db_max_width;
  56. extern int db_tab_stop_width;
  57. extern int db_max_line;
  58. extern int db_panic;
  59. extern int db_console;
  60. extern int db_log;
  61. extern int db_is_active;
  62. int ddb_sysctl(int *, u_int, void *, size_t *, void *, size_t,
  63. struct proc *);
  64. #endif
  65. #endif /* _DDB_DB_VAR_H_ */