aboutsummaryrefslogtreecommitdiff
path: root/sim/ppc
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2008-06-07 01:31:27 +0000
committerJoseph Myers <joseph@codesourcery.com>2008-06-07 01:31:27 +0000
commit6efef468bed94a730bb0ae60a36ebead70c97f4e (patch)
treec81eb269a4d526f464e8999e1ae3ca030fce662c /sim/ppc
parentbf37b8e8125cd1126cdc52e6bb411d70a6bae82b (diff)
downloadgdb-6efef468bed94a730bb0ae60a36ebead70c97f4e.zip
gdb-6efef468bed94a730bb0ae60a36ebead70c97f4e.tar.gz
gdb-6efef468bed94a730bb0ae60a36ebead70c97f4e.tar.bz2
sim:
2008-06-06 Vladimir Prus <vladimir@codesourcery.com> Daniel Jacobowitz <dan@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * cris/configure: Regenerate. sim/common: 2008-06-06 Vladimir Prus <vladimir@codesourcery.com> Daniel Jacobowitz <dan@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * aclocal.m4: Include ../../config/acx.m4. * common.m4: Use ACX_PKGVERSION and ACX_BUGURL. * configure, config.in: Regenerate. * Make-common.in (LIB_OBJS): Add version.o. (version.c, version.o): New rules. * run.c: Include version.h. (usage): Add help parameter. Print output either to stdout or stderr depending on that parameter. (print_version): New. (main): Check for --help and --version. * run-sim.h (sim_target_display_usage): Add help parameter. * version.h: New. sim/arm: 2008-06-06 Vladimir Prus <vladimir@codesourcery.com> Daniel Jacobowitz <dan@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * configure: Regenerate. * wrapper.c (sim_target_display_usage): Add help parameter. sim/cr16: 2008-06-06 Vladimir Prus <vladimir@codesourcery.com> Daniel Jacobowitz <dan@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * configure: Regenerate. sim/d10v: 2008-06-06 Vladimir Prus <vladimir@codesourcery.com> Daniel Jacobowitz <dan@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * configure: Regenerate. sim/erc32: 2008-06-06 Vladimir Prus <vladimir@codesourcery.com> Daniel Jacobowitz <dan@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * configure: Regenerate. sim/frv: 2008-06-06 Vladimir Prus <vladimir@codesourcery.com> Daniel Jacobowitz <dan@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * configure: Regenerate. sim/h8300: 2008-06-06 Vladimir Prus <vladimir@codesourcery.com> Daniel Jacobowitz <dan@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * configure: Regenerate. sim/iq2000: 2008-06-06 Vladimir Prus <vladimir@codesourcery.com> Daniel Jacobowitz <dan@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * configure: Regenerate. sim/m32c: 2008-06-06 Vladimir Prus <vladimir@codesourcery.com> Daniel Jacobowitz <dan@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * configure: Regenerate. sim/m32r: 2008-06-06 Vladimir Prus <vladimir@codesourcery.com> Daniel Jacobowitz <dan@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * configure: Regenerate. sim/m68hc11: 2008-06-06 Vladimir Prus <vladimir@codesourcery.com> Daniel Jacobowitz <dan@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * configure: Regenerate. sim/mcore: 2008-06-06 Vladimir Prus <vladimir@codesourcery.com> Daniel Jacobowitz <dan@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * configure: Regenerate. sim/mips: 2008-06-06 Vladimir Prus <vladimir@codesourcery.com> Daniel Jacobowitz <dan@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * configure: Regenerate. sim/mn10300: 2008-06-06 Vladimir Prus <vladimir@codesourcery.com> Daniel Jacobowitz <dan@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * configure: Regenerate. sim/ppc: 2008-06-06 Vladimir Prus <vladimir@codesourcery.com> Daniel Jacobowitz <dan@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL. * configure, config.in: Regenerated. * Makefile.in (LIB_OBJ): Add version.o. (version.c, version.o): New rules. * psim.c (psim_usage): Add help parameter. Print the bug URL. Exit with code 0 for help. (psim_options): Update calls to psim_usage. Handle --help and --version. * psim.h (psim_usage): Update prototype. * main.c (main): Update psim_usage call. sim/sh: 2008-06-06 Vladimir Prus <vladimir@codesourcery.com> Daniel Jacobowitz <dan@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * configure: Regenerate. sim/sh64: 2008-06-06 Vladimir Prus <vladimir@codesourcery.com> Daniel Jacobowitz <dan@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * configure: Regenerate. sim/v850: 2008-06-06 Vladimir Prus <vladimir@codesourcery.com> Daniel Jacobowitz <dan@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * configure: Regenerate.
Diffstat (limited to 'sim/ppc')
-rw-r--r--sim/ppc/ChangeLog15
-rw-r--r--sim/ppc/Makefile.in8
-rw-r--r--sim/ppc/config.in6
-rwxr-xr-xsim/ppc/configure71
-rw-r--r--sim/ppc/configure.ac5
-rw-r--r--sim/ppc/main.c2
-rw-r--r--sim/ppc/psim.c23
-rw-r--r--sim/ppc/psim.h2
8 files changed, 123 insertions, 9 deletions
diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog
index 19e5fd9..4b7c0ee 100644
--- a/sim/ppc/ChangeLog
+++ b/sim/ppc/ChangeLog
@@ -1,3 +1,18 @@
+2008-06-06 Vladimir Prus <vladimir@codesourcery.com>
+ Daniel Jacobowitz <dan@codesourcery.com>
+ Joseph Myers <joseph@codesourcery.com>
+
+ * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
+ * configure, config.in: Regenerated.
+ * Makefile.in (LIB_OBJ): Add version.o.
+ (version.c, version.o): New rules.
+ * psim.c (psim_usage): Add help parameter. Print the bug URL.
+ Exit with code 0 for help.
+ (psim_options): Update calls to psim_usage. Handle --help and
+ --version.
+ * psim.h (psim_usage): Update prototype.
+ * main.c (main): Update psim_usage call.
+
2008-03-14 Nick Hudson <nick.hudson@dsl.pipex.com
* configure.ac: Pass ../../intl to ZW_GNU_GETTEXT_SISTER_DIR.
diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in
index 02b12ca..2cd36e9 100644
--- a/sim/ppc/Makefile.in
+++ b/sim/ppc/Makefile.in
@@ -534,6 +534,7 @@ LIB_OBJ = \
support.o \
@sim_fpu@ \
psim.o \
+ version.o \
$(PACKAGE_OBJ) \
$(HW_OBJ) \
options.o
@@ -560,6 +561,13 @@ $(TARGETLIB): tmp-igen tmp-dgen tmp-hw tmp-pk tmp-defines $(LIB_OBJ) $(GDB_OBJ)
$(AR) $(AR_FLAGS) $(TARGETLIB) $(LIB_OBJ) $(GDB_OBJ)
$(RANLIB) $(TARGETLIB)
+version.c: Makefile ../../gdb/version.in
+ rm -f version.c-tmp version.c
+ echo '#include "version.h"' >> version.c-tmp
+ echo 'const char version[] = "'"`sed q ${srcdir}/../../gdb/version.in`"'";' >> version.c-tmp
+ mv version.c-tmp version.c
+version.o: version.c $(version_h)
+
psim.o: psim.c $(CPU_H) $(IDECODE_H) $(OPTIONS_H) $(TREE_H) $(BFD_H)
bits.o: bits.c $(BASICS_H)
diff --git a/sim/ppc/config.in b/sim/ppc/config.in
index b24229b..3fac50e 100644
--- a/sim/ppc/config.in
+++ b/sim/ppc/config.in
@@ -286,6 +286,12 @@
/* Define to the version of this package. */
#undef PACKAGE_VERSION
+/* Additional package description */
+#undef PKGVERSION
+
+/* Bug reporting address */
+#undef REPORT_BUGS_TO
+
/* Define as the return type of signal handlers (`int' or `void'). */
#undef RETSIGTYPE
diff --git a/sim/ppc/configure b/sim/ppc/configure
index 05e92bd..3b063d6 100755
--- a/sim/ppc/configure
+++ b/sim/ppc/configure
@@ -309,7 +309,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='sim_environment sim_alignment sim_assert sim_bitsize sim_endian sim_hostendian sim_float sim_scache sim_default_model sim_hw_cflags sim_hw_objs sim_hw sim_inline sim_packages sim_regparm sim_reserved_bits sim_smp sim_stdcall sim_xor_endian WARN_CFLAGS WERROR_CFLAGS SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CPP EGREP LIBOBJS CC_FOR_BUILD CFLAGS_FOR_BUILD HDEFINES AR RANLIB ac_ct_RANLIB sim_cflags sim_warnings sim_line_nr sim_config sim_opcode sim_switch sim_dup sim_decode_mechanism sim_jump sim_filter sim_icache sim_hw_src sim_hw_obj sim_pk_src sim_pk_obj sim_bswap sim_igen_smp sim_hostbitsize sim_env sim_timebase sim_trace sim_reserved sim_monitor sim_model sim_model_issue sim_stdio sim_termio sim_devzero sim_callback sim_targ_vals sim_fpu_cflags sim_fpu LTLIBOBJS'
+ac_subst_vars='sim_environment sim_alignment sim_assert sim_bitsize sim_endian sim_hostendian sim_float sim_scache sim_default_model sim_hw_cflags sim_hw_objs sim_hw sim_inline sim_packages sim_regparm sim_reserved_bits sim_smp sim_stdcall sim_xor_endian WARN_CFLAGS WERROR_CFLAGS SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CPP EGREP LIBOBJS CC_FOR_BUILD CFLAGS_FOR_BUILD HDEFINES AR RANLIB ac_ct_RANLIB sim_cflags sim_warnings sim_line_nr sim_config sim_opcode sim_switch sim_dup sim_decode_mechanism sim_jump sim_filter sim_icache sim_hw_src sim_hw_obj sim_pk_src sim_pk_obj sim_bswap sim_igen_smp sim_hostbitsize sim_env sim_timebase sim_trace sim_reserved sim_monitor sim_model sim_model_issue sim_stdio sim_termio sim_devzero sim_callback sim_targ_vals sim_fpu_cflags sim_fpu LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -886,6 +886,12 @@ Optional Features:
--enable-sim-warnings=opts Extra CFLAGS for turning on compiler warnings except for idecode.o, semantics.o and psim.o
--enable-sim-xor-endian=n Specify number bytes involved in PowerPC XOR bi-endian mode (default 8).
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
+ --with-bugurl=URL Direct users to URL to report a bug
+
Some influential environment variables:
CC C compiler command
CFLAGS C compiler flags
@@ -3396,6 +3402,66 @@ else
sim_xor_endian=""
fi;
+
+
+# Check whether --with-pkgversion or --without-pkgversion was given.
+if test "${with_pkgversion+set}" = set; then
+ withval="$with_pkgversion"
+ case "$withval" in
+ yes) { { echo "$as_me:$LINENO: error: package version not specified" >&5
+echo "$as_me: error: package version not specified" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ no) PKGVERSION= ;;
+ *) PKGVERSION="($withval) " ;;
+ esac
+else
+ PKGVERSION="(GDB) "
+
+fi;
+
+
+
+
+# Check whether --with-bugurl or --without-bugurl was given.
+if test "${with_bugurl+set}" = set; then
+ withval="$with_bugurl"
+ case "$withval" in
+ yes) { { echo "$as_me:$LINENO: error: bug URL not specified" >&5
+echo "$as_me: error: bug URL not specified" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ no) BUGURL=
+ ;;
+ *) BUGURL="$withval"
+ ;;
+ esac
+else
+ BUGURL="http://www.gnu.org/software/gdb/bugs/"
+
+fi;
+ case ${BUGURL} in
+ "")
+ REPORT_BUGS_TO=
+ REPORT_BUGS_TEXI=
+ ;;
+ *)
+ REPORT_BUGS_TO="<$BUGURL>"
+ REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
+ ;;
+ esac;
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define PKGVERSION "$PKGVERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
+_ACEOF
+
+
# Make sure we can run config.sub.
$ac_config_sub sun4 >/dev/null 2>&1 ||
{ { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
@@ -7039,6 +7105,9 @@ s,@DATADIRNAME@,$DATADIRNAME,;t t
s,@INSTOBJEXT@,$INSTOBJEXT,;t t
s,@GENCAT@,$GENCAT,;t t
s,@CATOBJEXT@,$CATOBJEXT,;t t
+s,@PKGVERSION@,$PKGVERSION,;t t
+s,@REPORT_BUGS_TO@,$REPORT_BUGS_TO,;t t
+s,@REPORT_BUGS_TEXI@,$REPORT_BUGS_TEXI,;t t
s,@build@,$build,;t t
s,@build_cpu@,$build_cpu,;t t
s,@build_vendor@,$build_vendor,;t t
diff --git a/sim/ppc/configure.ac b/sim/ppc/configure.ac
index b7550f1..076f294 100644
--- a/sim/ppc/configure.ac
+++ b/sim/ppc/configure.ac
@@ -563,6 +563,11 @@ if test x"$silent" != x"yes" && test x"$sim_xor_endian" != x""; then
fi],[sim_xor_endian=""])dnl
+ACX_PKGVERSION([GDB])
+ACX_BUGURL([http://www.gnu.org/software/gdb/bugs/])
+AC_DEFINE_UNQUOTED([PKGVERSION], ["$PKGVERSION"], [Additional package description])
+AC_DEFINE_UNQUOTED([REPORT_BUGS_TO], ["$REPORT_BUGS_TO"], [Bug reporting address])
+
AC_CANONICAL_SYSTEM
AC_ARG_PROGRAM
diff --git a/sim/ppc/main.c b/sim/ppc/main.c
index 4df78ab..6be9054 100644
--- a/sim/ppc/main.c
+++ b/sim/ppc/main.c
@@ -283,7 +283,7 @@ main(int argc, char **argv)
print_options ();
return 0;
} else {
- psim_usage(0);
+ psim_usage(0, 0);
}
}
name_of_file = argv[0];
diff --git a/sim/ppc/psim.c b/sim/ppc/psim.c
index be9d076..c311794 100644
--- a/sim/ppc/psim.c
+++ b/sim/ppc/psim.c
@@ -119,7 +119,7 @@ find_arg(char *err_msg,
INLINE_PSIM\
(void)
-psim_usage(int verbose)
+psim_usage(int verbose, int help)
{
printf_filtered("Usage:\n");
printf_filtered("\n");
@@ -217,7 +217,10 @@ psim_usage(int verbose)
printf_filtered("\n");
print_options();
}
- error("");
+
+ if (REPORT_BUGS_TO[0])
+ printf ("Report bugs to %s\n", REPORT_BUGS_TO);
+ exit (help ? 0 : 1);
}
/* Test "string" for containing a string of digits that form a number
@@ -258,7 +261,7 @@ psim_options(device *root,
while (*p != '\0') {
switch (*p) {
default:
- psim_usage(0);
+ psim_usage(0, 0);
error ("");
break;
case 'c':
@@ -279,7 +282,7 @@ psim_options(device *root,
else
{
printf_filtered ("Invalid <endian> option for -E (target-endian)\n");
- psim_usage (0);
+ psim_usage (0, 0);
}
break;
case 'f':
@@ -288,10 +291,10 @@ psim_options(device *root,
break;
case 'h':
case '?':
- psim_usage(1);
+ psim_usage(1, 1);
break;
case 'H':
- psim_usage(2);
+ psim_usage(2, 1);
break;
case 'i':
if (isdigit(p[1])) {
@@ -352,6 +355,14 @@ psim_options(device *root,
p = argv[argp] + strlen(argv[argp]) - 1;
printf_filtered("Warning - architecture parameter ignored\n");
}
+ else if (strcmp (argv[argp], "--help") == 0)
+ psim_usage (0, 1);
+ else if (strcmp (argv[argp], "--version") == 0)
+ {
+ extern const char version[];
+ printf ("GNU simulator %s%s\n", PKGVERSION, version);
+ exit (0);
+ }
else
error("Unrecognized option");
break;
diff --git a/sim/ppc/psim.h b/sim/ppc/psim.h
index 8c1c920..607e5a2 100644
--- a/sim/ppc/psim.h
+++ b/sim/ppc/psim.h
@@ -61,7 +61,7 @@ extern void psim_merge_device_file
const char *file_name);
extern void psim_usage
-(int verbose);
+(int verbose, int help);
/* create a new simulator from the device tree */