1501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown/*
2501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown * Copyright (C) 2011 The Android Open Source Project
3501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown *
4501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown * Licensed under the Apache License, Version 2.0 (the "License");
5501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown * you may not use this file except in compliance with the License.
6501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown * You may obtain a copy of the License at
7501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown *
8501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown *      http://www.apache.org/licenses/LICENSE-2.0
9501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown *
10501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown * Unless required by applicable law or agreed to in writing, software
11501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown * distributed under the License is distributed on an "AS IS" BASIS,
12501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown * See the License for the specific language governing permissions and
14501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown * limitations under the License.
15501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown */
16501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown
17501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown/* Architecture dependent functions. */
18501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown
19501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown#ifndef _CORKSCREW_PTRACE_ARCH_H
20501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown#define _CORKSCREW_PTRACE_ARCH_H
21501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown
22501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown#include <corkscrew/ptrace.h>
23501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown#include <corkscrew/map_info.h>
24501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown#include <corkscrew/symbol_table.h>
25501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown
26501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown#ifdef __cplusplus
27501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brownextern "C" {
28501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown#endif
29501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown
30501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown/* Custom extra data we stuff into map_info_t structures as part
31501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown * of our ptrace_context_t. */
32501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Browntypedef struct {
33501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown#ifdef __arm__
34501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown    uintptr_t exidx_start;
35501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown    size_t exidx_size;
36501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown#endif
37501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown    symbol_table_t* symbol_table;
38501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown} map_info_data_t;
39501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown
40501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brownvoid load_ptrace_map_info_data_arch(pid_t pid, map_info_t* mi, map_info_data_t* data);
41501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brownvoid free_ptrace_map_info_data_arch(map_info_t* mi, map_info_data_t* data);
42501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown
43501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown#ifdef __cplusplus
44501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown}
45501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown#endif
46501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown
47501edd29b823ce1301d2effdd3a9e4b6e2b20b76Jeff Brown#endif // _CORKSCREW_PTRACE_ARCH_H
48