From: vincent Dupaquis <v.dupaquis@trusted-objects.com>
To: <gdb@sourceware.org>
Subject: Re: Getting access to environement variables
Date: Fri, 5 Feb 2021 15:51:30 +0100 [thread overview]
Message-ID: <e0506c37-5dc4-8687-2e58-804ce658d231@trusted-objects.com> (raw)
In-Reply-To: <6c05f6f35de09330538fbeca5d4c1c68964f108e.camel@fit.cvut.cz>
I did not knew this one :)
Even better, looks like we are reaching a point where no one will be
able to complain about a missing tiny function ;)
Vincent.
Le 05/02/2021 à 15:34, Jan Vrany a écrit :
> On Fri, 2021-02-05 at 15:28 +0100, vincent Dupaquis wrote:
>> Good point !
>>
>> That's something I already use when instrumenting gdb, but for some
>> easy
>> and quick scripting, it would have been easier to be able to access
>> the
>> environement variables directly from the gdb commands.
> I have not tried, but I believe you can implement new convenience
> function in Python that would allow you to write something like
>
> $ENV("MY_ENV_VARIABLE")
>
> See
> https://sourceware.org/gdb/onlinedocs/gdb/Functions-In-Python.html#Functions-In-Python
>
> HTH, Jan
>
>> Vincent.
>>
>> Le 05/02/2021 à 15:06, Paul Koning a écrit :
>>>> On Feb 5, 2021, at 4:58 AM, vincent Dupaquis <
>>>> v.dupaquis@trusted-objects.com> wrote:
>>>>
>>>> Hello,
>>>>
>>>> I would like to point-out a possibly missing feature, which
>>>> is the
>>>> possibility of accessing ENV variables in GDB commands.
>>> Assuming your GDB is built with Python scripting included, you can
>>> do it via Python; "import os" then access environment variables as
>>> elements of dictionary "os.environ".
>>>
>>> paul
>>>
>
--
*Vincent Dupaquis*
Software security & Cryptography expert
06 24 58 17 05
/Europarc de Pichaury Bâtiment B8 1330 rue Guillibert Gautier de la
Lauzière 13290 Aix-en-Provence/
www.trusted-objects.com <http://www.trusted-objects.com>
prev parent reply other threads:[~2021-02-05 14:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-05 9:58 vincent Dupaquis
2021-02-05 14:06 ` Paul Koning
2021-02-05 14:28 ` vincent Dupaquis
2021-02-05 14:34 ` Jan Vrany
2021-02-05 14:51 ` vincent Dupaquis [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=e0506c37-5dc4-8687-2e58-804ce658d231@trusted-objects.com \
--to=v.dupaquis@trusted-objects.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).