Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Jim Blandy <jimb@codesourcery.com>
Cc: ringlej <ringlej@ringle.org>, Jon Ringle <jon@ringle.org>,
		Jon Ringle <JRingle@vertical.com>,
	gdb@sourceware.org
Subject: Re: No line number info debugging kernel modules with gdb 	6.6.90.20070926-cvs (gdb 6.7 branch)
Date: Tue, 02 Oct 2007 20:43:00 -0000	[thread overview]
Message-ID: <20071002204322.GA5154@caradoc.them.org> (raw)
In-Reply-To: <m3odfhxnzd.fsf@codesourcery.com>

On Tue, Oct 02, 2007 at 01:25:58PM -0700, Jim Blandy wrote:
> Where does this relocation happen?  By the time PSYMTAB_TO_SYMTAB
> returns the job should be done; all I see happening in dwarf2read.c or
> end_symtab is:
> 
>   baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
> 
> and then that gets applied to everything.  For variables we do consult
> other section offsets, but not for lines or functions.

Oh yes.  That's just a bug.  Unfortunately it is approximately
impossible to solve.  I do not remember how this works out for kernel
modules normally - maybe the answer is poorly.

We have to apply relocations, or else fake it by looking at the
slightly-relocated offsets (look at where we assign random VMAs
to the sections of unlinked objects during loading).

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2007-10-02 20:43 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-27 20:11 Jon Ringle
2007-09-28  0:25 ` Jim Blandy
2007-09-28  3:47   ` Jon Ringle
2007-09-28 13:47   ` Jon Ringle
2007-09-28 16:01     ` Jon Ringle
2007-09-28 21:32     ` Jim Blandy
2007-09-28 22:06       ` ringlej
2007-09-29  0:27         ` Jim Blandy
2007-09-29  0:27           ` Daniel Jacobowitz
2007-09-29  2:06             ` Jon Ringle
2007-09-29  2:27               ` Daniel Jacobowitz
2007-09-29  7:38                 ` Jon Ringle
2007-10-02 21:38                   ` Jim Blandy
2007-10-02 22:54                     ` Jon Ringle
2007-10-02 20:26             ` Jim Blandy
2007-10-02 20:43               ` Daniel Jacobowitz [this message]
2007-09-29  1:28           ` Jon Ringle

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=20071002204322.GA5154@caradoc.them.org \
    --to=drow@false.org \
    --cc=JRingle@vertical.com \
    --cc=gdb@sourceware.org \
    --cc=jimb@codesourcery.com \
    --cc=jon@ringle.org \
    --cc=ringlej@ringle.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