From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32434 invoked by alias); 4 Nov 2003 16:46:05 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 32427 invoked from network); 4 Nov 2003 16:46:05 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.105) by sources.redhat.com with SMTP; 4 Nov 2003 16:46:05 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 1E2D82B8F for ; Tue, 4 Nov 2003 11:46:01 -0500 (EST) Message-ID: <3FA7D7C8.50609@redhat.com> Date: Tue, 04 Nov 2003 16:46:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030820 X-Accept-Language: en-us, en MIME-Version: 1.0 To: gdb@sources.redhat.com Subject: New "info auxv" command and $auxv variable? Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-11/txt/msg00025.txt.bz2 Hello, In implementing a mechanism to query values from the the target's AUXV (/proc/$$/auxv) I decided I might as well add a generic command: (gdb) info auxv Entry point 0x1234 ... (gdb) that listed the contents of the processes auxv table. But why stop there? What about a builtin $auxv variable, a struct, vis: (gdb) print $auxv $1 = { entry = 0x1234, ... } Oh, and I guess: (gdb) interpreter mi --info-auxv ^ok,result={entry="0x1234",...} Thoughts? Andrew PS: Can any one point me at an official GNU/Linux or, I guess *BSD, distro that supports /proc/$$/auxv? So far I've only got Solaris :-/ PPS: The second one is actually tricky. It requires a type bound to the lifetime of the inferior - it is only in querying the inferior that the fields can be determined. An alternative would be to always create the type and then shove it into a type system bcache - ensuring that only one struct of that form exists.