public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: Fernando Nasser <fnasser@redhat.com>
To: Barry Branham <bbranham@networkusa.net>
Cc: insight@sourceware.cygnus.com
Subject: Re: insight crash
Date: Mon, 08 Jan 2001 04:57:00 -0000	[thread overview]
Message-ID: <3A59B8FB.BD8A2A64@redhat.com> (raw)
In-Reply-To: <3A592F01.7199F19D@networkusa.net>

Barry Branham wrote:
> 
> Did this and discovered that Insight was missing some ".itcl"  files from the
> /usr/local/share/gdbtcl directory.  Namely: gdbmenubar.itcl, gdbtoolbar.itcl,
> srcmenubar.itcl and srctoolbar.itcl.  Copied them from ./gdb/gdbtk/library/ and got a
> proper source window.  It was very nice do see - so much nicer to use than the 'ddd'
> interface.  

That was my fault.  I forgot to check in a change to the Makefile.in
that was one
level above.  Thank you for helping me locate that.  I fixed the
installation now.


> However when I ran the gnomine program I could not continue after it stopped
> at the first (default) breakpoint - the control functions were not enabled..  I can't
> interpret this gdb tty output but it's rather lengthy so I won't include it. Maybe you
> know the problem here - i.e. why the controls are disabled.
> 

Maybe it has not stopped yet.  You see, the first thing that shows up is
the main()
function and the cursor is in the first executable line (where the
default break is
inserted).

But you now must press the "Run" button, the one with the little men
running on the left.

Please let me know if you saw the little men turn into a stop sign and
then Insight
stopped at that main() line with a red button to the left.


