public inbox for ecos-devel@sourceware.org
 help / color / mirror / Atom feed
From: Michael Bergandi <mbergandi@gmail.com>
To: eCos Developer List <ecos-devel@ecos.sourceware.org>
Subject: diag_dump_*
Date: Tue, 09 Aug 2011 15:33:00 -0000	[thread overview]
Message-ID: <CAOHvnTNK2=UV6XRmhBF=v+M05Amuq+X-VGEZgOJYjoy+w8mgzA@mail.gmail.com> (raw)

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

             reply	other threads:[~2011-08-09 15:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-09 15:33 Michael Bergandi [this message]
2011-08-09 15:43 ` diag_dump_* Gary Thomas

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='CAOHvnTNK2=UV6XRmhBF=v+M05Amuq+X-VGEZgOJYjoy+w8mgzA@mail.gmail.com' \
    --to=mbergandi@gmail.com \
    --cc=ecos-devel@ecos.sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).