Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: "J. Johnston" <jjohnstn@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: RFA:  dwarf2read.c patch
Date: Tue, 06 May 2003 00:12:00 -0000	[thread overview]
Message-ID: <20030506001216.GA20285@nevyn.them.org> (raw)
In-Reply-To: <3EB6E10A.50104@redhat.com>

On Mon, May 05, 2003 at 06:09:14PM -0400, J. Johnston wrote:
> The following patch fixes a problem on ia64.  In dwarf2read.c,
> dwarf_decode_lines(), the function check_cu_functions() is called
> to check for a specific scenario caused by gcc.
> 
> The function takes an address and returns an address.  In some
> cases, it will return the lowpc value of the function rather than
> the address that was input.
> 
> On the ia64, this causes problems because the line table info spit
> out by the compiler is often specified with relative addresses.
> As well, ia64 addresses are special as they encode a slot number which goes
> 0, 1, 2, then skips to the next quadword boundary.  For example,
> 
> 0x00, 0x01, 0x02, 0x10, 0x11, 0x12, 0x20, 0x21, 0x22, ...
> 
> Addresses such as 0x0e or 0x0f are invalid and cause an error to
> occur if, say, a breakpoint was attempted to be inserted there.
> 
> Now, in dwarf_decode_lines(), if we update the address counter when we call
> check_cu_functions(), adding relative offsets in subsequent entries often 
> results in
> invalid addresses.
> 
> This patch makes it so the check_cu_functions() call is only used to
> alter the address passed to record_line(); the calculated address is left 
> untouched
> so subsequent relative operations result in valid results.
> 
> Tested on ia64 and x86.
> 
> Ok to commit?

I can't approve this, but I can say that that's certainly what I meant
to do with the check_cu_functions.  I feel really dumb for not noticing
that I was corrupting the line state machine.


-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


  reply	other threads:[~2003-05-06  0:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-05 22:09 J. Johnston
2003-05-06  0:12 ` Daniel Jacobowitz [this message]
2003-05-07 21:44 ` Jim Blandy
2003-05-07 22:57   ` J. Johnston
2003-05-07 21:58 ` Elena Zannoni

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=20030506001216.GA20285@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=jjohnstn@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