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] Check solib bfd arch


On Fri, Sep 18, 2009 at 04:07:46PM +0200, Mark Kettenis wrote:
> I suppose we needsto add the necessary magic to sparc-sol-nat.c to set
> the proper architecture.  I'll need to figure out how to extract that
> information from the system.  Is it possible to create a target
> description that just contains the architecture and not all the
> register stuff?

Yes, this is easy.  If there aren't any registers, the register bits
will be disabled.  The XML version would be something like:

<!DOCTYPE target SYSTEM "gdb-target.dtd">
<target>
  <architecture>sparc:sparcv9</architecture>
  <osabi>Solaris</osabi>
</target>

The C version could be generated from that, or if you want to do it
dynamically:

  struct target_desc *result = allocate_target_description ();
  set_tdesc_architecture (result, my_bfd_arch_info_ptr);

After that, mips_linux_read_description is a simple example of how to
supply the description.

I suspect the check is going to be problematic whether we do this or
not, though.

-- 
Daniel Jacobowitz
CodeSourcery


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