| 1 | /* $Id: prfcorereloc.cpp.h 3609 2007-10-29 01:11:39Z bird $ */
|
|---|
| 2 | /** @file
|
|---|
| 3 | * kProfiler Mark 2 - Core SetBasePtr Code Template.
|
|---|
| 4 | */
|
|---|
| 5 |
|
|---|
| 6 | /*
|
|---|
| 7 | * Copyright (c) 2006-2007 knut st. osmundsen <[email protected]>
|
|---|
| 8 | *
|
|---|
| 9 | * This file is part of kProfiler.
|
|---|
| 10 | *
|
|---|
| 11 | * kProfiler is free software; you can redistribute it and/or
|
|---|
| 12 | * modify it under the terms of the GNU Lesser General Public
|
|---|
| 13 | * License as published by the Free Software Foundation; either
|
|---|
| 14 | * version 2.1 of the License, or (at your option) any later version.
|
|---|
| 15 | *
|
|---|
| 16 | * kProfiler is distributed in the hope that it will be useful,
|
|---|
| 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|---|
| 19 | * Lesser General Public License for more details.
|
|---|
| 20 | *
|
|---|
| 21 | * You should have received a copy of the GNU Lesser General Public
|
|---|
| 22 | * License along with kProfiler; if not, write to the Free Software
|
|---|
| 23 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|---|
| 24 | *
|
|---|
| 25 | */
|
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 | /**
|
|---|
| 29 | * Set (or modify) the base pointer for the profiler.
|
|---|
| 30 | *
|
|---|
| 31 | * The purpose of the base pointer is to allow profiling of relocatable code. Set the
|
|---|
| 32 | * base pointer right after initializing the data set, and update it when relocating
|
|---|
| 33 | * the code (both by calling this function), and Bob's your uncle! :-)
|
|---|
| 34 | *
|
|---|
| 35 | * @param pHdr The header returned from the initializer.
|
|---|
| 36 | * @param uBasePtr The new base pointer value.
|
|---|
| 37 | */
|
|---|
| 38 | KPRF_DECL_FUNC(void, SetBasePtr)(KPRF_TYPE(P,HDR) pHdr, KPRF_TYPE(,UPTR) uBasePtr)
|
|---|
| 39 | {
|
|---|
| 40 | pHdr->uBasePtr = uBasePtr;
|
|---|
| 41 | }
|
|---|
| 42 |
|
|---|
| 43 |
|
|---|