Joel, thank you for reviewing this. Joel Brobecker wrote: >> * rs6000-tdep.c (rs6000_gdbarch_init): Use .gnu.attributes to see >> if this is a e500 binary (with SPE APU). >> (powerpc_show_vector_abi): New function. > > If you look at today's version of rs6000_gdbarch_init, you'll find > that we're already checking the Tag_GNU_Power_ABI_Vector, and setting > the tdep->vector_abi accordingly. It's actually conditionalized on > HAVE_ELF, so we need at least to make sure that your testing of > the .gnu.attributes sections gets conditionalized on HAVE_ELF as well. > > However, I am wondering if it wouldn't be better to simply take > advantage of the code that's already there. For that, you'll need > to move the code up a bit, so that vector_abi gets set earlier. > You can then use the resulting information to determine whether or > not to fallback on the current approach of using .PPC.EMB.apuinfo. With rearanged code, the patch is simpler, but functionally the same. My original patch is broken into two, the one dealing with rs6000_gdbarch_init changes and using .gnu.attributes, and the other with printing "powerpc vector-abi" information. Change logs: * rs6000-tdep.c (rs6000_gdbarch_init): Rearange the code to use .gnu.attributes to see if this is a e500 binary (with SPE APU). * rs6000-tdep.c (powerpc_show_vector_abi): New function. (_initialize_rs6000_tdep): Use powerpc_show_vector_abi. Thank you, Aleksandar