From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22927 invoked by alias); 17 Mar 2003 09:36:27 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 22752 invoked from network); 17 Mar 2003 09:36:25 -0000 Received: from unknown (HELO ngate.noida.hcltech.com) (202.54.110.230) by sources.redhat.com with SMTP; 17 Mar 2003 09:36:25 -0000 Received: from exch-01.noida.hcltech.com (exch-01 [204.160.254.29]) by ngate.noida.hcltech.com (8.9.3/8.9.3) with ESMTP id PAA06181; Mon, 17 Mar 2003 15:10:50 +0530 Received: by exch-01.noida.hcltech.com with Internet Mail Service (5.5.2656.59) id ; Mon, 17 Mar 2003 14:59:27 +0530 Message-ID: From: "D.Venkatasubramanian, Noida" To: "D.Venkatasubramanian, Noida" , Andrew Cagney , gdb-patches@sources.redhat.com Subject: RE: FW: [PATCH] Commandline Support for the H8300 Simulator. Date: Mon, 17 Mar 2003 09:36:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-SW-Source: 2003-03/txt/msg00358.txt.bz2 Hi, Corrected ChangeLog. Thanks and Regards, Venky 2003-03-17 D.Venkatasubramanian * compile.c: Added #define SET_CMDLINE_LOCATION to set the location of 8-bit (256 locations) where the Command Line arguments would be stored. (decode): Added a TRAP to 0xcc for Commandline processing using pseudo opcode O_SYS_CMDLINE. (sim_resume): Added handling of O_SYS_CMDLINE Trap. (sim_create_inferior): Setting a pointer to Commandline Args array. * inst.h: Added a new variable ptr_command_line for storing pointer to Commandline array. >-----Original Message----- >From: D.Venkatasubramanian, Noida >Sent: Monday, March 17, 2003 3:07 PM >To: 'Andrew Cagney'; gdb-patches@sources.redhat.com >Subject: RE: FW: [PATCH] Commandline Support for the H8300 Simulator. > > >Hi Andrew, > >I have done the changes you had suggested. >I am submitting the GDB part of the changes. > >Is it OK? > >Thanks and Regards, > >Venky > >>-----Original Message----- >>From: Andrew Cagney [mailto:ac131313@redhat.com] >>Sent: Friday, March 07, 2003 10:53 PM >>To: D.Venkatasubramanian, Noida; gdb-patches@sources.redhat.com >>Subject: Re: FW: [PATCH] Commandline Support for the H8300 Simulator. >> >> >> >>> 2003-02-22 D.Venkatasubramanian >>> >>> * compile.c: Added #define SET_CMDLINE_LOCATION to >>> set the location of 8-bit (256 locations) where the >>> Command Line arguments would be stored. >>> (decode): Added a TRAP to 0xcc for Commandline >>> processing using pseudo opcode O_SYS_CMDLINE. >>> (sim_resume): Added handling of O_SYS_CMDLINE Trap. >>> (sim_create_inferior): Setting a pointer to >>> Commandline Args array. >>> * inst.h: Added a new variable ptr_CommandLine for >>> storing pointer to Commandline array. >>> >>> >>> >>> *** sim/h8300/inst.h.original Wed Feb 19 15:28:24 2003 >>> --- sim/h8300/inst.h.modified Sat Feb 22 19:50:51 2003 >>> *************** enum h8300_sim_state { >>> *** 66,71 **** >>> --- 66,74 ---- >>> SIM_STATE_RUNNING, SIM_STATE_EXITED, >>SIM_STATE_SIGNALLED, SIM_STATE_STOPPED >>> }; >>> >>> + /* For Command Line. */ >>> + char **ptr_CommandLine; /* Pointer to command Line Arguments. */ >> >>Please call the variable: >> >> ptr_command_line >> >>(gnu coding standards don't like edit case variables) >> >>> typedef struct >>> { >>> enum h8300_sim_state state; >>> >>> >>> >>> *** sim/h8300/compile.c.original Wed Feb 19 15:28:09 2003 >>> --- sim/h8300/compile.c.modified Sat Feb 22 19:50:43 2003 >>> *************** void sim_set_simcache_size PARAMS ((int) >>> *** 119,124 **** >>> --- 119,132 ---- >>> #define UEXTSHORT(x) ((x) & 0xffff) >>> #define SEXTSHORT(x) ((short) (x)) >>> >>> + #define SET_CMDLINE_LOCATION \ >>> + if (h8300smode) \ >>> + addr_cmdline = 0xffff00L; \ >>> + else if (h8300hmode) \ >>> + addr_cmdline = 0x2ff00L; \ >>> + else \ >>> + addr_cmdline = 0xff00L; >>> + >> >>Please write the above as a function cmdline_location() that >>returns the >>address. >> >>> + ptr_CommandLine = argv; >> >>I'd change that to strdup (argv) (freeing the old value if >necessary). >>that way the code can't run foul of GDB freeing up the parameter. >> >>Otherwize, approved. >> >>Andrew >> >