Index: disasm.c =================================================================== RCS file: /cvs/src/src/gdb/disasm.c,v retrieving revision 1.17 diff -u -p -r1.17 disasm.c --- disasm.c 24 Oct 2003 17:37:03 -0000 1.17 +++ disasm.c 17 Dec 2003 20:37:25 -0000 @@ -164,6 +164,8 @@ do_mixed_source_and_assembly (struct ui_ CORE_ADDR pc; int num_displayed = 0; struct cleanup *ui_out_chain; + struct cleanup *ui_out_tuple_chain = NULL; + struct cleanup *ui_out_list_chain = NULL; mle = (struct dis_line_entry *) alloca (nlines * sizeof (struct dis_line_entry)); @@ -221,8 +223,6 @@ do_mixed_source_and_assembly (struct ui_ for (i = 0; i < newlines; i++) { - struct cleanup *ui_out_tuple_chain = NULL; - struct cleanup *ui_out_list_chain = NULL; int close_list = 1; /* Print out everything from next_line to the current line. */ @@ -275,19 +275,21 @@ do_mixed_source_and_assembly (struct ui_ next_line = mle[i].line + 1; ui_out_list_chain = make_cleanup_ui_out_list_begin_end (uiout, "line_asm_insn"); - /* Don't close the list if the lines are not in order. */ - if (i < (newlines - 1) && mle[i + 1].line <= mle[i].line) - close_list = 0; } + /* Don't close the list if the lines are not in order. */ + if (i < (newlines - 1) && mle[i + 1].line <= mle[i].line) + close_list = 0; + num_displayed += dump_insns (uiout, di, mle[i].start_pc, mle[i].end_pc, how_many, stb); if (close_list) { do_cleanups (ui_out_list_chain); do_cleanups (ui_out_tuple_chain); + ui_out_tuple_chain = NULL; + ui_out_list_chain = NULL; ui_out_text (uiout, "\n"); - close_list = 0; } if (how_many >= 0) if (num_displayed >= how_many)