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

jcarriere@ausy-group.com sourceware-bugzilla@sourceware.org
Tue Apr 4 16:11:00 GMT 2017


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.


More information about the Gdb-prs mailing list