Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Monika Chaddha" <monika@acmet.com>
To: "'Manoj Iyer'" <manjo@austin.ibm.com>, <gdb@sources.redhat.com>
Subject: RE: List command question
Date: Sat, 15 May 2004 07:40:00 -0000	[thread overview]
Message-ID: <004801c43a43$36fc9800$5100a8c0@monika> (raw)
In-Reply-To: <Pine.LNX.4.58.0405141235270.29359@lazy>

Hi Manoj

I m not sure but according to my knowledge, whenever we compile any
program with -g option, the compiler generates some debugging
information, which also includes the path of source file. Without
debugging information, it's not possible to use GDB and surely we will
get unexpected results from GDB

Monika



>-----Original Message-----
>From: gdb-owner@sources.redhat.com
[mailto:gdb-owner@sources.redhat.com] On
>Behalf Of Manoj Iyer
>Sent: Friday, May 14, 2004 11:44 PM
>To: gdb@sources.redhat.com
>Subject: List command question
>
>
>List command has different out put when the program is compiled with -g
>option and when it is not...
>
>I checked out the lastest CVS head of GDB and wrote a small hello world
>program, comppiled it with and without -g on a PowerPC 64bit machine,
and
>here is the diff in output.
>
>manjo@nefertiti:~/projects/src> cc -o ~/tests/test ~/tests/test.c
>manjo@nefertiti:~/projects/src> ./gdb/gdb ~/tests/test
>GNU gdb 2004-04-17-cvs
>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 "powerpc64-gnu-linux"...Using host
libthread_db
>libra
>ry "/lib64/tls/libthread_db.so.1".
>
>(gdb) list
>1       ../sysdeps/powerpc/powerpc32/elf/start.S: No such file or
>directory.
>        in ../sysdeps/powerpc/powerpc32/elf/start.S
>(gdb) quit
>
>
>
>
>manjo@nefertiti:~/projects/src> cc -g -o ~/tests/test ~/tests/test.c
>manjo@nefertiti:~/projects/src> ./gdb/gdb ~/tests/test
>GNU gdb 2004-04-17-cvs
>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 "powerpc64-gnu-linux"...Using host
libthread_db
>libra
>ry "/lib64/tls/libthread_db.so.1".
>
>(gdb) list
>1       #include <stdio.h>
>2
>3       main()
>4       {
>5           printf("hello world\n");
>6       }
>7
>(gdb)
>
>
>I am not sure how the list command should look like when no "-g" is
used
>to compile the test. Any suggestion? comments??
>
>
>Thanks
>Manoj Iyer


  parent reply	other threads:[~2004-05-15  7:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-14 18:29 Manoj Iyer
2004-05-14 19:27 ` Andreas Schwab
2004-05-15  8:37   ` Eli Zaretskii
2004-05-15 13:16     ` Andreas Schwab
2004-05-15 18:07     ` Ramana Radhakrishnan
2004-05-15  7:40 ` Monika Chaddha [this message]
2004-05-17 15:29   ` Manoj Iyer
2004-05-17 18:35     ` Andrew Cagney
2004-05-19  2:24       ` Manoj Iyer
2004-05-19 14:22         ` Andrew Cagney

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='004801c43a43$36fc9800$5100a8c0@monika' \
    --to=monika@acmet.com \
    --cc=gdb@sources.redhat.com \
    --cc=manjo@austin.ibm.com \
    /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