[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libunwind] Re: problems with unw_get_save_loc

From: David Mosberger
Subject: [libunwind] Re: problems with unw_get_save_loc
Date: Fri, 10 Oct 2003 18:15:18 -0700

Hi Rob,

>>>>> On Tue, 30 Sep 2003 11:27:36 -0400, Rob Faught <address@hidden> said:

  Rob> [I posted this to the wrong list earlier. Sorry.]
  Rob> Hello David,

  Rob> I'm having problems with unw_get_save_loc. The first seems to
  Rob> be at line 157 in Gget_save_loc-ia64.c. Shouldn't the ! in the
  Rob> condition be removed?

  Rob> if (!IA64_IS_NULL_LOC (loc))
  Rob> {
  Rob>   sloc-> type = UNW_SLT_NONE;
  Rob>   return 0;
  Rob> }

Yes indeed!  The bug was introduced on Apr 22nd:

  - if (!loc)
  + if (!IA64_IS_NULL_LOC (loc))

double negation isn't terribly good...

I fixed this and it does look like it was the only instance of
double-negation in that patch set.  So hopefully no more of those...

  Rob> The other problem I have is when calling this function for
  Rob> floating point registers. It always returns UNW_SLT_NONE, and
  Rob> indeed, there is no case in the switch statement for float
  Rob> regs. I could be wrong but I believe that this worked at some
  Rob> point in the past.

I doubt it ever worked: unw_get_save_loc() was adapted from
ia64_access_reg(), so I'm not surprised that I ended up forgetting to
handle the fp registers (and not having a test program for
unw_get_save_loc() doesn't help either).

The fix shouldn't be difficult though.  In fact, I just added it to
the bk tree.  Could you give it a whirl and see if it works for you?

  Rob> An unrelated issue is in internal.h. I believe that hpux on
  Rob> ia64 should have a big-endian byte order.

You've got a point there... ;-)
Should be fixed now in the bk tree.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]