public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Vimal Agrawal <avimalin@gmail.com>
To: gdb@sourceware.org
Cc: Vimal Agrawal <vimal.agrawal@sophos.com>
Subject: Not able to decode local/ stack variables in vmcore
Date: Tue, 14 Dec 2021 15:52:13 +0530	[thread overview]
Message-ID: <CALkUMdRboO3aPqKmkYJ_pkjeC1_vXYkc6eCNhFBodVpeR27oXQ@mail.gmail.com> (raw)
In-Reply-To: <CALkUMdTyaY2P-eh7JMb6KPgyPa8oZKrb4XJcgaWOpnUn2s6GaQ@mail.gmail.com>

I don't see any option to see local variables in vmcore using crash
utility. Tried gdb as well. Gdb is not able to dump stack.

(gdb) bt

#0  sysrq_handle_crash (key=99) at drivers/tty/sysrq.c:147

Backtrace stopped: Cannot access memory at address 0xffffb8c6c132fe40

(gdb) x 0xffffb8c6c132fe40

0xffffb8c6c132fe40: Cannot access memory at address 0xffffb8c6c132fe40

(gdb) info reg rsp

rsp            0xffffb8c6c132fe38 0xffffb8c6c132fe38

(gdb)


I have loaded symbols on specific .text, .data and .bss load addresses
using following commands:
> gdb -c kcrash_vmcore
gdb> add-symbol-file ~/crash3/vmlinux 0xffffffff97000000 -s .data
0xffffffff97c00000 -s .bss 0xffffffff97fa5000

I could decode .text and global .data symbols but not stack addresses
and local variables.
I have tried enabling CONFIG_FRAME_POINTER and also tried the latest
version of gdb and crash as well but no help.

Can someone please suggest and comment if this is indeed possible with
gdb/crash to decode local variables from vmcore?

Vimal Agrawal

           reply	other threads:[~2021-12-14 10:22 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <CALkUMdTyaY2P-eh7JMb6KPgyPa8oZKrb4XJcgaWOpnUn2s6GaQ@mail.gmail.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=CALkUMdRboO3aPqKmkYJ_pkjeC1_vXYkc6eCNhFBodVpeR27oXQ@mail.gmail.com \
    --to=avimalin@gmail.com \
    --cc=gdb@sourceware.org \
    --cc=vimal.agrawal@sophos.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).