Andes Workshop

It is currently Thu Mar 28, 2024 10:40 pm

All times are UTC + 8 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: gdb查看真實記憶體的方法(20111117更新)
PostPosted: Tue Sep 20, 2011 1:36 pm 
Offline
User avatar

Joined: Fri Mar 04, 2011 9:36 pm
Posts: 500
因為.text預設是不會更改,gdb cache一份內容,
所以memory的變動不會呈現。
如果要在gdb裡查看真實記憶體,
請在gdb下這個command:
set trust-readonly-sections off
下面pdf檔有比較詳細的說明。
Attachment:
gdb查看真實Memory的方法.pdf [347.23 KiB]
Downloaded 1291 times


Top
 Profile Send private message E-mail  
 
 Post subject: Re: gdb查看真實記憶體的方法(20111117更新)
PostPosted: Thu Nov 17, 2011 6:29 pm 
Offline
User avatar

Joined: Fri Mar 04, 2011 9:36 pm
Posts: 500
上網抓到的說明,不過Andes的平台似乎預設為on。

set trust-readonly-sections on
Tell GDB that readonly sections in your object file really are read-only (i.e. that their contents will not change). In that case, GDB can fetch values from these sections out of the object file, rather than from the target program. For some targets (notably embedded ones), this can be a significant enhancement to debugging performance.
The default is off.


set trust-readonly-sections off
Tell GDB not to trust readonly sections. This means that the contents of the section might change while the program is running, and must therefore be fetched from the target when needed.


Top
 Profile Send private message E-mail  
 
 Post subject: Re: gdb查看真實記憶體的方法(20111117更新)
PostPosted: Fri Dec 23, 2011 6:46 am 
Offline
User avatar

Joined: Fri Mar 04, 2011 9:36 pm
Posts: 500
在Andesight裡可以直接改成看真實記憶體。

方法:
在 toolchain 下的 .Andesgdbinit 裡開頭會有一行
set trust-readonly-sections 1
請把他移掉, 註解掉, 或是改成 0

請參考這一篇
viewtopic.php?f=18&t=149


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

All times are UTC + 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 15 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