This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC 3/4] - Adjust all archs/targets to new interface


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


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