This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [PATCH] UnixWare Pentium III core file fix


Hi Alan.

> On Thu, 28 Sep 2000, Petr Sorfa wrote:
> 
> > !   if (note->descsz == sizeof (pstatus_t)
> > ! #if defined (HAVE_PXSTATUS_T)
> > !       && note->descsz != sizeof (pxstatus_t)
> > ! #endif
> > !       )
> 
> This has got to be wrong.  Presumably you meant
> 
>           || note->descsz == sizeof (pxstatus_t)
Whoops you are right.

> Even ignoring this error, I'm not really happy with this patch.  What
> guarantee do we have that pstatus_t and pxstatus_t will always have pr_pid
> at the same offset?  I think it would be better to use a pxstatus_t local
> variable and duplicate some code.  Same goes for lwpxstatus_t.
Actually its a 100% guarantee. The whole idea of pxstatus_t and
lwpxstatus_t was be backwards compatible with pstatus_t and lwpstatus_t.
All the changes are appended to the original structure. The primary
reason (and proof of concept) is that all programs using pstatus_t and
lwpstatus_t will run with no problem using /proc even if the data
structure is pxstatus_t and lwpxstatus_t.

Having said all that you do have a valid point. Separate support for
pxstatus_t and lwpxstatus_t should be put in, particularly concerning
the additional register retrieval and additional information.

In the interim, is it possible to go ahead with the patch?

Thanks for the thorough code check.

Petr
-- 
--------------------------------------------------------
Petr Sorfa                  Software Engineer
Santa Cruz Operation (SCO)  
430 Mountain Ave.           http://www.sco.com
Murray Hill 07974
NJ, USA
--------------------------------------------------------
Disclaimer: All my comments are my own and nobody else's
----------------------------------------------------------

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]