This is the mail archive of the gdb-patches@sourceware.org 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: RFA: Make --memory-info work for MIPS simulators


Daniel Jacobowitz wrote:
> On Fri, Aug 10, 2007 at 11:38:10AM +0100, Nick Clifton wrote:
> > sim/mips/ChangeLog
> > 2007-08-10  Nick Clifton  <nickc@redhat.com>
> > 
> > 	* interp.c (options enum): Add OPTION_INFO_MEMORY.
> >         (display_mem_info): New static variable.
> >         (mips_option_handler): Handle OPTION_INFO_MEMORY.
> >         (mips_options): Add info-memory and memory-info.
> >         (sim_open): After processing the command line and board
> >         specification, check display_mem_info.  If it is set then
> >         call the real handler for the --memory-info command line
> >         switch.
> 
> I didn't see any response to this patch.  I think it's OK to commit,
> though.

I sent the appended email on 2007-08-13, it seems it didn't reach the
list for some reason.


Thiemo


From ths@networkno.de Mon Aug 13 18:15:43 2007
Date: Mon, 13 Aug 2007 18:15:43 +0100
From: Thiemo Seufer <ths@networkno.de>
To: Nick Clifton <nickc@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: RFA: Make --memory-info work for MIPS simulators
Message-ID: <20070813171543.GB19507@networkno.de>
References: <m33ayrfze5.fsf@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <m33ayrfze5.fsf@redhat.com>
User-Agent: Mutt/1.5.16 (2007-06-11)
Status: RO
Content-Length: 2065
Lines: 58

Nick Clifton wrote:
> Hi Thiemo,
> 
>   The --memory-info command line switch (and its alias --info-memory)
>   do not work for the MIPS simulator because the memory regions are
>   not set up until after the command line has been parsed.  The
>   attached patch fixes this by delaying the processing of
>   --memory-info until after the regions have been initialized.
> 
>   The patch does have one slightly dubious component - it removes the
>   mips specific command line options table from the linked list of
>   options tables once the command line has been processed.  It does
>   this so that the real handler for --memory-info can be called via
>   the sim_do_commandf() function.  I think that this is safe, since
>   there is no longer any need to process mips specific command line
>   switches.
> 
>   Before the patch:
>   
>     % mips64vrel-elf-run --memory-info a.out
>     Memory maps:
>     
>   After the patch:
> 
>     % mips64vrel-elf-run --memory-info a.out
>     Memory maps:
>       memory region 0x7fff8000,0x8000
>       memory alias 0xa0000000@0x1,0x20000000%0x800000,0x80000000@0x1
> 
>    May I apply this patch please ?
> 
> Cheers
>   Nick
> 
> PS. The sim/MAINTAINERS file has your email address as
> <ths@networkno.de>, judging from the ChangeLog though, I guessed that
> this was incorrect.

In the Changelog I use the mips.com mail address for changes which are
covered by the MTI copyright assignment, the networkno.de address is
for contributions which fall under my personal copyright assignment.

> sim/mips/ChangeLog
> 2007-08-10  Nick Clifton  <nickc@redhat.com>
> 
> 	* interp.c (options enum): Add OPTION_INFO_MEMORY.
>         (display_mem_info): New static variable.
>         (mips_option_handler): Handle OPTION_INFO_MEMORY.
>         (mips_options): Add info-memory and memory-info.
>         (sim_open): After processing the command line and board
>         specification, check display_mem_info.  If it is set then
>         call the real handler for the --memory-info command line
>         switch.

Ok.


Thiemo


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