Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* gdb exits with segmentation fault
@ 2009-06-06 13:16 nitinvk04
  2009-06-06 14:55 ` Paul Pluzhnikov
  0 siblings, 1 reply; 3+ messages in thread
From: nitinvk04 @ 2009-06-06 13:16 UTC (permalink / raw)
  To: gdb


I hope I am at the right forum.
I am trying to run simplest program - 

#include <stdio.h>

int  main(int argc, char *args[])
{
        int num1;
        num1 = 10;
        printf("VALUE OF NUM1=%d\n",num1);
        return 0;
}

i can run the program - 

[nitin@localhost shellCode]$ ./simple
VALUE OF NUM1=10

But gdb exits with segmentation fault - 

[nitin@localhost shellCode]$ gdb simple 
GNU gdb 6.0
Copyright 2003 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) run
Starting program: simple 
Segmentation fault
[nitin@localhost shellCode]$ 

I am using Mandrake 10 with a kernel 2.6.3-7mdk. and the gdb
is 6.0 - quite old, but i have some requirement.
I have compiled gdb from source as it was not installed. 
While compiling gdb i dint get any errors.
I cant figure out whats wrong with gdb. It's happening with
all executable programs. Can run few other commands like
disassemble, help but not run.

Any help would be appreciated.
Thanks a lot.
Nitin
 

-- 
View this message in context: http://www.nabble.com/gdb-exits-with-segmentation-fault-tp23901800p23901800.html
Sent from the Sourceware - gdb list mailing list archive at Nabble.com.


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

end of thread, other threads:[~2009-06-06 23:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-06 13:16 gdb exits with segmentation fault nitinvk04
2009-06-06 14:55 ` Paul Pluzhnikov
2009-06-06 23:04   ` nitinvk04

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox