From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15508 invoked by alias); 7 Jun 2002 05:55:26 -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 15489 invoked from network); 7 Jun 2002 05:55:25 -0000 Received: from unknown (HELO kerberos.suse.cz) (195.47.106.10) by sources.redhat.com with SMTP; 7 Jun 2002 05:55:25 -0000 Received: from chimera.suse.cz (chimera.suse.cz [10.20.0.2]) by kerberos.suse.cz (SuSE SMTP server) with ESMTP id A026859D34A; Fri, 7 Jun 2002 07:52:15 +0200 (CEST) Received: from suse.cz (naga.suse.cz [10.20.1.16]) by chimera.suse.cz (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id b01E8Yp27379; Wed, 1 Jan 1997 15:08:38 +0100 X-Authentication-Warning: chimera.suse.cz: Host naga.suse.cz [10.20.1.16] claimed to be suse.cz Message-ID: <3D004A0A.6070200@suse.cz> Date: Thu, 06 Jun 2002 22:55:00 -0000 From: Michal Ludvig Organization: SuSE CR User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0rc2) Gecko/20020510 X-Accept-Language: cs, cz, en MIME-Version: 1.0 To: GDB Patches Cc: Andrew Cagney Subject: Re: [RFA] x86_64_skip_prologue again... References: <3CFDFD19.3030603@suse.cz> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-06/txt/msg00104.txt.bz2 Michal Ludvig wrote: > Hi all, > now x86_64_skip_prologue() works even on functions without debug > information. > > 2002-06-05 Michal Ludvig > > * x86-64-tdep.c (x86_64_skip_prologue): Fix to work on functions > without debug information too. > > Easy one. Can I commit? This is rather simple one. If noone objects I'll commit this on monday as obvious. OK? Michal Ludvig > Michal Ludvig > > > ------------------------------------------------------------------------ > > Index: x86-64-tdep.c > =================================================================== > RCS file: /cvs/src/src/gdb/x86-64-tdep.c,v > retrieving revision 1.20 > diff -c -3 -p -r1.20 x86-64-tdep.c > *** x86-64-tdep.c 27 May 2002 13:37:38 -0000 1.20 > --- x86-64-tdep.c 5 Jun 2002 11:55:18 -0000 > *************** x86_64_frameless_function_invocation (st > *** 845,854 **** > CORE_ADDR > x86_64_skip_prologue (CORE_ADDR pc) > { > ! int i, firstline, currline; > struct symtab_and_line v_sal; > struct symbol *v_function; > ! CORE_ADDR salendaddr = 0, endaddr = 0; > > /* We will handle only functions beginning with: > 55 pushq %rbp > --- 845,854 ---- > CORE_ADDR > x86_64_skip_prologue (CORE_ADDR pc) > { > ! int i; > struct symtab_and_line v_sal; > struct symbol *v_function; > ! CORE_ADDR endaddr; > > /* We will handle only functions beginning with: > 55 pushq %rbp > *************** x86_64_skip_prologue (CORE_ADDR pc) > *** 876,893 **** > if (!v_function || !v_function->ginfo.value.block || !v_sal.symtab) > return pc; > > - firstline = v_sal.line; > - currline = firstline; > - salendaddr = v_sal.end; > endaddr = v_function->ginfo.value.block->endaddr; > > for (i = 0; i < v_sal.symtab->linetable->nitems; i++) > ! if (v_sal.symtab->linetable->item[i].line > firstline > ! && v_sal.symtab->linetable->item[i].pc >= salendaddr > && v_sal.symtab->linetable->item[i].pc < endaddr) > { > pc = v_sal.symtab->linetable->item[i].pc; > - currline = v_sal.symtab->linetable->item[i].line; > break; > } > > --- 876,888 ---- > if (!v_function || !v_function->ginfo.value.block || !v_sal.symtab) > return pc; > > endaddr = v_function->ginfo.value.block->endaddr; > > for (i = 0; i < v_sal.symtab->linetable->nitems; i++) > ! if (v_sal.symtab->linetable->item[i].pc >= pc > && v_sal.symtab->linetable->item[i].pc < endaddr) > { > pc = v_sal.symtab->linetable->item[i].pc; > break; > } > -- Michal Ludvig -- * SuSE CR, s.r.o * mludvig@suse.cz * +420 2 9654 5373 * http://www.suse.cz