This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PATCH: Add __frame_state_for for gcc 3.0.1


On Thu, Jul 05, 2001 at 09:52:41PM +0200, Jakub Jelinek wrote:
> On Thu, Jul 05, 2001 at 12:30:51PM -0700, H . J . Lu wrote:
> > I created a testcase and added some traces in frame-dwarf2.c. It turns
> > out that when a pre-GCC 3.0 program throws an exception inside libc.so
> > compiled with gcc 3.0, _Unwind_Find_FDE in
> > 
> > 	f = _Unwind_Find_FDE (pc_target, &bases);
> > 	if (f == 0)
> > 	  return 0;
> > 
> > will return 0. That is _Unwind_Find_FDE cannot find the frame if you
> > have mixed g++ v2 and g++ v3 frames. Do we really want to modify
> > _Unwind_Find_FDE to support such a thing? I think the best we can
> > do may be detect such a condition and issue a fatal error message.
> 
> It IMHO must work (although one cannot mix pre-G++ 3.0 and G++ 3.0 C++
> libraries together, one should be able to mix G++ 3.0 C++ libraries with
> pre-GCC 3.0 C libraries and vice versa, and C libraries can have unwinding
> info). So it needs to be debugged why it cannot find it.

This patch supports pre-g++ 3.0 DSOs against glibc compiled with gcc
3.0.1.  I will work on g++ 3.0 DSOs against glibc compiled with pre
gcc 3.0.


H.J.
----
2001-07-06  H.J. Lu  <hjl@gnu.org>

	* Versions.def (libc): Add GCC_3.0 if needed.

	* config.h.in (HAVE_DWARF2_UNWIND_GCC_3): Added.
	(HAVE_UNWIND_FIND_FDE): Added.

	* sysdeps/unix/sysv/linux/Versions (libc): Add _Unwind_Find_FDE,
	__register_frame_info_bases, __deregister_frame_info_bases and
	__register_frame_info_table_bases to version GCC_3.0 if needed.

	* config.make.in (need-frame-dwarf2): New. Substitute by
	@libc_cv_frame_dwarf2@.

	* configure.in (libc_cv_frame_dwarf2): Set to yes if
	_Unwind_Find_FDE exists in libgcc.
	(HAVE_UNWIND_FIND_FDE): Define if _Unwind_Find_FDE exists in
	libgcc.
	(HAVE_DWARF2_UNWIND_GCC_3): Define for gcc 3 version of DWARF2
	unwind.
	* configure: Rebuild.

	* sysdeps/generic/dwarf2.h: New file.
	* sysdeps/generic/frame-dwarf2.c: Likewise.
	* sysdeps/generic/unwind-dw2.c: Likewise.
	* sysdeps/generic/unwind-dw2-fde.h: Likewise.
	* sysdeps/generic/unwind-pe.h: Likewise.
	* sysdeps/generic/unwind.h: Likewise.
	* sysdeps/alpha/gccframe.h: Likewise.
	* sysdeps/arm/gccframe.h: Likewise.
	* sysdeps/i386/gccframe.h: Likewise.
	* sysdeps/m68k/gccframe.h: Likewise.
	* sysdeps/mips/gccframe.h: Likewise.
	* sysdeps/powerpc/gccframe.h: Likewise.
	* sysdeps/s390/s390-32/gccframe.h: Likewise.
	* sysdeps/sparc/gccframe.h: Likewise.

	* sysdeps/generic/gccframe.h: Updated.

	* sysdeps/unix/sysv/linux/alpha/Makefile (sysdep_routines): Add
	frame-dwarf2 and unwind-dw2 for elf if $(build-shared) and
	$(need-frame-dwarf2) are both yes.
	(shared-only-routines): Likewise.
	* sysdeps/unix/sysv/linux/arm/Makefile: Likewise.
	* sysdeps/unix/sysv/linux/i386/Makefile: Likewise.
	* sysdeps/unix/sysv/linux/m68k/Makefile: Likewise.
	* sysdeps/unix/sysv/linux/mips/Makefile: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/Makefile: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/Makefile: Likewise.
	* sysdeps/unix/sysv/linux/sparc/Makefile: Likewise.

glibc-gcc.patch.gz


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]