From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30311 invoked by alias); 4 Mar 2007 03:13:21 -0000 Received: (qmail 30293 invoked by uid 22791); 4 Mar 2007 03:13:19 -0000 X-Spam-Check-By: sourceware.org Received: from dessent.net (HELO dessent.net) (69.60.119.225) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 04 Mar 2007 03:13:17 +0000 Received: from localhost ([127.0.0.1] helo=dessent.net) by dessent.net with esmtp (Exim 4.50) id 1HNh9u-0000HV-R8; Sun, 04 Mar 2007 03:13:14 +0000 Message-ID: <45EA394A.1C292B19@dessent.net> Date: Sun, 04 Mar 2007 03:13:00 -0000 From: Brian Dessent Reply-To: insight@sourceware.org X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) MIME-Version: 1.0 To: Daniel Jacobowitz CC: gdb-patches@sourceware.org, insight@sourceware.org Subject: Re: [rfc] Remove deprecated_selected_frame References: <20070222212909.GA17260@caradoc.them.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: 2007-03/txt/msg00025.txt.bz2 Daniel Jacobowitz wrote: > Every reference to the global selected frame is either replaced by > get_selected_frame (if we know the program is running) or > deprecated_safe_get_selected_frame (if we're not sure). This removes > a class of bugs caused by lazy creation of the selected frame, several > of which Debian users have reported to me. It also simplifies some > other frame cleanups. I'm getting this now when building insight: gcc -c -g -O2 -I. -I/usr/src/sourceware/gdb -I/usr/src/sourceware/gdb/config -DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H -I/usr/src/sourceware/gdb/../include/opcode -I/usr/src/sourceware/gdb/../readline/.. -I../bfd -I/usr/src/sourceware/gdb/../bfd -I/usr/src/sourceware/gdb/../include -DMI_OUT=1 -DGDBTK -DTUI=1 -Wall -Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral -Wno-unused -Wno-switch -Werror -I/usr/src/sourceware/gdb/../libgui/src -I/usr/src/sourceware/itcl/itcl/generic \ -I/usr/src/sourceware/tcl/generic -I/usr/src/sourceware/tk/generic -I"/usr/src/sourceware/tk/xlib" \ /usr/src/sourceware/gdb/gdbtk/generic/gdbtk-cmds.c \ -DGDBTK_LIBRARY=\"/usr/local/share/insight1.0\" /usr/src/sourceware/gdb/gdbtk/generic/gdbtk-cmds.c: In function `gdb_loc': /usr/src/sourceware/gdb/gdbtk/generic/gdbtk-cmds.c:2133: error: `deprecated_selected_frame' undeclared (first use in this function) /usr/src/sourceware/gdb/gdbtk/generic/gdbtk-cmds.c:2133: error: (Each undeclared identifier is reported only once /usr/src/sourceware/gdb/gdbtk/generic/gdbtk-cmds.c:2133: error: for each function it appears in.) make: *** [gdbtk-cmds.o] Error 1 It looks like there are about a dozen more references in gdbtk/generic/gdbtk-{cmds,hooks,register,stack}.c. Most of them seem to be the "if (deprecated_selected_frame != NULL)" sort of thing -- is this safe to just replace with "if (get_selected_frame (NULL))" ? Brian