~ubuntu-branches/ubuntu/trusty/sysprof/trusty

« back to all changes in this revision

Viewing changes to module/sysprof-module.c

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings
  • Date: 2008-12-14 22:55:07 UTC
  • mfrom: (1.3.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20081214225507-9ym667xozn8yrgou
Tags: 1.0.12-1
* Orphan package
* New upstream release
  + Fix compiling on amd64 with kernel >= 2.6.25 (Closes: #508265)
* Change sysprof-module-source to Architecture: all since the package
  itself is not architecture-dependent

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
DECLARE_WAIT_QUEUE_HEAD (wait_for_exit);
68
68
 
69
69
/* Macro the names of the registers that are used on each architecture */
70
 
#if defined(CONFIG_X86_64)
71
 
#       define REG_FRAME_PTR rbp
72
 
#       define REG_INS_PTR rip
73
 
#       define REG_STACK_PTR rsp
74
 
#       define REG_STACK_PTR0 rsp0
75
 
#elif defined(CONFIG_X86)
76
 
#       if LINUX_VERSION_CODE >= KERNEL_VERSION (2,6,25)
77
 
#               define REG_FRAME_PTR bp
78
 
#               define REG_INS_PTR ip
79
 
#               define REG_STACK_PTR sp
80
 
#               define REG_STACK_PTR0 sp0
 
70
#if !defined(CONFIG_X86_64) && !defined(CONFIG_X86)
 
71
#       error Sysprof only supports the i386 and x86-64 architectures
 
72
#endif
 
73
 
 
74
#if LINUX_VERSION_CODE >= KERNEL_VERSION (2,6,25)
 
75
#       define REG_FRAME_PTR bp
 
76
#       define REG_INS_PTR ip
 
77
#       define REG_STACK_PTR sp
 
78
#       define REG_STACK_PTR0 sp0
 
79
#else
 
80
#       if defined(CONFIG_X86_64)
 
81
#               define REG_FRAME_PTR rbp
 
82
#               define REG_INS_PTR rip
 
83
#               define REG_STACK_PTR rsp
 
84
#               define REG_STACK_PTR0 rsp0
81
85
#       else
82
86
#               define REG_FRAME_PTR ebp
83
87
#               define REG_INS_PTR eip
84
88
#               define REG_STACK_PTR esp
85
89
#               define REG_STACK_PTR0 esp0
86
90
#       endif
87
 
#else
88
 
#       error Sysprof only supports the i386 and x86-64 architectures
89
91
#endif
90
92
 
91
93
typedef struct userspace_reader userspace_reader;