[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem exception handling g++ 2.95.3-i686
From: |
IT Staff |
Subject: |
Problem exception handling g++ 2.95.3-i686 |
Date: |
Tue, 06 Nov 2001 18:53:29 +0100 |
Hello
We have got a problem with exception handling on a g++ 2.95.3
i686-linux-elf
system.
In a given case, the compilator seems to mess up with the address of the
objects when we get out of a function.
class EX:public TR,public SB
will be ok if we recover the exception as a TR
will crash if we recover the exception as a SB
We think it could be related to the stack frame difference in an
exception
environment.
Any idea of how we could make this work correclty ?
In attachments, you have :
x.txt : dump of the correct behaviour.
y.txt : dump of the bugged behaviour.
extest.cpp : source code
dumpXXX.txt : dump of "g++ -dumpXXX"
Thanks in advance.
Regards,
IT Staff
i686-pc-linux-gnu
*asm:
%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*}
*asm_final:
%|
*cpp:
%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__}
%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}
*cc1:
%(cc1_cpu) %{profile:-p}
*cc1plus:
*endfile:
%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s
*link:
-m elf_i386 %{shared:-shared} %{!shared: %{!ibcs: %{!static:
%{rdynamic:-export-dynamic} %{!dynamic-linker:-dynamic-linker
/lib/ld-linux.so.2}} %{static:-static}}}
*lib:
%{shared: -lc} %{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread}
%{profile:-lc_p} %{!profile: -lc}}
*libgcc:
-lgcc
*startfile:
%{!shared: %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s}
%{!p:%{profile:gcrt1.o%s} %{!profile:crt1.o%s}}}}
crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}
*switches_need_spaces:
*signed_char:
%{funsigned-char:-D__CHAR_UNSIGNED__}
*predefines:
-D__ELF__ -Dunix -D__i386__ -Dlinux -Asystem(posix)
*cross_compile:
0
*version:
2.95.3
*multilib:
.. ;
*multilib_defaults:
*multilib_extra:
*multilib_matches:
*linker:
collect2
*cpp_486:
%{!ansi:-Di486} -D__i486 -D__i486__
*cpp_586:
%{!ansi:-Di586 -Dpentium} -D__i586 -D__i586__ -D__pentium -D__pentium__
*cpp_k6:
%{!ansi:-Di586 -Dk6} -D__i586 -D__i586__ -D__k6 -D__k6__
*cpp_686:
%{!ansi:-Di686 -Dpentiumpro} -D__i686 -D__i686__ -D__pentiumpro
-D__pentiumpro__
*cpp_cpu_default:
%(cpp_686)
*cpp_cpu:
-Acpu(i386) -Amachine(i386) %{!ansi:-Di386} -D__i386 -D__i386__
%{mcpu=i486:%(cpp_486)} %{m486:%(cpp_486)} %{mpentium:%(cpp_586)}
%{mcpu=pentium:%(cpp_586)} %{mpentiumpro:%(cpp_686)}
%{mcpu=pentiumpro:%(cpp_686)} %{mcpu=k6:%(cpp_k6)}
%{!mcpu*:%{!m486:%{!mpentium*:%(cpp_cpu_default)}}}
*cc1_cpu:
%{!mcpu*: %{m386:-mcpu=i386 -march=i386} %{m486:-mcpu=i486 -march=i486}
%{mpentium:-mcpu=pentium} %{mpentiumpro:-mcpu=pentiumpro}}
*link_command:
%{!fsyntax-only: %{!c:%{!M:%{!MM:%{!E:%{!S:%(linker) %l %X %{o*} %{A} %{d}
%{e*} %{m} %{N} %{n} %{r} %{s} %{t} %{u*} %{x} %{z} %{Z}
%{!A:%{!nostdlib:%{!nostartfiles:%S}}}
%{static:} %{L*} %D %o %{!nostdlib:%{!nodefaultlibs:%G %L %G}}
%{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*}
}}}}}}
2.95.3
test start
exception_test() begin
[bffff20c]::T()->
[bffff20c]::<-T()
[bffff1f0]::TR()->
[bffff1f0]::<-TR()
[bffff1fc]::SB()->
[bffff1fc]::<-SB()
[bffff1f0]::EX()->
[bffff1f0]::<-EX()
[081e0f14]::T()->
[081e0f14]::<-T()
[081e0ef8]::TR(x)->
[081e0ef8]::<-TR(x)
[081e0f04]::SB(x)->
[081e0f04]::<-SB(x)
[081e0ef8]::EX(x)->
[081e0ef8]::<-EX(x)
[bffff1f0]::~EX()->
[bffff1f0]::<-~EX()
[bffff1fc]::~SB()->
[bffff1fc]::<-~SB()
[bffff1f0]::~TR()->
[bffff1f0]::<-~TR()
[bffff20c]::~T()->
[bffff20c]::<-~T()
got the throw
[081e5b64]::T()->
[081e5b64]::<-T()
[081e5b48]::TR(x)->
[081e5b48]::<-TR(x)
[081e5b54]::SB(x)->
[081e5b54]::<-SB(x)
[081e5b48]::EX(x)->
[081e5b48]::<-EX(x)
[081e0ef8]::~EX()->
[081e0ef8]::<-~EX()
[081e0f04]::~SB()->
[081e0f04]::<-~SB()
[081e0ef8]::~TR()->
[081e0ef8]::<-~TR()
[081e0f14]::~T()->
[081e0f14]::<-~T()
got it
[081e5b48]::~EX()->
[081e5b48]::<-~EX()
[081e5b54]::~SB()->
[081e5b54]::<-~SB()
[081e5b48]::~TR()->
[081e5b48]::<-~TR()
[081e5b64]::~T()->
[081e5b64]::<-~T()
test done
test start
exception_test() begin
[bffff20c]::T()->
[bffff20c]::<-T()
[bffff1f0]::TR()->
[bffff1f0]::<-TR()
[bffff1fc]::SB()->
[bffff1fc]::<-SB()
[bffff1f0]::EX()->
[bffff1f0]::<-EX()
[081e0f14]::T()->
[081e0f14]::<-T()
[081e0ef8]::TR(x)->
[081e0ef8]::<-TR(x)
[081e0f04]::SB(x)->
[081e0f04]::<-SB(x)
[081e0ef8]::EX(x)->
[081e0ef8]::<-EX(x)
[bffff1f0]::~EX()->
[bffff1f0]::<-~EX()
[bffff1fc]::~SB()->
[bffff1fc]::<-~SB()
[bffff1f0]::~TR()->
[bffff1f0]::<-~TR()
[bffff20c]::~T()->
[bffff20c]::<-~T()
got the throw
[081e5b64]::T()->
[081e5b64]::<-T()
[081e5b48]::TR(x)->
[081e5b48]::<-TR(x)
[081e5b54]::SB(x)->
[081e5b54]::<-SB(x)
[081e5b48]::EX(x)->
[081e5b48]::<-EX(x)
[081e0ef8]::~EX()->
[081e0ef8]::<-~EX()
[081e0f04]::~SB()->
[081e0f04]::<-~SB()
[081e0ef8]::~TR()->
[081e0ef8]::<-~TR()
[081e0f14]::~T()->
[081e0f14]::<-~T()
got it
[081e5b54]::~EX()->
[081e5b54]::<-~EX()
- Problem exception handling g++ 2.95.3-i686,
IT Staff <=