#1 Find PC for amd64

closed-fixed
nobody
None
5
2005-06-02
2005-03-19
No

Date: Fri, 18 Mar 2005 09:55:30 -0500
From: Josh Brandt <jbrandt@WPI.EDU>
To: opensource@google.com
Subject: google-perftools amd64 patch...
Message-ID: <20050318145530.GB2426@ccc3.wpi.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.4i
X-Spam-Report: Content analysis details: (0.0 points,
5.0 required)
0.0 BAYES_50 BODY: Bayesian spam probability is
40 to 60%
[score: 0.4962]

This should set it it up properly find and use the
AMD64 PC:

*** src/profiler.cc.orig 2005-03-18
09:44:45.836777000 -0500
--- src/profiler.cc 2005-03-18 09:45:14.359595000 -0500
***************
*** 107,112 ****
--- 107,119 ----
typedef struct ucontext SigStructure;
inline void* GetPC(const SigStructure& sig_structure ) {
return (void*)sig_structure.uc_mcontext.gregs[REG_RIP];
+ }
+
+ #elif defined HAVE_STRUCT_SIGCONTEXT_RIP
+ typedef struct sigcontext SigStructure;
+ inline void* GetPC(const SigStructure& sig_structure ) {
+ return (void*)sig_structure.rip;
+ }

#else
#error I dont know what your PC is
*** configure.ac.orig 2005-03-18 09:33:37.476402000 -0500
--- configure.ac 2005-03-18 09:33:37.477403000 -0500
***************
*** 37,43 ****
struct ucontext.uc_mcontext,
struct sigcontext.eip,
struct sigcontext.sc_ip,
! struct siginfo.si_faddr],,,
[#include <signal.h>])

# Defines PRIuS
--- 37,44 ----
struct ucontext.uc_mcontext,
struct sigcontext.eip,
struct sigcontext.sc_ip,
! struct siginfo.si_faddr,
! struct sigcontext.rip],,,
[#include <signal.h>])

# Defines PRIuS

Discussion

  • Josh Brandt
    Josh Brandt
    2005-03-21

    Logged In: YES
    user_id=154768

    jbrandt@wpi.edu is my workplace address.

     
    • status: open --> closed-fixed
     
  • Logged In: YES
    user_id=1239124

    This should be fixed in the 0.2 release.