This is the mail archive of the gdb-patches@sources.redhat.com 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]

Re: Adding -file-list-exec-source-file command to GDB/MI


This change essentially adds the command -file-list-exec-source-file to
the mi commands.

* mi-cmd-file.c:    Added file to implement mi file commands.
* mi-getopt.c:      Added mi_valid_noargs to verify if a set of
                    parameters passed to an MI function has no arguments
* mi-getopt.h:      Prototyped mi_valid_noargs
* mi-cmds.c:        Added -file-list-exec-source-file command.
* mi-cmds.h:        Added -file-list-exec-source-file to proto list.
* doc/gdb.texinfo:  Document -file-list-exec-source-file.
* mi-file.exp:      Added testcase to test -file-list-exec-source-file.

Yes, ok. Just tweak the below GNU coding probs before committing.



+int +mi_valid_noargs(const char *prefix, int argc, char **argv)

mi_valid_noargs (


+{
+  int optind = 0;
+  char *optarg;
+  static struct mi_opt opts[] =
+  {
+    0
+  };
+
+  if ( mi_getopt(prefix, argc, argv, opts, &optind, &optarg) == -1 )

if (mi_getopt (prefix, ...., &optarg) == -1)


+    return 1;
+  else
+    return 0;
+}

Andrew





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