From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5758 invoked by alias); 18 Mar 2011 17:02:11 -0000 Received: (qmail 5749 invoked by uid 22791); 18 Mar 2011 17:02:09 -0000 X-SWARE-Spam-Status: No, hits=1.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-qy0-f169.google.com (HELO mail-qy0-f169.google.com) (209.85.216.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 18 Mar 2011 17:02:06 +0000 Received: by qyk2 with SMTP id 2so1011187qyk.0 for ; Fri, 18 Mar 2011 10:02:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.107.1 with SMTP id z1mr1204046qao.169.1300467724430; Fri, 18 Mar 2011 10:02:04 -0700 (PDT) Received: by 10.224.11.17 with HTTP; Fri, 18 Mar 2011 10:02:04 -0700 (PDT) Date: Fri, 18 Mar 2011 17:02:00 -0000 Message-ID: Subject: Walking an array of structs under gdb-Python From: Keith Goldberg To: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-03/txt/msg00105.txt.bz2 All - Can someone please point me to an example of how to walk through an array of structs using python under GDB? Presuming I have malloc'd enough space for 100 of mystruct, I would like to be able to use "pointer math" to inspect each element and its members at will. I appreciate any pointer to the right resource. Thanks - K.