This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
rs6000-tdep should probably not depend on the ppc-sim code
- From: Hector Oron <hector dot oron at gmail dot com>
- To: gdb-patches at sourceware dot org
- Cc: Joel Brobecker <brobecker at adacore dot com>, vapier at gentoo dot org
- Date: Tue, 13 Mar 2012 23:49:11 +0100
- Subject: rs6000-tdep should probably not depend on the ppc-sim code
Hello,
Trying to compile gdb on mips(el) platform with
--enable-targets=all, fails to build with following error:
mipsel-linux-gnu-gcc -g -O2 \
-o gdb gdb.o libgdb.a \
../sim/mips/libsim.a -lreadline
../opcodes/libopcodes.a ../bfd/libbfd.a ../libiberty/libiberty.a
../libdecnumber/libdecnumber.a -lncurses -lz -lm
-L/usr/lib/python2.7/config -lpthread -ldl -lutil -lm -lpython2.7
-Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions -lexpat
../libiberty/libiberty.a gnulib/libgnu.a -ldl -rdynamic
libgdb.a(rs6000-tdep.o): In function `init_sim_regno_table':
/home/zumbi/gdb-7.4really/gdb/rs6000-tdep.c:334: undefined reference
to `sim_spr_register_name'
collect2: ld returned 1 exit status
Looking into gdb/rs6000-tdep.c:334:
#ifdef WITH_SIM
/* Now handle all special-purpose registers. Verify that they
haven't mistakenly been assigned numbers by any of the above
code. */
for (i = 0; i < sim_ppc_num_sprs; i++)
{
const char *spr_name = sim_spr_register_name (i);
int gdb_regno = -1;
if (spr_name != NULL)
gdb_regno = user_reg_map_name_to_regnum (arch, spr_name, -1);
if (gdb_regno != -1)
set_sim_regno (sim_regno, gdb_regno, sim_ppc_spr0_regnum + i);
}
#endif
And sim_spr_register_name is defined under ./include/gdb/sim-ppc.h
which expects to build ./sim/ppc/gdb-sim.c
I was hoping to provide a patch to fix the issue, but I do not really
know whats the fix? Should sim_spr_register_name be defined somewhere
else? Should we enable the build ppc simulator?
Best regards,
--
ÂHÃctor OrÃn Â-.. . -... .. .- -. Â -.. . ...- . .-.. --- .--. . .-.