1;; Scheme side of the gdb module. 2;; 3;; Copyright (C) 2014-2023 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 register-breakpoint! 118 delete-breakpoint! 119 breakpoints 120 breakpoint? 121 breakpoint-valid? 122 breakpoint-number 123 breakpoint-type 124 brekapoint-visible? 125 breakpoint-location 126 breakpoint-expression 127 breakpoint-enabled? 128 set-breakpoint-enabled! 129 breakpoint-silent? 130 set-breakpoint-silent! 131 breakpoint-ignore-count 132 set-breakpoint-ignore-count! 133 breakpoint-hit-count 134 set-breakpoint-hit-count! 135 breakpoint-thread 136 set-breakpoint-thread! 137 breakpoint-task 138 set-breakpoint-task! 139 breakpoint-condition 140 set-breakpoint-condition! 141 breakpoint-stop 142 set-breakpoint-stop! 143 breakpoint-commands 144 145 ;; scm-cmd.c 146 147 make-command 148 register-command! 149 command? 150 command-valid? 151 dont-repeat 152 153 COMPLETE_NONE 154 COMPLETE_FILENAME 155 COMPLETE_LOCATION 156 COMPLETE_COMMAND 157 COMPLETE_SYMBOL 158 COMPLETE_EXPRESSION 159 160 COMMAND_NONE 161 COMMAND_RUNNING 162 COMMAND_DATA 163 COMMAND_STACK 164 COMMAND_FILES 165 COMMAND_SUPPORT 166 COMMAND_STATUS 167 COMMAND_BREAKPOINTS 168 COMMAND_TRACEPOINTS 169 COMMAND_OBSCURE 170 COMMAND_MAINTENANCE 171 COMMAND_USER 172 173 ;; scm-disasm.c 174 175 arch-disassemble 176 177 ;; scm-exception.c 178 179 make-exception 180 exception? 181 exception-key 182 exception-args 183 184 ;; scm-frame.c 185 186 NORMAL_FRAME 187 DUMMY_FRAME 188 INLINE_FRAME 189 TAILCALL_FRAME 190 SIGTRAMP_FRAME 191 ARCH_FRAME 192 SENTINEL_FRAME 193 194 FRAME_UNWIND_NO_REASON 195 FRAME_UNWIND_NULL_ID 196 FRAME_UNWIND_OUTERMOST 197 FRAME_UNWIND_UNAVAILABLE 198 FRAME_UNWIND_INNER_ID 199 FRAME_UNWIND_SAME_ID 200 FRAME_UNWIND_NO_SAVED_PC 201 FRAME_UNWIND_MEMORY_ERROR 202 203 frame? 204 frame-valid? 205 frame-name 206 frame-type 207 frame-arch 208 frame-unwind-stop-reason 209 frame-pc 210 frame-block 211 frame-function 212 frame-older 213 frame-newer 214 frame-sal 215 frame-read-register 216 frame-read-var 217 frame-select 218 newest-frame 219 selected-frame 220 unwind-stop-reason-string 221 222 ;; scm-iterator.c 223 224 make-iterator 225 iterator? 226 iterator-object 227 iterator-progress 228 set-iterator-progress! 229 iterator-next! 230 end-of-iteration 231 end-of-iteration? 232 233 ;; scm-lazy-string.c 234 ;; FIXME: Where's the constructor? 235 236 lazy-string? 237 lazy-string-address 238 lazy-string-length 239 lazy-string-encoding 240 lazy-string-type 241 lazy-string->value 242 243 ;; scm-math.c 244 245 valid-add 246 value-sub 247 value-mul 248 value-div 249 value-rem 250 value-mod 251 value-pow 252 value-not 253 value-neg 254 value-pos 255 value-abs 256 value-lsh 257 value-rsh 258 value-min 259 value-max 260 value-lognot 261 value-logand 262 value-logior 263 value-logxor 264 value=? 265 value 266 value<=? 267 value>? 268 value>=? 269 270 ;; scm-objfile.c 271 272 objfile? 273 objfile-valid? 274 objfile-filename 275 objfile-progspace 276 objfile-pretty-printers 277 set-objfile-pretty-printers! 278 current-objfile 279 objfiles 280 281 ;; scm-param.c 282 283 PARAM_BOOLEAN 284 PARAM_AUTO_BOOLEAN 285 PARAM_ZINTEGER 286 PARAM_UINTEGER 287 PARAM_ZUINTEGER 288 PARAM_ZUINTEGER_UNLIMITED 289 PARAM_STRING 290 PARAM_STRING_NOESCAPE 291 PARAM_OPTIONAL_FILENAME 292 PARAM_FILENAME 293 PARAM_ENUM 294 295 make-parameter 296 register-parameter! 297 parameter? 298 parameter-value 299 set-parameter-value! 300 301 ;; scm-ports.c 302 303 input-port 304 output-port 305 error-port 306 stdio-port? 307 open-memory 308 memory-port? 309 memory-port-range 310 memory-port-read-buffer-size 311 set-memory-port-read-buffer-size! 312 memory-port-write-buffer-size 313 set-memory-port-write-buffer-size! 314 ;; with-gdb-output-to-port, with-gdb-error-to-port are in experimental.scm. 315 316 ;; scm-pretty-print.c 317 318 make-pretty-printer 319 pretty-printer? 320 pretty-printer-enabled? 321 set-pretty-printer-enabled! 322 make-pretty-printer-worker 323 pretty-printer-worker? 324 pretty-printers 325 set-pretty-printers! 326 327 ;; scm-progspace.c 328 329 progspace? 330 progspace-valid? 331 progspace-filename 332 progspace-objfiles 333 progspace-pretty-printers 334 set-progspace-pretty-printers! 335 current-progspace 336 progspaces 337 338 ;; scm-gsmob.c 339 340 gdb-object-kind 341 342 ;; scm-string.c 343 344 string->argv 345 346 ;; scm-symbol.c 347 348 SYMBOL_LOC_UNDEF 349 SYMBOL_LOC_CONST 350 SYMBOL_LOC_STATIC 351 SYMBOL_LOC_REGISTER 352 SYMBOL_LOC_ARG 353 SYMBOL_LOC_REF_ARG 354 SYMBOL_LOC_LOCAL 355 SYMBOL_LOC_TYPEDEF 356 SYMBOL_LOC_LABEL 357 SYMBOL_LOC_BLOCK 358 SYMBOL_LOC_CONST_BYTES 359 SYMBOL_LOC_UNRESOLVED 360 SYMBOL_LOC_OPTIMIZED_OUT 361 SYMBOL_LOC_COMPUTED 362 SYMBOL_LOC_REGPARM_ADDR 363 364 SYMBOL_UNDEF_DOMAIN 365 SYMBOL_VAR_DOMAIN 366 SYMBOL_STRUCT_DOMAIN 367 SYMBOL_LABEL_DOMAIN 368 SYMBOL_VARIABLES_DOMAIN 369 SYMBOL_FUNCTIONS_DOMAIN 370 SYMBOL_TYPES_DOMAIN 371 372 symbol? 373 symbol-valid? 374 symbol-type 375 symbol-symtab 376 symbol-line 377 symbol-name 378 symbol-linkage-name 379 symbol-print-name 380 symbol-addr-class 381 symbol-argument? 382 symbol-constant? 383 symbol-function? 384 symbol-variable? 385 symbol-needs-frame? 386 symbol-value 387 lookup-symbol 388 lookup-global-symbol 389 390 ;; scm-symtab.c 391 392 symtab? 393 symtab-valid? 394 symtab-filename 395 symtab-fullname 396 symtab-objfile 397 symtab-global-block 398 symtab-static-block 399 sal? 400 sal-valid? 401 sal-symtab 402 sal-line 403 sal-pc 404 sal-last 405 find-pc-line 406 407 ;; scm-type.c 408 409 TYPE_CODE_BITSTRING 410 TYPE_CODE_PTR 411 TYPE_CODE_ARRAY 412 TYPE_CODE_STRUCT 413 TYPE_CODE_UNION 414 TYPE_CODE_ENUM 415 TYPE_CODE_FLAGS 416 TYPE_CODE_FUNC 417 TYPE_CODE_INT 418 TYPE_CODE_FLT 419 TYPE_CODE_VOID 420 TYPE_CODE_SET 421 TYPE_CODE_RANGE 422 TYPE_CODE_STRING 423 TYPE_CODE_ERROR 424 TYPE_CODE_METHOD 425 TYPE_CODE_METHODPTR 426 TYPE_CODE_MEMBERPTR 427 TYPE_CODE_REF 428 TYPE_CODE_CHAR 429 TYPE_CODE_BOOL 430 TYPE_CODE_COMPLEX 431 TYPE_CODE_TYPEDEF 432 TYPE_CODE_NAMESPACE 433 TYPE_CODE_DECFLOAT 434 TYPE_CODE_INTERNAL_FUNCTION 435 436 type? 437 lookup-type 438 type-code 439 type-fields 440 type-tag 441 type-sizeof 442 type-strip-typedefs 443 type-array 444 type-vector 445 type-pointer 446 type-range 447 type-reference 448 type-target 449 type-const 450 type-volatile 451 type-unqualified 452 type-name 453 type-num-fields 454 type-fields 455 make-field-iterator 456 type-field 457 type-has-field? 458 field? 459 field-name 460 field-type 461 field-enumval 462 field-bitpos 463 field-bitsize 464 field-artificial? 465 field-baseclass? 466 467 ;; scm-value.c 468 469 value? 470 make-value 471 value-optimized-out? 472 value-address 473 value-type 474 value-dynamic-type 475 value-cast 476 value-dynamic-cast 477 value-reinterpret-cast 478 value-dereference 479 value-referenced-value 480 value-field 481 value-subscript 482 value-call 483 value->bool 484 value->integer 485 value->real 486 value->bytevector 487 value->string 488 value->lazy-string 489 value-lazy? 490 make-lazy-value 491 value-fetch-lazy! 492 value-print 493 parse-and-eval 494 history-ref 495) 496 497;; Load the rest of the Scheme side. 498 499(include "gdb/init.scm") 500 501;; These come from other files, but they're really part of this module. 502 503(export 504 505 ;; init.scm 506 orig-input-port 507 orig-output-port 508 orig-error-port 509 throw-user-error 510) 511