From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from pb-smtp20.pobox.com (pb-smtp20.pobox.com [173.228.157.52]) by sourceware.org (Postfix) with ESMTPS id 70F0E3848414 for ; Tue, 25 May 2021 04:35:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 70F0E3848414 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kichwacoders.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=jonah@kichwacoders.com Received: from pb-smtp20.pobox.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id D7221129312 for ; Tue, 25 May 2021 00:35:49 -0400 (EDT) (envelope-from jonah@kichwacoders.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h= mime-version:from:date:message-id:subject:to:content-type; s= sasl; bh=rKw/XzZLrfYVKZKASnBlNziso1T2VZdH4BleKAkwxtw=; b=BhxpkK1 szPw8JseVXdbVQvM6AcjpTD0iqIQG+CcqMPyzfy0v9oxGS1M4+NlWQWoGIXsL/cM OAcApvVphm8+J0X60AsUAMBphNdTPUf+WbrbGis28eIzXI0rA8+Yk+YzY5HhDzSB tv8Z5Si5FZxzuHVVrHl05eNhAAYc7gVpE9jQ= Received: from pb-smtp20.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id CFCD1129311 for ; Tue, 25 May 2021 00:35:49 -0400 (EDT) (envelope-from jonah@kichwacoders.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=kichwacoders.com; h=mime-version:from:date:message-id:subject:to:content-type; s=mesmtp; bh=rKw/XzZLrfYVKZKASnBlNziso1T2VZdH4BleKAkwxtw=; b=GC5Th6x9+Lbws+7tDc2vDQngndVw5l357w/wrXz5OU5evedBugsmuHR4OG6g696/rUpcdAL8x7gZLGuWeg81wxx7FgrEojuFDw/rbHTe/LIc6rhgsSrRITo3STJkWPl1TkSQm6R26ik5yxaGffXYH3FxPijBsNurz8kHjgeiwYo= Received: from mail-wr1-f41.google.com (unknown [209.85.221.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pb-smtp20.pobox.com (Postfix) with ESMTPSA id 59419129310 for ; Tue, 25 May 2021 00:35:46 -0400 (EDT) (envelope-from jonah@kichwacoders.com) Received: by mail-wr1-f41.google.com with SMTP id y14so28552848wrm.13 for ; Mon, 24 May 2021 21:35:46 -0700 (PDT) X-Gm-Message-State: AOAM530HOVEnQH1+hWfCgILBbIIBoGh0IC5tfMIrgatQc0q0QKWTXcEf rszVKNKb1ggkZ1J+HOeNSw0xlOU7kczmbNLQMBM= X-Google-Smtp-Source: ABdhPJzdjsa02//bc4mOf8GWJkJ9pUk4BWVLixDoNZa1tl+AWy/NehcJxGPj4xY/2Ee7mrC1rhqjqSPQb++1zxtGa7g= X-Received: by 2002:adf:de09:: with SMTP id b9mr25497659wrm.340.1621917344621; Mon, 24 May 2021 21:35:44 -0700 (PDT) MIME-Version: 1.0 From: Jonah Graham Date: Tue, 25 May 2021 00:35:09 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: MI to access value of $ prefixed variable name To: GDB Development X-Pobox-Relay-ID: AC5D9A9E-BD12-11EB-B953-D5C30F5B5667-18936988!pb-smtp20.pobox.com X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, HTML_MESSAGE, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Tue, 25 May 2021 04:35:54 -0000 Hello, I have a user of Eclipse CDT who is having problems displaying a C variable called $j (dollar sign prefixed variable) - https://bugs.eclipse.org/bugs/show_bug.cgi?id=573703 I understand this is because $ prefixed variables are treated specially by GDB. 47-stack-list-locals --thread 1 --frame 0 1 47^done,locals=[{name="$f",value="0"}] 52-var-create --thread 1 --frame 0 - * $f 52^done,name="var3",numchild="0",value="void",type="void",has_more="0" Note type "void" above, $f is an int in the C code, but is indeed void (as expected) in GDB. -stack-list-locals shows the correct value, but I can't use the returned name back to -var-create because of the naming conflict. There wasn't anything I saw in the help ( https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Variable-Objects.html) on this topic. Thanks for your help. Jonah