]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Renamed the following options:
authorNicholas Nethercote <n.nethercote@gmail.com>
Mon, 21 Jun 2004 12:42:35 +0000 (12:42 +0000)
committerNicholas Nethercote <n.nethercote@gmail.com>
Mon, 21 Jun 2004 12:42:35 +0000 (12:42 +0000)
  --logfile-fd  -->  --log-fd
  --logfile     -->  --log-file
  --logsocket   -->  --log-socket

to be consistent with each other and other options (esp. --input-fd).  Also
renamed some related variables.  The old names still work, for backwards
compatibility, but they're not documented.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2429

12 files changed:
FAQ.txt
coregrind/docs/coregrind_core.html
coregrind/vg_include.h
coregrind/vg_main.c
coregrind/vg_messages.c
coregrind/vg_mylibc.c
coregrind/vg_signals.c
coregrind/vg_syscalls.c
include/vg_skin.h.base
memcheck/tests/error_counts.vgtest
none/tests/cmdline1.stdout.exp
none/tests/cmdline2.stdout.exp

diff --git a/FAQ.txt b/FAQ.txt
index 1e062889818257046f6f054186ce9a9810fa3af6..80442bc9eafb071e7b3a9d625a4c76724ad2539a 100644 (file)
--- a/FAQ.txt
+++ b/FAQ.txt
@@ -343,7 +343,7 @@ To trace child processes, use the --trace-children=yes option.
 
 If you are tracing large trees of processes, it can be less disruptive
 to have the output sent over the network.  Give Valgrind the flag
---logsocket=127.0.0.1:12345 (if you want logging output sent to port
+--log-socket=127.0.0.1:12345 (if you want logging output sent to port
 12345 on localhost).  You can use the valgrind-listener program to
 listen on that port:
 
index c6d6722b464ff43ed08dd4e893208a9b98756f2b..13f121c535b17d19e773e909c4ad4098ff6cc1d2 100644 (file)
@@ -162,10 +162,10 @@ You can direct the commentary to three different places:
     (stderr).  So, if you give the core no options, it will write 
     commentary to the standard error stream.  If you want to send 
     it to some other file descriptor, for example number 9,
-    you can specify <code>--logfile-fd=9</code>.
+    you can specify <code>--log-fd=9</code>.
 <p>
 <li>A less intrusive option is to write the commentary to a file, 
-    which you specify by <code>--logfile=filename</code>.  Note 
+    which you specify by <code>--log-file=filename</code>.  Note 
     carefully that the commentary is <b>not</b> written to the file
     you specify, but instead to one called
     <code>filename.pid12345</code>, if for example the pid of the
@@ -176,10 +176,10 @@ You can direct the commentary to three different places:
 <p>
 <li>The least intrusive option is to send the commentary to a network
     socket.  The socket is specified as an IP address and port number
-    pair, like this: <code>--logsocket=192.168.0.1:12345</code> if you
+    pair, like this: <code>--log-socket=192.168.0.1:12345</code> if you
     want to send the output to host IP 192.168.0.1 port 12345 (I have
     no idea if 12345 is a port of pre-existing significance).  You can
-    also omit the port number: <code>--logsocket=192.168.0.1</code>, 
+    also omit the port number: <code>--log-socket=192.168.0.1</code>, 
     in which case a default port of 1500 is used.  This default is
     defined by the constant <code>VG_CLO_DEFAULT_LOGPORT</code>
     in the sources.
@@ -209,7 +209,7 @@ You can direct the commentary to three different places:
     <li><code>portnumber</code>: changes the port it listens on from
         the default (1500).  The specified port must be in the range
         1024 to 65535.  The same restriction applies to port numbers
-        specified by a <code>--logsocket=</code> to Valgrind itself.
+        specified by a <code>--log-socket=</code> to Valgrind itself.
     </ul>
     <p>
     If a valgrinded process fails to connect to a listener, for
@@ -227,7 +227,7 @@ mix of messages from the Valgrind core and the selected tool.  If the
 tool reports errors, it will report them to the commentary.  However,
 if the tool does profiling, the profile data will be written to a file
 of some kind, depending on the tool, and independent of what
-<code>--log*</code> options are in force.  The commentary is intended
+<code>--log-*</code> options are in force.  The commentary is intended
 to be a low-bandwidth, human-readable channel.  Profiling data, on the
 other hand, is usually voluminous and not meaningful without further
 processing, which is why we have chosen this arrangement.
@@ -526,14 +526,14 @@ These options work with all tools.
       default.
       </li><br><p>
 
-  <li><code>--logfile-fd=&lt;number&gt;</code> [default: 2, stderr]
+  <li><code>--log-fd=&lt;number&gt;</code> [default: 2, stderr]
       <p>Specifies that Valgrind should send all of its
       messages to the specified file descriptor.  The default, 2, is
       the standard error channel (stderr).  Note that this may
       interfere with the client's own use of stderr.  
       </li><br><p>
 
-  <li><code>--logfile=&lt;filename&gt;</code>
+  <li><code>--log-file=&lt;filename&gt;</code>
       <p>Specifies that Valgrind should send all of its
       messages to the specified file.  In fact, the file name used
       is created by concatenating the text <code>filename</code>,
@@ -541,7 +541,7 @@ These options work with all tools.
       The specified file name may not be the empty string.
       </li><br><p>
 
-  <li><code>--logsocket=&lt;ip-address:port-number&gt;</code>
+  <li><code>--log-socket=&lt;ip-address:port-number&gt;</code>
       <p>Specifies that Valgrind should send all of its messages to
       the specified port at the specified IP address.  The port may be
       omitted, in which case port 1500 is used.  If a connection
@@ -965,7 +965,7 @@ tool-specific documentation for explanations of the tool-specific macros).
 <p>
 <li><code>VALGRIND_COUNT_ERRORS</code>: returns the number of errors
     found so far by Valgrind.  Can be useful in test harness code when
