This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/21352] New: Command tsave does not support -r argument


https://sourceware.org/bugzilla/show_bug.cgi?id=21352

            Bug ID: 21352
           Summary: Command tsave does not support -r argument
           Product: gdb
           Version: 7.11
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
          Assignee: unassigned at sourceware dot org
          Reporter: jcarriere@ausy-group.com
  Target Milestone: ---

The command tsave, for saving tracepoints to a file, refuses the -r option,
claiming it is not a valid option.

My personal investigation lead me to trace_save_command (in tracepoint.c or
tracefile.c),  which has code like this:

  for (; *argv; ++argv)
    {
      if (strcmp (*argv, "-r") == 0)
        target_does_save = 1;
      if (strcmp (*argv, "-ctf") == 0)
        generate_ctf = 1;
      else if (**argv == '-')
        error (_("unknown option `%s'"), *argv);
      else
        filename = *argv;
    }

I fixed it like this:
  for (; *argv; ++argv)
    {
      if (strcmp (*argv, "-r") == 0)
        target_does_save = 1;
      else if (strcmp (*argv, "-ctf") == 0)
        generate_ctf = 1;
      else if (**argv == '-')
        error (_("unknown option `%s'"), *argv);
      else
        filename = *argv;
    }

Thank you the GDB team for developing this great piece of software.
Jonathan.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]