LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


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

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


Hi,

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

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

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
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.
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:58 AM.

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