public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* Problems with function pointers in C++
@ 2008-02-17 14:40 Geert Vancompernolle
  2008-02-17 19:38 ` Keith Seitz
  0 siblings, 1 reply; 23+ messages in thread
From: Geert Vancompernolle @ 2008-02-17 14:40 UTC (permalink / raw)
  To: Insight Foum

Hi,

Using Insight 6.7.1, compiled for the host i686-pc-linux-gnu and for the 
target cris-axis-linux-gnu

I have the following (educational) piece of code (c) Lars Haendel 
(http://www.newty.de):

#include "stdio.h"

#include <stdlib.h>
#include <iostream>
using namespace std;

class TMyClass
{
public:
    int DoIt( float a, char b, char c )
    {
        cout << "TMyClass::DoIt" << endl;
        return ( (int)a + b + c);
    }
   
    int DoMore( float a, char b, char c ) const
    {
        cout << "TMyClass::DoMore" << endl;
        return ( (int)a - b + c );
    }
};

int DoIt( float a, char b, char c )
{
    printf( "DoIt\n");
    return ( (int)a + b + c );
}

int DoMore( float a, char b, char c ) //const
{
    printf( "DoIt\n");
    return ( (int)a - b + c );
}

int main( int argc, const char **argv )
{
    int (*pt2Function)( float, char, char ) = NULL;
    int (TMyClass::*pt2Member)( float, char, char ) = NULL;
    int (TMyClass::*pt2ConstMember)( float, char, char ) const = NULL;
   
    pt2Function = DoIt;
    //pt2Function = &DoMore;
   
    pt2ConstMember = &TMyClass::DoMore;
    pt2Member      = &TMyClass::DoIt;
   
    if ( pt2Function > 0 )
    {
        if ( pt2Function == &DoIt )
        {
            printf( "Pointer points to DoIt\n" );
        }
        else
        {
            printf( "Pointer not initialized\n" );
        }
    }
   
    int result1 = pt2Function( 12, 'a', 'b' );
    printf( "Result 1 = %d\n", result1 );
    int result2 = (*pt2Function)( 12, 'a', 'b' );
    printf( "Result 2 = %d\n", result2 );
   
    TMyClass instance1;
    int result3 = (instance1.*pt2Member)( 12, 'a', 'b' );
    printf( "Result 3 = %d\n", result3 );
    // int result4 = (*this.*pt2Member)( 12, 'a', 'b' );
    // printf( "Result 4 = %d\n", result4 );
   
    TMyClass* instance2 = new TMyClass;
    int result4 = (instance2->*pt2Member)( 12, 'a', 'b' );
    printf( "Result 4 = %d\n", result4 );
    int result5 = (instance2->*pt2ConstMember)( 12, 'a', 'b' );
    printf( "Result 5 = %d\n", result5 );
    delete instance2;
       
    return( 0 );
}


When using Insight to step through the code, I can step without problems 
into the "C" function pointers (pt2Function and *pt2Function) using the 
"S" command.

However, when trying to use the same "S" command when the C++ function 
pointers are handled, the debugger refuses to step into the functions 
"DoIt" and "DoItMore" from the class TMyClass.  Even stepping over the 
call (using "N") does not work.
I have to put a breakpoint just after the calls (on the lines containing 
the printf statements) and press "C" to continue debugging.

The results, however, are fine.  The program itself works perfect, only 
Insight can apparently not "follow" C++ function pointers.

Any ideas?

-- 
*Best rgds,

--Geert
*

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Problems with function pointers in C++
  2008-02-17 14:40 Problems with function pointers in C++ Geert Vancompernolle
@ 2008-02-17 19:38 ` Keith Seitz
  2008-02-18  4:03   ` Geert Vancompernolle
  0 siblings, 1 reply; 23+ messages in thread
From: Keith Seitz @ 2008-02-17 19:38 UTC (permalink / raw)
  To: Geert Vancompernolle; +Cc: Insight Foum

Geert Vancompernolle wrote:
> However, when trying to use the same "S" command when the C++ function 
> pointers are handled, the debugger refuses to step into the functions 
> "DoIt" and "DoItMore" from the class TMyClass.  Even stepping over the 
> call (using "N") does not work.
> I have to put a breakpoint just after the calls (on the lines containing 
> the printf statements) and press "C" to continue debugging.

This is a bug in gdb. I've checked your test case against CVS HEAD, and 
it can step into function pointers. Try a snapshot or build from CVS HEAD.

Keith

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Problems with function pointers in C++
  2008-02-17 19:38 ` Keith Seitz
@ 2008-02-18  4:03   ` Geert Vancompernolle
  2008-02-18  4:07     ` Geert Vancompernolle
  0 siblings, 1 reply; 23+ messages in thread
From: Geert Vancompernolle @ 2008-02-18  4:03 UTC (permalink / raw)
  To: Keith Seitz; +Cc: Geert Vancompernolle, Insight Foum

Keith Seitz wrote:
> Geert Vancompernolle wrote:
>> However, when trying to use the same "S" command when the C++ 
>> function pointers are handled, the debugger refuses to step into the 
>> functions "DoIt" and "DoItMore" from the class TMyClass.  Even 
>> stepping over the call (using "N") does not work.
>> I have to put a breakpoint just after the calls (on the lines 
>> containing the printf statements) and press "C" to continue debugging.
>
> This is a bug in gdb. I've checked your test case against CVS HEAD, 
> and it can step into function pointers. Try a snapshot or build from 
> CVS HEAD.
>
> Keith
>
>

Good news to read this.  Is it possible to tell me what to do to get the 
snapshot?  I've never done this before, I've always downloaded the 
sources from Sourceforge and compiled these.
I have TortoiseSVN running on Windows, if that could be a starting point...
 
*Best rgds,

