This is the mail archive of the gdb-prs@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]

cli/877: Quitting in the middle of "info set" output triggers push_level assersion failure from ui-out.c


>Number:         877
>Category:       cli
>Synopsis:       Quitting in the middle of "info set" output triggers push_level assersion failure from ui-out.c
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 09 12:18:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     nat.gurumoorthy@ubicom.com
>Release:        GNU gdb 5.2.91_2002-12-09-cvs
>Organization:
>Environment:
Linux lnx14 2.4.17 #3 SMP Fri Feb 8 22:11:23 PST 2002 i686 unknown

gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98)

This GDB was configured as "i686-pc-linux-gnu"
>Description:
Start GDB as follows
gdb -nw in a small xterm window.

At the command prompt type
info set

GDB will output a screenful of info and then put out the following at the end

"---Type <return> to continue, or q <return> to quit---"

Type q to cause it to quit the output.

Now again type

info set

And you will see the following
(gdb) info set
annotate:  Annotation_level is 0.
archdebug:  Architecture debugging is 0.
args:  Argument list to give program being debugged when it is started is "".
auto-solib-add:  Autoloading of shared library symbols is on.
can-use-hw-watchpoints:  Debugger's willingness to use watchpoint hardware is 1.
case-sensitive:  Case sensitivity in name search is "auto; currently on".
/home/natg/gdbcvs53/src/gdb/ui-out.c:130: gdb-internal-error: push_level: Assertion `uiout->level >= 0 && uiout->level < MAX_UI_OUT_LEVELS' failed.
check An internal GDB error was detected.  This may make further
debugging unreliable.  Quit this debugging session? (y or n) y

Create a core file containing the current state of GDB? (y or n) n
[lnx14]/home/natg/gdbcvs53/src/gdb/cli 76 % 


I am also attaching a file with the screen output

>How-To-Repeat:
Start GDB as
gdb -nw

Type
info set
q
info set

And you should see the problem
>Fix:
Index: cli-setshow.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-setshow.c,v
retrieving revision 1.9
diff -c -3 -p -r1.9 cli-setshow.c
*** cli-setshow.c       30 Jul 2002 13:45:14 -0000      1.9
--- cli-setshow.c       9 Dec 2002 20:07:49 -0000
*************** do_setshow_command (char *arg, int from_
*** 352,379 ****
  void
  cmd_show_list (struct cmd_list_element *list, int from_tty, char *prefix)
  {
!   ui_out_tuple_begin (uiout, "showlist");
    for (; list != NULL; list = list->next)
      {
        /* If we find a prefix, run its list, prefixing our output by its
           prefix (with "show " skipped).  */
        if (list->prefixlist && !list->abbrev_flag)
        {
!         ui_out_tuple_begin (uiout, "optionlist");
          ui_out_field_string (uiout, "prefix", list->prefixname + 5);
          cmd_show_list (*list->prefixlist, from_tty, list->prefixname + 5);
!         ui_out_tuple_end (uiout);
        }
        if (list->type == show_cmd)
        {
!         ui_out_tuple_begin (uiout, "option");
          ui_out_text (uiout, prefix);
          ui_out_field_string (uiout, "name", list->name);
          ui_out_text (uiout, ":  ");
          do_setshow_command ((char *) NULL, from_tty, list);
!         ui_out_tuple_end (uiout);
        }
      }
!   ui_out_tuple_end (uiout);
  }
  
--- 352,379 ----
  void
  cmd_show_list (struct cmd_list_element *list, int from_tty, char *prefix)
  {
!   struct cleanup *old_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "sho
wlist");
    for (; list != NULL; list = list->next)
      {
        /* If we find a prefix, run its list, prefixing our output by its
           prefix (with "show " skipped).  */
        if (list->prefixlist && !list->abbrev_flag)
        {
!         struct cleanup *old_chain = make_cleanup_ui_out_tuple_begin_end (uiout
, "optionlist");
          ui_out_field_string (uiout, "prefix", list->prefixname + 5);
          cmd_show_list (*list->prefixlist, from_tty, list->prefixname + 5);
!         do_cleanups(old_chain);
        }
        if (list->type == show_cmd)
        {
!         struct cleanup *old_chain = make_cleanup_ui_out_tuple_begin_end (uiout
, "option");
          ui_out_text (uiout, prefix);
          ui_out_field_string (uiout, "name", list->name);
          ui_out_text (uiout, ":  ");
          do_setshow_command ((char *) NULL, from_tty, list);
!         do_cleanups(old_chain);
        }
      }
!   do_cleanups(old_chain);
  }
  
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="screenout"
Content-Disposition: inline; filename="screenout"

[lnx14]/home/natg/gdbcvs53/src/gdb/cli 75 % ../../../work_386/gdb/gdb -nw
GNU gdb 5.2.91_2002-12-09-cvs
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
(gdb) info set
annotate:  Annotation_level is 0.
archdebug:  Architecture debugging is 0.
args:  Argument list to give program being debugged when it is started is "".
auto-solib-add:  Autoloading of shared library symbols is on.
can-use-hw-watchpoints:  Debugger's willingness to use watchpoint hardware is 1.
case-sensitive:  Case sensitivity in name search is "auto; currently on".
check check range:  Range checking is "auto; currently off".
check type:  Type checking is "auto; currently off".
complaints:  Max number of complaints about incorrect symbols is 0.
confirm:  Whether to confirm potentially dangerous operations is on.
debug debug arch:  Architecture debugging is 0.
debug event:  Event debugging is 0.
debug expression:  Expression debugging is 0.
debug lin-lwp:  Debugging of GNU/Linux lwp module is 0.
debug overload:  Debugging of C++ overloading is 0.
debug remote:  Debugging of remote protocol is 0.
debug serial:  Serial debugging is 0.
debug target:  Target debugging is 0.
debugvarobj:  Varobj debugging is 0.
demangle-style:  The current C++ demangling style is "auto".
disassembly-flavor:  The disassembly flavor is "att".
---Type <return> to continue, or q <return> to quit---q
Quit
(gdb) info set
annotate:  Annotation_level is 0.
archdebug:  Architecture debugging is 0.
args:  Argument list to give program being debugged when it is started is "".
auto-solib-add:  Autoloading of shared library symbols is on.
can-use-hw-watchpoints:  Debugger's willingness to use watchpoint hardware is 1.
case-sensitive:  Case sensitivity in name search is "auto; currently on".
/home/natg/gdbcvs53/src/gdb/ui-out.c:130: gdb-internal-error: push_level: Assertion `uiout->level >= 0 && uiout->level < MAX_UI_OUT_LEVELS' failed.
check An internal GDB error was detected.  This may make further
debugging unreliable.  Quit this debugging session? (y or n) y

Create a core file containing the current state of GDB? (y or n) n
[lnx14]/home/natg/gdbcvs53/src/gdb/cli 76 % 


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