From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14794 invoked by alias); 15 Aug 2011 09:08:48 -0000 Received: (qmail 14734 invoked by uid 22791); 15 Aug 2011 09:08:47 -0000 X-SWARE-Spam-Status: No, hits=-0.0 required=5.0 tests=BAYES_20 X-Spam-Check-By: sourceware.org Received: from smtp21.cstnet.cn (HELO cstnet.cn) (159.226.251.21) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 15 Aug 2011 09:08:31 +0000 Received: from yongyong.yang ( [159.226.20.14] ) by ajax-webmail-app1 (Coremail) ; Mon, 15 Aug 2011 17:08:28 +0800 (CST) Date: Mon, 15 Aug 2011 09:08:00 -0000 From: yongyong.yang@ia.ac.cn To: gdb@sourceware.org Message-ID: <54475b.156ef.131ccb300f5.Coremail.yongyong.yang@ia.ac.cn> Subject: What role does gdb/remote.c play? MIME-Version: 1.0 Content-Type: text/plain; charset=GBK Content-Transfer-Encoding: 7bit X-CM-CTRLDATA: gBwVRmZvb3Rlcl90eHQ9NTI3OjY= X-CM-TRANSID:RgCowJDrnjMM4khOQHh9AQ--.38684W X-CM-SenderInfo: 51rqw5xrqjh5xdqjqxndoduhdfq/1tbiAgkBCUzvvxhBaQAAsv X-Coremail-Antispam: 1Ur529EdanIXcx71UUUUU7IcSsGvfJ3iIAIbVAYjsxI4VWxJw CS07vEb4IE77IF4wCS07vE1I0E4x80FVAKz4kxMIAIbVAFxVCaYxvI4VCIwcAKzIAtYxBI daVFxhVjvjDU= Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-08/txt/msg00038.txt.bz2 Hey, everyone. Recently I am trying to port gdb for a remote target. I use remote-m32r-sdi as start point. when I debug it, I find the global variable current_target has the value specified in remote.c, furthermore I find the generated file init.c has both initialize_XXX() and _initialize_remote() , where XXX is the target I specified for my target. So when I run command 'target remote localhost:[port]', it is remote_open() that handles the argument and etc. Can someone explain what is wrong. Thank you.