-    combined with the <code>--logfile-fd=-1</code> option;  this runs
+    combined with the <code>--log-fd=-1</code> option;  this runs
     Valgrind silently, but the client program can detect when errors
     occur.  Only useful for tools that report errors, e.g. it's useful for
     Memcheck, but for Cachegrind it will always return zero because 
@@ -1501,7 +1501,7 @@ Most of these only appear if you run in verbose mode (enabled by
      Valgrind doesn't allow the client
      to close the logfile, because you'd never see any diagnostic
      information after that point.  If you see this message,
-     you may want to use the <code>--logfile-fd=&lt;number></code> 
+     you may want to use the <code>--log-fd=&lt;number></code> 
      option to specify a different logfile file-descriptor number.
      Or 
 <p>
index f078216ccec261e9f4d2cb9a5dbb6cf93d093d4b..652506d99b6503b585ce35212b315a988b1592b2 100644 (file)
@@ -197,24 +197,24 @@ extern Bool  VG_(clo_trace_children);
 
 /* Where logging output is to be sent to.
 
-   When log_to == VgLogTo_Fd, clo_logfile_fd holds the file id, and is
-   taken from the command line.  clo_logfile_name is irrelevant.
+   When log_to == VgLogTo_Fd, clo_log_fd holds the file id, and is
+   taken from the command line.  clo_log_name is irrelevant.
 
-   When log_to == VgLogTo_File, clo_logfile_name holds the logfile
-   name, and is taken from the command line.  clo_logfile_fd is then
-   made to hold the relevant file id, by opening clo_logfile_name
+   When log_to == VgLogTo_File, clo_log_name holds the log-file
+   name, and is taken from the command line.  clo_log_fd is then
+   made to hold the relevant file id, by opening clo_log_name
    (concatenated with the process ID) for writing.
 
-   When log_to == VgLogTo_Socket, clo_logfile_name holds the
+   When log_to == VgLogTo_Socket, clo_log_name holds the
    hostname:portnumber pair, and is taken from the command line.
-   clo_logfile_fd is then made to hold the relevant file handle, by
+   clo_log_fd is then made to hold the relevant file handle, by
    opening a connection to said hostname:portnumber pair. 
 
-   Global default is to set log_to == VgLogTo_Fd and logfile_fd == 2
+   Global default is to set log_to == VgLogTo_Fd and log_fd == 2
    (stderr). */
 extern VgLogTo VG_(clo_log_to);
-extern Int     VG_(clo_logfile_fd);
-extern Char*   VG_(clo_logfile_name);
+extern Int     VG_(clo_log_fd);
+extern Char*   VG_(clo_log_name);
 
 /* The file descriptor to read for input.  default: 0 == stdin */
 extern Int   VG_(clo_input_fd);
@@ -281,7 +281,7 @@ extern void VG_(intercept_libc_freeres_wrapper)(Addr);
    Debugging and profiling stuff
    ------------------------------------------------------------------ */
 
-/* Create a logfile into which messages can be dumped. */
+/* Create a log file into which messages can be dumped. */
 extern void VG_(startup_logging) ( void );
 extern void VG_(shutdown_logging)( void );
 
index 186a5a359e2183ba213b3fd30c4112ce7818d9b0..8051155e12a55b65447bc1bac41be8fb179364ac 100644 (file)
@@ -1366,8 +1366,8 @@ static void load_tool( const char *toolname, void** handle_out,
 
 static void abort_msg ( void )
 {
-   VG_(clo_log_to)     = VgLogTo_Fd;
-   VG_(clo_logfile_fd) = 2; /* stderr */
+   VG_(clo_log_to) = VgLogTo_Fd;
+   VG_(clo_log_fd) = 2; /* stderr */
 }
 
 void VG_(bad_option) ( Char* opt )
@@ -1465,8 +1465,8 @@ Bool   VG_(clo_trace_children) = False;
    fd is initially stdout, for --help, but gets moved to stderr by default
    immediately afterwards. */
 VgLogTo VG_(clo_log_to)        = VgLogTo_Fd;
-Int     VG_(clo_logfile_fd)    = 1;
-Char*   VG_(clo_logfile_name)  = NULL;
+Int     VG_(clo_log_fd)        = 1;
+Char*   VG_(clo_log_name)      = NULL;
 
 Int    VG_(clo_input_fd)       = 0; /* stdin */
 Int    VG_(clo_n_suppressions) = 0;
@@ -1531,16 +1531,15 @@ void usage ( Bool debug_help )
 "    --pointercheck=no|yes     enforce client address space limits [yes]\n"
 "\n"
 "  user options for Valgrind tools that report errors:\n"
-"    --logfile-fd=<number>     file descriptor for messages [2=stderr]\n"
-"    --logfile=<file>          log messages to <file>.pid<pid>\n"
-"    --logsocket=ipaddr:port   log messages to socket ipaddr:port\n"
+"    --log-fd=<number>         log messages to file descriptor [2=stderr]\n"
+"    --log-file=<file>         log messages to <file>.pid<pid>\n"
+"    --log-socket=ipaddr:port  log messages to socket ipaddr:port\n"
 "    --demangle=no|yes         automatically demangle C++ names? [yes]\n"
 "    --num-callers=<number>    show <num> callers in stack traces [4]\n"
 "    --error-limit=no|yes      stop showing new errors if too many? [yes]\n"
 "    --show-below-main=no|yes  continue stack traces below main() [no]\n"
 "    --suppressions=<filename> suppress errors described in <filename>\n"
 "    --gen-suppressions=no|yes print suppressions for errors detected [no]\n"
-
 "    --db-attach=no|yes        start debugger when errors detected? [no]\n"
 "    --db-command=<command>    command to start debugger [gdb -nw %%f %%p]\n"
 "    --input-fd=<number>       file descriptor for input [0=stdin]\n"
@@ -1647,12 +1646,12 @@ static void pre_process_cmd_line_options
 static void process_cmd_line_options
       ( UInt* client_auxv, Addr esp_at_startup, const char* toolname )
 {
-   Int  i, eventually_logfile_fd;
+   Int  i, eventually_log_fd;
    Int *auxp;
    Int  toolname_len = VG_(strlen)(toolname);
 
    /* log to stderr by default, but usage message goes to stdout */
-   eventually_logfile_fd = 2; 
+   eventually_log_fd = 2; 
 
    /* Check for sane path in ./configure --prefix=... */
    if (VG_LIBDIR[0] != '/') 
@@ -1748,20 +1747,36 @@ static void process_cmd_line_options
       else VG_BNUM_CLO("--num-callers",       VG_(clo_backtrace_size), 1,
                                                 VG_DEEPEST_BACKTRACE)
 
+      // for backwards compatibility, replaced by --log-fd
       else if (VG_CLO_STREQN(13, arg, "--logfile-fd=")) {
-         VG_(clo_log_to)       = VgLogTo_Fd;
-         VG_(clo_logfile_name) = NULL;
-         eventually_logfile_fd = (Int)VG_(atoll)(&arg[13]);
+         VG_(clo_log_to)   = VgLogTo_Fd;
+         VG_(clo_log_name) = NULL;
+         eventually_log_fd = (Int)VG_(atoll)(&arg[13]);
+      }
+      else if (VG_CLO_STREQN(9,  arg, "--log-fd=")) {
+         VG_(clo_log_to)   = VgLogTo_Fd;
+         VG_(clo_log_name) = NULL;
+         eventually_log_fd = (Int)VG_(atoll)(&arg[9]);
       }
 
+      // for backwards compatibility, replaced by --log-file
       else if (VG_CLO_STREQN(10, arg, "--logfile=")) {
-         VG_(clo_log_to)       = VgLogTo_File;
-         VG_(clo_logfile_name) = &arg[10];
+         VG_(clo_log_to)   = VgLogTo_File;
+         VG_(clo_log_name) = &arg[10];
+      }
+      else if (VG_CLO_STREQN(11, arg, "--log-file=")) {
+         VG_(clo_log_to)   = VgLogTo_File;
+         VG_(clo_log_name) = &arg[11];
       }
 
+      // for backwards compatibility, replaced by --log-socket
       else if (VG_CLO_STREQN(12, arg, "--logsocket=")) {
-         VG_(clo_log_to)       = VgLogTo_Socket;
-         VG_(clo_logfile_name) = &arg[12];
+         VG_(clo_log_to)   = VgLogTo_Socket;
+         VG_(clo_log_name) = &arg[12];
+      }
+      else if (VG_CLO_STREQN(13, arg, "--log-socket=")) {
+         VG_(clo_log_to)   = VgLogTo_Socket;
+         VG_(clo_log_name) = &arg[13];
       }
 
       else if (VG_CLO_STREQN(15, arg, "--suppressions=")) {
@@ -1823,7 +1838,7 @@ static void process_cmd_line_options
       VG_(bad_option)("--db-attach=yes and --trace-children=yes");
    }
 
-   /* Set up logging now.  After this is done, VG_(clo_logfile_fd)
+   /* Set up logging now.  After this is done, VG_(clo_log_fd)
       should be connected to whatever sink has been selected, and we
       indiscriminately chuck stuff into it without worrying what the
       nature of it is.  Oh the wonder of Unix streams. */
@@ -1831,14 +1846,14 @@ static void process_cmd_line_options
    /* So far we should be still attached to stdout, so we can show on
       the terminal any problems to do with processing command line
       opts. */
-   vg_assert(VG_(clo_logfile_fd) == 1 /* stdout */);
+   vg_assert(VG_(clo_log_fd) == 1 /* stdout */);
    vg_assert(VG_(logging_to_filedes) == True);
 
    switch (VG_(clo_log_to)) {
 
       case VgLogTo_Fd: 
-         vg_assert(VG_(clo_logfile_name) == NULL);
-         VG_(clo_logfile_fd) = eventually_logfile_fd;
+         vg_assert(VG_(clo_log_name) == NULL);
+         VG_(clo_log_fd) = eventually_log_fd;
          break;
 
       case VgLogTo_File: {
@@ -1846,32 +1861,32 @@ static void process_cmd_line_options
         Int seq = 0;
         Int pid = VG_(getpid)();
 
-         vg_assert(VG_(clo_logfile_name) != NULL);
-         vg_assert(VG_(strlen)(VG_(clo_logfile_name)) <= 900); /* paranoia */
+         vg_assert(VG_(clo_log_name) != NULL);
+         vg_assert(VG_(strlen)(VG_(clo_log_name)) <= 900); /* paranoia */
 
         for (;;) {
            if (seq == 0)
               VG_(sprintf)(logfilename, "%s.pid%d",
-                           VG_(clo_logfile_name), pid );
+                           VG_(clo_log_name), pid );
            else
               VG_(sprintf)(logfilename, "%s.pid%d.%d",
-                           VG_(clo_logfile_name), pid, seq );
+                           VG_(clo_log_name), pid, seq );
            seq++;
 
-           eventually_logfile_fd 
+           eventually_log_fd 
               = VG_(open)(logfilename, 
                           VKI_O_CREAT|VKI_O_WRONLY|VKI_O_EXCL|VKI_O_TRUNC, 
                           VKI_S_IRUSR|VKI_S_IWUSR);
-           if (eventually_logfile_fd >= 0) {
-              VG_(clo_logfile_fd) = VG_(safe_fd)(eventually_logfile_fd);
+           if (eventually_log_fd >= 0) {
+              VG_(clo_log_fd) = VG_(safe_fd)(eventually_log_fd);
               break;
            } else {
-              if (eventually_logfile_fd != -VKI_EEXIST) {
+              if (eventually_log_fd != -VKI_EEXIST) {
                  VG_(message)(Vg_UserMsg, 
                               "Can't create/open log file `%s.pid%d'; giving up!", 
-                              VG_(clo_logfile_name), pid);
+                              VG_(clo_log_name), pid);
                  VG_(bad_option)(
-                    "--logfile=<file> didn't work out for some reason.");
+                    "--log-file=<file> didn't work out for some reason.");
                  break;
               }
            }
@@ -1880,30 +1895,29 @@ static void process_cmd_line_options
       }
 
       case VgLogTo_Socket: {
-         vg_assert(VG_(clo_logfile_name) != NULL);
-         vg_assert(VG_(strlen)(VG_(clo_logfile_name)) <= 900); /* paranoia */
-         eventually_logfile_fd 
-            = VG_(connect_via_socket)( VG_(clo_logfile_name) );
-         if (eventually_logfile_fd == -1) {
+         vg_assert(VG_(clo_log_name) != NULL);
+         vg_assert(VG_(strlen)(VG_(clo_log_name)) <= 900); /* paranoia */
+         eventually_log_fd = VG_(connect_via_socket)( VG_(clo_log_name) );
+         if (eventually_log_fd == -1) {
             VG_(message)(Vg_UserMsg, 
-               "Invalid --logsocket=ipaddr or --logsocket=ipaddr:port spec"); 
+               "Invalid --log-socket=ipaddr or --log-socket=ipaddr:port spec"); 
             VG_(message)(Vg_UserMsg, 
-               "of `%s'; giving up!", VG_(clo_logfile_name) );
+               "of `%s'; giving up!", VG_(clo_log_name) );
             VG_(bad_option)(
-               "--logsocket=");
+               "--log-socket=");
         }
-         if (eventually_logfile_fd == -2) {
+         if (eventually_log_fd == -2) {
             VG_(message)(Vg_UserMsg, 
                "valgrind: failed to connect to logging server `%s'.",
-               VG_(clo_logfile_name) ); 
+               VG_(clo_log_name) ); 
             VG_(message)(Vg_UserMsg, 
                 "Log messages will sent to stderr instead." );
             VG_(message)(Vg_UserMsg, 
                 "" );
             /* We don't change anything here. */
         } else {
-            vg_assert(eventually_logfile_fd > 0);
-            VG_(clo_logfile_fd) = eventually_logfile_fd;
+            vg_assert(eventually_log_fd > 0);
+            VG_(clo_log_fd) = eventually_log_fd;
             VG_(logging_to_filedes) = False;
          }
          break;
@@ -1911,13 +1925,13 @@ static void process_cmd_line_options
 
    }
 
-   /* Move logfile_fd into the safe range, so it doesn't conflict with any app fds */
-   eventually_logfile_fd = VG_(fcntl)(VG_(clo_logfile_fd), VKI_F_DUPFD, VG_(max_fd)+1);
-   if (eventually_logfile_fd < 0)
+   /* Move log_fd into the safe range, so it doesn't conflict with any app fds */
+   eventually_log_fd = VG_(fcntl)(VG_(clo_log_fd), VKI_F_DUPFD, VG_(max_fd)+1);
+   if (eventually_log_fd < 0)
       VG_(message)(Vg_UserMsg, "valgrind: failed to move logfile fd into safe range");
    else {
-      VG_(clo_logfile_fd) = eventually_logfile_fd;
-      VG_(fcntl)(VG_(clo_logfile_fd), VKI_F_SETFD, VKI_FD_CLOEXEC);
+      VG_(clo_log_fd) = eventually_log_fd;
+      VG_(fcntl)(VG_(clo_log_fd), VKI_F_SETFD, VKI_FD_CLOEXEC);
    }
 
    /* Ok, the logging sink is running now.  Print a suitable preamble.
index f6407e1f00d67de1ffa4166f0ea62e583663f338..98e7c227d09d1202b7d4fb02d6b9209655f5e7fc 100644 (file)
@@ -97,7 +97,7 @@ int VG_(start_msg) ( VgMsgKind kind )
 int VG_(end_msg) ( void )
 {
    int count = 0;
-   if (VG_(clo_logfile_fd) >= 0) {
+   if (VG_(clo_log_fd) >= 0) {
       add_to_buf('\n');
       VG_(send_bytes_to_logging_sink) ( 
          vg_mbuf, VG_(strlen)(vg_mbuf) );
@@ -112,16 +112,16 @@ void VG_(send_bytes_to_logging_sink) ( Char* msg, Int nbytes )
 {
    Int rc;
    if (VG_(logging_to_filedes)) {
-      VG_(write)( VG_(clo_logfile_fd), msg, nbytes );
+      VG_(write)( VG_(clo_log_fd), msg, nbytes );
    } else {
-      rc = VG_(write_socket)( VG_(clo_logfile_fd), msg, nbytes );
+      rc = VG_(write_socket)( VG_(clo_log_fd), msg, nbytes );
       if (rc == -1) {
          /* for example, the listener process died.  Switch back to
             stderr. */
          VG_(logging_to_filedes) = True;
          VG_(clo_log_to) = VgLogTo_Fd;
-         VG_(clo_logfile_fd) = 2;
-         VG_(write)( VG_(clo_logfile_fd), msg, nbytes );
+         VG_(clo_log_fd) = 2;
+         VG_(write)( VG_(clo_log_fd), msg, nbytes );
       }
    }
 }
index b2940fe75fe8062ed3da9a5cf39faae55341404d..dcd2ba45c0d7923079d34b5200c1536cc0127aad 100644 (file)
@@ -700,7 +700,7 @@ static int  n_myprintf_buf;
 static void add_to_myprintf_buf ( Char c )
 {
    if (n_myprintf_buf >= 100-10 /*paranoia*/ ) {
-      if (VG_(clo_logfile_fd) >= 0) {
+      if (VG_(clo_log_fd) >= 0) {
          VG_(send_bytes_to_logging_sink)( 
             myprintf_buf, VG_(strlen)(myprintf_buf) );
       }
@@ -721,7 +721,7 @@ UInt VG_(printf) ( const char *format, ... )
    myprintf_buf[n_myprintf_buf] = 0;      
    ret = VG_(vprintf) ( add_to_myprintf_buf, format, vargs );
 
-   if (n_myprintf_buf > 0 && VG_(clo_logfile_fd) >= 0) {
+   if (n_myprintf_buf > 0 && VG_(clo_log_fd) >= 0) {
       VG_(send_bytes_to_logging_sink)( myprintf_buf, n_myprintf_buf );
    }
 
index 291a953aecf408b623d3826bc25ce9e601d469f0..203d8973edde046b04963cd897458fdb11cea16b 100644 (file)
@@ -1555,9 +1555,9 @@ static void make_coredump(ThreadId tid, const vki_ksiginfo_t *si, UInt max_size)
    struct elf_prpsinfo prpsinfo;
    struct elf_prstatus prstatus;
 
-   if (VG_(clo_logfile_name) != NULL) {
+   if (VG_(clo_log_name) != NULL) {
       coreext = ".core";
-      basename = VG_(clo_logfile_name);
+      basename = VG_(clo_log_name);
    }
 
    for(;;) {
index bfd81b531a8ce6eedebfc6f255cb54bc5918bec9..6ffde3e40034b040d4491a2fe86556d33d371770 100644 (file)
@@ -1057,14 +1057,13 @@ static Addr do_brk(Addr newbrk)
 /* Return true if we're allowed to use or create this fd */
 static Bool fd_allowed(Int fd, const Char *syscall, ThreadId tid)
 {
-   if (fd < 0 || fd > VG_(max_fd) || fd == VG_(clo_logfile_fd)) {
+   if (fd < 0 || fd > VG_(max_fd) || fd == VG_(clo_log_fd)) {
       VG_(message)(Vg_UserMsg, 
          "Warning: invalid file descriptor %d in syscall %s()",
          fd, syscall);
-      if (fd == VG_(clo_logfile_fd))
+      if (fd == VG_(clo_log_fd))
         VG_(message)(Vg_UserMsg, 
-            "   Use --logfile-fd=<number> to select an alternative "
-           "logfile fd.");
+            "   Use --log-fd=<number> to select an alternative log fd.");
       if (VG_(clo_verbosity) > 1) {
         ExeContext *ec = VG_(get_ExeContext)(tid);
         VG_(pp_ExeContext)(ec);
@@ -2099,8 +2098,7 @@ PRE(close)
 {
    /* int close(int fd); */
    MAYBE_PRINTF("close ( %d )\n",arg1);
-   /* Detect and negate attempts by the client to close Valgrind's
-      logfile fd ... */
+   /* Detect and negate attempts by the client to close Valgrind's log fd */
    if (!fd_allowed(arg1, "close", tid))
       res = -VKI_EBADF;
 }
index 5454e7d65ebda4cc877e1ac5ad1b5e3a223ec846..2017a3b593866b556fa672c5639ccb2d3e7098f5 100644 (file)
@@ -382,8 +382,8 @@ extern ThreadId VG_(first_matching_thread_stack)
 /* stdio.h
  *
  * Note that they all output to the file descriptor given by the
- * --logfile-fd=N argument, which defaults to 2 (stderr).  Hence no
- * need for VG_(fprintf)().
+ * --log-fd/--log-file/--log-socket argument, which defaults to 2 (stderr).
+ * Hence no need for VG_(fprintf)().
  */
 extern UInt VG_(printf)  ( const char *format, ... );
 /* too noisy ...  __attribute__ ((format (printf, 1, 2))) ; */
index ddd7241cba77cecaba9dd83d556d9d668a016163..a2bed401c7cef73db035aa4bb4a00581282e6692 100644 (file)
@@ -1,2 +1,2 @@
-vgopts: --logfile-fd=-1
+vgopts: --log-fd=-1
 prog:   error_counts
index 28f019814fe225aa508e7278d2b9d55c67bb4ec9..b12ded489ada17bd9d05b55a7ffa96b780d805fa 100644 (file)
@@ -24,9 +24,9 @@ usage: valgrind --tool=<toolname> [options] prog-and-args
     --pointercheck=no|yes     enforce client address space limits [yes]
 
   user options for Valgrind tools that report errors:
-    --logfile-fd=<number>     file descriptor for messages [2=stderr]
-    --logfile=<file>          log messages to <file>.pid<pid>
-    --logsocket=ipaddr:port   log messages to socket ipaddr:port
+    --log-fd=<number>         log messages to file descriptor [2=stderr]
+    --log-file=<file>         log messages to <file>.pid<pid>
+    --log-socket=ipaddr:port  log messages to socket ipaddr:port
     --demangle=no|yes         automatically demangle C++ names? [yes]
     --num-callers=<number>    show <num> callers in stack traces [4]
     --error-limit=no|yes      stop showing new errors if too many? [yes]
index bfad3504f2797324e38fd43a60808cfabdb39f08..535733695f9d6902b55e9d981b199310b48c3c1f 100644 (file)
@@ -24,9 +24,9 @@ usage: valgrind --tool=<toolname> [options] prog-and-args
     --pointercheck=no|yes     enforce client address space limits [yes]
 
   user options for Valgrind tools that report errors:
-    --logfile-fd=<number>     file descriptor for messages [2=stderr]
-    --logfile=<file>          log messages to <file>.pid<pid>
-    --logsocket=ipaddr:port   log messages to socket ipaddr:port
+    --log-fd=<number>         log messages to file descriptor [2=stderr]
+    --log-file=<file>         log messages to <file>.pid<pid>
+    --log-socket=ipaddr:port  log messages to socket ipaddr:port
     --demangle=no|yes         automatically demangle C++ names? [yes]
     --num-callers=<number>    show <num> callers in stack traces [4]
     --error-limit=no|yes      stop showing new errors if too many? [yes]