This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] nto-procfs.c: Add to_xfer_partial
- From: Pedro Alves <pedro at codesourcery dot com>
- To: Aleksandar Ristovski <aristovski at qnx dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 28 Jul 2009 12:22:26 +0100
- Subject: Re: [patch] nto-procfs.c: Add to_xfer_partial
- References: <h0rpib$7te$1@ger.gmane.org> <200907241400.22710.pedro@codesourcery.com> <4A6E03B3.7080805@qnx.com>
On Monday 27 July 2009 20:44:51, Aleksandar Ristovski wrote:
> Pedro Alves wrote:
> > (( Note: It isn't correct to defer to the target beneath for
> > TARGET_OBJECT_MEMORY (and similars) objects, but, I see that nto-procfs.c
> > is still implementing deprecated_xfer_memory. ))
>
> Did you want me to make changes here?
Nope, consider it an FYI.
>
> >> + /* For 32-bit architecture, size of auxv_t is 8 bytes. */
> >> + const unsigned int sizeof_auxv_t = 8;
> >
> > NTO doesn't support any 64-bit architecture?
>
> No, not yet.
Okay.
>
> >
> >> + enum bfd_endian byte_order;
> >> +
> >> + /* Skip over argc, argv and envp... (see comment in ldd.c) */
> >> + if (target_read_memory (initial_stack + data_ofs, targ32, sizeof (targ32))
> >> + != 0)
> >> + return 0;
> >
> > Can you paste here that ldd.c comment too? You had pasted it in the
> > equivalent gdbserver bit.
>
> Done.
Thanks!
On Monday 27 July 2009 20:44:51, Aleksandar Ristovski wrote:
> +static LONGEST
> +procfs_xfer_partial (struct target_ops *ops, enum target_object object,
> + const char *annex, gdb_byte *readbuf,
> + const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
> +{
> + if (object == TARGET_OBJECT_AUXV
> + && readbuf)
> + {
> + int err;
> + CORE_ADDR initial_stack;
> + debug_process_t procinfo;
> +
> + if (offset > 0)
> + return 0;
This offset > 0 check isn't really correct. Would it be hard to
make this work with partial transfers?
--
Pedro Alves