Commit | Line | Data |
---|---|---|
ed3ef339 DE |
1 | ;; Scheme side of the gdb module. |
2 | ;; | |
3 | ;; Copyright (C) 2014 Free Software Foundation, Inc. | |
4 | ;; | |
5 | ;; This file is part of GDB. | |
6 | ;; | |
7 | ;; This program is free software; you can redistribute it and/or modify | |
8 | ;; it under the terms of the GNU General Public License as published by | |
9 | ;; the Free Software Foundation; either version 3 of the License, or | |
10 | ;; (at your option) any later version. | |
11 | ;; | |
12 | ;; This program is distributed in the hope that it will be useful, | |
13 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | ;; GNU General Public License for more details. | |
16 | ;; | |
17 | ;; You should have received a copy of the GNU General Public License | |
18 | ;; along with this program. If not, see <http://www.gnu.org/licenses/>. | |
19 | ||
20 | ;; This file is loaded with scm_c_primitive_load, which is ok, but files | |
21 | ;; loaded with it are not compiled. So we do very little here, and do | |
22 | ;; most of the initialization in init.scm. | |
23 | ||
24 | (define-module (gdb) | |
25 | ;; The version of the (gdb) module as (major minor). | |
26 | ;; Incompatible changes bump the major version. | |
27 | ;; Other changes bump the minor version. | |
28 | ;; It's not clear whether we need a patch-level as well, but this can | |
29 | ;; be added later if necessary. | |
30 | ;; This is not the GDB version on purpose. This version tracks the Scheme | |
31 | ;; gdb module version. | |
32 | ;; TODO: Change to (1 0) when ready. | |
33 | #:version (0 1)) | |
34 | ||
35 | ;; Export the bits provided by the C side. | |
36 | ;; This is so that the compiler can see the exports when | |
37 | ;; other code uses this module. | |
38 | ;; TODO: Generating this list would be nice, but it would require an addition | |
39 | ;; to the GDB build system. Still, I think it's worth it. | |
40 | ||
41 | (export | |
42 | ||
43 | ;; guile.c | |
44 | ||
45 | execute | |
46 | data-directory | |
47 | gdb-version | |
48 | host-config | |
49 | target-config | |
50 | ||
51 | ;; scm-arch.c | |
52 | ||
53 | arch? | |
54 | current-arch | |
55 | arch-name | |
56 | arch-charset | |
57 | arch-wide-charset | |
58 | ||
59 | arch-void-type | |
60 | arch-char-type | |
61 | arch-short-type | |
62 | arch-int-type | |
63 | arch-long-type | |
64 | ||
65 | arch-schar-type | |
66 | arch-uchar-type | |
67 | arch-ushort-type | |
68 | arch-uint-type | |
69 | arch-ulong-type | |
70 | arch-float-type | |
71 | arch-double-type | |
72 | arch-longdouble-type | |
73 | arch-bool-type | |
74 | arch-longlong-type | |
75 | arch-ulonglong-type | |
76 | ||
77 | arch-int8-type | |
78 | arch-uint8-type | |
79 | arch-int16-type | |
80 | arch-uint16-type | |
81 | arch-int32-type | |
82 | arch-uint32-type | |
83 | arch-int64-type | |
84 | arch-uint64-type | |
85 | ||
86 | ;; scm-block.c | |
87 | ||
88 | block? | |
89 | block-valid? | |
90 | block-start | |
91 | block-end | |
92 | block-function | |
93 | block-superblock | |
94 | block-global-block | |
95 | block-static-block | |
96 | block-global? | |
97 | block-static? | |
98 | block-symbols | |
99 | make-block-symbols-iterator | |
100 | block-symbols-progress? | |
101 | lookup-block | |
102 | ||
103 | ;; scm-breakpoint.c | |
104 | ||
105 | BP_NONE | |
106 | BP_BREAKPOINT | |
107 | BP_WATCHPOINT | |
108 | BP_HARDWARE_WATCHPOINT | |
109 | BP_READ_WATCHPOINT | |
110 | BP_ACCESS_WATCHPOINT | |
111 | ||
112 | WP_READ | |
113 | WP_WRITE | |
114 | WP_ACCESS | |
115 | ||
116 | make-breakpoint | |
117 | breakpoint-delete! | |
118 | breakpoints | |
119 | breakpoint? | |
120 | breakpoint-valid? | |
121 | breakpoint-number | |
122 | breakpoint-type | |
123 | brekapoint-visible? | |
124 | breakpoint-location | |
125 | breakpoint-expression | |
126 | breakpoint-enabled? | |
127 | set-breakpoint-enabled! | |
128 | breakpoint-silent? | |
129 | set-breakpoint-silent! | |
130 | breakpoint-ignore-count | |
131 | set-breakpoint-ignore-count! | |
132 | breakpoint-hit-count | |
133 | set-breakpoint-hit-count! | |
134 | breakpoint-thread | |
135 | set-breakpoint-thread! | |
136 | breakpoint-task | |
137 | set-breakpoint-task! | |
138 | breakpoint-condition | |
139 | set-breakpoint-condition! | |
140 | breakpoint-stop | |
141 | set-breakpoint-stop! | |
142 | breakpoint-commands | |
143 | ||
144 | ;; scm-disasm.c | |
145 | ||
146 | arch-disassemble | |
147 | ||
148 | ;; scm-exception.c | |
149 | ||
150 | make-exception | |
151 | exception? | |
152 | exception-key | |
153 | exception-args | |
154 | ||
155 | ;; scm-frame.c | |
156 | ||
157 | NORMAL_FRAME | |
158 | DUMMY_FRAME | |
159 | INLINE_FRAME | |
160 | TAILCALL_FRAME | |
161 | SIGTRAMP_FRAME | |
162 | ARCH_FRAME | |
163 | SENTINEL_FRAME | |
164 | ||
165 | FRAME_UNWIND_NO_REASON | |
166 | FRAME_UNWIND_NULL_ID | |
167 | FRAME_UNWIND_OUTERMOST | |
168 | FRAME_UNWIND_UNAVAILABLE | |
169 | FRAME_UNWIND_INNER_ID | |
170 | FRAME_UNWIND_SAME_ID | |
171 | FRAME_UNWIND_NO_SAVED_PC | |
172 | ||
173 | frame? | |
174 | frame-valid? | |
175 | frame-name | |
176 | frame-type | |
177 | frame-arch | |
178 | frame-unwind-stop-reason | |
179 | frame-pc | |
180 | frame-block | |
181 | frame-function | |
182 | frame-older | |
183 | frame-newer | |
184 | frame-sal | |
185 | frame-read-var | |
186 | frame-select | |
187 | newest-frame | |
188 | selected-frame | |
189 | unwind-stop-reason-string | |
190 | ||
191 | ;; scm-iterator.c | |
192 | ||
193 | make-iterator | |
194 | iterator? | |
195 | iterator-object | |
196 | iterator-progress | |
197 | set-iterator-progress! | |
198 | iterator-next! | |
199 | end-of-iteration | |
200 | end-of-iteration? | |
201 | ||
202 | ;; scm-lazy-string.c | |
203 | ;; FIXME: Where's the constructor? | |
204 | ||
205 | lazy-string? | |
206 | lazy-string-address | |
207 | lazy-string-length | |
208 | lazy-string-encoding | |
209 | lazy-string-type | |
210 | lazy-string->value | |
211 | ||
212 | ;; scm-math.c | |
213 | ||
214 | valid-add | |
215 | value-sub | |
216 | value-mul | |
217 | value-div | |
218 | value-rem | |
219 | value-mod | |
220 | value-pow | |
221 | value-not | |
222 | value-neg | |
223 | value-pos | |
224 | value-abs | |
225 | value-lsh | |
226 | value-rsh | |
227 | value-min | |
228 | value-max | |
229 | value-lognot | |
230 | value-logand | |
231 | value-logior | |
232 | value-logxor | |
233 | value=? | |
234 | value<? | |
235 | value<=? | |
236 | value>? | |
237 | value>=? | |
238 | ||
239 | ;; scm-objfile.c | |
240 | ||
241 | objfile? | |
242 | objfile-valid? | |
243 | objfile-filename | |
244 | objfile-pretty-printers | |
245 | set-objfile-pretty-printers! | |
246 | current-objfile | |
247 | objfiles | |
248 | ||
249 | ;; scm-ports.c | |
250 | ||
251 | input-port | |
252 | output-port | |
253 | error-port | |
254 | stdio-port? | |
255 | open-memory | |
256 | memory-port? | |
257 | memory-port-range | |
258 | memory-port-read-buffer-size | |
259 | set-memory-port-read-buffer-size! | |
260 | memory-port-write-buffer-size | |
261 | set-memory-port-write-buffer-size! | |
262 | ;; with-gdb-output-to-port, with-gdb-error-to-port are in experimental.scm. | |
263 | ||
264 | ;; scm-pretty-print.c | |
265 | ||
266 | make-pretty-printer | |
267 | pretty-printer? | |
268 | pretty-printer-enabled? | |
269 | set-pretty-printer-enabled! | |
270 | make-pretty-printer-worker | |
271 | pretty-printer-worker? | |
272 | ||
273 | ;; scm-smob.c | |
274 | ||
275 | gsmob-kind | |
276 | gsmob-property | |
277 | set-gsmob-property! | |
278 | gsmob-has-property? | |
279 | gsmob-properties | |
280 | ||
281 | ;; scm-string.c | |
282 | ||
283 | string->argv | |
284 | ||
285 | ;; scm-symbol.c | |
286 | ||
287 | SYMBOL_LOC_UNDEF | |
288 | SYMBOL_LOC_CONST | |
289 | SYMBOL_LOC_STATIC | |
290 | SYMBOL_LOC_REGISTER | |
291 | SYMBOL_LOC_ARG | |
292 | SYMBOL_LOC_REF_ARG | |
293 | SYMBOL_LOC_LOCAL | |
294 | SYMBOL_LOC_TYPEDEF | |
295 | SYMBOL_LOC_LABEL | |
296 | SYMBOL_LOC_BLOCK | |
297 | SYMBOL_LOC_CONST_BYTES | |
298 | SYMBOL_LOC_UNRESOLVED | |
299 | SYMBOL_LOC_OPTIMIZED_OUT | |
300 | SYMBOL_LOC_COMPUTED | |
301 | SYMBOL_LOC_REGPARM_ADDR | |
302 | ||
303 | SYMBOL_UNDEF_DOMAIN | |
304 | SYMBOL_VAR_DOMAIN | |
305 | SYMBOL_STRUCT_DOMAIN | |
306 | SYMBOL_LABEL_DOMAIN | |
307 | SYMBOL_VARIABLES_DOMAIN | |
308 | SYMBOL_FUNCTIONS_DOMAIN | |
309 | SYMBOL_TYPES_DOMAIN | |
310 | ||
311 | symbol? | |
312 | symbol-valid? | |
313 | symbol-type | |
314 | symbol-symtab | |
315 | symbol-line | |
316 | symbol-name | |
317 | symbol-linkage-name | |
318 | symbol-print-name | |
319 | symbol-addr-class | |
320 | symbol-argument? | |
321 | symbol-constant? | |
322 | symbol-function? | |
323 | symbol-variable? | |
324 | symbol-needs-frame? | |
325 | symbol-value | |
326 | lookup-symbol | |
327 | lookup-global-symbol | |
328 | ||
329 | ;; scm-symtab.c | |
330 | ||
331 | symtab? | |
332 | symtab-valid? | |
333 | symtab-filename | |
334 | symtab-fullname | |
335 | symtab-objfile | |
336 | symtab-global-block | |
337 | symtab-static-block | |
338 | sal? | |
339 | sal-valid? | |
340 | sal-symtab | |
341 | sal-line | |
342 | sal-pc | |
343 | sal-last | |
344 | find-pc-line | |
345 | ||
346 | ;; scm-type.c | |
347 | ||
348 | TYPE_CODE_BITSTRING | |
349 | TYPE_CODE_PTR | |
350 | TYPE_CODE_ARRAY | |
351 | TYPE_CODE_STRUCT | |
352 | TYPE_CODE_UNION | |
353 | TYPE_CODE_ENUM | |
354 | TYPE_CODE_FLAGS | |
355 | TYPE_CODE_FUNC | |
356 | TYPE_CODE_INT | |
357 | TYPE_CODE_FLT | |
358 | TYPE_CODE_VOID | |
359 | TYPE_CODE_SET | |
360 | TYPE_CODE_RANGE | |
361 | TYPE_CODE_STRING | |
362 | TYPE_CODE_ERROR | |
363 | TYPE_CODE_METHOD | |
364 | TYPE_CODE_METHODPTR | |
365 | TYPE_CODE_MEMBERPTR | |
366 | TYPE_CODE_REF | |
367 | TYPE_CODE_CHAR | |
368 | TYPE_CODE_BOOL | |
369 | TYPE_CODE_COMPLEX | |
370 | TYPE_CODE_TYPEDEF | |
371 | TYPE_CODE_NAMESPACE | |
372 | TYPE_CODE_DECFLOAT | |
373 | TYPE_CODE_INTERNAL_FUNCTION | |
374 | ||
375 | type? | |
376 | lookup-type | |
377 | type-code | |
378 | type-fields | |
379 | type-tag | |
380 | type-sizeof | |
381 | type-strip-typedefs | |
382 | type-array | |
383 | type-vector | |
384 | type-pointer | |
385 | type-range | |
386 | type-reference | |
387 | type-target | |
388 | type-const | |
389 | type-volatile | |
390 | type-unqualified | |
391 | type-name | |
392 | type-num-fields | |
393 | type-fields | |
394 | make-field-iterator | |
395 | type-field | |
396 | type-has-field? | |
397 | field? | |
398 | field-name | |
399 | field-type | |
400 | field-enumval | |
401 | field-bitpos | |
402 | field-bitsize | |
403 | field-artificial? | |
404 | field-baseclass? | |
405 | ||
406 | ;; scm-value.c | |
407 | ||
408 | value? | |
409 | make-value | |
410 | value-optimized-out? | |
411 | value-address | |
412 | value-type | |
413 | value-dynamic-type | |
414 | value-cast | |
415 | value-dynamic-cast | |
416 | value-reinterpret-cast | |
417 | value-dereference | |
418 | value-referenced-value | |
419 | value-field | |
420 | value-subscript | |
421 | value-call | |
422 | value->bool | |
423 | value->integer | |
424 | value->real | |
425 | value->bytevector | |
426 | value->string | |
427 | value->lazy-string | |
428 | value-lazy? | |
429 | make-lazy-value | |
430 | value-fetch-lazy! | |
431 | value-print | |
432 | parse-and-eval | |
433 | history-ref | |
434 | ) | |
435 | ||
436 | ;; Load the rest of the Scheme side. | |
437 | ;; data-directory is provided by the C code. | |
438 | ||
439 | (add-to-load-path | |
440 | (string-append (data-directory) file-name-separator-string "guile")) | |
441 | ||
442 | (use-modules ((gdb init))) | |
443 | ||
444 | ;; These come from other files, but they're really part of this module. | |
445 | ||
446 | (re-export | |
447 | ||
448 | ;; init.scm | |
449 | orig-input-port | |
450 | orig-output-port | |
451 | orig-error-port | |
452 | ) |