2
|
1 # -*- ksh -*-
|
|
2 # You can use this file to debug XEmacs using Sun WorkShop's dbx.
|
|
3 # Add the contents of this file to $HOME/.dbxrc or
|
|
4 # Source the contents of this file with something like:
|
|
5 # test -r ./dbxrc && . ./dbxrc
|
|
6
|
|
7 ignore POLL
|
|
8 ignore IO
|
|
9
|
|
10 function lbt {
|
|
11 call Fbacktrace (Qexternal_debugging_output, Qt)
|
|
12 }
|
|
13
|
|
14 function dp {
|
|
15 call debug_print ($1);
|
|
16 }
|
|
17
|
|
18 function xptr {
|
|
19 print ("$1"<<4) & 0xFFFFFFF)
|
|
20 }
|
|
21
|
|
22 function xint {
|
|
23 print ((int)($1 << 4))>>4;
|
|
24 }
|
|
25
|
|
26 #function xstring {
|
|
27 # print *(struct Lisp_String *) ($1 & 0xFFFFFFF);
|
|
28 # #print ((struct Lisp_String *) ($1 & 0xFFFFFFF))->_data;
|
|
29 #}
|
|
30
|
|
31 function xlisp {
|
|
32 print $1 ($2 & 0xFFFFFFF);
|
|
33 #print ((struct Lisp_String *) ($1 & 0xFFFFFFF))->_data;
|
|
34 }
|
|
35
|
|
36 function defxlisp {
|
|
37 eval "function $1 { print $2 (\$1 & 0xFFFFFFF) ; }"
|
|
38 }
|
|
39
|
|
40 function defxstruct {
|
|
41 defxlisp "$1" "*(struct $2 *)"
|
|
42 }
|
|
43
|
|
44 defxstruct xstring 'Lisp_String'
|
|
45 defxstruct xlstream 'lstream'
|
|
46 defxstruct xsubr 'Lisp_Subr'
|
|
47 defxstruct xbitvec 'Lisp_Bit_Vector'
|
|
48 defxstruct xbuffer 'buffer'
|
|
49 defxstruct xbytecode 'Lisp_Bytecode'
|
|
50 defxstruct xcharset 'Lisp_Charset'
|
|
51 defxstruct xchartab 'Lisp_Char_Table'
|
|
52 defxstruct xchartabentry 'Lisp_Char_Table_Entry'
|
|
53 defxstruct xcodesys 'Lisp_Coding_System'
|
|
54 defxstruct xcolorinst 'Lisp_Color_Instance'
|
|
55 defxstruct xcons 'Lisp_Cons'
|
|
56 defxstruct xdevice 'device'
|
|
57 defxstruct xevent 'Lisp_Event'
|
|
58 defxstruct xextent 'extent'
|
|
59 defxstruct xextentaux 'extent_auxilliary'
|
|
60 defxstruct xfloat 'Lisp_Float'
|
|
61 defxstruct xfontinst 'Lisp_Font_Instance'
|
|
62 defxstruct xframe 'frame'
|
|
63 defxstruct xglyph 'Lisp_Glyph'
|
|
64 defxstruct xhashtable 'hashtable_struct'
|
|
65 defxstruct ximageinst 'Lisp_Image_Instance'
|
|
66 defxstruct xkeymap 'keymap'
|
|
67 defxstruct xmarker 'Lisp_Marker'
|
|
68 defxstruct xmenubardata 'menubar_data'
|
|
69 defxstruct xopaque 'Lisp_Opaque'
|
|
70 defxstruct xprocess 'Lisp_Process'
|
|
71 defxstruct xrangetab 'Lisp_Range_Table'
|
|
72 defxstruct xspec 'Lisp_Specifier'
|
|
73 defxstruct xsubwindow 'Lisp_Subwindow'
|
|
74 defxstruct xsymbol 'Lisp_Symbol'
|
|
75 defxstruct xtoolbarbutton 'toolbar_button'
|
|
76 defxstruct xtoolbardata 'toolbar_data'
|
|
77 defxstruct xtooltalkmess 'Lisp_Tooltalk_Message'
|
|
78 defxstruct xtooltalkpatt 'Lisp_Tooltalk_Pattern'
|
|
79 defxstruct xvector 'Lisp_Vector'
|
|
80 defxstruct xwindow 'window'
|
|
81 defxstruct xwindowconfig 'window_config'
|
|
82
|
|
83 function pproc {
|
|
84 print *(`process.c`struct Lisp_Process*)$1 ;
|
|
85 dp "(`process.c`struct Lisp_Process*)$1->name" ;
|
|
86 dp "(`process.c`struct Lisp_Process*)$1->command" ;
|
|
87 }
|
|
88
|
|
89 function xtype {
|
|
90 print (enum Lisp_Type) (($1 >> 28) & 7)
|
|
91 }
|
|
92
|
|
93 dbxenv suppress_startup_message 4.0
|
|
94
|
|
95 function dp_args {
|
|
96 dp "*(((Lisp_Object*)($1))+0)"
|
|
97 dp "*(((Lisp_Object*)($1))+1)"
|
|
98 }
|
|
99
|
|
100 function dp_core {
|
|
101 print ((struct x_frame *)(((struct frame*)(Fselected_frame(Qnil)&0x00FFFFFF))->frame_data))->widget->core
|
|
102 }
|
|
103
|
|
104 # Barf!
|
|
105 function print_shell {
|
|
106 print *(`frame-x.c`TopLevelShellRec*) (((struct `frame-x.c`x_frame*) (((struct `frame-x.c`frame*) (Fselected_frame(Qnil)&0x00FFFFFF))->frame_data))->widget)
|
|
107 }
|