From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4297 invoked by alias); 9 Aug 2011 15:33:16 -0000 Received: (qmail 4287 invoked by uid 22791); 9 Aug 2011 15:33:16 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-fx0-f49.google.com (HELO mail-fx0-f49.google.com) (209.85.161.49) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 09 Aug 2011 15:33:02 +0000 Received: by fxd20 with SMTP id 20so190350fxd.36 for ; Tue, 09 Aug 2011 08:33:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.134.88 with SMTP id i24mr9482194fat.68.1312903981293; Tue, 09 Aug 2011 08:33:01 -0700 (PDT) Received: by 10.223.111.77 with HTTP; Tue, 9 Aug 2011 08:33:01 -0700 (PDT) Date: Tue, 09 Aug 2011 15:33:00 -0000 Message-ID: Subject: diag_dump_* From: Michael Bergandi To: eCos Developer List Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact ecos-devel-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-devel-owner@ecos.sourceware.org X-SW-Source: 2011-08/txt/msg00000.txt.bz2 Hi all, I have been poking around looking at the diag_dump_* routines in infra/current/src/diag.cxx and I see the following test in diag_vdump_buf_with_offset() that makes me wonder what the intent was: diag_vdump_buf_with_offset(__printf_fun *pf, cyg_uint8 *p, CYG_ADDRWORD s, cyg_uint8 *base) { int i, c; if ((CYG_ADDRWORD)s > (CYG_ADDRWORD)p) { s = (CYG_ADDRWORD)s - (CYG_ADDRWORD)p; } My understanding of the parameters are: pf = pointer to function to use to print p = pointer to buffer that you want to print s = size (number of bytes to print) base = base address to use for printing the addresses I hope this is right. I can't find any documentation that actually says what these parameters are. There is no documentation for the function in diag.cxx, diag.hxx, or the reference manual. So, the test above doesn't make much sense based on what I understand the parameters to be. If I stretch my brain a bit, it looks like 's' is being treated as a pointer in the test and not a size or length value. Is this right or what is intended? -- Mike