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: [5/10] Add "explicit size" types to builtin_type


On Tue, Jun 12, 2007 at 06:24:39PM +0200, Ulrich Weigand wrote:
> Hmmm.  One thing I liked about the approach in my patch was that
> it in effect made *all* types gdbarch-specific.  This would have
> allowed in the end to implement something like a get_type_arch ()
> routine, which could be quite useful to push references to
> current_gdbarch out of the symbol parts of the debugger (where
> we often do not have a local gdbarch / frame / regcache argument,
> but where we typically operate on types or values).

That seems to me like a bad idea.  We do not know the gdbarch when we
read in the symbol file.  All references to the current architecture
in the symbol readers are bogus - basically, they only work as long as
the things referenced are the same between any other architectures we
select.  Like pointer size, for instance.  Fortunately the file
usually contains sufficient information for that purpose.

-- 
Daniel Jacobowitz
CodeSourcery


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