From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7589 invoked by alias); 23 Oct 2012 13:03:24 -0000 Received: (qmail 7568 invoked by uid 22791); 23 Oct 2012 13:03:22 -0000 X-SWARE-Spam-Status: No, hits=-5.0 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from co1ehsobe004.messaging.microsoft.com (HELO co1outboundpool.messaging.microsoft.com) (216.32.180.187) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 23 Oct 2012 13:03:07 +0000 Received: from mail198-co1-R.bigfish.com (10.243.78.229) by CO1EHSOBE014.bigfish.com (10.243.66.77) with Microsoft SMTP Server id 14.1.225.23; Tue, 23 Oct 2012 13:03:06 +0000 Received: from mail198-co1 (localhost [127.0.0.1]) by mail198-co1-R.bigfish.com (Postfix) with ESMTP id 1E150D0014C; Tue, 23 Oct 2012 13:03:06 +0000 (UTC) X-Forefront-Antispam-Report: CIP:59.163.77.177;KIP:(null);UIP:(null);IPV:NLI;H:KCHJEXHC02.kpit.com;RD:59.163.77.177.static.vsnl.net.in;EFVD:NLI X-SpamScore: -3 X-BigFish: VPS-3(zz1102I1432Idf9Izz1202h1d1ah1d2ahzzz2dh2a8h668h839h944hd25hf0ah107ah1220h1288h12a5h12a9h12bdh137ah13b6h1441h14ddh1504h1155h) Received: from mail198-co1 (localhost.localdomain [127.0.0.1]) by mail198-co1 (MessageSwitch) id 1350997384471579_22836; Tue, 23 Oct 2012 13:03:04 +0000 (UTC) Received: from CO1EHSMHS018.bigfish.com (unknown [10.243.78.236]) by mail198-co1.bigfish.com (Postfix) with ESMTP id 6B89D1C00B1; Tue, 23 Oct 2012 13:03:04 +0000 (UTC) Received: from KCHJEXHC02.kpit.com (59.163.77.177) by CO1EHSMHS018.bigfish.com (10.243.66.28) with Microsoft SMTP Server (TLS) id 14.1.225.23; Tue, 23 Oct 2012 13:03:03 +0000 Received: from KCHJEXMB02.kpit.com ([169.254.2.237]) by KCHJEXHC02.kpit.com ([172.10.15.74]) with mapi id 14.01.0289.001; Tue, 23 Oct 2012 18:33:00 +0530 From: Kaushik Phatak To: Joel Brobecker CC: Yao Qi , "gdb-patches@sourceware.org" Subject: RE: [RFA 3/5] New port: CR16: gdb port Date: Tue, 23 Oct 2012 13:03:00 -0000 Message-ID: References: <507279C7.8080401@codesourcery.com> <20121022224107.GB3713@adacore.com> In-Reply-To: <20121022224107.GB3713@adacore.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: kpitcummins.com 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-10/txt/msg00412.txt.bz2 Hi Joel, Thanks for your detailed review. I will make another pass over my code and take care of the formatting nits. To answer some of your questions, >> These types of globals are a big no-no, Can you adjust your code to avoid >> those globals? These globals are actually declared in /opcodes/cr16-dis.c and my earlier version of this patch had declared them extern here. Converting the disasse= mbler piece of code would be bit tricky as print_insn_cr16 and print_arg seem to = use these globals directly. Would it be OK just to leave them as extern here wi= th appropriate comments? >> > + ULONGEST pc; >> > + >> > + pc =3D frame_unwind_register_unsigned (this_frame, CR16_PC_REGNUM); >> > + return pc; >> Just curious: Why not just: >> return frame_unwind_register_unsigned (this_frame, CR16_PC_REGNUM); I will make that change for unwind_pc and unwind_sp as well. The locals hel= ped me debug my code better, but I can remove them now. >> > + /* If we don't pass the option -mint32 >> > + FIXME: add if else case depending on the option passed, >> Is there any way of handling this fixme easily? I think I can remove this fixme as the issue is actually at the sim end. The host side gdb gets correct information about data types directly from the symbol table. The simulator totally gets lost when -mint32 is passed. >> you can add a gdb_assert_not_reached if you know you've covered >> all registers, or else return any type, like builtin_int32. OK, I think I will return builtin_int32 here as there are some targets with additional debug registers. Regards, Kaushik