Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@cygnus.com>
To: gdb-patches@sources.redhat.com
Cc: klee@apple.com
Subject: [PATCH] tracepoint.c
Date: Mon, 07 Jan 2002 17:54:00 -0000	[thread overview]
Message-ID: <200201080149.g081nHw00463@reddwarf.cygnus.com> (raw)

2002-01-07  Michael Snyder  <msnyder@redhat.com>

	* tracepoint.c (tracepoint_save_command): From Klee Dienes --
	use tilde_expand and strerror for opening save-tracepoints file.

Index: tracepoint.c
===================================================================
RCS file: /cvs/src/src/gdb/tracepoint.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -p -r1.29 -r1.30
*** tracepoint.c	2001/12/25 22:24:38	1.29
--- tracepoint.c	2002/01/08 01:52:12	1.30
*************** tracepoint_save_command (char *args, int
*** 2263,2269 ****
    struct action_line *line;
    FILE *fp;
    char *i1 = "    ", *i2 = "      ";
!   char *indent, *actionline;
    char tmp[40];
  
    if (args == 0 || *args == 0)
--- 2263,2269 ----
    struct action_line *line;
    FILE *fp;
    char *i1 = "    ", *i2 = "      ";
!   char *indent, *actionline, *pathname;
    char tmp[40];
  
    if (args == 0 || *args == 0)
*************** tracepoint_save_command (char *args, int
*** 2275,2283 ****
        return;
      }
  
!   if (!(fp = fopen (args, "w")))
!     error ("Unable to open file '%s' for saving tracepoints");
! 
    ALL_TRACEPOINTS (tp)
    {
      if (tp->addr_string)
--- 2275,2286 ----
        return;
      }
  
!   pathname = tilde_expand (args);
!   if (!(fp = fopen (pathname, "w")))
!     error ("Unable to open file '%s' for saving tracepoints (%s)",
! 	   args, strerror (errno));
!   xfree (pathname);
!   
    ALL_TRACEPOINTS (tp)
    {
      if (tp->addr_string)


             reply	other threads:[~2002-01-08  1:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-07 17:54 Michael Snyder [this message]
2002-01-08  1:46 ` Klee Dienes
2002-01-08 15:15   ` Michael Snyder
2002-01-08 15:25 Klee Dienes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200201080149.g081nHw00463@reddwarf.cygnus.com \
    --to=msnyder@cygnus.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=klee@apple.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox