Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: nitinvk04 <nitinvk04@gmail.com>
To: gdb@sourceware.org
Subject: gdb exits with segmentation fault
Date: Sat, 06 Jun 2009 13:16:00 -0000	[thread overview]
Message-ID: <23901800.post@talk.nabble.com> (raw)


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.


             reply	other threads:[~2009-06-06 13:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-06 13:16 nitinvk04 [this message]
2009-06-06 14:55 ` Paul Pluzhnikov
2009-06-06 23:04   ` nitinvk04

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=23901800.post@talk.nabble.com \
    --to=nitinvk04@gmail.com \
    --cc=gdb@sourceware.org \
    /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