nixpkgs/pkgs/os-specific/linux/dietlibc/pc.patch

79 lines
2.3 KiB
Diff
Raw Normal View History

diff -rc dietlibc-0.30-orig/include/asm/arm-sigcontext.h dietlibc-0.30/include/asm/arm-sigcontext.h
*** dietlibc-0.30-orig/include/asm/arm-sigcontext.h 2002-05-09 03:05:10.000000000 +0200
--- dietlibc-0.30/include/asm/arm-sigcontext.h 2006-10-19 12:40:30.000000000 +0200
***************
*** 1,5 ****
! #define PC(ctx) (ctx.arm_pc)
/*
* Signal context structure - contains all info to do with the state
--- 1,5 ----
! #define __DIETLIBC_PC(ctx) (ctx.arm_pc)
/*
* Signal context structure - contains all info to do with the state
diff -rc dietlibc-0.30-orig/include/asm/i386-sigcontext.h dietlibc-0.30/include/asm/i386-sigcontext.h
*** dietlibc-0.30-orig/include/asm/i386-sigcontext.h 2005-09-21 09:33:08.000000000 +0200
--- dietlibc-0.30/include/asm/i386-sigcontext.h 2006-10-19 12:40:41.000000000 +0200
***************
*** 38,44 ****
};
#define X86_FXSR_MAGIC 0x0000
! #define PC(ctx) (ctx.eip)
struct sigcontext {
__u16 gs, __gsh;
--- 38,44 ----
};
#define X86_FXSR_MAGIC 0x0000
! #define __DIETLIBC_PC(ctx) (ctx.eip)
struct sigcontext {
__u16 gs, __gsh;
diff -rc dietlibc-0.30-orig/include/asm/ia64-sigcontext.h dietlibc-0.30/include/asm/ia64-sigcontext.h
*** dietlibc-0.30-orig/include/asm/ia64-sigcontext.h 2002-07-20 18:47:48.000000000 +0200
--- dietlibc-0.30/include/asm/ia64-sigcontext.h 2006-10-19 12:39:40.000000000 +0200
***************
*** 1,6 ****
#include <sys/ptrace.h>
! #define PC(ctx) (ctx.sc_ip)
struct sigcontext {
unsigned long sc_flags;
--- 1,6 ----
#include <sys/ptrace.h>
! #define __DIETLIBC_PC(ctx) (ctx.sc_ip)
struct sigcontext {
unsigned long sc_flags;
diff -rc dietlibc-0.30-orig/profiling/profil.c dietlibc-0.30/profiling/profil.c
*** dietlibc-0.30-orig/profiling/profil.c 2002-04-08 00:13:53.000000000 +0200
--- dietlibc-0.30/profiling/profil.c 2006-10-19 12:40:58.000000000 +0200
***************
*** 43,51 ****
static void
profiler (int signal, struct sigcontext ctx)
{
! size_t s = PC(ctx)-low_pc;
(void)signal;
! if ((PC(ctx)) < low_pc) return;
s >>= 1;
if (s < maxhits)
++buffer[s];
--- 43,51 ----
static void
profiler (int signal, struct sigcontext ctx)
{
! size_t s = __DIETLIBC_PC(ctx)-low_pc;
(void)signal;
! if ((__DIETLIBC_PC(ctx)) < low_pc) return;
s >>= 1;
if (s < maxhits)
++buffer[s];