| 1 | /* Target operations for the remote server for GDB. |
| 2 | Copyright (C) 2002-2014 Free Software Foundation, Inc. |
| 3 | |
| 4 | Contributed by MontaVista Software. |
| 5 | |
| 6 | This file is part of GDB. |
| 7 | |
| 8 | This program is free software; you can redistribute it and/or modify |
| 9 | it under the terms of the GNU General Public License as published by |
| 10 | the Free Software Foundation; either version 3 of the License, or |
| 11 | (at your option) any later version. |
| 12 | |
| 13 | This program is distributed in the hope that it will be useful, |
| 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | GNU General Public License for more details. |
| 17 | |
| 18 | You should have received a copy of the GNU General Public License |
| 19 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
| 20 | |
| 21 | #ifndef TARGET_H |
| 22 | #define TARGET_H |
| 23 | |
| 24 | #include "target/resume.h" |
| 25 | #include "target/wait.h" |
| 26 | #include "target/waitstatus.h" |
| 27 | |
| 28 | struct emit_ops; |
| 29 | struct btrace_target_info; |
| 30 | struct buffer; |
| 31 | struct process_info; |
| 32 | |
| 33 | /* This structure describes how to resume a particular thread (or all |
| 34 | threads) based on the client's request. If thread is -1, then this |
| 35 | entry applies to all threads. These are passed around as an |
| 36 | array. */ |
| 37 | |
| 38 | struct thread_resume |
| 39 | { |
| 40 | ptid_t thread; |
| 41 | |
| 42 | /* How to "resume". */ |
| 43 | enum resume_kind kind; |
| 44 | |
| 45 | /* If non-zero, send this signal when we resume, or to stop the |
| 46 | thread. If stopping a thread, and this is 0, the target should |
| 47 | stop the thread however it best decides to (e.g., SIGSTOP on |
| 48 | linux; SuspendThread on win32). This is a host signal value (not |
| 49 | enum gdb_signal). */ |
| 50 | int sig; |
| 51 | |
| 52 | /* Range to single step within. Valid only iff KIND is resume_step. |
| 53 | |
| 54 | Single-step once, and then continuing stepping as long as the |
| 55 | thread stops in this range. (If the range is empty |
| 56 | [STEP_RANGE_START == STEP_RANGE_END], then this is a single-step |
| 57 | request.) */ |
| 58 | CORE_ADDR step_range_start; /* Inclusive */ |
| 59 | CORE_ADDR step_range_end; /* Exclusive */ |
| 60 | }; |
| 61 | |
| 62 | struct target_ops |
| 63 | { |
| 64 | /* Start a new process. |
| 65 | |
| 66 | PROGRAM is a path to the program to execute. |
| 67 | ARGS is a standard NULL-terminated array of arguments, |
| 68 | to be passed to the inferior as ``argv''. |
| 69 | |
| 70 | Returns the new PID on success, -1 on failure. Registers the new |
| 71 | process with the process list. */ |
| 72 | |
| 73 | int (*create_inferior) (char *program, char **args); |
| 74 | |
| 75 | /* Attach to a running process. |
| 76 | |
| 77 | PID is the process ID to attach to, specified by the user |
| 78 | or a higher layer. |
| 79 | |
| 80 | Returns -1 if attaching is unsupported, 0 on success, and calls |
| 81 | error() otherwise. */ |
| 82 | |
| 83 | int (*attach) (unsigned long pid); |
| 84 | |
| 85 | /* Kill inferior PID. Return -1 on failure, and 0 on success. */ |
| 86 | |
| 87 | int (*kill) (int pid); |
| 88 | |
| 89 | /* Detach from inferior PID. Return -1 on failure, and 0 on |
| 90 | success. */ |
| 91 | |
| 92 | int (*detach) (int pid); |
| 93 | |
| 94 | /* The inferior process has died. Do what is right. */ |
| 95 | |
| 96 | void (*mourn) (struct process_info *proc); |
| 97 | |
| 98 | /* Wait for inferior PID to exit. */ |
| 99 | void (*join) (int pid); |
| 100 | |
| 101 | /* Return 1 iff the thread with process ID PID is alive. */ |
| 102 | |
| 103 | int (*thread_alive) (ptid_t pid); |
| 104 | |
| 105 | /* Resume the inferior process. */ |
| 106 | |
| 107 | void (*resume) (struct thread_resume *resume_info, size_t n); |
| 108 | |
| 109 | /* Wait for the inferior process or thread to change state. Store |
| 110 | status through argument pointer STATUS. |
| 111 | |
| 112 | PTID = -1 to wait for any pid to do something, PTID(pid,0,0) to |
| 113 | wait for any thread of process pid to do something. Return ptid |
| 114 | of child, or -1 in case of error; store status through argument |
| 115 | pointer STATUS. OPTIONS is a bit set of options defined as |
| 116 | TARGET_W* above. If options contains TARGET_WNOHANG and there's |
| 117 | no child stop to report, return is |
| 118 | null_ptid/TARGET_WAITKIND_IGNORE. */ |
| 119 | |
| 120 | ptid_t (*wait) (ptid_t ptid, struct target_waitstatus *status, int options); |
| 121 | |
| 122 | /* Fetch registers from the inferior process. |
| 123 | |
| 124 | If REGNO is -1, fetch all registers; otherwise, fetch at least REGNO. */ |
| 125 | |
| 126 | void (*fetch_registers) (struct regcache *regcache, int regno); |
| 127 | |
| 128 | /* Store registers to the inferior process. |
| 129 | |
| 130 | If REGNO is -1, store all registers; otherwise, store at least REGNO. */ |
| 131 | |
| 132 | void (*store_registers) (struct regcache *regcache, int regno); |
| 133 | |
| 134 | /* Prepare to read or write memory from the inferior process. |
| 135 | Targets use this to do what is necessary to get the state of the |
| 136 | inferior such that it is possible to access memory. |
| 137 | |
| 138 | This should generally only be called from client facing routines, |
| 139 | such as gdb_read_memory/gdb_write_memory, or the insert_point |
| 140 | callbacks. |
| 141 | |
| 142 | Like `read_memory' and `write_memory' below, returns 0 on success |
| 143 | and errno on failure. */ |
| 144 | |
| 145 | int (*prepare_to_access_memory) (void); |
| 146 | |
| 147 | /* Undo the effects of prepare_to_access_memory. */ |
| 148 | |
| 149 | void (*done_accessing_memory) (void); |
| 150 | |
| 151 | /* Read memory from the inferior process. This should generally be |
| 152 | called through read_inferior_memory, which handles breakpoint shadowing. |
| 153 | |
| 154 | Read LEN bytes at MEMADDR into a buffer at MYADDR. |
| 155 | |
| 156 | Returns 0 on success and errno on failure. */ |
| 157 | |
| 158 | int (*read_memory) (CORE_ADDR memaddr, unsigned char *myaddr, int len); |
| 159 | |
| 160 | /* Write memory to the inferior process. This should generally be |
| 161 | called through write_inferior_memory, which handles breakpoint shadowing. |
| 162 | |
| 163 | Write LEN bytes from the buffer at MYADDR to MEMADDR. |
| 164 | |
| 165 | Returns 0 on success and errno on failure. */ |
| 166 | |
| 167 | int (*write_memory) (CORE_ADDR memaddr, const unsigned char *myaddr, |
| 168 | int len); |
| 169 | |
| 170 | /* Query GDB for the values of any symbols we're interested in. |
| 171 | This function is called whenever we receive a "qSymbols::" |
| 172 | query, which corresponds to every time more symbols (might) |
| 173 | become available. NULL if we aren't interested in any |
| 174 | symbols. */ |
| 175 | |
| 176 | void (*look_up_symbols) (void); |
| 177 | |
| 178 | /* Send an interrupt request to the inferior process, |
| 179 | however is appropriate. */ |
| 180 | |
| 181 | void (*request_interrupt) (void); |
| 182 | |
| 183 | /* Read auxiliary vector data from the inferior process. |
| 184 | |
| 185 | Read LEN bytes at OFFSET into a buffer at MYADDR. */ |
| 186 | |
| 187 | int (*read_auxv) (CORE_ADDR offset, unsigned char *myaddr, |
| 188 | unsigned int len); |
| 189 | |
| 190 | /* Insert and remove a break or watchpoint. |
| 191 | Returns 0 on success, -1 on failure and 1 on unsupported. |
| 192 | The type is coded as follows: |
| 193 | '0' - software-breakpoint |
| 194 | '1' - hardware-breakpoint |
| 195 | '2' - write watchpoint |
| 196 | '3' - read watchpoint |
| 197 | '4' - access watchpoint */ |
| 198 | |
| 199 | int (*insert_point) (char type, CORE_ADDR addr, int len); |
| 200 | int (*remove_point) (char type, CORE_ADDR addr, int len); |
| 201 | |
| 202 | /* Returns 1 if target was stopped due to a watchpoint hit, 0 otherwise. */ |
| 203 | |
| 204 | int (*stopped_by_watchpoint) (void); |
| 205 | |
| 206 | /* Returns the address associated with the watchpoint that hit, if any; |
| 207 | returns 0 otherwise. */ |
| 208 | |
| 209 | CORE_ADDR (*stopped_data_address) (void); |
| 210 | |
| 211 | /* Reports the text, data offsets of the executable. This is |
| 212 | needed for uclinux where the executable is relocated during load |
| 213 | time. */ |
| 214 | |
| 215 | int (*read_offsets) (CORE_ADDR *text, CORE_ADDR *data); |
| 216 | |
| 217 | /* Fetch the address associated with a specific thread local storage |
| 218 | area, determined by the specified THREAD, OFFSET, and LOAD_MODULE. |
| 219 | Stores it in *ADDRESS and returns zero on success; otherwise returns |
| 220 | an error code. A return value of -1 means this system does not |
| 221 | support the operation. */ |
| 222 | |
| 223 | int (*get_tls_address) (struct thread_info *thread, CORE_ADDR offset, |
| 224 | CORE_ADDR load_module, CORE_ADDR *address); |
| 225 | |
| 226 | /* Read/Write from/to spufs using qXfer packets. */ |
| 227 | int (*qxfer_spu) (const char *annex, unsigned char *readbuf, |
| 228 | unsigned const char *writebuf, CORE_ADDR offset, int len); |
| 229 | |
| 230 | /* Fill BUF with an hostio error packet representing the last hostio |
| 231 | error. */ |
| 232 | void (*hostio_last_error) (char *buf); |
| 233 | |
| 234 | /* Read/Write OS data using qXfer packets. */ |
| 235 | int (*qxfer_osdata) (const char *annex, unsigned char *readbuf, |
| 236 | unsigned const char *writebuf, CORE_ADDR offset, |
| 237 | int len); |
| 238 | |
| 239 | /* Read/Write extra signal info. */ |
| 240 | int (*qxfer_siginfo) (const char *annex, unsigned char *readbuf, |
| 241 | unsigned const char *writebuf, |
| 242 | CORE_ADDR offset, int len); |
| 243 | |
| 244 | int (*supports_non_stop) (void); |
| 245 | |
| 246 | /* Enables async target events. Returns the previous enable |
| 247 | state. */ |
| 248 | int (*async) (int enable); |
| 249 | |
| 250 | /* Switch to non-stop (1) or all-stop (0) mode. Return 0 on |
| 251 | success, -1 otherwise. */ |
| 252 | int (*start_non_stop) (int); |
| 253 | |
| 254 | /* Returns true if the target supports multi-process debugging. */ |
| 255 | int (*supports_multi_process) (void); |
| 256 | |
| 257 | /* If not NULL, target-specific routine to process monitor command. |
| 258 | Returns 1 if handled, or 0 to perform default processing. */ |
| 259 | int (*handle_monitor_command) (char *); |
| 260 | |
| 261 | /* Returns the core given a thread, or -1 if not known. */ |
| 262 | int (*core_of_thread) (ptid_t); |
| 263 | |
| 264 | /* Read loadmaps. Read LEN bytes at OFFSET into a buffer at MYADDR. */ |
| 265 | int (*read_loadmap) (const char *annex, CORE_ADDR offset, |
| 266 | unsigned char *myaddr, unsigned int len); |
| 267 | |
| 268 | /* Target specific qSupported support. */ |
| 269 | void (*process_qsupported) (const char *); |
| 270 | |
| 271 | /* Return 1 if the target supports tracepoints, 0 (or leave the |
| 272 | callback NULL) otherwise. */ |
| 273 | int (*supports_tracepoints) (void); |
| 274 | |
| 275 | /* Read PC from REGCACHE. */ |
| 276 | CORE_ADDR (*read_pc) (struct regcache *regcache); |
| 277 | |
| 278 | /* Write PC to REGCACHE. */ |
| 279 | void (*write_pc) (struct regcache *regcache, CORE_ADDR pc); |
| 280 | |
| 281 | /* Return true if THREAD is known to be stopped now. */ |
| 282 | int (*thread_stopped) (struct thread_info *thread); |
| 283 | |
| 284 | /* Read Thread Information Block address. */ |
| 285 | int (*get_tib_address) (ptid_t ptid, CORE_ADDR *address); |
| 286 | |
| 287 | /* Pause all threads. If FREEZE, arrange for any resume attempt to |
| 288 | be ignored until an unpause_all call unfreezes threads again. |
| 289 | There can be nested calls to pause_all, so a freeze counter |
| 290 | should be maintained. */ |
| 291 | void (*pause_all) (int freeze); |
| 292 | |
| 293 | /* Unpause all threads. Threads that hadn't been resumed by the |
| 294 | client should be left stopped. Basically a pause/unpause call |
| 295 | pair should not end up resuming threads that were stopped before |
| 296 | the pause call. */ |
| 297 | void (*unpause_all) (int unfreeze); |
| 298 | |
| 299 | /* Cancel all pending breakpoints hits in all threads. */ |
| 300 | void (*cancel_breakpoints) (void); |
| 301 | |
| 302 | /* Stabilize all threads. That is, force them out of jump pads. */ |
| 303 | void (*stabilize_threads) (void); |
| 304 | |
| 305 | /* Install a fast tracepoint jump pad. TPOINT is the address of the |
| 306 | tracepoint internal object as used by the IPA agent. TPADDR is |
| 307 | the address of tracepoint. COLLECTOR is address of the function |
| 308 | the jump pad redirects to. LOCKADDR is the address of the jump |
| 309 | pad lock object. ORIG_SIZE is the size in bytes of the |
| 310 | instruction at TPADDR. JUMP_ENTRY points to the address of the |
| 311 | jump pad entry, and on return holds the address past the end of |
| 312 | the created jump pad. If a trampoline is created by the function, |
| 313 | then TRAMPOLINE and TRAMPOLINE_SIZE return the address and size of |
| 314 | the trampoline, else they remain unchanged. JJUMP_PAD_INSN is a |
| 315 | buffer containing a copy of the instruction at TPADDR. |
| 316 | ADJUST_INSN_ADDR and ADJUST_INSN_ADDR_END are output parameters that |
| 317 | return the address range where the instruction at TPADDR was relocated |
| 318 | to. If an error occurs, the ERR may be used to pass on an error |
| 319 | message. */ |
| 320 | int (*install_fast_tracepoint_jump_pad) (CORE_ADDR tpoint, CORE_ADDR tpaddr, |
| 321 | CORE_ADDR collector, |
| 322 | CORE_ADDR lockaddr, |
| 323 | ULONGEST orig_size, |
| 324 | CORE_ADDR *jump_entry, |
| 325 | CORE_ADDR *trampoline, |
| 326 | ULONGEST *trampoline_size, |
| 327 | unsigned char *jjump_pad_insn, |
| 328 | ULONGEST *jjump_pad_insn_size, |
| 329 | CORE_ADDR *adjusted_insn_addr, |
| 330 | CORE_ADDR *adjusted_insn_addr_end, |
| 331 | char *err); |
| 332 | |
| 333 | /* Return the bytecode operations vector for the current inferior. |
| 334 | Returns NULL if bytecode compilation is not supported. */ |
| 335 | struct emit_ops *(*emit_ops) (void); |
| 336 | |
| 337 | /* Returns true if the target supports disabling randomization. */ |
| 338 | int (*supports_disable_randomization) (void); |
| 339 | |
| 340 | /* Return the minimum length of an instruction that can be safely overwritten |
| 341 | for use as a fast tracepoint. */ |
| 342 | int (*get_min_fast_tracepoint_insn_len) (void); |
| 343 | |
| 344 | /* Read solib info on SVR4 platforms. */ |
| 345 | int (*qxfer_libraries_svr4) (const char *annex, unsigned char *readbuf, |
| 346 | unsigned const char *writebuf, |
| 347 | CORE_ADDR offset, int len); |
| 348 | |
| 349 | /* Return true if target supports debugging agent. */ |
| 350 | int (*supports_agent) (void); |
| 351 | |
| 352 | /* Check whether the target supports branch tracing. */ |
| 353 | int (*supports_btrace) (void); |
| 354 | |
| 355 | /* Enable branch tracing for @ptid and allocate a branch trace target |
| 356 | information struct for reading and for disabling branch trace. */ |
| 357 | struct btrace_target_info *(*enable_btrace) (ptid_t ptid); |
| 358 | |
| 359 | /* Disable branch tracing. */ |
| 360 | int (*disable_btrace) (struct btrace_target_info *tinfo); |
| 361 | |
| 362 | /* Read branch trace data into buffer. We use an int to specify the type |
| 363 | to break a cyclic dependency. */ |
| 364 | void (*read_btrace) (struct btrace_target_info *, struct buffer *, int type); |
| 365 | |
| 366 | /* Return true if target supports range stepping. */ |
| 367 | int (*supports_range_stepping) (void); |
| 368 | }; |
| 369 | |
| 370 | extern struct target_ops *the_target; |
| 371 | |
| 372 | void set_target_ops (struct target_ops *); |
| 373 | |
| 374 | #define create_inferior(program, args) \ |
| 375 | (*the_target->create_inferior) (program, args) |
| 376 | |
| 377 | #define myattach(pid) \ |
| 378 | (*the_target->attach) (pid) |
| 379 | |
| 380 | int kill_inferior (int); |
| 381 | |
| 382 | #define detach_inferior(pid) \ |
| 383 | (*the_target->detach) (pid) |
| 384 | |
| 385 | #define mourn_inferior(PROC) \ |
| 386 | (*the_target->mourn) (PROC) |
| 387 | |
| 388 | #define mythread_alive(pid) \ |
| 389 | (*the_target->thread_alive) (pid) |
| 390 | |
| 391 | #define fetch_inferior_registers(regcache, regno) \ |
| 392 | (*the_target->fetch_registers) (regcache, regno) |
| 393 | |
| 394 | #define store_inferior_registers(regcache, regno) \ |
| 395 | (*the_target->store_registers) (regcache, regno) |
| 396 | |
| 397 | #define join_inferior(pid) \ |
| 398 | (*the_target->join) (pid) |
| 399 | |
| 400 | #define target_supports_non_stop() \ |
| 401 | (the_target->supports_non_stop ? (*the_target->supports_non_stop ) () : 0) |
| 402 | |
| 403 | #define target_async(enable) \ |
| 404 | (the_target->async ? (*the_target->async) (enable) : 0) |
| 405 | |
| 406 | #define target_supports_multi_process() \ |
| 407 | (the_target->supports_multi_process ? \ |
| 408 | (*the_target->supports_multi_process) () : 0) |
| 409 | |
| 410 | #define target_process_qsupported(query) \ |
| 411 | do \ |
| 412 | { \ |
| 413 | if (the_target->process_qsupported) \ |
| 414 | the_target->process_qsupported (query); \ |
| 415 | } while (0) |
| 416 | |
| 417 | #define target_supports_tracepoints() \ |
| 418 | (the_target->supports_tracepoints \ |
| 419 | ? (*the_target->supports_tracepoints) () : 0) |
| 420 | |
| 421 | #define target_supports_fast_tracepoints() \ |
| 422 | (the_target->install_fast_tracepoint_jump_pad != NULL) |
| 423 | |
| 424 | #define target_get_min_fast_tracepoint_insn_len() \ |
| 425 | (the_target->get_min_fast_tracepoint_insn_len \ |
| 426 | ? (*the_target->get_min_fast_tracepoint_insn_len) () : 0) |
| 427 | |
| 428 | #define thread_stopped(thread) \ |
| 429 | (*the_target->thread_stopped) (thread) |
| 430 | |
| 431 | #define pause_all(freeze) \ |
| 432 | do \ |
| 433 | { \ |
| 434 | if (the_target->pause_all) \ |
| 435 | (*the_target->pause_all) (freeze); \ |
| 436 | } while (0) |
| 437 | |
| 438 | #define unpause_all(unfreeze) \ |
| 439 | do \ |
| 440 | { \ |
| 441 | if (the_target->unpause_all) \ |
| 442 | (*the_target->unpause_all) (unfreeze); \ |
| 443 | } while (0) |
| 444 | |
| 445 | #define cancel_breakpoints() \ |
| 446 | do \ |
| 447 | { \ |
| 448 | if (the_target->cancel_breakpoints) \ |
| 449 | (*the_target->cancel_breakpoints) (); \ |
| 450 | } while (0) |
| 451 | |
| 452 | #define stabilize_threads() \ |
| 453 | do \ |
| 454 | { \ |
| 455 | if (the_target->stabilize_threads) \ |
| 456 | (*the_target->stabilize_threads) (); \ |
| 457 | } while (0) |
| 458 | |
| 459 | #define install_fast_tracepoint_jump_pad(tpoint, tpaddr, \ |
| 460 | collector, lockaddr, \ |
| 461 | orig_size, \ |
| 462 | jump_entry, \ |
| 463 | trampoline, trampoline_size, \ |
| 464 | jjump_pad_insn, \ |
| 465 | jjump_pad_insn_size, \ |
| 466 | adjusted_insn_addr, \ |
| 467 | adjusted_insn_addr_end, \ |
| 468 | err) \ |
| 469 | (*the_target->install_fast_tracepoint_jump_pad) (tpoint, tpaddr, \ |
| 470 | collector,lockaddr, \ |
| 471 | orig_size, jump_entry, \ |
| 472 | trampoline, \ |
| 473 | trampoline_size, \ |
| 474 | jjump_pad_insn, \ |
| 475 | jjump_pad_insn_size, \ |
| 476 | adjusted_insn_addr, \ |
| 477 | adjusted_insn_addr_end, \ |
| 478 | err) |
| 479 | |
| 480 | #define target_emit_ops() \ |
| 481 | (the_target->emit_ops ? (*the_target->emit_ops) () : NULL) |
| 482 | |
| 483 | #define target_supports_disable_randomization() \ |
| 484 | (the_target->supports_disable_randomization ? \ |
| 485 | (*the_target->supports_disable_randomization) () : 0) |
| 486 | |
| 487 | #define target_supports_agent() \ |
| 488 | (the_target->supports_agent ? \ |
| 489 | (*the_target->supports_agent) () : 0) |
| 490 | |
| 491 | #define target_supports_btrace() \ |
| 492 | (the_target->supports_btrace ? (*the_target->supports_btrace) () : 0) |
| 493 | |
| 494 | #define target_enable_btrace(ptid) \ |
| 495 | (*the_target->enable_btrace) (ptid) |
| 496 | |
| 497 | #define target_disable_btrace(tinfo) \ |
| 498 | (*the_target->disable_btrace) (tinfo) |
| 499 | |
| 500 | #define target_read_btrace(tinfo, buffer, type) \ |
| 501 | (*the_target->read_btrace) (tinfo, buffer, type) |
| 502 | |
| 503 | #define target_supports_range_stepping() \ |
| 504 | (the_target->supports_range_stepping ? \ |
| 505 | (*the_target->supports_range_stepping) () : 0) |
| 506 | |
| 507 | /* Start non-stop mode, returns 0 on success, -1 on failure. */ |
| 508 | |
| 509 | int start_non_stop (int nonstop); |
| 510 | |
| 511 | ptid_t mywait (ptid_t ptid, struct target_waitstatus *ourstatus, int options, |
| 512 | int connected_wait); |
| 513 | |
| 514 | #define prepare_to_access_memory() \ |
| 515 | (the_target->prepare_to_access_memory \ |
| 516 | ? (*the_target->prepare_to_access_memory) () \ |
| 517 | : 0) |
| 518 | |
| 519 | #define done_accessing_memory() \ |
| 520 | do \ |
| 521 | { \ |
| 522 | if (the_target->done_accessing_memory) \ |
| 523 | (*the_target->done_accessing_memory) (); \ |
| 524 | } while (0) |
| 525 | |
| 526 | #define target_core_of_thread(ptid) \ |
| 527 | (the_target->core_of_thread ? (*the_target->core_of_thread) (ptid) \ |
| 528 | : -1) |
| 529 | |
| 530 | int read_inferior_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len); |
| 531 | |
| 532 | int write_inferior_memory (CORE_ADDR memaddr, const unsigned char *myaddr, |
| 533 | int len); |
| 534 | |
| 535 | void set_desired_inferior (int id); |
| 536 | |
| 537 | const char *target_pid_to_str (ptid_t); |
| 538 | |
| 539 | #endif /* TARGET_H */ |