diff options
| author | Richard M. Stallman | 1998-05-10 01:13:11 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-05-10 01:13:11 +0000 |
| commit | 14a8902aad57782a0f781405a561efe839b5c7f3 (patch) | |
| tree | 4b64f312e127f6a3456c6ef0b170983446bd332b /src | |
| parent | e6b506397310455f7aee813dd29f196bd702e411 (diff) | |
| download | emacs-14a8902aad57782a0f781405a561efe839b5c7f3.tar.gz emacs-14a8902aad57782a0f781405a561efe839b5c7f3.zip | |
(xstring): Handle unibyte strings.
(xchartable, xboolvector): New commands.
Diffstat (limited to 'src')
| -rw-r--r-- | src/.gdbinit | 108 |
1 files changed, 65 insertions, 43 deletions
diff --git a/src/.gdbinit b/src/.gdbinit index 9bfc9ddf2e7..406e02def59 100644 --- a/src/.gdbinit +++ b/src/.gdbinit | |||
| @@ -69,15 +69,6 @@ document xptr | |||
| 69 | Print the pointer portion of $, assuming it is an Emacs Lisp value. | 69 | Print the pointer portion of $, assuming it is an Emacs Lisp value. |
| 70 | end | 70 | end |
| 71 | 71 | ||
| 72 | define xwindow | ||
| 73 | print (struct window *) (($ & $valmask) | gdb_data_seg_bits) | ||
| 74 | printf "%dx%d+%d+%d\n", $->width, $->height, $->left, $->top | ||
| 75 | end | ||
| 76 | document xwindow | ||
| 77 | Print $ as a window pointer, assuming it is an Emacs Lisp window value. | ||
| 78 | Print the window's position as "WIDTHxHEIGHT+LEFT+TOP". | ||
| 79 | end | ||
| 80 | |||
| 81 | define xmarker | 72 | define xmarker |
| 82 | print (struct Lisp_Marker *) (($ & $valmask) | gdb_data_seg_bits) | 73 | print (struct Lisp_Marker *) (($ & $valmask) | gdb_data_seg_bits) |
| 83 | end | 74 | end |
| @@ -141,16 +132,6 @@ document xbuflocal | |||
| 141 | Print $ as a buffer-local-value pointer, assuming it is an Emacs Lisp Misc value. | 132 | Print $ as a buffer-local-value pointer, assuming it is an Emacs Lisp Misc value. |
| 142 | end | 133 | end |
| 143 | 134 | ||
| 144 | define xbuffer | ||
| 145 | print (struct buffer *) (($ & $valmask) | gdb_data_seg_bits) | ||
| 146 | output &((struct Lisp_String *) ((($->name) & $valmask) | gdb_data_seg_bits))->data | ||
| 147 | echo \n | ||
| 148 | end | ||
| 149 | document xbuffer | ||
| 150 | Set $ as a buffer pointer, assuming it is an Emacs Lisp buffer value. | ||
| 151 | Print the name of the buffer. | ||
| 152 | end | ||
| 153 | |||
| 154 | define xsymbol | 135 | define xsymbol |
| 155 | print (struct Lisp_Symbol *) ((((int) $) & $valmask) | gdb_data_seg_bits) | 136 | print (struct Lisp_Symbol *) ((((int) $) & $valmask) | gdb_data_seg_bits) |
| 156 | output (char*)&$->name->data | 137 | output (char*)&$->name->data |
| @@ -163,7 +144,7 @@ end | |||
| 163 | 144 | ||
| 164 | define xstring | 145 | define xstring |
| 165 | print (struct Lisp_String *) (($ & $valmask) | gdb_data_seg_bits) | 146 | print (struct Lisp_String *) (($ & $valmask) | gdb_data_seg_bits) |
| 166 | output ($->size > 1000) ? 0 : ($->data[0])@($->size_byte) | 147 | output ($->size > 1000) ? 0 : ($->data[0])@($->size_byte < 0 ? $->size : $->size_byte) |
| 167 | echo \n | 148 | echo \n |
| 168 | end | 149 | end |
| 169 | document xstring | 150 | document xstring |
| @@ -181,6 +162,15 @@ Print the contents and address of the vector $. | |||
| 181 | This command assumes that $ is an Emacs Lisp vector value. | 162 | This command assumes that $ is an Emacs Lisp vector value. |
| 182 | end | 163 | end |
| 183 | 164 | ||
| 165 | define xprocess | ||
| 166 | print (struct Lisp_Process *) (($ & $valmask) | gdb_data_seg_bits) | ||
| 167 | output *$ | ||
| 168 | echo \n | ||
| 169 | end | ||
| 170 | document xprocess | ||
| 171 | Print the address of the struct Lisp_process which the Lisp_Object $ points to. | ||
| 172 | end | ||
| 173 | |||
| 184 | define xframe | 174 | define xframe |
| 185 | print (struct frame *) (($ & $valmask) | gdb_data_seg_bits) | 175 | print (struct frame *) (($ & $valmask) | gdb_data_seg_bits) |
| 186 | end | 176 | end |
| @@ -188,6 +178,23 @@ document xframe | |||
| 188 | Print $ as a frame pointer, assuming it is an Emacs Lisp frame value. | 178 | Print $ as a frame pointer, assuming it is an Emacs Lisp frame value. |
| 189 | end | 179 | end |
| 190 | 180 | ||
| 181 | define xcompiled | ||
| 182 | print (struct Lisp_Vector *) (($ & $valmask) | gdb_data_seg_bits) | ||
| 183 | output ($->contents[0])@($->size & 0xff) | ||
| 184 | end | ||
| 185 | document xcompiled | ||
| 186 | Print $ as a compiled function pointer, assuming it is an Emacs Lisp compiled value. | ||
| 187 | end | ||
| 188 | |||
| 189 | define xwindow | ||
| 190 | print (struct window *) (($ & $valmask) | gdb_data_seg_bits) | ||
| 191 | printf "%dx%d+%d+%d\n", $->width, $->height, $->left, $->top | ||
| 192 | end | ||
| 193 | document xwindow | ||
| 194 | Print $ as a window pointer, assuming it is an Emacs Lisp window value. | ||
| 195 | Print the window's position as "WIDTHxHEIGHT+LEFT+TOP". | ||
| 196 | end | ||
| 197 | |||
| 191 | define xwinconfig | 198 | define xwinconfig |
| 192 | print (struct save_window_data *) (($ & $valmask) | gdb_data_seg_bits) | 199 | print (struct save_window_data *) (($ & $valmask) | gdb_data_seg_bits) |
| 193 | end | 200 | end |
| @@ -195,12 +202,45 @@ document xwinconfig | |||
| 195 | Print $ as a window configuration pointer, assuming it is an Emacs Lisp window configuration value. | 202 | Print $ as a window configuration pointer, assuming it is an Emacs Lisp window configuration value. |
| 196 | end | 203 | end |
| 197 | 204 | ||
| 198 | define xcompiled | 205 | define xsubr |
| 199 | print (struct Lisp_Vector *) (($ & $valmask) | gdb_data_seg_bits) | 206 | print (struct Lisp_Subr *) (($ & $valmask) | gdb_data_seg_bits) |
| 200 | output ($->contents[0])@($->size & 0xff) | 207 | output *$ |
| 208 | echo \n | ||
| 201 | end | 209 | end |
| 202 | document xcompiled | 210 | document xsubr |
| 203 | Print $ as a compiled function pointer, assuming it is an Emacs Lisp compiled value. | 211 | Print the address of the subr which the Lisp_Object $ points to. |
| 212 | end | ||
| 213 | |||
| 214 | define xchartable | ||
| 215 | print (struct Lisp_Char_Table *) (($ & $valmask) | gdb_data_seg_bits) | ||
| 216 | printf "Purpose: " | ||
| 217 | output (char*)&((struct Lisp_Symbol *) ((((int) $->purpose) & $valmask) | gdb_data_seg_bits))->name->data | ||
| 218 | printf " %d extra slots", ($->size & 0x1ff) - 388 | ||
| 219 | echo \n | ||
| 220 | end | ||
| 221 | document xchartable | ||
| 222 | Print the address of the char-table $, and its purpose. | ||
| 223 | This command assumes that $ is an Emacs Lisp char-table value. | ||
| 224 | end | ||
| 225 | |||
| 226 | define xboolvector | ||
| 227 | print (struct Lisp_Bool_Vector *) (($ & $valmask) | gdb_data_seg_bits) | ||
| 228 | output ($->size > 256) ? 0 : ($->data[0])@(($->size + 7)/ 8) | ||
| 229 | echo \n | ||
| 230 | end | ||
| 231 | document xboolvector | ||
| 232 | Print the contents and address of the bool-vector $. | ||
| 233 | This command assumes that $ is an Emacs Lisp bool-vector value. | ||
| 234 | end | ||
| 235 | |||
| 236 | define xbuffer | ||
| 237 | print (struct buffer *) (($ & $valmask) | gdb_data_seg_bits) | ||
| 238 | output &((struct Lisp_String *) ((($->name) & $valmask) | gdb_data_seg_bits))->data | ||
| 239 | echo \n | ||
| 240 | end | ||
| 241 | document xbuffer | ||
| 242 | Set $ as a buffer pointer, assuming it is an Emacs Lisp buffer value. | ||
| 243 | Print the name of the buffer. | ||
| 204 | end | 244 | end |
| 205 | 245 | ||
| 206 | define xcons | 246 | define xcons |
| @@ -235,24 +275,6 @@ document xcdr | |||
| 235 | Print the cdr of $, assuming it is an Emacs Lisp pair. | 275 | Print the cdr of $, assuming it is an Emacs Lisp pair. |
| 236 | end | 276 | end |
| 237 | 277 | ||
| 238 | define xsubr | ||
| 239 | print (struct Lisp_Subr *) (($ & $valmask) | gdb_data_seg_bits) | ||
| 240 | output *$ | ||
| 241 | echo \n | ||
| 242 | end | ||
| 243 | document xsubr | ||
| 244 | Print the address of the subr which the Lisp_Object $ points to. | ||
| 245 | end | ||
| 246 | |||
| 247 | define xprocess | ||
| 248 | print (struct Lisp_Process *) (($ & $valmask) | gdb_data_seg_bits) | ||
| 249 | output *$ | ||
| 250 | echo \n | ||
| 251 | end | ||
| 252 | document xprocess | ||
| 253 | Print the address of the struct Lisp_process which the Lisp_Object $ points to. | ||
| 254 | end | ||
| 255 | |||
| 256 | define xfloat | 278 | define xfloat |
| 257 | print ((struct Lisp_Float *) (($ & $valmask) | gdb_data_seg_bits))->data | 279 | print ((struct Lisp_Float *) (($ & $valmask) | gdb_data_seg_bits))->data |
| 258 | end | 280 | end |