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]

Re: nrun.c patch


Hi!

Doug Evans a écrit :
> 
> Stephane Carrez writes:
>  > > Having to specify the -v with the -p is wrong.
>  >
>  > Sure!
>  >
>  > The sim_info() is used for several purposes. For several simulators, it is used
>  > to print various information (not only profiling as in your case). Having this
>  > information printed each time you run the simulator is not good too. In particular
>  > I don't want to have such information printed when I run the gcc testsuite.
>  >
>  > Now, I understand that -v is not the appropriate option. I guess a new flag
>  > is necessary in the SIM_DESC to control the final call to sim_info().
>  > Such flag should then be set when the profiling is activated, or when some
>  > -print-sim-info-at-the-end nice option is specified.
>  >
>  > I think this would solve your problem and mine.
> 
> The way things were intended to work, sim_info would always be run
> and each target would have sim_info print the things the user
> told it to print.  If the user didn't tell the simulator to print
> anything, then sim_info would print nothing.  Up until your patch,
> it has always worked this way.  ie. your sim_info is supposed to
> check various flags and print (and not print) what the user told it
> to print (and not print).

I have two objections, your honor:

 - sim_info() is also called from gdb and the user has no way to control the
   flags (except at simulator creation time, ie target sim).

 - several simulator (h8300, h8500, mcore, d10v, sh, w65) are printing statistics
   about insn or cpu cycles executed (and I'm doing the same for 68hc11). 
   None of them are checking flags as you suggest.

May be the way things were intended to work are not correct and we can fix that.
Now, I just want/need a common way to enable/disable the simulator statistics.

	Stephane

-----------------------------------------------------------------------
         Home                               Office
E-mail: stcarrez@worldnet.fr               Stephane.Carrez@sun.com
WWW:    http://home.worldnet.fr/stcarrez   http://www.sun.com
Mail:   17, rue Foucher Lepelletier        6, avenue Gustave Eiffel
        92130 Issy Les Moulineaux          78182 Saint Quentin en Yvelines
        France

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