All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom King <Tom.King@bullant.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [linux-ia64] re: Lockups on 2.4.1
Date: Wed, 07 Mar 2001 03:51:44 +0000	[thread overview]
Message-ID: <marc-linux-ia64-105590693005251@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590693005175@msgid-missing>

>>2. What is this new unwind stuff?

> You probably want to know in the context of the kernel.  I can't answer
that.

> I can answer in the context of C++.  The unwind stuff is used for
exception
> handling.  When a program throws, we use the unwind stuff to unwind stack
> frames back to where the exception handler (catch clause) is.  The unwind
> data is similar in spirit to the DWARF2 frame info that is currently used
by
> most all other gcc targets.  It is basically the same data just encoded
> differently.
> The format of the data is documented in the Software Conventions and
Runtime
> Architecture manual, section 11.  The library interface for C++ EH is
> documented in the psABI, section 6.  This hasn't been implemented yet, we
are
> working on it right now.

> Jim

This is really a question about throw/catch on g++. I wonder if your
description of NYI is the reason for the failure?
I am running gnupro-1117-6 (gcc version 2.96-ia64-000717 snap 001117)
on Redhat 7.0 fisher (kernel 2.4.0-0.99.11smp) on a lion processor
the following program runs o.k. with ./a.out 5 - but fails with ./a.out 6

# throws.h
#include <iostream>
#include <stdlib.h>
class exc {
  private :
    int level;
  public :

  void setLevel(int il) { level = il; cout << "set exc " << level << "\n"; }
  int getLevel() { return level; }
  void here(){ cout << "exception" ; } 

  };
void doit(int, int);
void doit2(int, int);
//--------------------------------------------------------------------------
---------------------------
//throws.cpp

#include "throws.h"
int main(int argc, char ** argv, char **envp)
{
  int count = atoi(*(argv+1));
  try {
    doit(count, count);
  } 
  catch(exc e) {
    cout << "doit at top level " << e.getLevel() << "\n";
  }
}

void doit(int start, int level) {
  if (level = 0 ) {
    cout << "o.k.\n" ;
    exc e;
    e.setLevel(start);
    throw(e);
  } 
  else {
    doit(start, level - 1);
  }
}
//--------------------------------------------------------------------------
-----------------
bash% g++ -Wall -ggdb -fPIC -fexceptions  -mb-step  throws.cpp
bash% ./a.out 5
o.k.
set exc 5
doit at top level 5
bash% ./a.out 6
o.k.
set exc 6
Illegal instruction (core dumped)

 
Tom King
Kernel Engineer
Bullant Technology
DID +61-2-8925-1618
http://www.bullant.com



  parent reply	other threads:[~2001-03-07  3:51 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-21 16:05 [Linux-ia64] Re: Lockups on 2.4.1 Bill Nottingham
2001-02-21 17:16 ` Gerrit Huizenga
2001-02-21 17:57 ` David Mosberger
2001-02-21 18:58 ` Chris McDermott
2001-02-21 21:02 ` David Mosberger
2001-02-23 15:19 ` Jun Nakajima
2001-02-23 19:06 ` Seth, Rohit
2001-02-23 19:20 ` Michael Madore
2001-02-23 19:48 ` Seth, Rohit
2001-02-23 20:00 ` Jesse Barnes
2001-02-24 13:39 ` Francis Galiegue
2001-02-24 14:44 ` Francis Galiegue
2001-02-24 18:45 ` Michael Madore
2001-02-24 23:18 ` Joseph V Moss
2001-02-25  2:43 ` Francis Galiegue
2001-02-26 20:52 ` Jim Wilson
2001-03-07  3:51 ` Tom King [this message]
2001-03-07 20:34 ` [linux-ia64] " Jim Wilson
2001-03-08  3:45 ` Tom King

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=marc-linux-ia64-105590693005251@msgid-missing \
    --to=tom.king@bullant.com \
    --cc=linux-ia64@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.