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]

[MI PATCH RFA]: make -var-list-children's CHILDREN result field a list


-var-list-children's return is CHILDREN, which is a list of CHILD
tuples.  Currently CHILDREN is a tuple, which is incorrect -- this
patch changes it to a list, when not in mi1 mode.  
(in mi0, lists and tuples are identical so I only check for mi1)

[gdb/mi/ChangeLog]
2002-11-10  Jason Molenda  (jason-cl@molenda.com)

        * mi-cmd-var.c (mi_cmd_var_list_children): CHILDREN field is
        now a list; still a tuple when in mi1.
        * gdbmi.texinfo: Update var-list-children example.

[gdb/testsuite/ChangeLog]
2002-11-10  Jason Molenda  (jason-cl@molenda.com)

        * gdb.mi/mi-var-child.exp: -var-list-children's CHILDREN field is
        now a list, not a tuple.
        * gdb.mi/mi-var-display.exp: Ditto.
        * gdb.mi/gdb792.exp: Ditto.



As an aside, error messages are output twice in MI.  For instance, 
if you hit a breakpoint during an inferior function call, you get 
a result like this:


  &"The program being debugged stopped while in a function called from GDB.\n"
  &"When the function (foo) is done executing, GDB will silently\n"
  &"stop (instead of continuing to evaluate the expression containing\n"
  &"the function call).\n"
  401^error,msg="The program being debugged stopped while in a function called from GDB.\nWhen the function (foo) is done executing, GDB will silently\nstop (instead of continuing to evaluate the expression containing\nthe function call)."


At Apple, we've done away with the stderr console output, and just send
the error message through the normal MI mechanism.  The GUI can display
the error message to the user in a reasonable way.  You could argue that
the UI could try to do the same thing with the &"" messages, but those
aren't as clearly tied to specific MI commands.

As an added benefit, MI test cases that involve errors get a lot
shorter. :-)

Seriously though, I'd be surprised if the double sending of error output
is used by shipping front ends.  I'd be happy to submit a patch to change
the FSF gdb behavior for mi_version > 1 -- it's the addition of one
conditional in utils.c:error_stream().

Jason

Attachment: pa.txt
Description: Text document


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