Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Gianni Mariani <gianni@mariani.ws>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: gdb@sources.redhat.com
Subject: Re: 5.2 branch gdb crash - infinite recursion stack overflow
Date: Thu, 07 Mar 2002 06:54:00 -0000	[thread overview]
Message-ID: <3C877F2A.9020708@mariani.ws> (raw)
In-Reply-To: <20020306111312.A14992@nevyn.them.org>

Daniel Jacobowitz wrote:

>On Wed, Mar 06, 2002 at 07:57:11AM -0800, Gianni Mariani wrote:
>
>>Any ideas ?
>>
>
>"That's nice, give us more."
>
>I need to see a little more information before I can guess what's
>wrong.  Like, what were you doing?  Preferably source code so that I
>can actually debug the problem!
>
Oops, I forgot to mention that I had asked to print a deref of pointer 
to a class that has virtual inheritance and virtual methods.  In prior 
revs of gdb it would come back with "can't convert to integer" or 
somthing like that.

So, it terms of creating a snippet of offending code - I'll do that 
soon, I just am too bizzee right now.  However, here is the snippet of 
the code of the offending classes.  A HA_ErrorReport is an interface 
passed into methods that want to be able to report errors. 
 HA_ErrorReportImpl is an implementation of an error reporter that 
basically stores the error codes.

These were compiled using g++ 3.0.3 on RH 7.2 running linux 2.4.17 on an 
Athlon.

class HA_ErrorReport {
public:
      
    /**
     * SetErrorMessage
     * @parm code The error code being set.
     * @parm msg The error message being set.
     */
    virtual void SetErrorMessage( int w_code, const std::string & w_msg 
) = 0;
    
};  

class HA_ErrorReportImpl : virtual public HA_ErrorReport {
public:

    /**
     * m_message contains the last message set by SetErrorMessage.
     */
    std::string             m_message;
 
    /**
     * m_code contains the last code set by SetErrorMessage.
     */
    int                     m_code;

    /**
     * m_ncalled contains the number of times SetErrorMessage was called.
     */
    int                     m_ncalled;

    /**
     * SetErrorMessage implements the HA_ErrorReport method to reporting
     * errors.
     */
    virtual void SetErrorMessage( int w_code, const std::string & w_msg );
      
    HA_ErrorReportImpl() :
        m_code(0), m_ncalled(0)
    {
    }
      
    virtual ~HA_ErrorReportImpl()
    {
    }
};  



Regards
G

>




      reply	other threads:[~2002-03-07 14:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-06  7:57 Gianni Mariani
2002-03-06  8:13 ` Daniel Jacobowitz
2002-03-07  6:54   ` Gianni Mariani [this message]

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=3C877F2A.9020708@mariani.ws \
    --to=gianni@mariani.ws \
    --cc=drow@mvista.com \
    --cc=gdb@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