Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 09-30-2012, 01:10 PM   #1
LQ Newbie
Registered: Sep 2012
Posts: 4

Rep: Reputation: Disabled
Few Memory location within a page not accessible from GDB


I am seeing this issue, where few memory location within a page are not accessible from GDB, but others are.

Now my doubt is, if the page entry in page table doesn't have PTE_U set, then whole page should not be accessible.

Could anyone give me some idea, why this could happen, so that I can fix the issue.

(gdb) p /x *( 0xef7fdfff-5)
$12 = 0x0
(gdb) p /x *( 0xef7fdfff-4)
$13 = 0x0
(gdb) p /x *( 0xef7fdfff-3)
$14 = 0x0
(gdb) p /x *( 0xef7fdfff-2)
Cannot access memory at address 0xef7fdffd
(gdb) p /x *( 0xef7fdfff-1)
Cannot access memory at address 0xef7fdffe
(gdb) p /x *( 0xef7fdfff)
Cannot access memory at address 0xef7fdfff

Old 10-01-2012, 07:26 AM   #2
LQ Guru
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
Originally Posted by kronus View Post
I am seeing this issue, where few memory location within a page are not accessible from GDB, but others are.
I am not sure which of two things you are misunderstanding:

1) There is a default size for the memory reference *(address) in gdb. I couldn't found that described in gdb documentation (probably is there and I don't read such documentation well). But a google search found a "hacking" site that at least told me that default size in 32 bit Linux is 32 bits.

2) Each 8 bits has its own address. A 32 bit memory reference is effectively accessing four sequential addresses starting at the one you specify. All four need to be mapped, not just the first one.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Trying to make local web page accessible from internet (IP question) SkyerSK Linux - Newbie 8 12-27-2010 12:43 PM
PCIe dma-able memory location in physical memory for Intel Nehalem / Tylersburg arch robvoo Linux - Kernel 4 07-31-2009 06:21 AM
gdb memory location breaker arunachalam Linux - Software 1 09-19-2007 11:59 AM
Change GDB location joelcomp1 Linux - Newbie 1 07-03-2007 08:28 AM
Accessible stack memory for a process on IA-64 muzzafukka Linux - General 0 05-24-2004 08:57 AM

All times are GMT -5. The time now is 06:47 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration