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: [PATCH 07/14] add infcall_mmap and gcc_target_options gdbarch methods


On 05/19/2014 02:40 PM, Jan Kratochvil wrote:
>> I doubt the interface like this is sufficient for other archs, like
>> > arm and mips, which have multiple multilibs, such as -marm/thumb,
>> > -mfloat-abi={hard,softfp}, etc.  This hook in GDB has to take something
>> > into account, such as gdbarch, current frame, the related bfd, etc, in
>> > order to return a correct or compatible options for gcc to compile
>> > source.
> It already already takes 'gdbarch' as its parameter.  If it is not enough some
> more parameters can be added.  But IMO those should be added only when this
> method gets implemented for arch which needs such parameter.

We can add these parameters when we really need them.  That is fine.
However, I still doubt whether GDB is able to return the correct gcc
options by means of analysing executable only.  Supposing the executable
is compiled with "-march=armv7-a -mthumb -mfloat-abi=hard -mfpu=neon",
GDB should know the code is thumb and float-abi is hard.  How can GDB
tell "-march=armv7-a -mfpu=neon" is used too?  If GDB doesn't know,
what options this hook should return? and is the object code
compiled "on the fly" still compatible to the inferior code and target
runtime?

-- 
Yao (éå)


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