Add progspace support for Guile.
[deliverable/binutils-gdb.git] / gdb / guile / lib / gdb.scm
CommitLineData
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
53e8a631 172 FRAME_UNWIND_MEMORY_ERROR
ed3ef339
DE
173
174 frame?
175 frame-valid?
176 frame-name
177 frame-type
178 frame-arch
179 frame-unwind-stop-reason
180 frame-pc
181 frame-block
182 frame-function
183 frame-older
184 frame-newer
185 frame-sal
186 frame-read-var
187 frame-select
188 newest-frame
189 selected-frame
190 unwind-stop-reason-string
191
192 ;; scm-iterator.c
193
194 make-iterator
195 iterator?
196 iterator-object
197 iterator-progress
198 set-iterator-progress!
199 iterator-next!
200 end-of-iteration
201 end-of-iteration?
202
203 ;; scm-lazy-string.c
204 ;; FIXME: Where's the constructor?
205
206 lazy-string?
207 lazy-string-address
208 lazy-string-length
209 lazy-string-encoding
210 lazy-string-type
211 lazy-string->value
212
213 ;; scm-math.c
214
215 valid-add
216 value-sub
217 value-mul
218 value-div
219 value-rem
220 value-mod
221 value-pow
222 value-not
223 value-neg
224 value-pos
225 value-abs
226 value-lsh
227 value-rsh
228 value-min
229 value-max
230 value-lognot
231 value-logand
232 value-logior
233 value-logxor
234 value=?
235 value<?
236 value<=?
237 value>?
238 value>=?
239
240 ;; scm-objfile.c
241
242 objfile?
243 objfile-valid?
244 objfile-filename
245 objfile-pretty-printers
246 set-objfile-pretty-printers!
247 current-objfile
248 objfiles
249
250 ;; scm-ports.c
251
252 input-port
253 output-port
254 error-port
255 stdio-port?
256 open-memory
257 memory-port?
258 memory-port-range
259 memory-port-read-buffer-size
260 set-memory-port-read-buffer-size!
261 memory-port-write-buffer-size
262 set-memory-port-write-buffer-size!
263 ;; with-gdb-output-to-port, with-gdb-error-to-port are in experimental.scm.
264
265 ;; scm-pretty-print.c
266
267 make-pretty-printer
268 pretty-printer?
269 pretty-printer-enabled?
270 set-pretty-printer-enabled!
271 make-pretty-printer-worker
272 pretty-printer-worker?
273
ded03782
DE
274 ;; scm-progspace.c
275
276 progspace?
277 progspace-valid?
278 progspace-filename
279 progspace-objfiles
280 progspace-pretty-printers
281 set-progspace-pretty-printers!
282 current-progspace
283 progspaces
284
b2715b27 285 ;; scm-gsmob.c
ed3ef339 286
b2715b27 287 gdb-object-kind
ed3ef339
DE
288
289 ;; scm-string.c
290
291 string->argv
292
293 ;; scm-symbol.c
294
295 SYMBOL_LOC_UNDEF
296 SYMBOL_LOC_CONST
297 SYMBOL_LOC_STATIC
298 SYMBOL_LOC_REGISTER
299 SYMBOL_LOC_ARG
300 SYMBOL_LOC_REF_ARG
301 SYMBOL_LOC_LOCAL
302 SYMBOL_LOC_TYPEDEF
303 SYMBOL_LOC_LABEL
304 SYMBOL_LOC_BLOCK
305 SYMBOL_LOC_CONST_BYTES
306 SYMBOL_LOC_UNRESOLVED
307 SYMBOL_LOC_OPTIMIZED_OUT
308 SYMBOL_LOC_COMPUTED
309 SYMBOL_LOC_REGPARM_ADDR
310
311 SYMBOL_UNDEF_DOMAIN
312 SYMBOL_VAR_DOMAIN
313 SYMBOL_STRUCT_DOMAIN
314 SYMBOL_LABEL_DOMAIN
315 SYMBOL_VARIABLES_DOMAIN
316 SYMBOL_FUNCTIONS_DOMAIN
317 SYMBOL_TYPES_DOMAIN
318
319 symbol?
320 symbol-valid?
321 symbol-type
322 symbol-symtab
323 symbol-line
324 symbol-name
325 symbol-linkage-name
326 symbol-print-name
327 symbol-addr-class
328 symbol-argument?
329 symbol-constant?
330 symbol-function?
331 symbol-variable?
332 symbol-needs-frame?
333 symbol-value
334 lookup-symbol
335 lookup-global-symbol
336
337 ;; scm-symtab.c
338
339 symtab?
340 symtab-valid?
341 symtab-filename
342 symtab-fullname
343 symtab-objfile
344 symtab-global-block
345 symtab-static-block
346 sal?
347 sal-valid?
348 sal-symtab
349 sal-line
350 sal-pc
351 sal-last
352 find-pc-line
353
354 ;; scm-type.c
355
356 TYPE_CODE_BITSTRING
357 TYPE_CODE_PTR
358 TYPE_CODE_ARRAY
359 TYPE_CODE_STRUCT
360 TYPE_CODE_UNION
361 TYPE_CODE_ENUM
362 TYPE_CODE_FLAGS
363 TYPE_CODE_FUNC
364 TYPE_CODE_INT
365 TYPE_CODE_FLT
366 TYPE_CODE_VOID
367 TYPE_CODE_SET
368 TYPE_CODE_RANGE
369 TYPE_CODE_STRING
370 TYPE_CODE_ERROR
371 TYPE_CODE_METHOD
372 TYPE_CODE_METHODPTR
373 TYPE_CODE_MEMBERPTR
374 TYPE_CODE_REF
375 TYPE_CODE_CHAR
376 TYPE_CODE_BOOL
377 TYPE_CODE_COMPLEX
378 TYPE_CODE_TYPEDEF
379 TYPE_CODE_NAMESPACE
380 TYPE_CODE_DECFLOAT
381 TYPE_CODE_INTERNAL_FUNCTION
382
383 type?
384 lookup-type
385 type-code
386 type-fields
387 type-tag
388 type-sizeof
389 type-strip-typedefs
390 type-array
391 type-vector
392 type-pointer
393 type-range
394 type-reference
395 type-target
396 type-const
397 type-volatile
398 type-unqualified
399 type-name
400 type-num-fields
401 type-fields
402 make-field-iterator
403 type-field
404 type-has-field?
405 field?
406 field-name
407 field-type
408 field-enumval
409 field-bitpos
410 field-bitsize
411 field-artificial?
412 field-baseclass?
413
414 ;; scm-value.c
415
416 value?
417 make-value
418 value-optimized-out?
419 value-address
420 value-type
421 value-dynamic-type
422 value-cast
423 value-dynamic-cast
424 value-reinterpret-cast
425 value-dereference
426 value-referenced-value
427 value-field
428 value-subscript
429 value-call
430 value->bool
431 value->integer
432 value->real
433 value->bytevector
434 value->string
435 value->lazy-string
436 value-lazy?
437 make-lazy-value
438 value-fetch-lazy!
439 value-print
440 parse-and-eval
441 history-ref
442)
443
444;; Load the rest of the Scheme side.
445;; data-directory is provided by the C code.
446
447(add-to-load-path
448 (string-append (data-directory) file-name-separator-string "guile"))
449
450(use-modules ((gdb init)))
451
452;; These come from other files, but they're really part of this module.
453
454(re-export
455
456 ;; init.scm
457 orig-input-port
458 orig-output-port
459 orig-error-port
460)
This page took 0.074113 seconds and 4 git commands to generate.