comparison src/.gdbinit @ 69679:7a7755ff46ed

(pr, pp, pp1, pv, pv1): Force print_output_debug_flag to zero before calling debug_print or safe_debug_print.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 25 Mar 2006 18:00:51 +0000
parents faf10626ffee
children 039ae41bde1a c1e013e3dc0e e6bf73e43cf4
comparison
equal deleted inserted replaced
69678:551e94bacb60 69679:7a7755ff46ed
56 set $bugfix = $arg0 56 set $bugfix = $arg0
57 set $type = gdb_use_union ? $bugfix.s.type : (enum Lisp_Type) (gdb_use_lsb ? $bugfix & $tagmask : $bugfix >> gdb_valbits) 57 set $type = gdb_use_union ? $bugfix.s.type : (enum Lisp_Type) (gdb_use_lsb ? $bugfix & $tagmask : $bugfix >> gdb_valbits)
58 end 58 end
59 59
60 # Set up something to print out s-expressions. 60 # Set up something to print out s-expressions.
61 # We save and restore print_output_debug_flag to prevent the w32 port
62 # from calling OutputDebugString, which causes GDB to display each
63 # character twice (yuk!).
61 define pr 64 define pr
65 set $output_debug = print_output_debug_flag
66 set print_output_debug_flag = 0
62 set debug_print ($) 67 set debug_print ($)
68 set print_output_debug_flag = $output_debug
63 end 69 end
64 document pr 70 document pr
65 Print the emacs s-expression which is $. 71 Print the emacs s-expression which is $.
66 Works only when an inferior emacs is executing. 72 Works only when an inferior emacs is executing.
67 end 73 end
68 74
69 # Print out s-expressions 75 # Print out s-expressions
70 define pp 76 define pp
71 set $tmp = $arg0 77 set $tmp = $arg0
78 set $output_debug = print_output_debug_flag
79 set print_output_debug_flag = 0
72 set safe_debug_print ($tmp) 80 set safe_debug_print ($tmp)
81 set print_output_debug_flag = $output_debug
73 end 82 end
74 document pp 83 document pp
75 Print the argument as an emacs s-expression 84 Print the argument as an emacs s-expression
76 Works only when an inferior emacs is executing. 85 Works only when an inferior emacs is executing.
77 end 86 end
79 # Print out s-expressions from tool bar 88 # Print out s-expressions from tool bar
80 define pp1 89 define pp1
81 set $tmp = $arg0 90 set $tmp = $arg0
82 echo $arg0 91 echo $arg0
83 printf " = " 92 printf " = "
93 set $output_debug = print_output_debug_flag
94 set print_output_debug_flag = 0
84 set safe_debug_print ($tmp) 95 set safe_debug_print ($tmp)
96 set print_output_debug_flag = $output_debug
85 end 97 end
86 document pp1 98 document pp1
87 Print the argument as an emacs s-expression 99 Print the argument as an emacs s-expression
88 Works only when an inferior emacs is executing. 100 Works only when an inferior emacs is executing.
89 For use on tool bar when debugging in Emacs 101 For use on tool bar when debugging in Emacs
92 end 104 end
93 105
94 # Print value of lisp variable 106 # Print value of lisp variable
95 define pv 107 define pv
96 set $tmp = "$arg0" 108 set $tmp = "$arg0"
109 set $output_debug = print_output_debug_flag
110 set print_output_debug_flag = 0
97 set safe_debug_print ( find_symbol_value (intern ($tmp))) 111 set safe_debug_print ( find_symbol_value (intern ($tmp)))
112 set print_output_debug_flag = $output_debug
98 end 113 end
99 document pv 114 document pv
100 Print the value of the lisp variable given as argument. 115 Print the value of the lisp variable given as argument.
101 Works only when an inferior emacs is executing. 116 Works only when an inferior emacs is executing.
102 end 117 end
104 # Print value of lisp variable 119 # Print value of lisp variable
105 define pv1 120 define pv1
106 set $tmp = "$arg0" 121 set $tmp = "$arg0"
107 echo $arg0 122 echo $arg0
108 printf " = " 123 printf " = "
124 set $output_debug = print_output_debug_flag
125 set print_output_debug_flag = 0
109 set safe_debug_print (find_symbol_value (intern ($tmp))) 126 set safe_debug_print (find_symbol_value (intern ($tmp)))
127 set print_output_debug_flag = $output_debug
110 end 128 end
111 document pv1 129 document pv1
112 Print the value of the lisp variable given as argument. 130 Print the value of the lisp variable given as argument.
113 Works only when an inferior emacs is executing. 131 Works only when an inferior emacs is executing.
114 For use on tool bar when debugging in Emacs 132 For use on tool bar when debugging in Emacs