From: Thiago Jung Bauermann <bauerman@br.ibm.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC] problem with read_memory_string (reads 8 bytes at a time)
Date: Wed, 08 Apr 2009 19:01:00 -0000 [thread overview]
Message-ID: <1239217285.8871.90.camel@localhost.localdomain> (raw)
In-Reply-To: <20090408182650.GE7535@adacore.com>
El mié, 08-04-2009 a las 11:26 -0700, Joel Brobecker escribió:
> b. Read 8 bytes from 0x1002e0 + 8 = 0x1002e8:
> i. The section ends at 0x001102ec, so bfd returns only 4 bytes read.
> ii. We find out that only 4 bytes were read, so we still need to
> read another 4 bytes for the 8byte read to be complete
> iii. the next 4byte read doesn't find a section from which to
> read the 4bytes, and so returns 0 signifying an error.
>
> I don't really know how to fix this issue except by reading the string
> one byte at a time :-(. Any suggestion?
I suggest using target_read_string. If I understand its code correctly,
it handles the corner case you hit.
I thought that valprint.c:read_string also handled that, but now that I
read the code again, it looks like it would fail too. :-(
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center
next prev parent reply other threads:[~2009-04-08 19:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-08 18:27 Joel Brobecker
2009-04-08 19:01 ` Thiago Jung Bauermann [this message]
2009-04-08 21:26 ` Joel Brobecker
2009-04-08 22:18 ` Thiago Jung Bauermann
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=1239217285.8871.90.camel@localhost.localdomain \
--to=bauerman@br.ibm.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@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