[Ltrace-devel] [PATCH v2] Fix SIGSEGV on MIPS big endian
Edgar E. Iglesias
edgar.iglesias at gmail.com
Mon Feb 4 15:22:33 UTC 2013
On Mon, Feb 04, 2013 at 03:29:33PM +0100, Oliver Spornitz wrote:
> ---
> sysdeps/linux-gnu/mipsel/arch.h | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
Looks good to me.
Acked-by: Edgar E. Iglesias <edgar.iglesias at gmail.com>
>
> diff --git a/sysdeps/linux-gnu/mipsel/arch.h b/sysdeps/linux-gnu/mipsel/arch.h
> index ba1220d..14572cd 100644
> --- a/sysdeps/linux-gnu/mipsel/arch.h
> +++ b/sysdeps/linux-gnu/mipsel/arch.h
> @@ -25,10 +25,18 @@
> #include <stddef.h>
> #include <gelf.h>
>
> -#define BREAKPOINT_VALUE { 0x0d, 0x00, 0x00, 0x00 }
> +#ifdef __MIPSEL__
> +# define BREAKPOINT_VALUE { 0x0d, 0x00, 0x00, 0x00 }
> +# define ARCH_ENDIAN_LITTLE
> +#elif defined(__MIPSEB__)
> +# define BREAKPOINT_VALUE { 0x00, 0x00, 0x00, 0x0d }
> +# define ARCH_ENDIAN_BIG
> +#else
> +# error __MIPSEL__ or __MIPSEB__ must be defined
> +#endif
> +
> #define BREAKPOINT_LENGTH 4
> #define DECR_PC_AFTER_BREAK 0
> -#define ARCH_ENDIAN_LITTLE
>
> #define LT_ELFCLASS ELFCLASS32
> #define LT_ELF_MACHINE EM_MIPS
> --
> 1.8.0
>
>
>
> _______________________________________________
> Ltrace-devel mailing list
> Ltrace-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/ltrace-devel
More information about the Ltrace-devel
mailing list