Andes Workshop
http://forum.andestech.com/

gdb查看真實記憶體的方法(20111117更新)
http://forum.andestech.com/viewtopic.php?f=23&t=146
Page 1 of 1

Author:  cindy [ Tue Sep 20, 2011 1:36 pm ]
Post subject:  gdb查看真實記憶體的方法(20111117更新)

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

Author:  cindy [ Thu Nov 17, 2011 6:29 pm ]
Post subject:  Re: gdb查看真實記憶體的方法(20111117更新)

上網抓到的說明,不過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.

Author:  cindy [ Fri Dec 23, 2011 6:46 am ]
Post subject:  Re: gdb查看真實記憶體的方法(20111117更新)

在Andesight裡可以直接改成看真實記憶體。

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

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

Page 1 of 1 All times are UTC + 8 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/