This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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: More i386 architectures?


>> I wonder what cpu_arch_name is.  Hmm, "i8086", ....., "sledgehammer", 
>> ...  One thought is to use names found in archures so that GDB can 
>> continue to use BFD to do lookups etc on them.  Another is to formalize 
>> the interface to that table.  Either way the objective is to provide a 
>> consistent namespace across GAS, OBJDUMP and GDB.
> 
> 
> My idea with the note was to provide more detail than the existing bfd
> architecture info does.

Yes, agreed.

The only tricky bit is that GDB would like to be consistent with GAS 
et.al with the names it uses to identify architectures.  That way, if a 
user specifies ``.arch FOO'' then, within GDB, ``arch FOO'' also works.

GDB currently does this by doing a lookup on bfd_archures_list[] to map 
an architecture name onto an architecutre:machine pair.  That way it is 
consistent with the -M option.

The above expands the set of names that would need to be recognised.  To 
that end, I can see GDB et.a.. being tweeked in one of the following ways:

	o	the bfd_archures_list get extended to include
		names that correspond to the above (per my
		suggestion to add more choices to cpu-i386.c).

	o	a second BFD table containing this info be
		provided.

	o	GDB start maintaining its own local table
		(groan :-)

Any suggestions or a preference?


>> If the user specifies an option something like -mi8066, does that also 
>> set cpu_arch_name and hence select the architecture?
> 
> 
> No.  Most current assembly won't even emit the note as you only get it
> if the source has a .arch directive.

Ok.  Do you think that behavour makes sense - -m<arch> on the command 
line being roughly equivalent to an explicit ``.arch <arch>'' on ``line 
0'' and hence emitting a note?

enjoy,
Andrew



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