kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Kapshuk <alexander.kapshuk@gmail.com>
To: Adrian Larumbe <fromago@gmail.com>
Cc: "Valdis Klētnieks" <valdis.kletnieks@vt.edu>,
	kernelnewbies <Kernelnewbies@kernelnewbies.org>
Subject: Re: Oops stack trace missing function addresses
Date: Fri, 16 Oct 2020 15:27:52 +0300	[thread overview]
Message-ID: <CAJ1xhMV3J5ymu1LKmZM1SdMy4yP3OY4mmSXJkr3HKUqhm+d7hA@mail.gmail.com> (raw)
In-Reply-To: <20201016114904.5ffc7ce5ssji7jwy@arch-linux.localdomain>

On Fri, Oct 16, 2020 at 2:49 PM Adrian Larumbe <fromago@gmail.com> wrote:
>
> > OK, I'll bite.  You *are* getting the function name and offset, what additional
> > knowledge do you get from knowing the VA?
>
> I was hoping to use the VA to calculate the C source line where the
> fault happens, by substracting the function's VA from the module load
> address as revealed by cat /proc/modules, adding the offset within the
> function and then passing the offset to addr2line.
>
> I've just realised I might as well load the module object file into gdb
> and do 'info line *(func+offset)'.
>
> But how would I do this just with addr2line ?

scripts/faddr2line path/to/module.ko symbol+0xsym_offset/0xsym_size
would give you the C source line referenced by the offset.

>
> > What architecture is this on?  Stack unwinding is architecture-dependent, so
> > it may just be the unwinder for that arch doesn't output the virtual address.
>
> It's a QEMU VM, 'uname -m' claims it's i686.
>
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

      reply	other threads:[~2020-10-16 12:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-15 17:34 Oops stack trace missing function addresses Adrian Larumbe
2020-10-16  3:52 ` Valdis Klētnieks
2020-10-16 11:49   ` Adrian Larumbe
2020-10-16 12:27     ` Alexander Kapshuk [this message]

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=CAJ1xhMV3J5ymu1LKmZM1SdMy4yP3OY4mmSXJkr3HKUqhm+d7hA@mail.gmail.com \
    --to=alexander.kapshuk@gmail.com \
    --cc=Kernelnewbies@kernelnewbies.org \
    --cc=fromago@gmail.com \
    --cc=valdis.kletnieks@vt.edu \
    /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 NNTP newsgroup(s).