From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5523 invoked by alias); 14 Aug 2002 23:25:57 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 5475 invoked from network); 14 Aug 2002 23:25:56 -0000 Received: from unknown (HELO valrhona.uglyboxes.com) (64.1.192.220) by sources.redhat.com with SMTP; 14 Aug 2002 23:25:56 -0000 Received: from localhost.localdomain (IDENT:QOM6xBD2S8uyI35p4Oi5SQrtg76M/8ue@localhost.localdomain [127.0.0.1]) by valrhona.uglyboxes.com (8.11.6/8.11.6) with ESMTP id g7ENSZC08470 for ; Wed, 14 Aug 2002 16:28:35 -0700 Date: Wed, 14 Aug 2002 16:25:00 -0000 From: Keith Seitz X-X-Sender: keiths@valrhona.uglyboxes.com To: gdb-patches@sources.redhat.com Subject: [RFA] stack.c: Always set current_source_{symtab,line} Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2002-08/txt/msg00358.txt.bz2 Hi, Another MI fallout. This has changed a few times in the past few months, but I believe that this is how it should be for anything that uses the CLI/command interpreter. Without this, an -interpreter-exec call in MI will get "lost". (Use MI to stop at breakpoint, step a few times, use console interp to "break" -- breakpoint would be set someplace other than current location.) I've run this through the testsuite, and it introduces no new failures. (And of course, it still works with Insight.) Keith ChangeLog 2002-08-14 Keith Seitz * stack.c (print_frame_info_base): Always set current_source_symtab and current_source_line. Patch Index: stack.c =================================================================== RCS file: /cvs/src/src/gdb/stack.c,v retrieving revision 1.40 diff -p -r1.40 stack.c *** stack.c 11 Jul 2002 19:29:08 -0000 1.40 --- stack.c 14 Aug 2002 23:17:59 -0000 *************** print_frame_info_base (struct frame_info *** 398,403 **** --- 398,408 ---- print_frame (fi, level, source, args, sal); source_print = (source == SRC_LINE || source == SRC_AND_LOC); + if (sal.symtab != NULL) + { + current_source_symtab = sal.symtab; + current_source_line = sal.line; + } if (source_print && sal.symtab) { *************** print_frame_info_base (struct frame_info *** 410,419 **** if (!done) { if (print_frame_info_listing_hook) ! { ! print_frame_info_listing_hook (sal.symtab, sal.line, sal.line + 1, 0); ! current_source_symtab = sal.symtab; ! } else { /* We used to do this earlier, but that is clearly --- 415,421 ---- if (!done) { if (print_frame_info_listing_hook) ! print_frame_info_listing_hook (sal.symtab, sal.line, sal.line + 1, 0); else { /* We used to do this earlier, but that is clearly