From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29525 invoked by alias); 30 Aug 2012 05:14:14 -0000 Received: (qmail 29515 invoked by uid 22791); 30 Aug 2012 05:14:12 -0000 X-SWARE-Spam-Status: No, hits=-4.4 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 30 Aug 2012 05:13:59 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1T6x4m-0000bC-N8 from Yao_Qi@mentor.com ; Wed, 29 Aug 2012 22:13:56 -0700 Received: from SVR-ORW-FEM-03.mgc.mentorg.com ([147.34.97.39]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 29 Aug 2012 22:13:56 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.1.289.1; Wed, 29 Aug 2012 22:13:55 -0700 Message-ID: <503EF699.1060700@codesourcery.com> Date: Thu, 30 Aug 2012 05:14:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120717 Thunderbird/14.0 MIME-Version: 1.0 To: Kaushik Phatak CC: Pedro Alves , "gdb-patches@sourceware.org" Subject: Re: [RFC] New GDB Port CR16 References: <503CE3BA.2090602@redhat.com> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-08/txt/msg00861.txt.bz2 On 08/30/2012 12:49 PM, Kaushik Phatak wrote: > I have another cr16-tdep.c file (might call it cr16-linux-tdep.c) that would > work with the kernel port. They have slightly different register set and use > different breakpoint instruction. I am still not sure how to go about that part. We've handled different breakpoint instructions in other ports, and you can follow the similar way for your port. You need a 'struct gdbarch_tdep' defined in ${arch}-tdep.h, with a field 'breakpoint', for example, which points to the exact breakpoint instruction you'll use. Set field 'breakpoint' in ${arch}-linux-tdep.c:${arch}_uclinux_init_abi according to some ELF header or attributes. Return correct breakpoint instruction in ${arch}_breakpoint_from_pc. Set ${arch} to 'tic6x' above, you'll see the example in details. With respect to different register sets, you may have to use 'target description' feature in GDB. -- Yao