Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: gdb@sources.redhat.com
Subject: Re: [RFC] File-I/O, target access to host file system via gdb remote protocol enhancement
Date: Tue, 12 Nov 2002 13:24:00 -0000	[thread overview]
Message-ID: <20021112212526.GA28814@nevyn.them.org> (raw)
In-Reply-To: <20021111131354.N10395@cygbert.vinschen.de>

On Mon, Nov 11, 2002 at 01:13:54PM +0100, Corinna Vinschen wrote:
> Hi,
> 
> this RFC tries to introduce a remote protocol enhancement, which
> already has been implemented at Red Hat.  The idea is to allow
> the remote target (which likely has no own file system at all)
> to access the host file system to store and retrieve data from
> a gdb session, as if the hosts filesystem is local to the target.

This is a great thing.  I remember using similar functionality both for
debugging and for running certain unnamed industry benchmarks...

> A second part of this implementation is to map the basic stdio
> streams (file descriptors 0-2) to the gdb console, to enable
> the user to serve a remote target application interactively.
> This should work in gdb's CLI as well as in the GUI.

I like this one too; but I'm not sure that I like linking it to the
remote-syscall interface.  Implementation-wise, that's the most useful
method for a stub like RedBoot; but for a larger system like gdbserver,
it's useful to allocate the program a normal pseudo-terminal as if it
had a console.  And to do character rather than line I/O.

As I'm sure Andrew will remind me, my suggestion doesn't fit the
current remote protocol very well; it's not synchronous enough for one
thing.  So don't take this as an objection, and I'll come back to
proper remote console support a little later.  This'll be a nice
starting point.

> B.3 struct stat
> 
>   The buffer of type struct stat used by the target and GDB is defined
>   as follows:
> 
>     struct stat {
> 	unsigned int  st_dev;      /* device */
> 	unsigned int  st_ino;      /* inode */
> 	mode_t        st_mode;     /* protection */
> 	unsigned int  st_nlink;    /* number of hard links */
> 	unsigned int  st_uid;      /* user ID of owner */
> 	unsigned int  st_gid;      /* group ID of owner */
> 	unsigned int  st_rdev;     /* device type (if inode device) */
> 	unsigned long st_size;     /* total size, in bytes */
> 	unsigned long st_blksize;  /* blocksize for filesystem I/O */
> 	unsigned long st_blocks;   /* number of blocks allocated */
> 	time_t        st_atime;    /* time of last access */
> 	time_t        st_mtime;    /* time of last modification */
> 	time_t        st_ctime;    /* time of last change */
>     };
> 
>   The integral datatypes are conforming to the definition in B.1 so this
>   structure is of size 64 bytes.

Ick, 32-bit st_ino... why bother to transfer it if you say "no meaning
for the target"?

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


  parent reply	other threads:[~2002-11-12 21:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-11  4:14 Corinna Vinschen
2002-11-11 22:01 ` [RFC] File-I/O, target access to host file system via gdb , " Eli Zaretskii
2002-11-12  0:40   ` Corinna Vinschen
2002-11-12 13:24 ` Daniel Jacobowitz [this message]
     [not found]   ` <20021113143522.T10395@cygbert.vinschen.de>
2002-11-13  6:30     ` [RFC] File-I/O, target access to host file system via gdb " Daniel Jacobowitz
2002-11-13  6:52       ` Corinna Vinschen
2002-11-13  7:08         ` Daniel Jacobowitz
2002-11-13  7:44           ` Corinna Vinschen
2003-02-26 21:19   ` Andrew Cagney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021112212526.GA28814@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox