diff options
author | Joseph Myers <joseph@codesourcery.com> | 2008-06-05 22:36:57 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2008-06-05 22:36:57 +0000 |
commit | c16158bc9c346310d06db48674a3dfc3e241e8df (patch) | |
tree | 2e8363eab355ee85b6b45cc963bb03edf058bbd2 /gdb/gdbserver | |
parent | 75c99385347dccd47be824629ed4dda494bfc037 (diff) | |
download | gdb-c16158bc9c346310d06db48674a3dfc3e241e8df.zip gdb-c16158bc9c346310d06db48674a3dfc3e241e8df.tar.gz gdb-c16158bc9c346310d06db48674a3dfc3e241e8df.tar.bz2 |
2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
Nathan Sidwell <nathan@codesourcery.com>
Joseph Myers <joseph@codesourcery.com>
* acinclude.m4: Include ../config/acx.m4.
* configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
* configure, config.in: Regenerate.
* main.c (print_gdb_help): Use REPORT_BUGS_TO for bug-reporting
address.
* top.c (print_gdb_version): Use PKGVERSION and REPORT_BUGS_TO.
doc:
2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
Nathan Sidwell <nathan@codesourcery.com>
Joseph Myers <joseph@codesourcery.com>
* configure.ac: Include ../../config/acx.m4. Use ACX_PKGVERSION
and ACX_BUGURL.
* configure: Regenerate.
* Makefile.in (PKGVERSION, BUGURL_TEXI): Define.
(GDBvn.texi): Define VERSION_PACKAGE, BUGURL and BUGURL_DEFAULT.
* gdb.texinfo: Use VERSION_PACKAGE and BUGURL. Remove
mailing-list-specific text about bug reporting unless
BUGURL_DEFAULT.
gdbserver:
2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
Nathan Sidwell <nathan@codesourcery.com>
Joseph Myers <joseph@codesourcery.com>
* acinclude.m4: Include ../../config/acx.m4.
* configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
* configure, config.in: Regenerate.
* Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
* server.c (gdbserver_version): Print PKGVERSION.
(gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
(main): Adjust gdbserver_usage calls.
* gdbreplay.c (version, host_name): Add declarations.
(gdbreplay_version, gdbreplay_usage): New.
(main): Accept --version and --help options.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r-- | gdb/gdbserver/ChangeLog | 15 | ||||
-rw-r--r-- | gdb/gdbserver/Makefile.in | 4 | ||||
-rw-r--r-- | gdb/gdbserver/acinclude.m4 | 3 | ||||
-rw-r--r-- | gdb/gdbserver/config.in | 9 | ||||
-rwxr-xr-x | gdb/gdbserver/configure | 71 | ||||
-rw-r--r-- | gdb/gdbserver/configure.ac | 5 | ||||
-rw-r--r-- | gdb/gdbserver/gdbreplay.c | 36 | ||||
-rw-r--r-- | gdb/gdbserver/server.c | 36 |
8 files changed, 157 insertions, 22 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 72d8575..70f9e94 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,18 @@ +2008-06-05 Vladimir Prus <vladimir@codesourcery.com> + Nathan Sidwell <nathan@codesourcery.com> + Joseph Myers <joseph@codesourcery.com> + + * acinclude.m4: Include ../../config/acx.m4. + * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL. + * configure, config.in: Regenerate. + * Makefile.in (gdbreplay$(EXEEXT)): Add version.o. + * server.c (gdbserver_version): Print PKGVERSION. + (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO. + (main): Adjust gdbserver_usage calls. + * gdbreplay.c (version, host_name): Add declarations. + (gdbreplay_version, gdbreplay_usage): New. + (main): Accept --version and --help options. + 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com> * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New. diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in index 9b040cc..84174e7 100644 --- a/gdb/gdbserver/Makefile.in +++ b/gdb/gdbserver/Makefile.in @@ -194,9 +194,9 @@ gdbserver$(EXEEXT): $(OBS) ${ADD_DEPS} ${CDEPS} ${CC-LD} $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) -o gdbserver$(EXEEXT) $(OBS) \ $(GDBSERVER_LIBS) $(XM_CLIBS) -gdbreplay$(EXEEXT): gdbreplay.o +gdbreplay$(EXEEXT): gdbreplay.o version.o rm -f gdbreplay$(EXEEXT) - ${CC-LD} $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) -o gdbreplay$(EXEEXT) gdbreplay.o \ + ${CC-LD} $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) -o gdbreplay$(EXEEXT) $^ \ $(XM_CLIBS) # Put the proper machine-specific files first, so M-. on a machine diff --git a/gdb/gdbserver/acinclude.m4 b/gdb/gdbserver/acinclude.m4 index b32fe8c..8770ad0 100644 --- a/gdb/gdbserver/acinclude.m4 +++ b/gdb/gdbserver/acinclude.m4 @@ -4,6 +4,9 @@ sinclude(../../bfd/bfd.m4) dnl This gets autoconf bugfixes sinclude(../../config/override.m4) +dnl For ACX_PKGVERSION and ACX_BUGURL. +sinclude(../../config/acx.m4) + AC_DEFUN([SRV_CHECK_THREAD_DB], [AC_CACHE_CHECK([for libthread_db],[srv_cv_thread_db], [old_LIBS="$LIBS" diff --git a/gdb/gdbserver/config.in b/gdb/gdbserver/config.in index c666ab2..e636f82 100644 --- a/gdb/gdbserver/config.in +++ b/gdb/gdbserver/config.in @@ -41,6 +41,9 @@ /* Define to 1 if you have the <malloc.h> header file. */ #undef HAVE_MALLOC_H +/* Define to 1 if you have the `memmem' function. */ +#undef HAVE_MEMMEM + /* Define to 1 if you have the <memory.h> header file. */ #undef HAVE_MEMORY_H @@ -159,6 +162,12 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION +/* Additional package description */ +#undef PKGVERSION + +/* Bug reporting address */ +#undef REPORT_BUGS_TO + /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure index 18b114e..00df01d 100755 --- a/gdb/gdbserver/configure +++ b/gdb/gdbserver/configure @@ -310,7 +310,7 @@ ac_includes_default="\ # include <unistd.h> #endif" -ac_subst_vars='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 CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CPP EGREP LIBOBJS RDYNAMIC GDBSERVER_DEPFILES GDBSERVER_LIBS USE_THREAD_DB srv_xmlbuiltin srv_xmlfiles LTLIBOBJS' +ac_subst_vars='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 CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CPP EGREP LIBOBJS PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI RDYNAMIC GDBSERVER_DEPFILES GDBSERVER_LIBS USE_THREAD_DB srv_xmlbuiltin srv_xmlfiles LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -848,6 +848,12 @@ if test -n "$ac_init_help"; then cat <<\_ACEOF +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 @@ -3656,6 +3662,66 @@ _ACEOF 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 + + . ${srcdir}/configure.srv if test "${srv_mingwce}" = "yes"; then @@ -5075,6 +5141,9 @@ s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@CPP@,$CPP,;t t s,@EGREP@,$EGREP,;t t s,@LIBOBJS@,$LIBOBJS,;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,@RDYNAMIC@,$RDYNAMIC,;t t s,@GDBSERVER_DEPFILES@,$GDBSERVER_DEPFILES,;t t s,@GDBSERVER_LIBS@,$GDBSERVER_LIBS,;t t diff --git a/gdb/gdbserver/configure.ac b/gdb/gdbserver/configure.ac index 8ae5d06..7cfbaf6 100644 --- a/gdb/gdbserver/configure.ac +++ b/gdb/gdbserver/configure.ac @@ -68,6 +68,11 @@ AC_CHECK_TYPES(socklen_t, [], [], #include <sys/socket.h> ]) +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]) + . ${srcdir}/configure.srv if test "${srv_mingwce}" = "yes"; then diff --git a/gdb/gdbserver/gdbreplay.c b/gdb/gdbserver/gdbreplay.c index 23c72d7..d54ed1d 100644 --- a/gdb/gdbserver/gdbreplay.c +++ b/gdb/gdbserver/gdbreplay.c @@ -69,6 +69,10 @@ typedef int socklen_t; /* Sort of a hack... */ #define EOL (EOF - 1) +/* Version information, from version.c. */ +extern const char version[]; +extern const char host_name[]; + static int remote_desc; #ifdef __MINGW32CE__ @@ -387,16 +391,44 @@ play (FILE *fp) } } +static void +gdbreplay_version (void) +{ + printf ("GNU gdbreplay %s%s\n" + "Copyright (C) 2008 Free Software Foundation, Inc.\n" + "gdbserver is free software, covered by the GNU General Public License.\n" + "This gdbserver was configured as \"%s\"\n", + PKGVERSION, version, host_name); +} + +static void +gdbreplay_usage (FILE *stream) +{ + fprintf (stream, "Usage:\tgdbreplay <logfile> <host:port>\n"); + if (REPORT_BUGS_TO[0] && stream == stdout) + fprintf (stream, "Report bugs to \"%s\".\n", REPORT_BUGS_TO); +} + int main (int argc, char *argv[]) { FILE *fp; int ch; + if (argc >= 2 && strcmp (argv[1], "--version") == 0) + { + gdbreplay_version (); + exit (0); + } + if (argc >= 2 && strcmp (argv[1], "--help") == 0) + { + gdbreplay_usage (stdout); + exit (0); + } + if (argc < 3) { - fprintf (stderr, "Usage: gdbreplay <logfile> <host:port>\n"); - fflush (stderr); + gdbreplay_usage (stderr); exit (1); } fp = fopen (argv[1], "r"); diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c index ab4d8ec..57f5500 100644 --- a/gdb/gdbserver/server.c +++ b/gdb/gdbserver/server.c @@ -1178,26 +1178,28 @@ myresume (char *own_buf, int step, int *signalp, char *statusp) static void gdbserver_version (void) { - printf ("GNU gdbserver %s\n" + printf ("GNU gdbserver %s%s\n" "Copyright (C) 2007 Free Software Foundation, Inc.\n" "gdbserver is free software, covered by the GNU General Public License.\n" "This gdbserver was configured as \"%s\"\n", - version, host_name); + PKGVERSION, version, host_name); } static void -gdbserver_usage (void) +gdbserver_usage (FILE *stream) { - printf ("Usage:\tgdbserver [OPTIONS] COMM PROG [ARGS ...]\n" - "\tgdbserver [OPTIONS] --attach COMM PID\n" - "\tgdbserver [OPTIONS] --multi COMM\n" - "\n" - "COMM may either be a tty device (for serial debugging), or \n" - "HOST:PORT to listen for a TCP connection.\n" - "\n" - "Options:\n" - " --debug\t\tEnable debugging output.\n" - " --wrapper WRAPPER --\tRun WRAPPER to start new programs.\n"); + fprintf (stream, "Usage:\tgdbserver [OPTIONS] COMM PROG [ARGS ...]\n" + "\tgdbserver [OPTIONS] --attach COMM PID\n" + "\tgdbserver [OPTIONS] --multi COMM\n" + "\n" + "COMM may either be a tty device (for serial debugging), or \n" + "HOST:PORT to listen for a TCP connection.\n" + "\n" + "Options:\n" + " --debug\t\tEnable debugging output.\n" + " --wrapper WRAPPER --\tRun WRAPPER to start new programs.\n"); + if (REPORT_BUGS_TO[0] && stream == stdout) + fprintf (stream, "Report bugs to \"%s\".\n", REPORT_BUGS_TO); } #undef require_running @@ -1234,7 +1236,7 @@ main (int argc, char *argv[]) } else if (strcmp (*next_arg, "--help") == 0) { - gdbserver_usage (); + gdbserver_usage (stdout); exit (0); } else if (strcmp (*next_arg, "--attach") == 0) @@ -1251,7 +1253,7 @@ main (int argc, char *argv[]) if (next_arg == wrapper_argv || *next_arg == NULL) { - gdbserver_usage (); + gdbserver_usage (stderr); exit (1); } @@ -1280,7 +1282,7 @@ main (int argc, char *argv[]) next_arg++; if (port == NULL || (!attach && !multi_mode && *next_arg == NULL)) { - gdbserver_usage (); + gdbserver_usage (stderr); exit (1); } @@ -1305,7 +1307,7 @@ main (int argc, char *argv[]) if (bad_attach) { - gdbserver_usage (); + gdbserver_usage (stderr); exit (1); } |