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: RFC patch mi-cmds.c table format (pedantic)



On Mar 18, 2004, at 11:55 AM, Andrew Cagney wrote:


First, have a look at:
http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit- trail&database=gdb&pr=496

Ah, I hadn't seen that.


How do you envision the cli-mapped mi commands working (e.g. -gdb-set), where files in the gdb/ directory are registering the commands?


the mi-cmds table changed from this format:
  {"break-info", "info break %s", 0},
  {"break-insert", 0, 0, mi_cmd_break_insert},
to this format:
  { "break-info", { "info break", 1 }, NULL, NULL },
  { "break-insert", { NULL, 0 }, 0, mi_cmd_break_insert},
As you can see here, the use of 0 vs NULL is inconsistent,

That's cos it was converted using an emacs macro.


Emacs? Ah, well, I think we can all see the problem right there. :-)

ok, but perhaps don't bother with the trailing initializers.

OK I'll come up with a real/tested patch. The trailing initializers -- you don't mean this kind of change, do you?


-  { "exec-step", { NULL, 0 }, mi_cmd_exec_step},
+  { "exec-step", { NULL, 0 }, mi_cmd_exec_step, NULL},

I think you were talking about the final NULL entry.



Should I ask what motived this?

Our GUI guys asked for -exec-abort to be implemented so I had cause to look at our tasty-fresh-mid-merge sources for the first time, where we're just picking up FSF gdb changes from the last year or so.



J



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