> Obviously something didn't work in the Insight installation so the real question is what
> is wrong with the install process.
> 
> >
> > > It occured to me it might help you if I got the to top of the stack trace I sent last
> > > time from running Insight with Dash so I made a tall window and held the return key.
> > > Here's the result:
> > >
> > Now we are cooking.
> >
> > It seems that you've hit a bug in the GDB C++ symbol overloading
> > routines.
> >
> > I Will revert the order of the frames so I can comment:
> >
> > >
> > > #130919 0x813153c in gdb_search (clientData=0x8131344, interp=0x8358b58, objc=5,
> > >     objv=0x83597d4) at ./gdbtk/generic/gdbtk-cmds.c:1618
> >
> > Here is where Insight calls GDB to get information about the symbol
> > "main".
> >
> > > #130918 0x80982e9 in search_symbols (
> > > regexp=0x83ab470 "main",
> > >
> > > kind=FUNCTIONS_NAMESPACE,
> > >     nfiles=0
> > >
> > > , files=0x0, matches=0xbfffdab4) at symtab.c:2555
> >
> > Here we are not in Insight anymore.  We are in GDB (file symtab.c) where
> > this function "search_symbols", looking for "main". We are looking for a
> > function
> > because  kind=FUNCTIONS_NAMESPACE.
> >
> > Here is this function definition (from GDB sources).
> >
> > /* Search the symbol table for matches to the regular expression REGEXP,
> >    returning the results in *MATCHES.
> >
> >    Only symbols of KIND are searched:
> >    FUNCTIONS_NAMESPACE - search all functions
> >    TYPES_NAMESPACE     - search all type names
> >    METHODS_NAMESPACE   - search all methods NOT IMPLEMENTED
> >    VARIABLES_NAMESPACE - search all symbols, excluding functions, type
> > names,
> >    and constants (enums)
> >
> >    free_search_symbols should be called when *MATCHES is no longer
> > needed.
> >  */
> > void
> > search_symbols (char *regexp, namespace_enum kind, int nfiles, char
> > *files[],
> >                 struct symbol_search **matches)
> >
> > > #130917 0x8096100 in lookup_symbol (name=0x85759a8
> > > "mainWindowWidget__C14VkSimpleWindow",
> > >     block=0x0, namespace=VAR_NAMESPACE, is_a_field_of_this=0x0, symtab=0x0) at
> > > symtab.c:595
> >
> > We found a partial match (it is not a function though).
> >
> > > #130916 0x8096100 in lookup_symbol (name=0x85759a8
> > > "mainWindowWidget__C14VkSimpleWindow",
> > >     block=0x863ac6c, namespace=VAR_NAMESPACE, is_a_field_of_this=0x0, symtab=0x0)
> > >     at symtab.c:595
> >
> > Found the same symbol again.
> >
> > > #130915 0x8096100 in lookup_symbol (name=0x85759a8
> > > "mainWindowWidget__C14VkSimpleWindow",
> > >     block=0x863ac6c, namespace=VAR_NAMESPACE, is_a_field_of_this=0x0, symtab=0x0)
> > >     at symtab.c:595
> >
> > And again.
> >
> > And this repeats until memory is exhausted.
> >
> > (gdb) bt
> > #0  0x401cb245 in chunk_alloc (ar_ptr=0x0, nb=0) at malloc.c:2736
> > #1  0x401cb08e in __libc_malloc (bytes=32) at malloc.c:2704
> > #2  0x80d853a in xmmalloc (md=0x0, size=32) at utils.c:1024
> > #3  0x80d85a8 in xmalloc (size=32) at utils.c:1059
> > #4  0x8185274 in string_need (s=0xbf800290, n=16) at cplus-dem.c:4721
> > #5  0x81853c5 in string_appendn (p=0xbf800290,
> >
> > It may be possible to repeat this crash without the GUI.  Maybe a
> > "info function main" command in console mode (gdb -nw) will also
> > dump core.
> >
> > If I could reproduce this here I could ask someone from the GDB symbols
> > area
> > to take a look at it.
> >
> > Can you try to cause the core dump with a soer of Hello, world! program
> > that links to
> > this library and send me the binary?  I could foward this to someone I
> > believe will
> > be able to tell us something about this...
> 
> I copied a ViewKit hello program and built it and ran Insight (with the missing .itcl
> files installed) on it and got the same segfault.
> 
> Here's the debug output from that:
> 
> ----------------
> I ManagedWin init {}
> I ManagedWin _open {DebugWin }
> I ManagedWin _create {win=debugwin args=}
> I ManagedWin constructor {::.debugwin0.debugwin args=}
> I DebugWin constructor {}
> W global gdbtk_clear_file GDBTK_CLEAR_FILE
> I ManagedWin find SrcWin
> I global gdbtk_locate_main {gdbtk_locate_main: Searching MAIN___ MAIN__ main}
> I SrcWin point_to_main {could not find main}
> I ManagedWin startup {Got active list {ManagedWin::open DebugWin} {ManagedWin::open
> SrcWin}}
> I ManagedWin _open {DebugWin }
> I ManagedWin _open {SrcWin }
> I ManagedWin _create {win=srcwin args=}
> I GDBWin constructor {GDBWin::constructor }
> I ManagedWin constructor {::.srcwin0.srcwin args=}
> I TopLevelWin constructor .srcwin0.srcwin
> I SrcWin constructor {}
> W SrcToolBar _set_runstop normal
> W SrcToolBar {} {configuring runstop normal}
> W SrcToolBar _set_runstop normal
> I global gdbtk_locate_main {gdbtk_locate_main: Searching MAIN___ MAIN__ main}
> 
> ----------------------
> This agrees with your analysis of the stack dump.
> Here's the source - VkHello.cc:
> 
> ////////////////////////////////////////////////////////////////////////////////
> ///////   Copyright 1992, Silicon Graphics, Inc.  All Rights Reserved.   ///////
> //                                                                            //
> // This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;     //
> // the contents of this file may not be disclosed to third parties, copied    //
> // or duplicated in any form, in whole or in part, without the prior written  //
> // permission of Silicon Graphics, Inc.                                       //
> //                                                                            //
> // RESTRICTED RIGHTS LEGEND:                                                  //
> // Use,duplication or disclosure by the Government is subject to restrictions //
> // as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data     //
> // and Computer Software clause at DFARS 252.227-7013, and/or in similar or   //
> // successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -    //
> // rights reserved under the Copyright Laws of the United States.             //
> //                                                                            //
> ////////////////////////////////////////////////////////////////////////////////
> 
> /////////////////////////////////////////////////////////////////////
> // hello.c++: This example displays a simple label in a window. The program
> // instantiates a VkApp object and defines a toplevel window class,
> // HelloWindow, which is a subclass of VkSimpleWindow.
> // Unlike the "generic" examples, this is the more usual way
> // to organize a program, as it provides a place to keep
> // per-window state and a way to support per-window operations
> ////////////////////////////////////////////////////////////////////
> 
> #include <Vk/VkApp.h>
> #include <Vk/VkSimpleWindow.h>
> #include <Xm/Label.h>
> 
> // Define a top-level window class
> 
> class HelloWindow: public VkSimpleWindow {
> 
>   protected:
> 
>     Widget _label;    // Hang on to widget a a data member
> 
>   public:
> 
>     HelloWindow ( const char *name );
>     ~HelloWindow();
>     virtual const char* className();  // Identify this class
> };
> 
> // The HelloWindow constructor provides a place in which to create a
> // widget tree to be installed as a "view" in the window.
> 
> HelloWindow::HelloWindow ( const char *name ) : VkSimpleWindow ( name )
> {
>     _label =  XmCreateLabel ( mainWindowWidget(), "hello", NULL, 0 );
> 
>     addView(_label);
> }
> 
> const char * HelloWindow::className()
> {
>     return "HelloWindow";
> }
> 
> HelloWindow::~HelloWindow()
> {
>     // Empty
> }
> 
> // Main driver. Just instantiate a VkApp and a top-level window, "show"
> // the window and then "run" the application.
> 
> int main ( int argc, char **argv )
> {
>     VkApp        *app = new VkApp("Hello", &argc, argv);
>     HelloWindow  *win = new HelloWindow("hello");
> 
>     win->show();
>     app->run();
> }
> 
> --------------------------
> And the Makefile:
> --------------------------
> 
> #
> #  Makefile for VkHello.cc
> #
> 
> CXX = g++
> OPTIMIZER = -g
> 
> CXXFLAGS= $(OPTIMIZER) $(CXXOPTS) $(INCLUDEDIR)
> 
> INCLUDEDIR = -I/usr/X11R6/include -I/usr/X11R6/share/include
> 
> VKLIBPATH = -L/usr/X11R6/lib
> 
> MOTIFLIBS = -lXmu -lXext -lXm -lXp -lXt -lSM -lICE -lX11
> VKLIBS =  $(VKLIBPATH) -lvk  -lvkhelp -lXpm -ldl
> LLDLIBS=  $(VKLIBS) $(MOTIFLIBS) -lm
> 
> PROG = VkHello
> 
> $(PROG): $(PROG).o
>  $(CXX) $(CXXFLAGS) -o $(PROG) $(PROG).o $(LLDLIBS)
> 
> $(PROG).o: $(PROG).cc
>  $(CXX) $(CXXFLAGS) -c $(PROG).cc -o $(PROG).o
> 
> -------------------------------------
> 
> You will need ViewKit which is available from www.viewkit.com and also motif or lesstif.
> I'm using openmotif which is rpm'd at www.motifzone.net.
> 
> Good luck!
> Barry

