Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: loody <miloody@gmail.com>
To: gdb@sourceware.org
Subject: how to source level debug if I cannot see source embedded in elf file
Date: Mon, 23 Nov 2009 00:04:00 -0000	[thread overview]
Message-ID: <3a665c760911220903y352e7062m2acfd5fb27a1b169@mail.gmail.com> (raw)

Dear all:
If my tool chain cannot generate elf file without source embedded even
I compile them with "-g", can I do the source level debugging?

one of my toolchain cannot generate elf file with source embedded in,
I cannot see source code with "objdump -S testprogram.elf|less", but I
can see the function name in the file as the end of letter.

If I can do the source level debug, is there any setting or file I
have to generate?
appreciate your help,
miloody

/* source codes not embedded in the elf*/
80000298 <main>:
80000298:	27bdffd8 	addiu	sp,sp,-40
8000029c:	afbf0024 	sw	ra,36(sp)
800002a0:	afbe0020 	sw	s8,32(sp)
800002a4:	03a0f021 	move	s8,sp
800002a8:	24020017 	li	v0,23
800002ac:	afc20018 	sw	v0,24(s8)
800002b0:	24020020 	li	v0,32
800002b4:	afc20014 	sw	v0,20(s8)
800002b8:	2402002c 	li	v0,44
800002bc:	afc20010 	sw	v0,16(s8)
800002c0:	8fc30018 	lw	v1,24(s8)
800002c4:	8fc20014 	lw	v0,20(s8)
800002c8:	00621821 	addu	v1,v1,v0
800002cc:	8fc20010 	lw	v0,16(s8)
800002d0:	00621021 	addu	v0,v1,v0
800002d4:	afc20018 	sw	v0,24(s8)
800002d8:	24040100 	li	a0,256
800002dc:	0c0000d8 	jal	80000360 <malloc>
800002e0:	00000000 	nop
800002e4:	afc2001c 	sw	v0,28(s8)
800002e8:	0c00009e 	jal	80000278 <newline>
800002ec:	00000000 	nop
800002f0:	03c0e821 	move	sp,s8
800002f4:	8fbf0024 	lw	ra,36(sp)
800002f8:	8fbe0020 	lw	s8,32(sp)
800002fc:	27bd0028 	addiu	sp,sp,40


             reply	other threads:[~2009-11-22 17:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-23  0:04 loody [this message]
2009-11-23 12:43 ` Simon Richter
2009-11-23 14:31   ` loody
2009-11-24 19:10     ` Dave Korn

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=3a665c760911220903y352e7062m2acfd5fb27a1b169@mail.gmail.com \
    --to=miloody@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