Andes Workshop

It is currently Thu Jul 29, 2021 12:51 am

All times are UTC + 8 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: 用shell script時,ctrl-C會退出gdb的解決方法
PostPosted: Tue Apr 24, 2012 2:36 pm 
Offline
User avatar

Joined: Fri Mar 04, 2011 9:36 pm
Posts: 500
(1)複製問題的方法
附件解壓縮後有2個sh檔。
如附件test.sh,只要將gdb包在shell script裡,用./test.sh啟動。
按下Ctrl-C之後會跳出gdb。

(2)問題發生的原因
因為Andesight v200 MCU的gdb是用Mingw編譯,
但是執行環境為cygwin。

(3)解法
sh檔的寫法
# 忽略 SIGINT
trap "" 2
# gdb command
gdb ...
# 預設狀態 SIGINT
trap 2

example請將附件解壓縮,看裡面的start_gdb.sh。

Attachment:
example.zip [516 Bytes]
Downloaded 757 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 1 guest


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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group