From: Ludovic Brenta <ludovic@ludovic-brenta.org>
To: <gdb@sourceware.org>
Subject: Re: Inspecting environment variables from a core dump?
Date: Wed, 20 Apr 2011 12:28:00 -0000 [thread overview]
Message-ID: <102a959df9a18135271bc2ddd5ae9eb1@localhost> (raw)
In-Reply-To: <m2vcy9p7pv.fsf@igel.home>
Andreas Schwab wrote:
> Ludovic Brenta <ludovic@ludovic-brenta.org> writes:
>
>> Does a core dump contain the environment of the program that dumped
core?
>
> A core dump contains the whole used address space of the program, and
> the environment is of course part of it.
>
>> If so, how can I inspect the environment variables?
>
> The environment is always stored in the variable environ.
Thanks but:
(gdb) p environ
$13 = 0
(gdb) whatis environ
type = <data variable, no debug info>
Am I simply out of luck or doing something wrong?
--
Ludovic Brenta.
next prev parent reply other threads:[~2011-04-20 12:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-20 9:37 Ludovic Brenta
2011-04-20 9:56 ` Andreas Schwab
2011-04-20 12:28 ` Ludovic Brenta [this message]
2011-05-08 8:05 ` Paul Pluzhnikov
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=102a959df9a18135271bc2ddd5ae9eb1@localhost \
--to=ludovic@ludovic-brenta.org \
--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