001 // This file is part of the program FRYSK. 002 // 003 // Copyright 2007, 2008, Red Hat Inc. 004 // 005 // FRYSK is free software; you can redistribute it and/or modify it 006 // under the terms of the GNU General Public License as published by 007 // the Free Software Foundation; version 2 of the License. 008 // 009 // FRYSK is distributed in the hope that it will be useful, but 010 // WITHOUT ANY WARRANTY; without even the implied warranty of 011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 012 // General Public License for more details. 013 // 014 // You should have received a copy of the GNU General Public License 015 // along with FRYSK; if not, write to the Free Software Foundation, 016 // Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. 017 // 018 // In addition, as a special exception, Red Hat, Inc. gives You the 019 // additional right to link the code of FRYSK with code not covered 020 // under the GNU General Public License ("Non-GPL Code") and to 021 // distribute linked combinations including the two, subject to the 022 // limitations in this paragraph. Non-GPL Code permitted under this 023 // exception must only link to the code of FRYSK through those well 024 // defined interfaces identified in the file named EXCEPTION found in 025 // the source code files (the "Approved Interfaces"). The files of 026 // Non-GPL Code may instantiate templates or use macros or inline 027 // functions from the Approved Interfaces without causing the 028 // resulting work to be covered by the GNU General Public 029 // License. Only Red Hat, Inc. may make changes or additions to the 030 // list of Approved Interfaces. You must obey the GNU General Public 031 // License in all respects for all of the FRYSK code and other code 032 // used in conjunction with FRYSK except the Non-GPL Code covered by 033 // this exception. If you modify this file, you may extend this 034 // exception to your version of the file, but you are not obligated to 035 // do so. If you do not wish to provide this exception without 036 // modification, you must delete this exception statement from your 037 // version and license this file solely under the GPL without 038 // exception. 039 040 package lib.unwind; 041 042 import frysk.rsl.Log; 043 import frysk.rsl.LogFactory; 044 045 public class UnwindPPC64 extends Unwind { 046 static final Log fine = LogFactory.fine(Unwind.class); 047 static final Log finest = LogFactory.finest(Unwind.class); 048 049 native long createCursor(AddressSpace addressSpace, 050 long unwAddressSpace); 051 native void destroyCursor(long unwCursor); 052 053 native long createAddressSpace (ByteOrder byteOrder); 054 native void destroyAddressSpace (long unwAddressSpace); 055 056 native void setCachingPolicy(long unwAddressSpace, 057 CachingPolicy cachingPolicy); 058 059 native int isSignalFrame (long unwCursor); 060 061 native int step (long unwCursor); 062 063 native void getRegister(long unwCursor, Number regNum, 064 long offset, int length, byte[] word, int start); 065 native void setRegister(long unwCursor, Number regNum, 066 long offset, int length, byte[] word, int start); 067 068 native long getIP(long unwCursor); 069 native long getSP(long unwCursor); 070 native long getCFA(long unwCursor); 071 072 native long copyCursor(long unwCursor); 073 native int getContext(long context); 074 075 native int fillProcInfoNotAvailable(long unwProcInfo); 076 native int fillProcInfoFromElfImage(long unwProcInfo, 077 long ip, boolean needUnwindInfo, 078 AddressSpace addressSpace, 079 String name, 080 long addressLow, long addressHigh, 081 long offset); 082 native int fillProcInfoFromVDSO(long unwProcInfo, 083 long ip, boolean needUnwindInfo, 084 AddressSpace addressSpace, 085 long addressLow, long addressHigh, 086 long offset); 087 088 native long getProcInfo(long unwCursor); 089 native void destroyProcInfo(long unwProcInfo); 090 091 native long getStartIP(long unwProcInfo); 092 native long getEndIP(long unwProcInfo); 093 native long getLSDA(long unwProcInfo); 094 native long getHandler(long unwProcInfo); 095 native long getGP(long unwProcInfo); 096 native long getFlags(long unwProcInfo); 097 native int getFormat(long unwProcInfo); 098 native int getUnwindInfoSize(long unwProcInfo); 099 native long getUnwindInfo(long unwProcInfo); 100 }