Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(438)

Side by Side Diff: gdb/gdbserver/target.h

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gdb/gdbserver/spu-low.c ('k') | gdb/gdbserver/target.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Target operations for the remote server for GDB. 1 /* Target operations for the remote server for GDB.
2 Copyright (C) 2002-2005, 2007-2012 Free Software Foundation, Inc. 2 Copyright (C) 2002-2005, 2007-2012 Free Software Foundation, Inc.
3 3
4 Contributed by MontaVista Software. 4 Contributed by MontaVista Software.
5 5
6 This file is part of GDB. 6 This file is part of GDB.
7 7
8 This program is free software; you can redistribute it and/or modify 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 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 10 the Free Software Foundation; either version 3 of the License, or
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 { 46 {
47 ptid_t thread; 47 ptid_t thread;
48 48
49 /* How to "resume". */ 49 /* How to "resume". */
50 enum resume_kind kind; 50 enum resume_kind kind;
51 51
52 /* If non-zero, send this signal when we resume, or to stop the 52 /* If non-zero, send this signal when we resume, or to stop the
53 thread. If stopping a thread, and this is 0, the target should 53 thread. If stopping a thread, and this is 0, the target should
54 stop the thread however it best decides to (e.g., SIGSTOP on 54 stop the thread however it best decides to (e.g., SIGSTOP on
55 linux; SuspendThread on win32). This is a host signal value (not 55 linux; SuspendThread on win32). This is a host signal value (not
56 enum target_signal). */ 56 enum gdb_signal). */
57 int sig; 57 int sig;
58 }; 58 };
59 59
60 /* Generally, what has the program done? */ 60 /* Generally, what has the program done? */
61 enum target_waitkind 61 enum target_waitkind
62 { 62 {
63 /* The program has exited. The exit status is in 63 /* The program has exited. The exit status is in
64 value.integer. */ 64 value.integer. */
65 TARGET_WAITKIND_EXITED, 65 TARGET_WAITKIND_EXITED,
66 66
(...skipping 23 matching lines...) Expand all
90 }; 90 };
91 91
92 struct target_waitstatus 92 struct target_waitstatus
93 { 93 {
94 enum target_waitkind kind; 94 enum target_waitkind kind;
95 95
96 /* Forked child pid, execd pathname, exit status or signal number. */ 96 /* Forked child pid, execd pathname, exit status or signal number. */
97 union 97 union
98 { 98 {
99 int integer; 99 int integer;
100 » enum target_signal sig; 100 » enum gdb_signal sig;
101 ptid_t related_pid; 101 ptid_t related_pid;
102 char *execd_pathname; 102 char *execd_pathname;
103 } 103 }
104 value; 104 value;
105 }; 105 };
106 106
107 /* Options that can be passed to target_ops->wait. */ 107 /* Options that can be passed to target_ops->wait. */
108 108
109 #define TARGET_WNOHANG 1 109 #define TARGET_WNOHANG 1
110 110
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 int (*supports_disable_randomization) (void); 387 int (*supports_disable_randomization) (void);
388 388
389 /* Return the minimum length of an instruction that can be safely overwritten 389 /* Return the minimum length of an instruction that can be safely overwritten
390 for use as a fast tracepoint. */ 390 for use as a fast tracepoint. */
391 int (*get_min_fast_tracepoint_insn_len) (void); 391 int (*get_min_fast_tracepoint_insn_len) (void);
392 392
393 /* Read solib info on SVR4 platforms. */ 393 /* Read solib info on SVR4 platforms. */
394 int (*qxfer_libraries_svr4) (const char *annex, unsigned char *readbuf, 394 int (*qxfer_libraries_svr4) (const char *annex, unsigned char *readbuf,
395 unsigned const char *writebuf, 395 unsigned const char *writebuf,
396 CORE_ADDR offset, int len); 396 CORE_ADDR offset, int len);
397
398 /* Return true if target supports debugging agent. */
399 int (*supports_agent) (void);
397 }; 400 };
398 401
399 extern struct target_ops *the_target; 402 extern struct target_ops *the_target;
400 403
401 void set_target_ops (struct target_ops *); 404 void set_target_ops (struct target_ops *);
402 405
403 #define create_inferior(program, args) \ 406 #define create_inferior(program, args) \
404 (*the_target->create_inferior) (program, args) 407 (*the_target->create_inferior) (program, args)
405 408
406 #define myattach(pid) \ 409 #define myattach(pid) \
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 adjusted_insn_addr_end, \ 510 adjusted_insn_addr_end, \
508 err) 511 err)
509 512
510 #define target_emit_ops() \ 513 #define target_emit_ops() \
511 (the_target->emit_ops ? (*the_target->emit_ops) () : NULL) 514 (the_target->emit_ops ? (*the_target->emit_ops) () : NULL)
512 515
513 #define target_supports_disable_randomization() \ 516 #define target_supports_disable_randomization() \
514 (the_target->supports_disable_randomization ? \ 517 (the_target->supports_disable_randomization ? \
515 (*the_target->supports_disable_randomization) () : 0) 518 (*the_target->supports_disable_randomization) () : 0)
516 519
520 #define target_supports_agent() \
521 (the_target->supports_agent ? \
522 (*the_target->supports_agent) () : 0)
523
517 /* Start non-stop mode, returns 0 on success, -1 on failure. */ 524 /* Start non-stop mode, returns 0 on success, -1 on failure. */
518 525
519 int start_non_stop (int nonstop); 526 int start_non_stop (int nonstop);
520 527
521 ptid_t mywait (ptid_t ptid, struct target_waitstatus *ourstatus, int options, 528 ptid_t mywait (ptid_t ptid, struct target_waitstatus *ourstatus, int options,
522 int connected_wait); 529 int connected_wait);
523 530
524 #define prepare_to_access_memory() \ 531 #define prepare_to_access_memory() \
525 (the_target->prepare_to_access_memory \ 532 (the_target->prepare_to_access_memory \
526 ? (*the_target->prepare_to_access_memory) () \ 533 ? (*the_target->prepare_to_access_memory) () \
527 : 0) 534 : 0)
528 535
529 #define done_accessing_memory() \ 536 #define done_accessing_memory() \
530 do \ 537 do \
531 { \ 538 { \
532 if (the_target->done_accessing_memory) \ 539 if (the_target->done_accessing_memory) \
533 (*the_target->done_accessing_memory) (); \ 540 (*the_target->done_accessing_memory) (); \
534 } while (0) 541 } while (0)
535 542
543 #define target_core_of_thread(ptid) \
544 (the_target->core_of_thread ? (*the_target->core_of_thread) (ptid) \
545 : -1)
546
536 int read_inferior_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len); 547 int read_inferior_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len);
537 548
538 int write_inferior_memory (CORE_ADDR memaddr, const unsigned char *myaddr, 549 int write_inferior_memory (CORE_ADDR memaddr, const unsigned char *myaddr,
539 int len); 550 int len);
540 551
541 void set_desired_inferior (int id); 552 void set_desired_inferior (int id);
542 553
543 const char *target_pid_to_str (ptid_t); 554 const char *target_pid_to_str (ptid_t);
544 555
545 const char *target_waitstatus_to_string (const struct target_waitstatus *); 556 const char *target_waitstatus_to_string (const struct target_waitstatus *);
546 557
547 #endif /* TARGET_H */ 558 #endif /* TARGET_H */
OLDNEW
« no previous file with comments | « gdb/gdbserver/spu-low.c ('k') | gdb/gdbserver/target.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698