public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "dimabarts at yahoo dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/11704] Cannot load debugging info
Date: Mon, 14 Jun 2010 21:22:00 -0000	[thread overview]
Message-ID: <20100614212253.22810.qmail@sourceware.org> (raw)
In-Reply-To: <20100614182907.11704.dimabarts@yahoo.com>


------- Additional Comments From dimabarts at yahoo dot com  2010-06-14 21:22 -------
(In reply to comment #1)
> > % cc hello.o -o hello
> 
> Try changing that to:
> 
> cc hello.o -g -o hello
> 
> I think you need -g on the link line to tell the linker to preserve debuginfo.
> 
> You can always check gdb here by using readelf or something like that to
> see if the executable does in fact have debuginfo.

Thanks but no dice...

% cc hello.o -g -o hello
% ~/gdb-7.1/gdb/gdb hello
Reading symbols from /export/home/dbarts/C/hello...Can't read symbols from
/export/home/dbarts/C/hello: Invalid operation

I've checked man ld and the flag -g isn't mentioned at all (although there's the
opposite one, -s). Here's another experiment - without any executables:
% ~/gdb-7.1/gdb/gdb
(gdb) symbol-file hello.o
Reading symbols from /export/home/dbarts/C/hello.o...(no debugging symbols
found)...done.

But there is dbg info:
% ls -l hello.o
-rw-r--r--   1 dbarts   staff       1040 Jun 14 14:18 hello.o
% strip hello.o
% ls -l hello.o
-rw-r--r--   1 dbarts   staff        760 Jun 14 17:15 hello.o

So 25% of original hello.o had consisted of dbg info.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11704

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


  parent reply	other threads:[~2010-06-14 21:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-14 18:29 [Bug gdb/11704] New: " dimabarts at yahoo dot com
2010-06-14 20:58 ` [Bug gdb/11704] " tromey at redhat dot com
2010-06-14 21:22 ` dimabarts at yahoo dot com [this message]
2010-06-15 21:46 ` tromey at redhat dot com
2010-06-16  0:35 ` dimabarts at yahoo dot com
2010-06-16 17:38 ` dimabarts at yahoo dot com
2010-06-17 17:03 ` tromey at redhat dot com
     [not found] <bug-11704-4717@http.sourceware.org/bugzilla/>
2014-09-12 22:21 ` sergiodj at redhat dot com

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=20100614212253.22810.qmail@sourceware.org \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).