From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailex.trusted-objects.com (mailex.trusted-objects.com [149.202.244.204]) by sourceware.org (Postfix) with ESMTPS id 912F139F080F for ; Fri, 5 Feb 2021 09:58:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 912F139F080F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=trusted-objects.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=v.dupaquis@trusted-objects.com Received: from [192.170.0.219] (88.127.245.42) by S76918.EX76918.lan (2001:41d0:117:dd00::95ca:f4cc) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P521) id 15.1.2176.2; Fri, 5 Feb 2021 10:58:01 +0100 To: From: vincent Dupaquis Subject: Getting access to environement variables Message-ID: <83736f95-5415-5963-12e7-36466185cef4@trusted-objects.com> Date: Fri, 5 Feb 2021 10:58:00 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Content-Language: fr-FR X-Originating-IP: [88.127.245.42] X-ClientProxiedBy: S76918.EX76918.lan (2001:41d0:117:dd00::95ca:f4cc) To S76918.EX76918.lan (2001:41d0:117:dd00::95ca:f4cc) X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_05, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2021 09:58:04 -0000     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