Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michal Ludvig <mludvig@suse.cz>
To: GDB Patches <gdb-patches@sources.redhat.com>
Cc: Andrew Cagney <ac131313@redhat.com>
Subject: Re: [RFA] x86_64_skip_prologue again...
Date: Thu, 06 Jun 2002 22:55:00 -0000	[thread overview]
Message-ID: <3D004A0A.6070200@suse.cz> (raw)
In-Reply-To: <3CFDFD19.3030603@suse.cz>

Michal Ludvig wrote:
> Hi all,
> now x86_64_skip_prologue() works even on functions without debug 
> information.
> 
> 2002-06-05  Michal Ludvig  <mludvig@suse.cz>
> 
>     * 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


  reply	other threads:[~2002-06-07  5:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-05  4:59 Michal Ludvig
2002-06-06 22:55 ` Michal Ludvig [this message]
2002-06-07  3:47   ` Andreas Schwab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3D004A0A.6070200@suse.cz \
    --to=mludvig@suse.cz \
    --cc=ac131313@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox