public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Save trace files in binary mode
@ 2010-04-20 22:04 Stan Shebs
  0 siblings, 0 replies; only message in thread
From: Stan Shebs @ 2010-04-20 22:04 UTC (permalink / raw)
  To: gdb-patches

Saving trace files in binary mode works better for Unix/Windows compat.  
(I'm posting this without committing yet, in case there are any other 
considerations to account for.)

Stan

2010-04-20  Stan Shebs  <stan@codesourcery.com>
        Nathan Sidwell  <nathan@codesourcery.com>

    * tracepoint.c (trace_save): Open in binary mode.

Index: tracepoint.c
===================================================================
RCS file: /cvs/src/src/gdb/tracepoint.c,v
retrieving revision 1.182
diff -p -r1.182 tracepoint.c
*** tracepoint.c    20 Apr 2010 18:52:59 -0000    1.182
--- tracepoint.c    20 Apr 2010 22:01:09 -0000
*************** trace_save (const char *filename, int ta
*** 2616,2622 ****
    pathname = tilde_expand (filename);
    cleanup = make_cleanup (xfree, pathname);
 
!   fp = fopen (pathname, "w");
    if (!fp)
      error (_("Unable to open file '%s' for saving trace data (%s)"),
         filename, safe_strerror (errno));
--- 2616,2622 ----
    pathname = tilde_expand (filename);
    cleanup = make_cleanup (xfree, pathname);
 
!   fp = fopen (pathname, "wb");
    if (!fp)
      error (_("Unable to open file '%s' for saving trace data (%s)"),
         filename, safe_strerror (errno));

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-04-20 22:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-20 22:04 [PATCH] Save trace files in binary mode Stan Shebs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).