From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1689 invoked by alias); 28 Jul 2009 11:22:36 -0000 Received: (qmail 1679 invoked by uid 22791); 28 Jul 2009 11:22:35 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 28 Jul 2009 11:22:29 +0000 Received: (qmail 27832 invoked from network); 28 Jul 2009 11:22:27 -0000 Received: from unknown (HELO orlando) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 28 Jul 2009 11:22:27 -0000 From: Pedro Alves To: Aleksandar Ristovski Subject: Re: [patch] nto-procfs.c: Add to_xfer_partial Date: Tue, 28 Jul 2009 12:01:00 -0000 User-Agent: KMail/1.9.10 Cc: gdb-patches@sourceware.org References: <200907241400.22710.pedro@codesourcery.com> <4A6E03B3.7080805@qnx.com> In-Reply-To: <4A6E03B3.7080805@qnx.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907281222.26339.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-07/txt/msg00672.txt.bz2 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