From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 461 invoked by alias); 14 Apr 2008 19:23:43 -0000 Received: (qmail 448 invoked by uid 22791); 14 Apr 2008 19:23:42 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 14 Apr 2008 19:23:20 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 931B1983D9; Mon, 14 Apr 2008 19:23:18 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 726CC98119; Mon, 14 Apr 2008 19:23:18 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1JlUGr-0007Wh-Qb; Mon, 14 Apr 2008 15:23:17 -0400 Date: Mon, 14 Apr 2008 19:31:00 -0000 From: Daniel Jacobowitz To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [RFC 3/4] - Adjust all archs/targets to new interface Message-ID: <20080414192317.GN1968@caradoc.them.org> Mail-Followup-To: Pedro Alves , gdb-patches@sourceware.org References: <200804091557.09472.pedro@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200804091557.09472.pedro@codesourcery.com> User-Agent: Mutt/1.5.17 (2007-12-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-04/txt/msg00262.txt.bz2 On Wed, Apr 09, 2008 at 03:57:09PM +0100, Pedro Alves wrote: > - arm-linux: either we have currently the wrong jb_pc, or there must > be some switch that changes the jmp_buf format I'm not aware of. I > took the values in the patch from glibc, and tested it with a > qemu in several multilibs configurations, including -mthumb. > Inspecting manually revealed that indeed the these are the > correct values, and running the new longjmp.exp test passed cleanly. ARM_LINUX_JB_PC is for pre-EABI. This is ports/sysdeps/arm/fpu/__longjmp.S in glibc: /* Save registers */ sfmea f4, 4, [r0]! stmia r0, {v1-v6, sl, fp, sp, lr} So it's the tenth integer register but they're after the FPU state. I can'd decode sfmea in my head, but I assume the previous value was more or less right. Anyway, you were probably testing on EABI. Looks like it needs an ARM_ABI_AAPCS conditional. > * alpha-tdep.c (alplha_get_longjmp_target): Add SP parameter. Typo. I'm really sorry my comments on the earlier patch might make you adjust this... it looks like a tremendous piece of work. > Index: src/gdb/i386-cygwin-tdep.c > =================================================================== > --- src.orig/gdb/i386-cygwin-tdep.c 2008-04-07 23:13:41.000000000 +0100 > +++ src/gdb/i386-cygwin-tdep.c 2008-04-08 11:00:00.000000000 +0100 > @@ -233,6 +233,15 @@ i386_cygwin_init_abi (struct gdbarch_inf > tdep->gregset_num_regs = ARRAY_SIZE (i386_win32_gregset_reg_offset); > tdep->sizeof_gregset = I386_WIN32_SIZEOF_GREGSET; > > + /* TODO: this seems to be 4 and 5 on mingw32. I guess we came to a > + point where we need to split cygwin vs mingw *-tdep.c support > + somehow. Maybe we should detect a cygwin binary by looking at > + the imports for "cygwin1.dll", and have a GDB_OSABI_MINGW32 or > + GDB_OSABI_WINDOWS afterall. */ > + > + tdep->jb_sp_offset = 7 * 4; > + tdep->jb_pc_offset = 8 * 4; > + > set_solib_ops (gdbarch, &solib_target_so_ops); > > /* Core file support. */ I would somewhat prefer to see this resolved first. -- Daniel Jacobowitz CodeSourcery