Thanks.  I will cc: you anything I learn about this.


-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9

  reply	other threads:[~2001-01-08  4:57 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-06 15:19 Barry Branham
2001-01-06 15:40 ` Fernando Nasser
2001-01-06 19:09   ` Barry Branham
2001-01-07  7:17     ` Fernando Nasser
2001-01-07  8:51       ` Barry Branham
2001-01-07 10:07         ` Fernando Nasser
2001-01-07 13:44           ` Barry Branham
2001-01-07 15:46             ` Fernando Nasser
2001-01-07 19:03               ` Barry Branham
2001-01-08  4:57                 ` Fernando Nasser [this message]
2001-01-08  5:37                   ` Barry Branham
2001-01-08  7:10                     ` Fernando Nasser
2001-01-15  7:08                       ` Barry Branham
2001-01-15  7:30                         ` Fernando Nasser
  -- strict thread matches above, loose matches on Subject: below --
2001-10-09  7:49 Insight crash Tom Tromey
2001-12-04 20:49 ` Tom Tromey
2001-05-11 16:48 Tom Tromey
2001-05-11 17:10 ` Fernando Nasser
2001-05-11 18:48   ` Tom Tromey
2000-12-08 12:26 Tom Tromey
2000-12-08 13:58 ` Fernando Nasser
2000-12-11  8:42   ` Fernando Nasser
2000-04-07 17:32 Tom Tromey
2000-04-10  9:02 ` Fernando Nasser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3A59B8FB.BD8A2A64@redhat.com \
    --to=fnasser@redhat.com \
    --cc=bbranham@networkusa.net \
    --cc=insight@sourceware.cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).