Geert
*

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Problems with function pointers in C++
  2008-02-18  4:03   ` Geert Vancompernolle
@ 2008-02-18  4:07     ` Geert Vancompernolle
  2008-02-18  7:09       ` Keith Seitz
  0 siblings, 1 reply; 23+ messages in thread
From: Geert Vancompernolle @ 2008-02-18  4:07 UTC (permalink / raw)
  To: Geert Vancompernolle; +Cc: Keith Seitz, Insight Foum

Geert Vancompernolle wrote:
> Keith Seitz wrote:
>> Geert Vancompernolle wrote:
>>> However, when trying to use the same "S" command when the C++ 
>>> function pointers are handled, the debugger refuses to step into the 
>>> functions "DoIt" and "DoItMore" from the class TMyClass.  Even 
>>> stepping over the call (using "N") does not work.
>>> I have to put a breakpoint just after the calls (on the lines 
>>> containing the printf statements) and press "C" to continue debugging.
>>
>> This is a bug in gdb. I've checked your test case against CVS HEAD, 
>> and it can step into function pointers. Try a snapshot or build from 
>> CVS HEAD.
>>
>> Keith
>>
>>
>
> Good news to read this.  Is it possible to tell me what to do to get 
> the snapshot?  I've never done this before, I've always downloaded the 
> sources from Sourceforge and compiled these.
> I have TortoiseSVN running on Windows, if that could be a starting 
> point...
>
> *Best rgds,
>
> Geert
> *
>
Sorry, I was too fast in typing.  I didn't mean Sourceforge, but the 
download section of the Insight web site...

In the mean time, I've seen the CVS commands are given on that same page 
too (http://sourceware.org/insight/downloads.php), so I'll have a look 
at this first.

Unless it's the wrong place I'm looking at, of course...

-- 
*Best rgds,

Geert
*

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Problems with function pointers in C++
  2008-02-18  4:07     ` Geert Vancompernolle
@ 2008-02-18  7:09       ` Keith Seitz
  2008-02-19 18:51         ` Geert Vancompernolle
  0 siblings, 1 reply; 23+ messages in thread
From: Keith Seitz @ 2008-02-18  7:09 UTC (permalink / raw)
  To: Geert Vancompernolle; +Cc: Geert Vancompernolle, Insight Foum

