This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Add support for target switches in simulator


> Index: include/remote-sim.h
> ===================================================================
> RCS file: /cvs/src/src/include/remote-sim.h,v
> retrieving revision 1.4
> diff -c -3 -p -w -r1.4 remote-sim.h
> *** include/remote-sim.h	14 Mar 2001 02:27:43 -0000	1.4
> --- include/remote-sim.h	16 May 2002 16:07:49 -0000
> *************** void sim_set_profile_size PARAMS ((int n
> *** 346,351 ****
> --- 346,362 ----
>      multi-cpu simulators. */
>   
>   void sim_kill PARAMS ((SIM_DESC sd));
> + 
> + #ifdef SIM_TARGET_SWITCHES
> +   /* Parse the command line, extracting any target specific switches
> +      before the generic simulator code gets a chance to complain
> +      about them.  Returns the adjusted value of argc.  */
> + int sim_target_parse_command_line PARAMS ((int, char **));
> + 
> +   /* Display a list of target specific switches supported by this
> +      target.  */
> + void sim_target_display_usage PARAMS ((void));
> + #endif
>   
>   #ifdef __cplusplus
>   }

Nick,

I can understand you adding the interface here (that is where all the 
others are).  However, see:
http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb

(in hindsight, the functions should be just moved and not renamed, and 
I'm not asking you to do any of that).

I think a better place would be a new file sim/common/sim-run.h to 
indicate that this is part of the interface that run.c uses.

As for converting Arm to use the new framework, I would recommend 
creating a change-request :-)

Andrew



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]