Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Any C++ on Alpha gfurus out there?
@ 1998-11-13 19:10 Brian E.W. Wood
  1998-11-13 19:17 ` Nicholas Sallembian
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Brian E.W. Wood @ 1998-11-13 19:10 UTC (permalink / raw)
  To: axp-list


I'm trying to compile the most recent versions of AbiWord, a promising project
to create a GPL wysiwyg word processor.

As of recent versions is has stopped working on my Alpha. It apparently
comtinues to run on Intel machines.

I'm definitely not a C++ programmer, but I'd like to try and find out what has
happened.

The program segfaults on the following bit of code:

const char * EV_UnixMenu::_getItemPath(AP_Menu_Id id) const
{
        for (UT_uint32 k=0; (k < m_nrActualFactoryItems); k++)
        {
                _wd * wd = (_wd *)m_menuFactoryItems[k].callback_action;
                if (wd && (wd->m_id==id))
                        return m_menuFactoryItems[k].path;
        }

GDB says it segfaults at the if statement.

UT_uint32 is defined in the header file:

protected:
        UT_uint32                       m_nrActualFactoryItems;
        UT_Vector                       m_vecMenuWidgets;

I realize that this is woefully inadequate information with which to diagnose
the problem but I'm hoping somebody might have an inspired guess as to what
direction I should proceed in. is the uint32 perhaps a problem on the alpha?

Thanks.


---
Brian E.W. Wood  beww@intac.com


^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: Any C++ on Alpha gfurus out there?
@ 1998-11-16 14:49 Leo
  0 siblings, 0 replies; 15+ messages in thread
From: Leo @ 1998-11-16 14:49 UTC (permalink / raw)
  To: axp-list

 Paul Tomblin wrote:
> >
> > Quoting Stefan Schroepfer (scr@iis.fhg.de):
> > > Brian E.W. Wood wrote:
> > > >
> > > > _wd * wd = (_wd *)m_menuFactoryItems[k].callback_action;
> > >
> > > [...]
> > >  - Why does one write such a counter-intuitive construct
> > >    even if it is a valid one?
> >
> > What's so hard to understand?  _wd is obviously a class or a
typedef.  wd is a
> > pointer to that class.  m_menuFactoryItems is an array of structs or
class
> > instances, which has a data field (or method) of type (pointer to
_wd) called
> > callback_action.

> Thanks for the reply. I simply overlooked that there's an
> instantiation of a (_wd *) in this line and got confused
> about this presumed dammned _product_ on the left side of
> the assignment (it's not my day today).
>
> scr


Oops... that's true, the l-value is the wd variable, of course.


Sorry,
Leo




^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~1998-11-16 14:51 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-11-13 19:10 Any C++ on Alpha gfurus out there? Brian E.W. Wood
1998-11-13 19:17 ` Nicholas Sallembian
1998-11-13 19:25   ` B. James Phillippe
1998-11-13 21:48     ` Nicholas Sallembian
1998-11-14  1:06     ` Bob McElrath
1998-11-14 13:20       ` sterwill
1998-11-14 17:37         ` Brian E.W. Wood
1998-11-13 19:26   ` Anders Hammarquist
1998-11-13 19:37 ` Heinz Ulrich Stille
1998-11-16  3:50   ` Michael J. Donahue
1998-11-16 13:15 ` Stefan Schroepfer
1998-11-16 13:45   ` Paul Tomblin
1998-11-16 14:24     ` Stefan Schroepfer
1998-11-16 14:43     ` Leo
  -- strict thread matches above, loose matches on Subject: below --
1998-11-16 14:49 Leo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox