Andes Workshop

It is currently Thu Mar 28, 2024 8:52 pm

All times are UTC + 8 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: .text區的記憶體無法寫入的設定方法
PostPosted: Wed Sep 21, 2011 3:25 pm 
Offline
User avatar

Joined: Fri Mar 04, 2011 9:36 pm
Posts: 500
很多user發現,AndeSight的memory view在.text區的記憶體無法寫入。
例如.text區由0x500000開始,則0x500000起的一段memory無法寫入。

因為我們預設有一個"set trust-readonly-sections 1"的設定,
這個設定會讓 gdb 不會去remote memory 讀 readonly-section 的值,
而是從local file讀. 所以你會有沒有寫進去的錯覺, 其實寫入還是會執行,
只是讀出會從local file

解決方法:
在 toolchain 下的 .Andesgdbinit 裡開頭會有一行
set trust-readonly-sections 1
請把他移掉, 註解掉, 或是改成 0
Attachment:
off.gif
off.gif [ 13.57 KiB | Viewed 8670 times ]


或者在gdb command view裡可以下command,僅限當次有效。
set trust-readonly-sections off
如下圖:

Attachment:
q1.gif
q1.gif [ 10.75 KiB | Viewed 8671 times ]


Attachment:
q2.gif
q2.gif [ 7.31 KiB | Viewed 8671 times ]


Top
 Profile Send private message E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 23 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group