X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdbserver%2Ftarget.h;h=bf653a4d08a4547b8f8886996a015a393d61d1a4;hb=c9b7b80460e47ea4554960af6814de71b3e427cb;hp=d728646d274c5b6a221cb17efab22fa2ce1d8390;hpb=8247b8236bc5528993d9b2938bc0544a5acea21d;p=deliverable%2Fbinutils-gdb.git diff --git a/gdbserver/target.h b/gdbserver/target.h index d728646d27..bf653a4d08 100644 --- a/gdbserver/target.h +++ b/gdbserver/target.h @@ -70,27 +70,6 @@ class process_target; shared code. */ struct process_stratum_target { - /* Multiple-filesystem-aware open. Like open(2), but operating in - the filesystem as it appears to process PID. Systems where all - processes share a common filesystem should set this to NULL. - If NULL, the caller should fall back to open(2). */ - int (*multifs_open) (int pid, const char *filename, - int flags, mode_t mode); - - /* Multiple-filesystem-aware unlink. Like unlink(2), but operates - in the filesystem as it appears to process PID. Systems where - all processes share a common filesystem should set this to NULL. - If NULL, the caller should fall back to unlink(2). */ - int (*multifs_unlink) (int pid, const char *filename); - - /* Multiple-filesystem-aware readlink. Like readlink(2), but - operating in the filesystem as it appears to process PID. - Systems where all processes share a common filesystem should - set this to NULL. If NULL, the caller should fall back to - readlink(2). */ - ssize_t (*multifs_readlink) (int pid, const char *filename, - char *buf, size_t bufsiz); - /* Return the breakpoint kind for this target based on PC. The PCPTR is adjusted to the real memory location in case a flag (e.g., the Thumb bit on ARM) was present in the PC. */ @@ -501,6 +480,29 @@ public: string should be copied into a buffer by the client if the string will not be immediately used, or if it must persist. */ virtual char *pid_to_exec_file (int pid); + + /* Return true if any of the multifs ops is supported. */ + virtual bool supports_multifs (); + + /* Multiple-filesystem-aware open. Like open(2), but operating in + the filesystem as it appears to process PID. Systems where all + processes share a common filesystem should not override this. + The default behavior is to use open(2). */ + virtual int multifs_open (int pid, const char *filename, + int flags, mode_t mode); + + /* Multiple-filesystem-aware unlink. Like unlink(2), but operates + in the filesystem as it appears to process PID. Systems where + all processes share a common filesystem should not override this. + The default behavior is to use unlink(2). */ + virtual int multifs_unlink (int pid, const char *filename); + + /* Multiple-filesystem-aware readlink. Like readlink(2), but + operating in the filesystem as it appears to process PID. + Systems where all processes share a common filesystem should + not override this. The default behavior is to use readlink(2). */ + virtual ssize_t multifs_readlink (int pid, const char *filename, + char *buf, size_t bufsiz); }; extern process_stratum_target *the_target;