From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1419 invoked by alias); 13 Oct 2007 14:19:51 -0000 Received: (qmail 1410 invoked by uid 22791); 13 Oct 2007 14:19:50 -0000 X-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,DK_POLICY_SIGNSOME,FORGED_RCVD_HELO X-Spam-Check-By: sourceware.org Received: from wildebeest.demon.nl (HELO gnu.wildebeest.org) (83.160.170.119) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 13 Oct 2007 14:19:43 +0000 Received: from dijkstra.wildebeest.org ([192.168.1.29]) by gnu.wildebeest.org with esmtp (Exim 4.63) (envelope-from ) id 1Ighq5-0004rI-R5; Sat, 13 Oct 2007 16:19:39 +0200 Subject: Re: New Libunwind for Power Fix From: Mark Wielaard To: Jose Flavio Aguilar Paulino Cc: Frysk In-Reply-To: <1192120504.12765.2.camel@kandinsky.prado> References: <1192120504.12765.2.camel@kandinsky.prado> Content-Type: text/plain Date: Sat, 13 Oct 2007 14:19:00 -0000 Message-Id: <1192285177.3905.46.camel@dijkstra.wildebeest.org> Mime-Version: 1.0 X-Mailer: Evolution 2.8.3 (2.8.3-2.fc6) Content-Transfer-Encoding: 7bit X-Spam-Score: -4.4 (----) X-IsSubscribed: yes Mailing-List: contact frysk-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: frysk-owner@sourceware.org X-SW-Source: 2007-q4/txt/msg00047.txt.bz2 Hi Jose, On Thu, 2007-10-11 at 13:35 -0300, Jose Flavio Aguilar Paulino wrote: > This patch fix the libunwind that was recently imported. > Through this libunwind can properly compile for Power64 and Power32. Thanks! I added these patches as follows: frysk-imports/libunwind/ChangeLog: 2007-10-12 Jose Flavio Aguilar Paulino * include/tdep-ppc32/libunwind_i.h: Define tdep_fetch_proc_info_post. (tdep_get_elf_image): Add void *arg argument. * include/tdep-ppc64/libunwind_i.h: Likewise. * src/Makefile.am (libunwind_la_SOURCES_ppc): Add ppc/Lfetch_proc_info_post.c. (libunwind_ppc_la_SOURCES_ppc_generic): Add ppc/Gfetch_proc_info_post.c. * src/ppc/Gfetch_proc_info_post.c: New file. * src/ppc/Lfetch_proc_info_post.c: New file. * src/ppc32/Ginit.c (get_static_proc_name): Pass through arg. * src/ppc64/Ginit.c (get_static_proc_name): Likewise. I also added ppc32 as proper libunwind target in the frysk build so things get configured and build properly by default now: frysk-imports/ChangeLog: 2007-10-12 Mark Wielaard * Makefile.am: Set LIBUNWIND_ARCH_DIR, LIBUNWIND_OTHER_DIRS and GEN_GCJ_LDADD_LIST to include ppc32 target. * bootstrap.sh: Add ppc32 to isa list. common/ChangeLog: 2007-10-12 Mark Wielaard * m4/frysk-use-libunwind.m4: Check for and transform powerpc target to ppc32. frysk-imports/libunwind/ChangeLog: 2007-10-12 Mark Wielaard * src/ppc32/ucontext_i.h: Use locally defined reg structs. As you see I had to add a similar patch to ppc32/ucontext_i.h that I send you for ppc64/ucontext_i.h earlier because we want to be able to compile for targets on hosts that might not have the kernel headers with those structures in them available. Please do double check, I didn't have a ppc machine available to test. On each target you can build frysk with --enable-check-libunwind which will build the tests for that particular target for a make check that you can then compare with libunwind upstream results. They should be fairly comparable (modulo a few extra/adjusted tests in frysk). See http://sourceware.org/ml/frysk/2007-q4/msg00022.html To complete unwinding/stack support in frysk for ppc some more work is necessary: - frysk-sys/lib/unwind and cni support should be added. This isn't particularly hard, see the existing UnwindRegisters[X86].shenum,shjava and cni/Unwind[X86].cxx examples. Just need to make sure that the right mappings to/from registers and the right libunwind target is selected. - frysk-core/frysk/stack/LibunwindAddressSpace.java Should select the right unwind target (has hardcoded dependencies on x86/x86_64 currently). - frysk-core/frys/isa/ Registers and frysk-core/frysk/proc Task should have the correct register names, register banks and selection. Andrew is currently reorganizing this code (see his recent messages to the list). Cheers, Mark P.S. I will be without internet access for a couple of days, so I might take a while to respond to questions.