public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: vincent Dupaquis <v.dupaquis@trusted-objects.com>
To: <gdb@sourceware.org>
Subject: Getting access to environement variables
Date: Fri, 5 Feb 2021 10:58:00 +0100	[thread overview]
Message-ID: <83736f95-5415-5963-12e7-36466185cef4@trusted-objects.com> (raw)

    Hello,

    I would like to point-out a possibly missing feature, which is the
possibility of accessing ENV variables in GDB commands.

    Currently, if I want my command scripts to work on a remote target
or another, the only way I've found to parametrize the target/port is to
generate a command file in the calling script, and to include it into
the executed script.

    Something like :

#!/bin/bash
GDBPORT=(GDBPORT:=1234)
echo "target remote localhost:${GDBPORT}" > connect.cmd

    And then in the gdb script
include connect.cmd
...

    Is there a better way, or is it the way it is intended top be done ?

    Else, I wanted to thank/copngratulate everyone who contributed to
GDB for their fantastic work building probably the most powerfull
debugger ever (not the most user friendly, still :) ).

    Best regards,
        Vincent.

-- 

*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  9:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-05  9:58 vincent Dupaquis [this message]
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

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=83736f95-5415-5963-12e7-36466185cef4@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).