Andes Workshop

It is currently Fri Mar 29, 2024 4:39 am

All times are UTC + 8 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: 修改.Andesgdbinit的方法
PostPosted: Wed Jan 16, 2013 6:27 pm 
Offline
User avatar

Joined: Fri Mar 04, 2011 9:36 pm
Posts: 500
不建議修改.Andesgdbinit。
因為怕toolchain更新忘了加上去。
如果真的要改,請參考下面的說明。
.Andesgdbinit路徑:在toolchain的bin目錄裡。

1. 在target一連上的時候
請加在這2個地方
define target hookpost-remote
set $nds32_target = 1
xxxxxxxxx
end


define target hookpost-extended-remote
set $nds32_target = 1
xxxxxxxxxxxxxxx
end


2. 在load code之前
# Disable cache when loading code
define hook-load
xxxxxxxxxxxxxx
if $nds32_target
if $nds32_elf_check
nds32 elf-check
end

set $old_mr8 = $mr8
set $mr8 = 0
maintenance packet qPart:nds32:request:InvalidateCache
maintenance packet qPart:nds32:request:MemAccBus
end
end


3. 在load code之後
define hookpost-load
xxxxxxxxxxxxxxxxxxxx
if $nds32_target
maintenance packet qPart:nds32:request:MemAccCPU
set $mr8 = $old_mr8
nds32 set-gloss
end
end

上面的邏輯很簡單..在某指令xxxx執行之前,就叫hook-xxxx,
在某個指令執行之後,就叫hookpost-xxxx。
xxxx就看需要,例如加next也行。


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: Google [Bot] and 18 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