Insight is gone in Ubuntu Natty

Insight is a graphical user interface to GDB, the GNU Debugger written in Tcl/Tk by people working at Red Hat, Inc. and Cygnus Solutions.
source-and-asm-mixed

So because i need it for a class, i tried to to install under my Ubuntu Natty 11.04, but… there is no insight for it!

Reading package lists… Done
Building dependency tree       
Reading state information… Done
Package insight is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  gdb-doc

E: Package ‘insight’ has no installation candidate

So… after searching a bit, because i do want to take full advantage to use this is my netbook, as a powerful machine, it’s not advisable to run a Virtual Machine on it over another OS.

Seems that this has been removed from Ubuntu since the Lucid Lynx release according this author of a book, in which he gives examples to use insight, and because of this, no one can use it.

So the answer after Googling a bit the real solution seems to be compile it, and install it.

So, just this:

1. wget ftp://sourceware.org/pub/insight/releases/insight-6.8-1a.tar.bz2
2. sudo apt-get install libx11-dev
3. sudo apt-get install libncurses5-dev
4. tar -xjvf insight-6.8-1a.tar.bz2
5. cd insight-6.8-1/
6. ./configure –disable-werror
7. make
8. sudo make install

After this you could try it… i did a simple “hello world” with a for, just for testing.

Open a new file, and name it hello.c

#include<stdio.h>

int main()
{
printf(“Hello World! Let’s loop:”);
int i;
for (i = 1;i<4;i++) {
printf(“%d…”,i);
}
return 0;
}

Next, compile:

gcc -Wall -g -c hello.c

Linking:

gcc -o hello hello.o

And debug it:

insight hello

Result:

hello

Leave a Reply

Your email address will not be published. Required fields are marked *