From: Daniel Jacobowitz <drow@mvista.com>
To: David Stroupe <dstroupe@keyed-upsoftware.com>
Cc: gdb@sources.redhat.com
Subject: Re: gdb and mmap
Date: Mon, 13 May 2002 12:24:00 -0000 [thread overview]
Message-ID: <20020513192449.GA1757@nevyn.them.org> (raw)
In-Reply-To: <3CE011C3.6060807@keyed-upsoftware.com>
On Mon, May 13, 2002 at 02:19:31PM -0500, David Stroupe wrote:
> I am mmap()ing a memory range proovided by a driver. In gdb if I do a
> /x address I get an Cannot access memory at address 0x4001b000 error.
> If on the other hand I do somethink like
> str = (char*) address;
> printf("%s\n", str);
>
> I see the string that is stored in the address.
>
> Is there a way for me to tell gdb that the mmap()ped address is a valid one?
This is not a bug in GDB but a limitation of your operating system.
For instance, GNU/Linux chooses not to expose I/O mappings to ptrace().
I believe it can't generically be done safely, without some significant
kernel rewrite.
You can just write a function to peek at the address and call it via
'call' or 'print' at the GDB prompt.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2002-05-13 19:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-13 12:19 David Stroupe
2002-05-13 12:24 ` Daniel Jacobowitz [this message]
2007-07-13 8:15 GDB " Jan Somr
2007-07-13 11:44 ` Daniel Jacobowitz
2007-07-17 3:46 ` Rodrigo Rubira Branco
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=20020513192449.GA1757@nevyn.them.org \
--to=drow@mvista.com \
--cc=dstroupe@keyed-upsoftware.com \
--cc=gdb@sources.redhat.com \
/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