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] gdb: Move DJGPP/go32 bits to their own tdep file


On 04/12/2017 03:45 PM, Eli Zaretskii wrote:

> It's fine with me if you decide to make only that change.  I just
> think that if you had this difficulty with go32 bits, someone else
> might have the same difficulty with SVR4 bits.  That's why I wrote
> what I wrote.

Hmm, actually, the SVR4 bits are likely useless by now?  It seems to me
that the only way to activate them is to manually do "set osabi SVR4".
At least according to a grep by GDB_OSABI_SVR4:

 defs.h:  GDB_OSABI_SVR4,
 i386-tdep.c:  gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_SVR4,

I.e., unlike most other ports, there's no osabi sniffer to auto-detect
SVR4.

Grepping for i386_svr4_init_abi, we see that Solaris is the only other
SVR4-like port that reuses the function:

 i386-tdep.c:4474:i386_svr4_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 i386-tdep.c:9093:                         i386_svr4_init_abi);
 i386-tdep.h:433:extern void i386_svr4_init_abi (struct gdbarch_info, struct gdbarch *);
 i386-sol2-tdep.c:109:  i386_svr4_init_abi (info, gdbarch);

So maybe we should drop GDB_OSABI_SVR4, and inline/move the i386_svr4_init_abi
function to i386-sol2-tdep.c.

Thanks,
Pedro Alves


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