comparison src/.dbxrc @ 442:abe6d1db359e r21-2-36

Import from CVS: tag r21-2-36
author cvs
date Mon, 13 Aug 2007 11:35:02 +0200
parents 8de8e3f6228a
children 3d3049ae1304
comparison
equal deleted inserted replaced
441:72a7cfa4a488 442:abe6d1db359e
62 62
63 function ldp { 63 function ldp {
64 call debug_print ($1); 64 call debug_print ($1);
65 } 65 }
66 66
67 Lisp_Type_Int=-2
68
67 # A bug in dbx prevents string variables from having values beginning with `-'!! 69 # A bug in dbx prevents string variables from having values beginning with `-'!!
68 function XEmacsInit { 70 function XEmacsInit {
69 function ToInt { eval "$1=\$[(int) \`alloc.c\`$1]"; } 71 function ToInt { eval "$1=\$[(int) \`alloc.c\`$1]"; }
70 ToInt dbg_USE_UNION_TYPE 72 ToInt dbg_USE_UNION_TYPE
71 ToInt Lisp_Type_Int
72 ToInt Lisp_Type_Char 73 ToInt Lisp_Type_Char
73 ToInt Lisp_Type_Cons
74 ToInt Lisp_Type_String
75 ToInt Lisp_Type_Vector
76 ToInt Lisp_Type_Symbol
77 ToInt Lisp_Type_Record 74 ToInt Lisp_Type_Record
78 ToInt dbg_valbits 75 ToInt dbg_valbits
79 ToInt dbg_gctypebits 76 ToInt dbg_gctypebits
80 function ToLong { eval "$1=\$[(\`alloc.c\`unsigned long) \`alloc.c\`$1]"; } 77 function ToLong { eval "$1=\$[(\`alloc.c\`unsigned long) \`alloc.c\`$1]"; }
81 ToLong dbg_valmask 78 ToLong dbg_valmask
120 if test "$val" = "(nil)"; then type=null_pointer; fi 117 if test "$val" = "(nil)"; then type=null_pointer; fi
121 fi 118 fi
122 fi 119 fi
123 120
124 if test $type = $Lisp_Type_Record; then 121 if test $type = $Lisp_Type_Record; then
125 typeset lheader="((struct lrecord_header *) $val)" 122 lheader="((struct lrecord_header *) $val)"
123 lrecord_type=$[(enum lrecord_type) $lheader->type]
126 imp=$[(void*)(`alloc.c`lrecord_implementations_table[$lheader->type])] 124 imp=$[(void*)(`alloc.c`lrecord_implementations_table[$lheader->type])]
127 else 125 else
126 lheader="((struct lrecord_header *) -1)"
127 lrecord_type=-1
128 imp="0xdeadbeef" 128 imp="0xdeadbeef"
129 fi 129 fi
130 # printvar obj val type imp 130 # printvar obj val type imp
131 } 131 }
132 132
142 142
143 function xtype { 143 function xtype {
144 decode_object "$*" 144 decode_object "$*"
145 if test $type = $Lisp_Type_Int; then echo "int" 145 if test $type = $Lisp_Type_Int; then echo "int"
146 elif test $type = $Lisp_Type_Char; then echo "char" 146 elif test $type = $Lisp_Type_Char; then echo "char"
147 elif test $type = $Lisp_Type_Symbol; then echo "symbol"
148 elif test $type = $Lisp_Type_String; then echo "string"
149 elif test $type = $Lisp_Type_Vector; then echo "vector"
150 elif test $type = $Lisp_Type_Cons; then echo "cons"
151 elif test $type = null_pointer; then echo "null_pointer" 147 elif test $type = null_pointer; then echo "null_pointer"
152 else 148 else
153 echo "record type with name: $[((struct lrecord_implementation *)$imp)->name]" 149 echo "record type with name: $[((struct lrecord_implementation *)$imp)->name]"
154 fi 150 fi
155 } 151 }
218 function dump-temacs { 214 function dump-temacs {
219 environment-to-run-temacs 215 environment-to-run-temacs
220 run -batch -l ../lisp/loadup.el dump 216 run -batch -l ../lisp/loadup.el dump
221 } 217 }
222 218
223 function pstruct { 219 function pstruct { # pstruct foo.c struct-name
224 xstruct="((struct $1 *) $val)" 220 module "$1" > /dev/null
225 print $xstruct 221 type_ptr="((struct $2 *) $val)"
226 print *$xstruct 222 print $type_ptr
227 } 223 print *$type_ptr
228
229 function lrecord_type_p {
230 if eval test -z \"\$lrecord_$1\" && test $imp = $[(void*)(&lrecord_$1)]; then return 0; else return 1; fi
231 } 224 }
232 225
233 document pobj << 'end' 226 document pobj << 'end'
234 Usage: pobj lisp_object 227 Usage: pobj lisp_object
235 Print the internal C representation of a Lisp Object. 228 Print the internal C representation of a Lisp Object.
243 if test $[$val > 32 && $val < 128] = 1; then 236 if test $[$val > 32 && $val < 128] = 1; then
244 print -f"Char: %c" $val 237 print -f"Char: %c" $val
245 else 238 else
246 print -f"Char: %d" $val 239 print -f"Char: %d" $val
247 fi 240 fi
248 elif test $type = $Lisp_Type_String || lrecord_type_p string; then 241 elif test $lrecord_type = lrecord_type_string; then
249 pstruct Lisp_String 242 pstruct alloc.c Lisp_String
250 elif test $type = $Lisp_Type_Cons || lrecord_type_p cons; then 243 elif test $lrecord_type = lrecord_type_cons; then
251 pstruct Lisp_Cons 244 pstruct alloc.c Lisp_Cons
252 elif test $type = $Lisp_Type_Symbol || lrecord_type_p symbol; then 245 elif test $lrecord_type = lrecord_type_symbol; then
253 pstruct Lisp_Symbol 246 pstruct symbols.c Lisp_Symbol
254 echo "Symbol name: $[(char *)($xstruct->name->data)]" 247 echo "Symbol name: $[(char *)($type_ptr->name->data)]"
255 elif test $type = $Lisp_Type_Vector || lrecord_type_p vector; then 248 elif test $lrecord_type = lrecord_type_vector; then
256 pstruct Lisp_Vector 249 pstruct alloc.c Lisp_Vector
257 echo "Vector of length $[$xstruct->size]" 250 echo "Vector of length $[$type_ptr->size]"
258 elif lrecord_type_p bit_vector; then 251 elif test $lrecord_type = lrecord_type_bit_vector; then
259 pstruct Lisp_Bit_Vector 252 pstruct fns.c Lisp_Bit_Vector
260 elif lrecord_type_p buffer; then 253 elif test $lrecord_type = lrecord_type_buffer; then
261 pstruct buffer 254 pstruct buffer.c buffer
262 elif lrecord_type_p char_table; then 255 elif test $lrecord_type = lrecord_type_char_table; then
263 pstruct Lisp_Char_Table 256 pstruct chartab.c Lisp_Char_Table
264 elif lrecord_type_p char_table_entry; then 257 elif test $lrecord_type = lrecord_type_char_table_entry; then
265 pstruct Lisp_Char_Table_Entry 258 pstruct chartab.c Lisp_Char_Table_Entry
266 elif lrecord_type_p charset; then 259 elif test $lrecord_type = lrecord_type_charset; then
267 pstruct Lisp_Charset 260 pstruct mule-charset.c Lisp_Charset
268 elif lrecord_type_p coding_system; then 261 elif test $lrecord_type = lrecord_type_coding_system; then
269 pstruct Lisp_Coding_System 262 pstruct file-coding.c Lisp_Coding_System
270 elif lrecord_type_p color_instance; then 263 elif test $lrecord_type = lrecord_type_color_instance; then
271 pstruct Lisp_Color_Instance 264 pstruct objects.c Lisp_Color_Instance
272 elif lrecord_type_p command_builder; then 265 elif test $lrecord_type = lrecord_type_command_builder; then
273 pstruct command_builder 266 pstruct event-stream.c command_builder
274 elif lrecord_type_p compiled_function; then 267 elif test $lrecord_type = lrecord_type_compiled_function; then
275 pstruct Lisp_Compiled_Function 268 pstruct bytecode.c Lisp_Compiled_Function
276 elif lrecord_type_p console; then 269 elif test $lrecord_type = lrecord_type_console; then
277 pstruct console 270 pstruct console.c console
278 elif lrecord_type_p database; then 271 elif test $lrecord_type = lrecord_type_database; then
279 pstruct Lisp_Database 272 pstruct database.c Lisp_Database
280 elif lrecord_type_p device; then 273 elif test $lrecord_type = lrecord_type_device; then
281 pstruct device 274 pstruct device.c device
282 elif lrecord_type_p event; then 275 elif test $lrecord_type = lrecord_type_event; then
283 pstruct Lisp_Event 276 pstruct events.c Lisp_Event
284 elif lrecord_type_p extent; then 277 elif test $lrecord_type = lrecord_type_extent; then
285 pstruct extent 278 pstruct extents.c extent
286 elif lrecord_type_p extent_auxiliary; then 279 elif test $lrecord_type = lrecord_type_extent_auxiliary; then
287 pstruct extent_auxiliary 280 pstruct extents.c extent_auxiliary
288 elif lrecord_type_p extent_info; then 281 elif test $lrecord_type = lrecord_type_extent_info; then
289 pstruct extent_info 282 pstruct extents.c extent_info
290 elif lrecord_type_p face; then 283 elif test $lrecord_type = lrecord_type_face; then
291 pstruct Lisp_Face 284 pstruct faces.c Lisp_Face
292 elif lrecord_type_p float; then 285 elif test $lrecord_type = lrecord_type_float; then
293 pstruct Lisp_Float 286 pstruct floatfns.c Lisp_Float
294 elif lrecord_type_p font_instance; then 287 elif test $lrecord_type = lrecord_type_font_instance; then
295 pstruct Lisp_Font_Instance 288 pstruct objects.c Lisp_Font_Instance
296 elif lrecord_type_p frame; then 289 elif test $lrecord_type = lrecord_type_frame; then
297 pstruct frame 290 pstruct frame.c frame
298 elif lrecord_type_p glyph; then 291 elif test $lrecord_type = lrecord_type_glyph; then
299 pstruct Lisp_Glyph 292 pstruct glyph.c Lisp_Glyph
300 elif lrecord_type_p hash_table; then 293 elif test $lrecord_type = lrecord_type_gui_item; then
301 pstruct Lisp_Hash_Table 294 pstruct gui.c Lisp_Gui_Item
302 elif lrecord_type_p image_instance; then 295 elif test $lrecord_type = lrecord_type_hash_table; then
303 pstruct Lisp_Image_Instance 296 pstruct elhash.c Lisp_Hash_Table
304 elif lrecord_type_p keymap; then 297 elif test $lrecord_type = lrecord_type_image_instance; then
305 pstruct Lisp_Keymap 298 pstruct glyphs.c Lisp_Image_Instance
306 elif lrecord_type_p lcrecord_list; then 299 elif test $lrecord_type = lrecord_type_keymap; then
307 pstruct lcrecord_list 300 pstruct keymap.c Lisp_Keymap
308 elif lrecord_type_p lstream; then 301 elif test $lrecord_type = lrecord_type_lcrecord_list; then
309 pstruct lstream 302 pstruct alloc.c lcrecord_list
310 elif lrecord_type_p marker; then 303 elif test $lrecord_type = lrecord_type_ldap; then
311 pstruct Lisp_Marker 304 pstruct ldap.c Lisp_LDAP
312 elif lrecord_type_p opaque; then 305 elif test $lrecord_type = lrecord_type_lstream; then
313 pstruct Lisp_Opaque 306 pstruct lstream.c lstream
314 elif lrecord_type_p opaque_ptr; then 307 elif test $lrecord_type = lrecord_type_marker; then
315 pstruct Lisp_Opaque_Ptr 308 pstruct marker.c Lisp_Marker
316 elif lrecord_type_p popup_data; then 309 elif test $lrecord_type = lrecord_type_opaque; then
317 pstruct popup_data 310 pstruct opaque.c Lisp_Opaque
318 elif lrecord_type_p process; then 311 elif test $lrecord_type = lrecord_type_opaque_ptr; then
319 pstruct Lisp_Process 312 pstruct opaque.c Lisp_Opaque_Ptr
320 elif lrecord_type_p range_table; then 313 elif test $lrecord_type = lrecord_type_popup_data; then
321 pstruct Lisp_Range_Table 314 pstruct gui-x.c popup_data
322 elif lrecord_type_p specifier; then 315 elif test $lrecord_type = lrecord_type_process; then
323 pstruct Lisp_Specifier 316 pstruct process.c Lisp_Process
324 elif lrecord_type_p subr; then 317 elif test $lrecord_type = lrecord_type_range_table; then
325 pstruct Lisp_Subr 318 pstruct rangetab.c Lisp_Range_Table
326 elif lrecord_type_p symbol_value_buffer_local; then 319 elif test $lrecord_type = lrecord_type_specifier; then
327 pstruct symbol_value_buffer_local 320 pstruct specifier.c Lisp_Specifier
328 elif lrecord_type_p symbol_value_forward; then 321 elif test $lrecord_type = lrecord_type_subr; then
329 pstruct symbol_value_forward 322 pstruct eval.c Lisp_Subr
330 elif lrecord_type_p symbol_value_lisp_magic; then 323 elif test $lrecord_type = lrecord_type_symbol_value_buffer_local; then
331 pstruct symbol_value_lisp_magic 324 pstruct symbols.c symbol_value_buffer_local
332 elif lrecord_type_p symbol_value_varalias; then 325 elif test $lrecord_type = lrecord_type_symbol_value_forward; then
333 pstruct symbol_value_varalias 326 pstruct symbols.c symbol_value_forward
334 elif lrecord_type_p toolbar_button; then 327 elif test $lrecord_type = lrecord_type_symbol_value_lisp_magic; then
335 pstruct toolbar_button 328 pstruct symbols.c symbol_value_lisp_magic
336 elif lrecord_type_p tooltalk_message; then 329 elif test $lrecord_type = lrecord_type_symbol_value_varalias; then
337 pstruct Lisp_Tooltalk_Message 330 pstruct symbols.c symbol_value_varalias
338 elif lrecord_type_p tooltalk_pattern; then 331 elif test $lrecord_type = lrecord_type_timeout; then
339 pstruct Lisp_Tooltalk_Pattern 332 pstruct event-stream.c Lisp_Timeout
340 elif lrecord_type_p weak_list; then 333 elif test $lrecord_type = lrecord_type_toolbar_button; then
341 pstruct weak_list 334 pstruct toolbar.c toolbar_button
342 elif lrecord_type_p window; then 335 elif test $lrecord_type = lrecord_type_tooltalk_message; then
343 pstruct window 336 pstruct tooltalk.c Lisp_Tooltalk_Message
344 elif lrecord_type_p window_configuration; then 337 elif test $lrecord_type = lrecord_type_tooltalk_pattern; then
345 pstruct window_config 338 pstruct tooltalk.c Lisp_Tooltalk_Pattern
339 elif test $lrecord_type = lrecord_type_weak_list; then
340 pstruct data.c weak_list
341 elif test $lrecord_type = lrecord_type_window; then
342 pstruct window.c window
343 elif test $lrecord_type = lrecord_type_window_configuration; then
344 pstruct window.c window_config
346 elif test "$type" = "null_pointer"; then 345 elif test "$type" = "null_pointer"; then
347 echo "Lisp Object is a null pointer!!" 346 echo "Lisp Object is a null pointer!!"
348 else 347 else
349 echo "Unknown Lisp Object type" 348 echo "Unknown Lisp Object type"
350 print $1 349 print $1
351 fi 350 fi
352 } 351 }
353 352
354 function pproc {
355 print *(`process.c`struct Lisp_Process*)$1 ;
356 ldp "(`process.c`struct Lisp_Process*)$1->name" ;
357 ldp "(`process.c`struct Lisp_Process*)$1->command" ;
358 }
359
360 dbxenv suppress_startup_message 4.0 353 dbxenv suppress_startup_message 4.0
361 dbxenv mt_watchpoints on 354 # dbxenv mt_watchpoints on
362 355
363 function dp_core { 356 function dp_core {
364 print ((struct x_frame *)(((struct frame*)(Fselected_frame(Qnil)&0x00FFFFFF))->frame_data))->widget->core 357 print ((struct x_frame *)(((struct frame*)(Fselected_frame(Qnil)&0x00FFFFFF))->frame_data))->widget->core
365 } 358 }
366 359