From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31118 invoked by alias); 7 Apr 2010 17:39:42 -0000 Received: (qmail 31108 invoked by uid 22791); 7 Apr 2010 17:39:41 -0000 X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SARE_MSGID_LONG45,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.35) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 07 Apr 2010 17:39:35 +0000 Received: from hpaq11.eem.corp.google.com (hpaq11.eem.corp.google.com [10.3.21.11]) by smtp-out.google.com with ESMTP id o37HdXaZ029667 for ; Wed, 7 Apr 2010 19:39:33 +0200 Received: from pzk6 (pzk6.prod.google.com [10.243.19.134]) by hpaq11.eem.corp.google.com with ESMTP id o37HdVGZ024801 for ; Wed, 7 Apr 2010 19:39:32 +0200 Received: by pzk6 with SMTP id 6so1139936pzk.1 for ; Wed, 07 Apr 2010 10:39:31 -0700 (PDT) MIME-Version: 1.0 Received: by 10.141.124.12 with HTTP; Wed, 7 Apr 2010 10:39:30 -0700 (PDT) In-Reply-To: <20100407173222.A21C584397@ruffy.mtv.corp.google.com> References: <20100407173222.A21C584397@ruffy.mtv.corp.google.com> Date: Wed, 07 Apr 2010 17:39:00 -0000 Received: by 10.141.124.18 with SMTP id b18mr7385611rvn.202.1270661970318; Wed, 07 Apr 2010 10:39:30 -0700 (PDT) Message-ID: Subject: Re: [RFA][python] Add program space support From: Doug Evans To: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-04/txt/msg00144.txt.bz2 On Wed, Apr 7, 2010 at 10:32 AM, Doug Evans wrote: > Hi. > > This patch adds basic support for program spaces to python. > > It also adds support for recording pretty-printers with a program space. > This is useful, for example, when a class is entirely inlined and there > isn't necessarily a .so to attach the pretty-printer to. > Adding the pretty-printer to the gdb module isn't necessarily correct, > different programs may have different implementations for the same class. > > Ok to check in? Blech, forgot a NEWS entry. 2010-04-07 Doug Evans * NEWS: Add entry for python program space support. Index: NEWS =================================================================== RCS file: /cvs/src/src/gdb/NEWS,v retrieving revision 1.367 diff -u -p -r1.367 NEWS --- NEWS 1 Apr 2010 14:11:22 -0000 1.367 +++ NEWS 7 Apr 2010 17:38:49 -0000 @@ -25,10 +25,13 @@ * Python scripting -** The GDB Python API now has access to symbols, symbol tables, and - frame's code blocks. +** The GDB Python API now has access to program spaces, symbols, + symbol tables, and frame's code blocks. -** New methods gdb.target_charset and gdb.target_wide_charset. +** New methods gdb.target_charset, gdb.target_wide_charset, + gdb.progspaces, and gdb.current_progspace. + +** Pretty-printers are now also looked up in the current program space. * Tracepoint actions were unified with breakpoint commands. In particular, there are no longer differences in "info break" output for breakpoints and