This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA:] sim: More breaks in generated .gdbinit
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Tue, 7 Dec 2004 19:24:43 +0100
- Subject: [RFA:] sim: More breaks in generated .gdbinit
To avoid a:
.gdbinit:3: Error in sourced command file:
Function "cgen_rtx_error" not defined.
for non-CGEN-simulators it seemed appropriate to use autoconf.
Tested by configuring for frv-elf (CGEN simulator) and mcore-elf
(non-CGEN) and inspecting .gdbinit. Ok to commit?
sim/common:
* aclocal.m4 (SIM_AC_OUTPUT): Substitute @cgen_breaks@ for "break
cgen_rtx_error" in a CGEN-generated simulator.
* gdbinit.in: Break on sim_core_signal too. Have autoconf
replacement for CGEN-related breakpoints.
sim/(all targets that "sinclude(../common/aclocal.m4)" in configure.in):
* configure: Regenerate for ../common/aclocal.m4 update.
Index: gdbinit.in
===================================================================
RCS file: /cvs/src/src/sim/common/gdbinit.in,v
retrieving revision 1.1.1.1
diff -c -p -r1.1.1.1 gdbinit.in
*** gdbinit.in 16 Apr 1999 01:34:56 -0000 1.1.1.1
--- gdbinit.in 7 Dec 2004 18:22:05 -0000
***************
*** 1,4 ****
--- 1,6 ----
break sim_io_error
+ break sim_core_signal
+ @cgen_breaks@
define dump
set sim_debug_dump ()
Index: aclocal.m4
===================================================================
RCS file: /cvs/src/src/sim/common/aclocal.m4,v
retrieving revision 1.6
diff -c -p -r1.6 aclocal.m4
*** aclocal.m4 3 Dec 2004 19:36:53 -0000 1.6
--- aclocal.m4 7 Dec 2004 18:22:05 -0000
*************** dnl the target's fragment at the appropr
*** 861,866 ****
--- 861,872 ----
AC_DEFUN(SIM_AC_OUTPUT,
[
AC_LINK_FILES($sim_link_files, $sim_link_links)
+ dnl Make @cgen_breaks@ non-null only if the sim uses CGEN.
+ cgen_breaks=""
+ if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
+ cgen_breaks="break cgen_rtx_error";
+ fi
+ AC_SUBST(cgen_breaks)
AC_OUTPUT(Makefile.sim:Makefile.in Make-common.sim:../common/Make-common.in .gdbinit:../common/gdbinit.in,
[case "x$CONFIG_FILES" in
xMakefile*)
brgds, H-P