1 /* system/debuggerd/utility.h
3 ** Copyright 2008, The Android Open Source Project
5 ** Licensed under the Apache License, Version 2.0 (the "License");
6 ** you may not use this file except in compliance with the License.
7 ** You may obtain a copy of the License at
9 ** http://www.apache.org/licenses/LICENSE-2.0
11 ** Unless required by applicable law or agreed to in writing, software
12 ** distributed under the License is distributed on an "AS IS" BASIS,
13 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 ** See the License for the specific language governing permissions and
15 ** limitations under the License.
25 #define PT_ARM_EXIDX 0x70000001 /* .ARM.exidx segment */
28 #define STACK_CONTENT_DEPTH 32
30 typedef struct mapinfo {
39 /* Get a word from pid using ptrace. The result is the return value. */
40 extern int get_remote_word(int pid, void *src);
42 /* Handy routine to read aggregated data from pid using ptrace. The read
43 * values are written to the dest locations directly.
45 extern void get_remote_struct(int pid, void *src, void *dst, size_t size);
47 /* Find the containing map for the pc */
48 const mapinfo *pc_to_mapinfo (mapinfo *mi, unsigned pc, unsigned *rel_pc);
50 /* Map a pc address to the name of the containing ELF file */
51 const char *map_to_name(mapinfo *mi, unsigned pc, const char* def);
53 /* Log information onto the tombstone */
54 extern void _LOG(int tfd, bool in_tombstone_only, const char *fmt, ...);