From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28863 invoked by alias); 30 May 2005 15:10:08 -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 28686 invoked by uid 22791); 30 May 2005 15:09:46 -0000 Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Mon, 30 May 2005 15:09:46 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Dcl8V-0004i4-Ur for gdb@sources.redhat.com; Mon, 30 May 2005 16:20:59 +0200 Received: from zigzag.lvk.cs.msu.su ([158.250.17.23]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 30 May 2005 16:20:59 +0200 Received: from ghost by zigzag.lvk.cs.msu.su with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 30 May 2005 16:20:59 +0200 To: gdb@sources.redhat.com From: Vladimir Prus Subject: printing "variable-sized" registers Date: Mon, 30 May 2005 15:10:00 -0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit User-Agent: KNode/0.8.2 X-SW-Source: 2005-05/txt/msg00365.txt.bz2 Hello, I'm working on a gdb port, and have problems with printing certain registers of my target. The problem is that those registers are vector buffers that can hold from 0 to 32 values at any given moment. I would like the 'info registers' command to print exactly the number of values that are present in a buffer. That is, on one invocation I might get 4 values printed, and on another 15, depending on the current processor state. However, I don't see an easy way to do this. The 'default_print_registers_info' function uses 'val_print' to print the value, and 'val_print' uses register type (struct type*), which has a fixed size. Anything I can do? Or I should just write arch-specific 'print_registers_info' function? Thanks in advance, Volodya