public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: "H. J. Lu" <hjl@lucon.org>
To: Elena Zannoni <ezannoni@redhat.com>
Cc: GDB <gdb@sources.redhat.com>
Subject: Re: RFC: DW_TAG_try_block
Date: Tue, 27 May 2003 15:19:00 -0000	[thread overview]
Message-ID: <20030527081334.A23209@lucon.org> (raw)
In-Reply-To: <16083.32844.434477.515378@localhost.redhat.com>; from ezannoni@redhat.com on Tue, May 27, 2003 at 11:12:12AM -0400

On Tue, May 27, 2003 at 11:12:12AM -0400, Elena Zannoni wrote:
>  > > How about adding a little test case to the gdb.c++ directory?
>  > > 
>  > 
>  > I can provide a simple C++ code. But you will need Intel C++ compiler to
>  > see the problem. Also the current Intel compiler doesn't support RedHat
>  > 9.
>  > 
> 
> Hmm, maybe just post the example code then.
> 
> elena
> 

When it is compiled by ecc 7.1,

# ecc -g main.cc -o main

The current gdb won't see ni nor n when break points are set in try
and catch blocks.


H.J.
-----
#include <iostream>
#include <stdexcept>

using namespace std;

int main(int argc, char* argv[])
{
    try {

        int ni = 2;
        if (ni)
            cout << "scatt: " << ni << endl;

        throw "Good: ";

        exit(EXIT_SUCCESS);
    } catch(runtime_error& e) {
        cerr << "scatt: runtime error occured.\n";
        exit(EXIT_FAILURE);
    }
    catch (const char *p)
    {
        int n;
        n = 3;
        cerr << p << n << endl;
        exit(EXIT_FAILURE);
    }
}

  reply	other threads:[~2003-05-27 15:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-26 19:46 H. J. Lu
2003-05-26 19:59 ` Daniel Jacobowitz
2003-05-26 20:16   ` H. J. Lu
2003-05-27 14:46 ` Elena Zannoni
2003-05-27 14:58   ` H. J. Lu
2003-05-27 15:05     ` Daniel Jacobowitz
2003-05-27 15:06     ` Elena Zannoni
2003-05-27 15:19       ` H. J. Lu [this message]
2003-05-28 16:47         ` David Carlton
2003-05-28 16:50           ` Daniel Jacobowitz

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=20030527081334.A23209@lucon.org \
    --to=hjl@lucon.org \
    --cc=ezannoni@redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).