public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: vincent Dupaquis <v.dupaquis@trusted-objects.com>
To: Paul Koning <paulkoning@comcast.net>
Cc: <gdb@sourceware.org>
Subject: Re: Getting access to environement variables
Date: Fri, 5 Feb 2021 15:28:49 +0100	[thread overview]
Message-ID: <0cb22341-6d2e-5889-d07c-3a00f29fcdd8@trusted-objects.com> (raw)
In-Reply-To: <54B2CC51-8AA2-43AE-95F6-80F5B4BA8128@comcast.net>

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.

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>

  reply	other threads:[~2021-02-05 14:28 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 [this message]
2021-02-05 14:34     ` Jan Vrany
2021-02-05 14:51       ` vincent Dupaquis

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=0cb22341-6d2e-5889-d07c-3a00f29fcdd8@trusted-objects.com \
    --to=v.dupaquis@trusted-objects.com \
    --cc=gdb@sourceware.org \
    --cc=paulkoning@comcast.net \
    /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).