gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gdb] Re: Gdb Digest, Vol 24, Issue 2


From: Jaskiran Singh
Subject: [Gdb] Re: Gdb Digest, Vol 24, Issue 2
Date: Fri, 17 Dec 2004 09:36:10 +0530

you have to compile your code with
g++ -g -o <myfile.exe> <myfile.c>

now run
gdb myfile.exe

Jas

----- Original Message -----
From: <address@hidden>
To: <address@hidden>
Sent: Thursday, December 16, 2004 10:29 PM
Subject: Gdb Digest, Vol 24, Issue 2


> Send Gdb mailing list submissions to
> address@hidden
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.gnu.org/mailman/listinfo/gdb
> or, via email, send a message with subject or body 'help' to
> address@hidden
>
> You can reach the person managing the list at
> address@hidden
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Gdb digest..."
>
>
> Today's Topics:
>
>    1. problem seeing executable file (Jon Hatchett)
>    2. Re: problem seeing executable file (Ben Elliston)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 16 Dec 2004 09:11:01 +0900
> From: Jon Hatchett <address@hidden>
> Subject: [Gdb] problem seeing executable file
> To: address@hidden
> Message-ID: <address@hidden>
> Content-Type: text/plain
>
> Dear all,
>
> I am afraid I have a very simple problem but I am not very good with
> Linux. I want to use gdb (here on a test program a.out), but it seems
> that gdb cannot see the file even though from the directory it runs
> fine.
>
> bash-2.05b$ a.out
> hello world
> bash-2.05b$ gdb a.out
> GNU gdb Red Hat Linux (6.0post-0.20040223.17rh)
> Copyright 2004 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
> "i386-redhat-linux-gnu"..."/home/jonh/dynamicrewire/numerics/a.out": not
> in executable format: File format not recognized
>
> If I type path I get
>
> Executable and object file path:
> .:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin
>
> so the present directory does seem to be in the path.
>
> Sorry for such a stupid question, any help would be appreciated,
>
> thanks,
>
> Jon Hatchett
>
>
>
>
>
> ------------------------------
>
> Message: 2
> Date: 16 Dec 2004 13:29:08 +1100
> From: Ben Elliston <address@hidden>
> Subject: [Gdb] Re: problem seeing executable file
> To: address@hidden
> Message-ID: <address@hidden>
> Content-Type: text/plain; charset=us-ascii
>
> Jon Hatchett <address@hidden> writes:
>
> > I am afraid I have a very simple problem but I am not very good with
> > Linux. I want to use gdb (here on a test program a.out), but it
> > seems that gdb cannot see the file even though from the directory it
> > runs fine.
>
> > bash-2.05b$ a.out
> > hello world
> > bash-2.05b$ gdb a.out
> [...]
> > "i386-redhat-linux-gnu"..."/home/jonh/dynamicrewire/numerics/a.out": not
> > in executable format: File format not recognized
>
> > .:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin
> > so the present directory does seem to be in the path.
>
> GDB doesn't search the path for files.  You need to either give the
> full path to a.out, or you need to cd into that directory before
> running GDB.
>
> BTW, having . at the front of your path is probably not wise.
>
> Cheers, Ben
>
>
>
>
>
>
> ------------------------------
>
> _______________________________________________
> Gdb mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/gdb
>
>
> End of Gdb Digest, Vol 24, Issue 2
> **********************************





reply via email to

[Prev in Thread] Current Thread [Next in Thread]