Geert Vancompernolle wrote:
> In the mean time, I've seen the CVS commands are given on that same page 
> too (http://sourceware.org/insight/downloads.php), so I'll have a look 
> at this first.

No worries, that's the right place. You can download the snapshots at 
the same place -- a new one is posted every Monday (I'm not on vacation):

ftp://sourceware.org/pub/insight/snapshots/current

I'll be doing a new one in a few hours...

Keith

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Problems with function pointers in C++
  2008-02-18  7:09       ` Keith Seitz
@ 2008-02-19 18:51         ` Geert Vancompernolle
  2008-02-19 19:00           ` Geert Vancompernolle
  2008-02-19 19:20           ` Geert Vancompernolle
  0 siblings, 2 replies; 23+ messages in thread
From: Geert Vancompernolle @ 2008-02-19 18:51 UTC (permalink / raw)
  To: Keith Seitz; +Cc: Geert Vancompernolle, Insight Foum

Keith Seitz wrote:
>
> ftp://sourceware.org/pub/insight/snapshots/current
>
> I'll be doing a new one in a few hours...
>
Hello Keith,

Just downloaded the newest version (I took the 
insight-weekly-CVS-6.7.50-20080218.tar.bz2 file, not the 
insight-weekly-6.7.50-20080218-tar.bz2 file) and I tried to rebuild the 
package.

During the build process, I get a couple of errors (sorry for the long 
listing, but I think you will need all the info):

Making info in doc
make[3]: Entering directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
make chew
make[4]: Entering directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
gcc -o chew.$$ ../.././bfd/doc/chew.c \
          -g -O2   \
          -I.. -I../.././bfd/doc/.. -I../.././bfd/doc/../../include 
-I../.././bfd/doc/../../intl -I../../intl; \
        /bin/sh ../.././bfd/doc/../../move-if-change chew.$$ chew
make[4]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
./chew -f ../.././bfd/doc/doc.str <../.././bfd/doc/../aoutx.h >aoutx.tmp
/bin/sh ../.././bfd/doc/../../move-if-change aoutx.tmp aoutx.texi
make chew
make[4]: Entering directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
make[4]: `chew' is up to date.
make[4]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
./chew -f ../.././bfd/doc/doc.str <../.././bfd/doc/../archive.c >archive.tmp
/bin/sh ../.././bfd/doc/../../move-if-change archive.tmp archive.texi
make chew
make[4]: Entering directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
make[4]: `chew' is up to date.
make[4]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
./chew -f ../.././bfd/doc/doc.str < ../.././bfd/doc/../archures.c 
 >archures.tmp
/bin/sh ../.././bfd/doc/../../move-if-change archures.tmp archures.texi
make chew
make[4]: Entering directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
make[4]: `chew' is up to date.
make[4]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
./chew -f ../.././bfd/doc/doc.str < ../.././bfd/doc/../bfd.c >bfd.tmp
/bin/sh ../.././bfd/doc/../../move-if-change bfd.tmp bfdt.texi
make chew
make[4]: Entering directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
make[4]: `chew' is up to date.
make[4]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
./chew -f ../.././bfd/doc/doc.str < ../.././bfd/doc/../cache.c >cache.tmp
/bin/sh ../.././bfd/doc/../../move-if-change cache.tmp cache.texi
make chew
make[4]: Entering directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
make[4]: `chew' is up to date.
make[4]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
./chew -f ../.././bfd/doc/doc.str <../.././bfd/doc/../coffcode.h 
 >coffcode.tmp
/bin/sh ../.././bfd/doc/../../move-if-change coffcode.tmp coffcode.texi
make chew
make[4]: Entering directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
make[4]: `chew' is up to date.
make[4]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
./chew -f ../.././bfd/doc/doc.str <../.././bfd/doc/../corefile.c >core.tmp
/bin/sh ../.././bfd/doc/../../move-if-change core.tmp core.texi
make chew
make[4]: Entering directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
make[4]: `chew' is up to date.
make[4]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
./chew -f ../.././bfd/doc/doc.str <../.././bfd/doc/../elf.c >elf.tmp
/bin/sh ../.././bfd/doc/../../move-if-change elf.tmp elf.texi
make chew
make[4]: Entering directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
make[4]: `chew' is up to date.
make[4]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
./chew -f ../.././bfd/doc/doc.str <../.././bfd/doc/../elfcode.h >elfcode.tmp
/bin/sh ../.././bfd/doc/../../move-if-change elfcode.tmp elfcode.texi
make chew
make[4]: Entering directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
make[4]: `chew' is up to date.
make[4]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
./chew -f ../.././bfd/doc/doc.str <../.././bfd/doc/../format.c >format.tmp
/bin/sh ../.././bfd/doc/../../move-if-change format.tmp format.texi
make chew
make[4]: Entering directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
make[4]: `chew' is up to date.
make[4]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
./chew -f ../.././bfd/doc/doc.str < ../.././bfd/doc/../libbfd.c >libbfd.tmp
/bin/sh ../.././bfd/doc/../../move-if-change libbfd.tmp libbfd.texi
make chew
make[4]: Entering directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
make[4]: `chew' is up to date.
make[4]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
./chew -f ../.././bfd/doc/doc.str < ../.././bfd/doc/../bfdwin.c >bfdwin.tmp
/bin/sh ../.././bfd/doc/../../move-if-change bfdwin.tmp bfdwin.texi
make chew
make[4]: Entering directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
make[4]: `chew' is up to date.
make[4]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
./chew -f ../.././bfd/doc/doc.str < ../.././bfd/doc/../bfdio.c >bfdio.tmp
/bin/sh ../.././bfd/doc/../../move-if-change bfdio.tmp bfdio.texi
make chew
make[4]: Entering directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
make[4]: `chew' is up to date.
make[4]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
./chew -f ../.././bfd/doc/doc.str  <../.././bfd/doc/../opncls.c >opncls.tmp
/bin/sh ../.././bfd/doc/../../move-if-change opncls.tmp opncls.texi
make chew
make[4]: Entering directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
make[4]: `chew' is up to date.
make[4]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
./chew -f ../.././bfd/doc/doc.str <../.././bfd/doc/../reloc.c >reloc.tmp
/bin/sh ../.././bfd/doc/../../move-if-change reloc.tmp reloc.texi
make chew
make[4]: Entering directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
make[4]: `chew' is up to date.
make[4]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
./chew -f ../.././bfd/doc/doc.str <../.././bfd/doc/../section.c >section.tmp
/bin/sh ../.././bfd/doc/../../move-if-change section.tmp section.texi
make chew
make[4]: Entering directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
make[4]: `chew' is up to date.
make[4]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
./chew -f ../.././bfd/doc/doc.str <../.././bfd/doc/../syms.c >syms.tmp
/bin/sh ../.././bfd/doc/../../move-if-change syms.tmp syms.texi
make chew
make[4]: Entering directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
make[4]: `chew' is up to date.
make[4]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
./chew -f ../.././bfd/doc/doc.str <../.././bfd/doc/../targets.c >targets.tmp
/bin/sh ../.././bfd/doc/../../move-if-change targets.tmp targets.texi
make chew
make[4]: Entering directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
make[4]: `chew' is up to date.
make[4]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
./chew -f ../.././bfd/doc/doc.str <../.././bfd/doc/../init.c >init.tmp
/bin/sh ../.././bfd/doc/../../move-if-change init.tmp init.texi
make chew
make[4]: Entering directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
make[4]: `chew' is up to date.
make[4]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
./chew -f ../.././bfd/doc/doc.str <../.././bfd/doc/../hash.c >hash.tmp
/bin/sh ../.././bfd/doc/../../move-if-change hash.tmp hash.texi
make chew
make[4]: Entering directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
make[4]: `chew' is up to date.
make[4]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
./chew -f ../.././bfd/doc/doc.str <../.././bfd/doc/../linker.c >linker.tmp
/bin/sh ../.././bfd/doc/../../move-if-change linker.tmp linker.texi
make chew
make[4]: Entering directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
make[4]: `chew' is up to date.
make[4]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
./chew -f ../.././bfd/doc/doc.str <../.././bfd/doc/../mmo.c >mmo.tmp
/bin/sh ../.././bfd/doc/../../move-if-change mmo.tmp mmo.texi
creating bfdver.texi
restore=: && backupdir=".am$$" && \
        rm -rf $backupdir && mkdir $backupdir && \
        if 
(/home/geertvc/applications/insight/insight-6.7.5-RC/src/missing 
makeinfo --split-size=5000000 --split-size=5000000 --version) >/dev/null 
2>&1; then \
          for f in bfd.info bfd.info-[0-9] bfd.info-[0-9][0-9] 
bfd.i[0-9] bfd.i[0-9][0-9]; do \
            if test -f $f; then mv $f $backupdir; restore=mv; else :; fi; \
          done; \
        else :; fi && \
        if 
/home/geertvc/applications/insight/insight-6.7.5-RC/src/missing makeinfo 
--split-size=5000000 --split-size=5000000   -I ../.././bfd/doc \
         -o bfd.info `test -f 'bfd.texinfo' || echo 
'../.././bfd/doc/'`bfd.texinfo; \
        then \
          rc=0; \
        else \
          rc=$?; \
          $restore $backupdir/* `echo "./bfd.info" | sed 's|[^/]*$||'`; \
        fi; \
        rm -rf $backupdir; exit $rc
WARNING: `makeinfo' is missing on your system.  You should only need it if
         you modified a `.texi' or `.texinfo' file, or any other file
         indirectly affecting the aspect of the manual.  The spurious
         call might also be the consequence of using a buggy `make' (AIX,
         DU, IRIX).  You might want to install the `Texinfo' package or
         the `GNU make' package.  Grab either from any GNU archive site.
make[3]: *** [bfd.info] Error 1
make[3]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
Making info in po
make[3]: Entering directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/po'
( if test 'x../.././bfd/po' != 'x.'; then \
            posrcprefix='../.././bfd/'; \
          else \
            posrcprefix="../"; \
          fi; \
          rm -f SRC-POTFILES-t SRC-POTFILES \
            && (sed -e '/^#/d' \
                    -e '/^[     ]*$/d' \
                    -e "s@.*@   $posrcprefix& \\\\@" < 
../.././bfd/po/SRC-POTFILES.in \
                | sed -e '$s/\\$//') > SRC-POTFILES-t \
            && chmod a-w SRC-POTFILES-t \
            && mv SRC-POTFILES-t SRC-POTFILES )
( rm -f BLD-POTFILES-t BLD-POTFILES \
            && (sed -e '/^#/d' \
                    -e '/^[     ]*$/d' \
                    -e "s@.*@   ../& \\\\@" < 
../.././bfd/po/BLD-POTFILES.in \
                | sed -e '$s/\\$//') > BLD-POTFILES-t \
            && chmod a-w BLD-POTFILES-t \
            && mv BLD-POTFILES-t BLD-POTFILES )
cd .. \
          && CONFIG_FILES=po/Makefile.in:po/Make-in \
             CONFIG_HEADERS= /bin/sh ./config.status
config.status: creating po/Makefile.in
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing default-1 commands
config.status: executing bfd_stdint.h commands
config.status: executing default commands
make[3]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/po'
make[3]: Entering directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/po'
make[3]: Nothing to be done for `info'.
make[3]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/po'
make[3]: Entering directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd'
make[3]: Nothing to be done for `info-am'.
make[3]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd'
make[2]: *** [info-recursive] Error 1
make[2]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd'
make[1]: *** [all-bfd] Error 2
make[1]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src'
make: *** [all] Error 2
geertvc@VirLinGeva:~/applications/insight/insight-6.7.5-RC/src$ make
make[1]: Entering directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src'
make[2]: Entering directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/libiberty'
make[3]: Entering directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/libiberty/testsuite'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/libiberty/testsuite'
make[2]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/libiberty'
make[2]: Entering directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/intl'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/intl'
make[2]: Entering directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd'
Making info in doc
make[3]: Entering directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
restore=: && backupdir=".am$$" && \
        rm -rf $backupdir && mkdir $backupdir && \
        if 
(/home/geertvc/applications/insight/insight-6.7.5-RC/src/missing 
makeinfo --split-size=5000000 --split-size=5000000 --version) >/dev/null 
2>&1; then \
          for f in bfd.info bfd.info-[0-9] bfd.info-[0-9][0-9] 
bfd.i[0-9] bfd.i[0-9][0-9]; do \
            if test -f $f; then mv $f $backupdir; restore=mv; else :; fi; \
          done; \
        else :; fi && \
        if 
/home/geertvc/applications/insight/insight-6.7.5-RC/src/missing makeinfo 
--split-size=5000000 --split-size=5000000   -I ../.././bfd/doc \
         -o bfd.info `test -f 'bfd.texinfo' || echo 
'../.././bfd/doc/'`bfd.texinfo; \
        then \
          rc=0; \
        else \
          rc=$?; \
          $restore $backupdir/* `echo "./bfd.info" | sed 's|[^/]*$||'`; \
        fi; \
        rm -rf $backupdir; exit $rc
WARNING: `makeinfo' is missing on your system.  You should only need it if
         you modified a `.texi' or `.texinfo' file, or any other file
         indirectly affecting the aspect of the manual.  The spurious
         call might also be the consequence of using a buggy `make' (AIX,
         DU, IRIX).  You might want to install the `Texinfo' package or
         the `GNU make' package.  Grab either from any GNU archive site.
make[3]: *** [bfd.info] Error 1
make[3]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/doc'
Making info in po
make[3]: Entering directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/po'
make[3]: Nothing to be done for `info'.
make[3]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd/po'
make[3]: Entering directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd'
make[3]: Nothing to be done for `info-am'.
make[3]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd'
make[2]: *** [info-recursive] Error 1
make[2]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/bfd'
make[1]: *** [all-bfd] Error 2
make[1]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src'
make: *** [all] Error 2
geertvc@VirLinGeva:~/applications/insight/insight-6.7.5-RC/src$ which 
makeinfo
/usr/bin/makeinfo

I see that the error is mentioning "makeinfo" is missing on the system.  
However, when running "which makeinfo", I get "/usr/bin/makeinfo" back 
as a result (see last command given).

Compiling 6.7.1 was giving no problems at all.

Any idea what is causing this error/these errors?

-- 
*Best rgds,

--Geert

*

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Problems with function pointers in C++
  2008-02-19 18:51         ` Geert Vancompernolle
@ 2008-02-19 19:00           ` Geert Vancompernolle
  2008-02-19 19:20           ` Geert Vancompernolle
  1 sibling, 0 replies; 23+ messages in thread
From: Geert Vancompernolle @ 2008-02-19 19:00 UTC (permalink / raw)
  To: Keith Seitz; +Cc: Geert Vancompernolle, Insight Foum

Geert Vancompernolle wrote:
> Keith Seitz wrote:
>>
>> ftp://sourceware.org/pub/insight/snapshots/current
>>
>> I'll be doing a new one in a few hours...
>>
Some more info which might be useful: the output of the command 
./configure --target=cris-axis-linux-gnu:


geertvc@VirLinGeva:~/applications/insight/insight-6.7.5-RC/src$ 
./configure --target=cris-axis-linux-gnu
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... cris-axis-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking for gnatbind... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 
$$f1 $$f2
*** removing intl/Makefile to force reconfigure
*** removing libiberty/Makefile to force reconfigure
*** removing bfd/Makefile to force reconfigure
checking for bison... bison -y
checking for bison... bison
checking for gm4... no
checking for gnum4... no
checking for m4... m4
checking for flex... flex
checking for flex... flex
checking for makeinfo... makeinfo
checking for expect... no
checking for runtest... no
checking for ar... ar
checking for as... as
checking for dlltool... no
checking for ld... ld
checking for lipo... no
checking for nm... nm
checking for ranlib... ranlib
checking for strip... strip
checking for windres... no
checking for windmc... no
checking for objcopy... objcopy
checking for objdump... objdump
checking for cris-axis-linux-gnu-cc... no
checking for cris-axis-linux-gnu-gcc... cris-axis-linux-gnu-gcc
checking for cris-axis-linux-gnu-c++... cris-axis-linux-gnu-c++
checking for cris-axis-linux-gnu-gcc... cris-axis-linux-gnu-gcc
checking for cris-axis-linux-gnu-gcj... no
checking for cris-axis-linux-gnu-gfortran... no
checking for cris-axis-linux-gnu-ar... cris-axis-linux-gnu-ar
checking for cris-axis-linux-gnu-as... cris-axis-linux-gnu-as
checking for cris-axis-linux-gnu-dlltool... no
checking for cris-axis-linux-gnu-ld... cris-axis-linux-gnu-ld
checking for cris-axis-linux-gnu-lipo... no
checking for cris-axis-linux-gnu-nm... cris-axis-linux-gnu-nm
checking for cris-axis-linux-gnu-objdump... cris-axis-linux-gnu-objdump
checking for cris-axis-linux-gnu-ranlib... cris-axis-linux-gnu-ranlib
checking for cris-axis-linux-gnu-strip... cris-axis-linux-gnu-strip
checking for cris-axis-linux-gnu-windres... no
checking for cris-axis-linux-gnu-windmc... no
checking where to find the target ar... pre-installed
checking where to find the target as... pre-installed
checking where to find the target cc... pre-installed
checking where to find the target c++... pre-installed
checking where to find the target c++ for libstdc++... pre-installed
checking where to find the target dlltool... pre-installed
checking where to find the target gcc... pre-installed
checking where to find the target gcj... pre-installed
checking where to find the target gfortran... pre-installed
checking where to find the target ld... pre-installed
checking where to find the target lipo... pre-installed
checking where to find the target nm... pre-installed
checking where to find the target objdump... pre-installed
checking where to find the target ranlib... pre-installed
checking where to find the target strip... pre-installed
checking where to find the target windres... pre-installed
checking where to find the target windmc... pre-installed
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether -fkeep-inline-functions is supported... yes
configure: creating ./config.status
config.status: creating Makefile

Also here, you see it finds "makeinfo", so the error message I get is a 
bit of a mystery to me...

-- 
*Best rgds,

--Geert

*

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Problems with function pointers in C++
  2008-02-19 18:51         ` Geert Vancompernolle
  2008-02-19 19:00           ` Geert Vancompernolle
@ 2008-02-19 19:20           ` Geert Vancompernolle
  2008-02-19 19:59             ` Keith Seitz
  1 sibling, 1 reply; 23+ messages in thread
From: Geert Vancompernolle @ 2008-02-19 19:20 UTC (permalink / raw)
  To: Geert Vancompernolle; +Cc: Keith Seitz, Insight Foum

Geert Vancompernolle wrote:
> Keith Seitz wrote:
>>
>> ftp://sourceware.org/pub/insight/snapshots/current
>>
>> I'll be doing a new one in a few hours...
>>
> Hello Keith,
>
> Just downloaded the newest version (I took the 
> insight-weekly-CVS-6.7.50-20080218.tar.bz2 file, not the 
> insight-weekly-6.7.50-20080218-tar.bz2 file) and I tried to rebuild 
> the package.
>
> During the build process, I get a couple of errors (sorry for the long 
> listing, but I think you will need all the info):
>

No need to look for the cause any more...

I was looking on the inet to know where to find "makeinfo" (although it 
was already installed) and I found it was part of the texinfo package.

So, using Kubuntu 7.10, I installed the package texinfo and then ran the 
make again.  But still with the same bad result: errors.

Then I did a "make clean" and a "make" again, and the build went through!!!

I could install without any problems and I'm running now version 
6.7.5-20080218-cvs (via "Help | About").

But unfortunately, also with this version I can't step through my C++ 
function pointers.  While apparently you could do it...

So, what could still be the difference between your situation and mine?

-- 
*Best rgds,

--Geert

*

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Problems with function pointers in C++
  2008-02-19 19:20           ` Geert Vancompernolle
@ 2008-02-19 19:59             ` Keith Seitz
  2008-02-20 18:24               ` Geert Vancompernolle
  0 siblings, 1 reply; 23+ messages in thread
From: Keith Seitz @ 2008-02-19 19:59 UTC (permalink / raw)
  To: Geert Vancompernolle; +Cc: Insight Foum

Geert Vancompernolle wrote:
> But unfortunately, also with this version I can't step through my C++ 
> function pointers.  While apparently you could do it...
> 
> So, what could still be the difference between your situation and mine?

Wow... That's strange...

My only guess is that it could be your compiler -- which one are you 
using? I'm using Fedora 8 with GCC "4.1.2 20070925 (Red Hat 4.1.2-33)".

I'm going to send you a binary of your test case built with this 
compiler (privately via email). Try that on your insight build. If it 
works, we know that it's your compiler giving you problems.

Please respond to this message with your findings.
Keith

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Problems with function pointers in C++
  2008-02-19 19:59             ` Keith Seitz
@ 2008-02-20 18:24               ` Geert Vancompernolle
  2008-02-20 19:03                 ` Keith Seitz
  0 siblings, 1 reply; 23+ messages in thread
From: Geert Vancompernolle @ 2008-02-20 18:24 UTC (permalink / raw)
  To: Keith Seitz; +Cc: Insight Foum

Keith Seitz wrote:
>
> Please respond to this message with your findings.
> Keith
>
Just received the binary you made on your Fedora machine.

But I see that's a binary for a Linux PC version.  The Insight I'm 
using, is to debug code written for an embedded Linux system, using the 
CRIS compiler.  And on that target (a FoxBoard from AcmeSystems, running 
embedded Linux on an ETRAX chip), the bin file is not running (seems 
quite obvious, this one...).

That's why I've compiled Insight with the following commands:

./configure --target=cris-axis-linux-gnu
make

This way, I have a cross-compiled version of Insight.  And that's the 
version I'm having problems with, when using the C++ function pointers.

When I ask the "Help About" status of Insight, I get the following info 
screen message:

"This GDB was configured as "--host=i686-pc-linux-gnu 
--target=cris-axis-linux-gnu". (next to the rest of the help info).

I can rebuild Insight for the PC version and try out the binary, but 
finally that's not my target...

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Problems with function pointers in C++
  2008-02-20 18:24               ` Geert Vancompernolle
@ 2008-02-20 19:03                 ` Keith Seitz
  2008-02-20 19:30                   ` Geert Vancompernolle
  0 siblings, 1 reply; 23+ messages in thread
From: Keith Seitz @ 2008-02-20 19:03 UTC (permalink / raw)
  To: Geert Vancompernolle; +Cc: Insight Foum

Geert Vancompernolle wrote:
> That's why I've compiled Insight with the following commands:
> 
> ./configure --target=cris-axis-linux-gnu
> make

Whoops. I missed that...

> I can rebuild Insight for the PC version and try out the binary, but 
> finally that's not my target...

Actually, if you could do that, it would be best. Since all of the 
language handling code is not target-specific, this test might be useful 
to indicate a problem with the compiler.

Keith

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Problems with function pointers in C++
  2008-02-20 19:03                 ` Keith Seitz
@ 2008-02-20 19:30                   ` Geert Vancompernolle
  2008-02-20 19:35                     ` Keith Seitz
  0 siblings, 1 reply; 23+ messages in thread
From: Geert Vancompernolle @ 2008-02-20 19:30 UTC (permalink / raw)
  To: Keith Seitz; +Cc: Insight Foum

Keith Seitz wrote:
> Actually, if you could do that, it would be best. Since all of the 
> language handling code is not target-specific, this test might be 
> useful to indicate a problem with the compiler.
>
Just tried the Insight build for the PC.  I launched the gdbserver in a 
terminal window in the directory where I've put the binary TMyCass you 
gave me.

This is the command I've given:  gdbserver :1000 ./TMyClass

Then I got the message:

Process ./TMyClass created; pid = 21754
Listening on port 1000

So far, so good.

Then I copied the executable to another place (otherwise, both gdb and 
gdbserver would "eat" from the same file, that doesn't work) and loaded 
that copy into Insight, using "File | Open Source...". 
However, I saw there was no debug info in it, I only see assembly (and 
that, I can't follow really easy... ;-) ).

Can you send me a binary with debug info present?

Best rgds,

--Geert

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Problems with function pointers in C++
  2008-02-20 19:30                   ` Geert Vancompernolle
@ 2008-02-20 19:35                     ` Keith Seitz
  2008-02-20 19:48                       ` Geert Vancompernolle
  0 siblings, 1 reply; 23+ messages in thread
From: Keith Seitz @ 2008-02-20 19:35 UTC (permalink / raw)
  To: Geert Vancompernolle; +Cc: Insight Foum

Geert Vancompernolle wrote:
> Can you send me a binary with debug info present?

That file does have debug info. [If it contained no debug info, Insight 
would have opened a dialog box telling you that.] You can verify this by 
running "readelf -w" on the binary, which should output all the DWARF 
debug info.

The more likely culprit is that gdb doesn't know where to find the 
source files. You'll need to use the "dir" command to add the path to 
the source files.

Keith

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Problems with function pointers in C++
  2008-02-20 19:35                     ` Keith Seitz
@ 2008-02-20 19:48                       ` Geert Vancompernolle
  2008-02-20 19:53                         ` Keith Seitz
  0 siblings, 1 reply; 23+ messages in thread
From: Geert Vancompernolle @ 2008-02-20 19:48 UTC (permalink / raw)
  To: Keith Seitz; +Cc: Insight Foum

Keith Seitz wrote:
> You'll need to use the "dir" command to add the path to the source files.
>
Sorry, this one I don't understand, Keith...

Best rgds,

--Geert
*
*

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Problems with function pointers in C++
  2008-02-20 19:48                       ` Geert Vancompernolle
@ 2008-02-20 19:53                         ` Keith Seitz
  2008-02-21 18:58                           ` Geert Vancompernolle
  0 siblings, 1 reply; 23+ messages in thread
From: Keith Seitz @ 2008-02-20 19:53 UTC (permalink / raw)
  To: Geert Vancompernolle; +Cc: Insight Foum

Geert Vancompernolle wrote:
> Keith Seitz wrote:
>> You'll need to use the "dir" command to add the path to the source files.
>>
> Sorry, this one I don't understand, Keith...

Gdb doesn't know where your source files are, since they were compiled 
on my machine in a directory that probably doesn't exist on your machine.

Gdb's "dir" command adds paths to the source search list so that gdb can 
find the sources:

(gdb) help dir
Add directory DIR to beginning of search path for source files.
Forget cached info on source file locations and line positions.
DIR can also be $cwd for the current working directory, or $cdir for the
directory in which the source file was compiled into object code.
With no argument, reset the search path to $cdir:$cwd, the default.

But perhaps I am mistaken about this being the problem...

Keith

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Problems with function pointers in C++
  2008-02-20 19:53                         ` Keith Seitz
@ 2008-02-21 18:58                           ` Geert Vancompernolle
  2008-02-21 19:04                             ` Keith Seitz
  2008-02-21 19:33                             ` Geert Vancompernolle
  0 siblings, 2 replies; 23+ messages in thread
From: Geert Vancompernolle @ 2008-02-21 18:58 UTC (permalink / raw)
  To: Keith Seitz; +Cc: Insight Foum

Keith Seitz wrote:
>
>
> But perhaps I am mistaken about this being the problem...
>

Well, I just recompiled that code for the PC, not for my embedded Linux 
system.  But when I try to load the source into Insight, I still get 
only assembly code, I don't see the HLL code...

Don't know why...  When using Insight in combination with my external 
embedded Linux board, it's working like a breeze (apart from the C++ 
pointer problems), when using Insight to debug a PC application, it's 
not working.  Never did debug a PC program before on Linux, though...

So, how can I get out of this...

-- 
*Best rgds,

--Geert

*

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Problems with function pointers in C++
  2008-02-21 18:58                           ` Geert Vancompernolle
@ 2008-02-21 19:04                             ` Keith Seitz
  2008-02-21 19:33                             ` Geert Vancompernolle
  1 sibling, 0 replies; 23+ messages in thread
From: Keith Seitz @ 2008-02-21 19:04 UTC (permalink / raw)
  To: Geert Vancompernolle; +Cc: Insight Foum

Geert Vancompernolle wrote:
> Well, I just recompiled that code for the PC, not for my embedded Linux 
> system.  But when I try to load the source into Insight, I still get 
> only assembly code, I don't see the HLL code...

If you open a console window and type "info func main", what does it 
say? How about if you type "list main".

If the former lists main in the "non-debugging symbols" section, you 
forgot to compile with debug info. Otherwise, if "list main" says "29 
    TMyClass.cc: No such file or directory.", then gdb (and insight) 
cannot find your source file. Use the "dir" command to add the directory 
to gdb's search path, i.e., "dir /path/to/my/sources".

Keith

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Problems with function pointers in C++
  2008-02-21 18:58                           ` Geert Vancompernolle
  2008-02-21 19:04                             ` Keith Seitz
@ 2008-02-21 19:33                             ` Geert Vancompernolle
  2008-02-21 19:49                               ` Keith Seitz
  1 sibling, 1 reply; 23+ messages in thread
From: Geert Vancompernolle @ 2008-02-21 19:33 UTC (permalink / raw)
  To: Keith Seitz; +Cc: Insight Foum

Geert Vancompernolle wrote:
> So, how can I get out of this...
>
I was finally able to recompile again the program *and* see my HLL in 
Insight.  Next question: when I type "R", then I get a dialogue box for 
a target selection.

For my embedded external board, I know what to set and select 
(Remote/TCP and hostname + port).

What do I have to fill in for my PC application?  What selections to be 
made?

Do I also have to start a gdbserver session on my PC, so Insight can 
hook on it?


-- 
*Best rgds,

--Geert

*

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Problems with function pointers in C++
  2008-02-21 19:33                             ` Geert Vancompernolle
@ 2008-02-21 19:49                               ` Keith Seitz
  2008-02-22 18:09                                 ` Geert Vancompernolle
  0 siblings, 1 reply; 23+ messages in thread
From: Keith Seitz @ 2008-02-21 19:49 UTC (permalink / raw)
  To: Geert Vancompernolle; +Cc: Insight Foum

Geert Vancompernolle wrote:
> Geert Vancompernolle wrote:

> I was finally able to recompile again the program *and* see my HLL in 
> Insight.  Next question: when I type "R", then I get a dialogue box for 
> a target selection.

Okay, getting closer. Hmm. If you have a native version, it shouldn't 
ask you for a target, but it might be picking up something from your 
.gdbtkinit file. Try running "insight -nx". Otherwise, open the Target 
Settings dialog (File->Target Settings...) and select "Exec" target.

Then simply click the Run button. Honestly, that's all I ever have to do!

Keith

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Problems with function pointers in C++
  2008-02-21 19:49                               ` Keith Seitz
@ 2008-02-22 18:09                                 ` Geert Vancompernolle
  2008-02-22 19:53                                   ` Keith Seitz
  0 siblings, 1 reply; 23+ messages in thread
From: Geert Vancompernolle @ 2008-02-22 18:09 UTC (permalink / raw)
  To: Keith Seitz; +Cc: Insight Foum

Keith Seitz wrote:
> Okay, getting closer. Hmm. If you have a native version, it shouldn't 
> ask you for a target
>

My horrible mistake, Keith.

I thought I was using the Insight version for the PC, but I was 
mistakenly still using the Insight version for my Cris compiler 
(embedded Linux).

I've wiped out the whole source tree and untarred again the weekly 6.7.5 
release.  Then I used ./config.guess to see exactly what target I had to 
use.

Came to know it had to be i386-pc-linux-gnu.  So, I ran the 
configuration *./configure --target=i386-pc-linux-gnu*, followed by *make*.

All went fine, even the installation of it afterwards.  The target 
generated is called *i386-pc-linux-gnu-insight* (next to the two other 
targets *gdb* and *gdbtui*).

But when I start up *i386-pc-linux-gnu-insight*, I get the following errors:

root@VirLinGeva:/usr/local/bin# ./i386-pc-linux-gnu-insight --nx
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

Tk_Init failed: this isn't a Tk applicationcouldn't connect to display 
":0.0"


This is strange, since I don't have that kind of errors with my CRIS 
compiled version of Insight.

Again, stuck... Sorry if I bother you too much...


-- 
*Best rgds,

--Geert
*

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Problems with function pointers in C++
  2008-02-22 18:09                                 ` Geert Vancompernolle
@ 2008-02-22 19:53                                   ` Keith Seitz
  2008-02-24 10:03                                     ` Geert Vancompernolle
  0 siblings, 1 reply; 23+ messages in thread
From: Keith Seitz @ 2008-02-22 19:53 UTC (permalink / raw)
  To: Geert Vancompernolle; +Cc: Insight Foum

Geert Vancompernolle wrote:
> Came to know it had to be i386-pc-linux-gnu.  So, I ran the 
> configuration *./configure --target=i386-pc-linux-gnu*, followed by *make*.

Hmm. I wonder if specifying the target confused the build any? Normally 
I just do "./configure; make all-gdb".

> But when I start up *i386-pc-linux-gnu-insight*, I get the following 
> errors:
> 
> root@VirLinGeva:/usr/local/bin# ./i386-pc-linux-gnu-insight --nx
> Xlib: connection to ":0.0" refused by server
> Xlib: No protocol specified

That is strange. What is DISPLAY set to? Does the wish application in 
$INSTALLDIR/bin/wish8.4 run?

Keith

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Problems with function pointers in C++
  2008-02-22 19:53                                   ` Keith Seitz
@ 2008-02-24 10:03                                     ` Geert Vancompernolle
  2008-02-24 18:34                                       ` Keith Seitz
  0 siblings, 1 reply; 23+ messages in thread
From: Geert Vancompernolle @ 2008-02-24 10:03 UTC (permalink / raw)
  To: Keith Seitz; +Cc: Insight Foum

Keith Seitz wrote:
>
> Hmm. I wonder if specifying the target confused the build any? 
> Normally I just do "./configure; make all-gdb".
>
I just rebuilt Insight the way you do (I always have to first delete all 
cache files using *rm `find -name "*.cache"`*, *make distclean* does not 
do the job well, apparently...).

The compilation went fine, but when I want to do a *make install*, now I 
get the following error:

.
.
.
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
/usr/bin/install -c -m 644 .././opcodes/../include/dis-asm.h 
/usr/local/include/dis-asm.h
make[4]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/opcodes'
make[3]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/opcodes'
make[2]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/opcodes'
make[2]: Entering directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/etc'
make[2]: *** No rule to make target `install'.  Stop.
make[2]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src/etc'
make[1]: *** [install-etc] Error 2
make[1]: Leaving directory 
`/home/geertvc/applications/insight/insight-6.7.5-RC/src'
make: *** [install] Error 2


I don't have those install problems when running *./configure 
cris-axis-linux-gnu* or *./configure i386-px-linux-gnu*, so I'm facing 
another new problem...

The problems keep on running behind me...

Keith Seitz wrote:
>
> That is strange. What is DISPLAY set to? Does the wish application in 
> $INSTALLDIR/bin/wish8.4 run?
>
Before I rebuilt Insight again according the way you do it, I asked for 
the parameters you referred to:


echo $DISPLAY shows me :0.0

Running wish8.4 opens a command prompt (%) and opens also an X-window 
(nothing in the window, however).

Any more hints?

I'm not getting desperate yet, I just want to know why the C++ pointers 
are (still) not working for my embedded Linux system (the original 
reason for my problem).

-- 
*Best rgds,

--Geert

*

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Problems with function pointers in C++
  2008-02-24 10:03                                     ` Geert Vancompernolle
@ 2008-02-24 18:34                                       ` Keith Seitz
  0 siblings, 0 replies; 23+ messages in thread
From: Keith Seitz @ 2008-02-24 18:34 UTC (permalink / raw)
  To: Geert Vancompernolle; +Cc: Insight Foum

Geert Vancompernolle wrote:
> I just rebuilt Insight the way you do (I always have to first delete all 
> cache files using *rm `find -name "*.cache"`*, *make distclean* does not 
> do the job well, apparently...).

Hmm. I've never had a problem with this before. I'll have to investigate 
it sometime.

> `/home/geertvc/applications/insight/insight-6.7.5-RC/src/etc'
> make[2]: *** No rule to make target `install'.  Stop.
> make[2]: Leaving directory 
> `/home/geertvc/applications/insight/insight-6.7.5-RC/src/etc'
> make[1]: *** [install-etc] Error 2

Yeah, that's also a new one to me. etc isn't important, so you could 
just ignore it (make -k install) or tell the build to only do gdb stuff 
(make all-gdb; make install-gdb).

> Running wish8.4 opens a command prompt (%) and opens also an X-window 
> (nothing in the window, however).
> 
> Any more hints?

Wow, this is getting worse and worse. Okay, let's try something else. 
DON'T install it, just run it from the build directory. Does that work?

If you get the "can't open :0.0" thing again, well, I'm going to assume 
that this message is bogus and it's really something else...

Keith

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2008-02-24 18:34 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-17 14:40 Problems with function pointers in C++ Geert Vancompernolle
2008-02-17 19:38 ` Keith Seitz
2008-02-18  4:03   ` Geert Vancompernolle
2008-02-18  4:07     ` Geert Vancompernolle
2008-02-18  7:09       ` Keith Seitz
2008-02-19 18:51         ` Geert Vancompernolle
2008-02-19 19:00           ` Geert Vancompernolle
2008-02-19 19:20           ` Geert Vancompernolle
2008-02-19 19:59             ` Keith Seitz
2008-02-20 18:24               ` Geert Vancompernolle
2008-02-20 19:03                 ` Keith Seitz
2008-02-20 19:30                   ` Geert Vancompernolle
2008-02-20 19:35                     ` Keith Seitz
2008-02-20 19:48                       ` Geert Vancompernolle
2008-02-20 19:53                         ` Keith Seitz
2008-02-21 18:58                           ` Geert Vancompernolle
2008-02-21 19:04                             ` Keith Seitz
2008-02-21 19:33                             ` Geert Vancompernolle
2008-02-21 19:49                               ` Keith Seitz
2008-02-22 18:09                                 ` Geert Vancompernolle
2008-02-22 19:53                                   ` Keith Seitz
2008-02-24 10:03                                     ` Geert Vancompernolle
2008-02-24 18:34                                       ` Keith Seitz

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).