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


> I have not worked out how this feature would be accessed from
>> >  GDB.  My guess is that the switches could be added to the
>> >  arguments passed via sim_open(), but how would a GDB user tell
>> >  GDB to add these switches ?
> 
> 
>> Richard Earnshaw <rearnsha@arm.com> writes:
> 
> 
>> Hmm, I thought there was already a way to tell the simulator what
>> amount of memory to use.

I've an approved patch for:

(gdb) target sim -m <number>

Nick suggested some tweaks that I didn't get back to :-/

> So did I, but looking through the GDB sources I do not see a place
> where it is used.

It isn't.  The interface is marked obsolete.  Instead sim-common 
simulators use:

(gdb) sim memory-size ...

>> Couldn't a similar method be employed.
> 
> 
> That method is specific to setting the memory size - it uses a
> simulator/debugger interface call specifically set up for the
> purpose.  I looked for the function - sim_size() - and found it being
> used by the run program but not by GDB.  I am puzzled.
> 
> Anyway the point here is that setting the memory size appears to be a
> specific API function and I want a generic method to set any kind of
> target specific option.

Andrew




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