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: [PING] ui_out related patches


Could someone please take a look at the following patches:

    http://sources.redhat.com/ml/gdb-patches/2002-07/msg00514.html
    http://sources.redhat.com/ml/gdb-patches/2002-07/msg00517.html

They are both related to internal errors that occur when gdb generates
a long list and the user aborts in the midst of displaying the list.

IMO, this is something that should be fixed prior to the next release.
(I accidently deleted the other thread discussing this.)

Anyway, 1.3c worth ...

Way back when MI was being started one of the ``lofty goals'' was to eliminate the exception code (i.e., cleanups, everything would use return). I think reality has set in on this front and we're not going to manage it --- instead we're going to be living with cleanups for a long time.

Anyway, I think the code should be made more robust. That is, given:

ui_out_cleanup_list_begin()
ui_out_tupple_begin()
ui_out_list_begin()
ui_out_list_end()
ui_out_tupple_end()
do_cleanups (list_end_cleanup);

the cleanup should know how to close off everything back to the specified cleanup level.

Other approaches would be:

cleanup = make_cleanup (null_cleanup, NULL);
ui_out_cleanup_list_begin()
ui_out_cleanup_tupple_begin()
ui_out_cleanup_list_begin()
do_cleanups (list_end_cleanup);

which happens to ``work'' (cleanups are a filo). And even:

ui_out_list_begin()
ui_out_tupple_begin()
ui_out_list_begin()
ui_out_list_end()
ui_out_tupple_end()
ui_out_list_end()

where ui-out internally and implicitly set up and executed cleanups.

Andrew



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