From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11044 invoked by alias); 24 Nov 2004 17:43:53 -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 10983 invoked from network); 24 Nov 2004 17:43:42 -0000 Received: from unknown (HELO bluesmobile.specifixinc.com) (64.220.152.98) by sourceware.org with SMTP; 24 Nov 2004 17:43:42 -0000 Received: from toadfish.ninemoons.com (bluesmobile.corp.specifixinc.com [192.168.1.2]) by bluesmobile.specifixinc.com (Postfix) with ESMTP id 51692162C5; Wed, 24 Nov 2004 09:43:39 -0800 (PST) From: Fred Fish Reply-To: fnf@specifixinc.com Organization: Specifix Inc To: gdb-patches@sources.redhat.com Subject: [RFA] Improve rs6000-tdep.c prologue skipping Date: Wed, 24 Nov 2004 17:43:00 -0000 User-Agent: KMail/1.6.2 Cc: fnf@specifixinc.com MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200411241043.32944.fnf@specifixinc.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-SW-Source: 2004-11/txt/msg00460.txt.bz2 Recently there was some discussion about the handling of prologues, with some good long term suggestions. But I wanted to see if any significant improvements could be made in the powerpc-eabi target I'm working on, so I've been digging around in the prologue handling code in rs6000-tdep.c. The attached patch makes a dramatic difference in the number of testsuite failures for the powerpc-eabi tests: < # of expected passes 8558 < # of unexpected failures 288 < # of known failures 25 --- > # of expected passes 8719 > # of unexpected failures 125 > # of known failures 27 (Note I suppressed the running of the gdbtk tests completely so your numbers may vary) -Fred 2004-11-24 Fred Fish * rs6000-tdep.c (skip_prologue): Use line table info to skip over compiler generated function calls made as part of a prologue. Index: rs6000-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v retrieving revision 1.232 diff -c -p -r1.232 rs6000-tdep.c *** rs6000-tdep.c 12 Nov 2004 21:45:07 -0000 1.232 --- rs6000-tdep.c 24 Nov 2004 17:34:30 -0000 *************** skip_prologue (CORE_ADDR pc, CORE_ADDR l *** 1048,1056 **** fdata->frameless = 0; /* Don't skip over the subroutine call if it is not within ! the first three instructions of the prologue. */ if ((pc - orig_pc) > 8) ! break; op = read_memory_integer (pc + 4, 4); --- 1048,1065 ---- fdata->frameless = 0; /* Don't skip over the subroutine call if it is not within ! the first three instructions of the prologue and either ! we have no line table information or the line info tells ! us that the subroutine call is not part of the line ! associated with the prologue. */ if ((pc - orig_pc) > 8) ! { ! struct symtab_and_line prologue_sal = find_pc_line (orig_pc, 0); ! struct symtab_and_line this_sal = find_pc_line (pc, 0); ! ! if ((prologue_sal.line == 0) || (prologue_sal.line != this_sal.line)) ! break; ! } op = read_memory_integer (pc + 4, 4);