Stackdb
Stackdb is a stackable, multi-target and -level source debugger and memory forensics library.
|
#include "config.h"
#include <errno.h>
#include <assert.h>
#include <glib.h>
#include <dlfcn.h>
#include <signal.h>
#include "glib_wrapper.h"
#include "arch.h"
#include "regcache.h"
#include "rfilter.h"
#include "binfile.h"
#include "dwdebug.h"
#include "dwdebug_priv.h"
#include "target_api.h"
#include "target.h"
#include "probe.h"
#include "target_linux_userproc.h"
#include "target_os_process.h"
#include "target_php.h"
#include "target_gdb.h"
Go to the source code of this file.
Data Structures | |
struct | target_gkv_info |
struct | target_thread_gkv_info |
struct | code_cache_entry |
Macros | |
#define | TARGET_ARGP_BASE 0x333331 |
#define | TARGET_ARGP_OVERLAY 0x333332 |
#define | TARGET_ARGP_PERSONALITY 0x333333 |
#define | TARGET_ARGP_PERSONALITY_LIB 0x333334 |
#define | TARGET_ARGP_START_PAUSED 0x333335 |
#define | __XEN_ARGP_TYPE |
#define | TARGET_ARGP_CORE_OPTS |
#define | CODE_CACHE_BUF_PAD 5 |
#define | TARGET_UNW_CONSECUTIVE_IPADDR_LIMIT 8 |
#define | __SWC 64 |
#define | TARGET_REGCACHE_ALLOC(tctxt, errretval) |
#define | TARGET_REGCACHE_ALLOC_NT(tctxt, errretval) |
#define | TARGET_REGCACHE_GET(tctxt, errretval) |
Variables | |
struct argp_option | target_argp_opts [] |
struct argp_option | target_argp_opts_only_one [] |
struct argp | linux_userproc_argp |
char * | linux_userproc_argp_header |
char * | TSTATUS_STRINGS [] |
char * | THREAD_STATUS_STRINGS [] |
char * | POLL_STRINGS [] |
char * | REGION_TYPE_STRINGS [] |
#define __SWC 64 |
#define TARGET_ARGP_CORE_OPTS |
#define TARGET_REGCACHE_ALLOC | ( | tctxt, | |
errretval | |||
) |
Register helpers, for the cases where the target is using our regcache support.
#define TARGET_REGCACHE_ALLOC_NT | ( | tctxt, | |
errretval | |||
) |
#define TARGET_REGCACHE_GET | ( | tctxt, | |
errretval | |||
) |
unsigned char* __target_load_addr_real | ( | struct target * | target, |
struct memrange * | range, | ||
ADDR | addr, | ||
load_flags_t | flags, | ||
unsigned char * | buf, | ||
int | bufsiz | ||
) |
void os_linux_generic_decoder_lib_register | ( | void | ) |
Definition at line 593 of file target_os_linux_generic_decoders.c.
void os_linux_generic_register | ( | void | ) |
Globals.
Definition at line 9476 of file target_os_linux_generic.c.
ADDR target_addressof_symbol | ( | struct target * | target, |
struct target_location_ctxt * | tlctxt, | ||
struct bsymbol * | bsymbol, | ||
load_flags_t | flags, | ||
struct memrange ** | range_saveptr | ||
) |
Load functions. Everything that gets loaded is loaded as a value struct.
Each load function can handle a bsymbol that contains a nested symbol chain. Members may nest in either 1) functions, or 2) struct/unions. Obviously, once you are in a struct/union, the only members of those can be variables. Thus, all functions must come first in the chain. So, here are some examples of nested symbols that can be followed by these functions: function.subfunc.param1, function.local, function.localstructinst.x, structinst.x.y.z, structinst->x.y.z, structinst->x->y->z Now, since we support automatic pointer dereferencing, you don't have to worry about actually using -> or .; you just use . . If the final symbol is itself a pointer to something, if the AUTO_DEREF or AUTO_STRING load flags are set, the pointer will be dereferenced as much as possible before loading. Otherwise, it won't be. The AUTO_DEREF flags do not affect the behavior of intermediate pointer symbols in the chain; those are always autoloaded if possible. If you don't like this intermediate pointer autoloading behavior, don't use it!
int target_argp_driver_parse | ( | struct argp * | driver_parser, |
void * | driver_state, | ||
int | argc, | ||
char ** | argv, | ||
target_type_t | target_types, | ||
int | filter_quoted, | ||
struct target_spec ** | primary_target_spec, | ||
GList ** | base_target_specs, | ||
GList ** | overlay_target_specs | ||
) |
Parses possibly multiple target specification objects by parsing command line arguments provided in the standard argc, argv pair. The caller should be a StackDB program who wants to build a target_spec object containing the details about one or more targets (and perhaps one or more stacks of overlay targets built atop them) to instantiate. This program may also require its own arguments, which it can retrieve and parse after any StackDB-relevant arguments have been extracted (see the User Guide section on standard StackDB arguments).
driver_parser | A fully-specified GNU argp parser struct (see http://www.gnu.org/software/libc/manual/html_node/Argp.html). May be NULL, if your program doesn't require any arguments. | |
driver_state | A pointer to an object that will be passed to your driver_parser when driver_parser->parser is invoked. May always be NULL; it's up to you. | |
argc | A count of the arguments in argv; usually is main()'s first argument. | |
argv | An argument vector; usually is main()'s second argument. | |
target_types | A mask of allowed target types (drivers) that your program can be applied to. | |
filter_quoted | If set non-zero, the StackDB argp wrapper will catch any arguments after the "--" characters on the command line, and save them to be processed. The Ptrace driver will process any arguments after "--" and use them to launch a program that StackDB will attach to). | |
[out] | primary_target_spec | The primary target_spec. This should be a pointer to a target_spec * that is set to NULL; this function will allocate a target_spec * according to the argv parameter. |
[out] | base_target_specs | A GList * of base target_specs. This should be a pointer to a GList * that is set to NULL. This function will allocate a GList * of target_spec * structs based on any –base '...' argv members. The primary target_spec object is not in this list! |
[out] | overlay_target_specs | A GList * of overlay target_specs. This should be a pointer to a GList * that is set to NULL. This function will allocate a GList * of target_spec * structs based on any –overlay '...' argv members. |
struct target_spec* target_argp_driver_parse_one | ( | struct argp * | driver_parser, |
void * | driver_state, | ||
int | argc, | ||
char ** | argv, | ||
target_type_t | target_types, | ||
int | filter_quoted | ||
) |
Returns a single target specification object by parsing command line arguments provided in the standard argc, argv pair. The caller should be a StackDB program who wants to build a target_spec object containing the details about a target (and perhaps its overlay targets) to instantiate. This program may also require its own arguments, which it can retrieve and parse after any StackDB-relevant arguments have been extracted (see the User Guide section on standard StackDB arguments).
driver_parser | A fully-specified GNU argp parser struct (see http://www.gnu.org/software/libc/manual/html_node/Argp.html). May be NULL, if your program doesn't require any arguments. |
driver_state | A pointer to an object that will be passed to your driver_parser when driver_parser->parser is invoked. May always be NULL; it's up to you. |
argc | A count of the arguments in argv; usually is main()'s first argument. |
argv | An argument vector; usually is main()'s second argument. |
target_types | A mask of allowed target types (drivers) that your program can be applied to. |
filter_quoted | If set non-zero, the StackDB argp wrapper will catch any arguments after the "--" characters on the command line, and save them to be processed. The Ptrace driver will process any arguments after "--" and use them to launch a program that StackDB will attach to). |
void* target_argp_driver_state | ( | struct argp_state * | state | ) |
error_t target_argp_parse_opt | ( | int | key, |
char * | arg, | ||
struct argp_state * | state | ||
) |
Target argp parsing stuff. This loosely wraps argp. The idea is that target library users want to write target-backend-independent programs that use the library. So this function helps them automatically instantiate a target from standard options.
The reason we can't use exactly the argp style is because 1) child parsers cannot see arguments (and the Ptrace parser will eat quoted arguments (i.e., those following '–') if possible, so we want to make this work); 2) and because the top-level target argp parser will optionally only include the target backend argp children according to user choice (i.e., a program might only support ptrace, not xen) – and we have to keep track of that state.
For these reasons, it ends up making more sense to use the driver program's argp parser as the top-level parser, and glue on our target argp child parsers – but then to pass all parsers a struct target_driver_argp_parser_state as the input. Clients can retrieve their state via target_driver_argp_state().
struct target_spec* target_argp_target_spec | ( | struct argp_state * | state | ) |
int target_attach_probe | ( | struct target * | target, |
struct target_thread * | thread, | ||
struct probe * | probe | ||
) |
int target_bsymbol_resolve_base | ( | struct target * | target, |
struct target_location_ctxt * | tlctxt, | ||
struct bsymbol * | bsymbol, | ||
ADDR * | o_addr, | ||
struct memrange ** | o_range | ||
) |
struct target* target_create | ( | char * | type, |
struct target_spec * | spec | ||
) |
struct target_thread* target_create_thread | ( | struct target * | target, |
tid_t | tid, | ||
void * | tstate, | ||
void * | tpstate | ||
) |
int target_decoder_binding_add | ( | struct target_decoder_binding * | tdb, |
struct bsymbol * | bsymbol, | ||
target_decoder_t | dfn | ||
) |
struct target_decoder_binding* target_decoder_binding_create | ( | struct target_decoder_lib * | lib, |
struct target * | target | ||
) |
void target_decoder_binding_free | ( | struct target_decoder_binding * | tdb | ) |
int target_decoder_lib_bind | ( | struct target * | target, |
char * | decoder_lib, | ||
char * | decoder_lib_lib | ||
) |
int target_decoder_lib_load | ( | char * | filename | ) |
int target_decoder_lib_register | ( | struct target_decoder_lib * | lib | ) |
int target_decoder_lookup | ( | struct target * | target, |
struct value * | value, | ||
target_decoder_t * | decoder, | ||
void ** | decoder_data | ||
) |
void target_default_cleanup | ( | void | ) |
A function that pauses, closes, and finalizes all targets the target library knows of. If any of the target objects was handling an exception, it schedules an interrupt for that target — and the user (the caller of target_monitor() or target_monitor_evloop() must call target_default_cleanup() if the returned target status is TSTATUS_INTERRUPTED. The user must also identify if the signal was a fatal signal, or a simple interruption; this is up to the user.
void target_default_sighandler | ( | int | signo, |
siginfo_t * | siginfo, | ||
void * | x | ||
) |
The default signal handler for the target library. Saves off the signal information into a global variable (accessible via target_monitor_was_interrupted()); calls the user sighandler if specified; pauses all target objects if the signal was supposed to result in an interrupt of the target_monitor_evloop() function (and pauses them safely by employing target_monitor_schedule_interrupt() on any target that is currently handling an exception); OR calls the target_default_cleanup() function if the signal is fatal.
void target_detach_thread | ( | struct target * | target, |
struct target_thread * | tthread | ||
) |
void target_driver_argp_init_children | ( | struct argp_state * | state | ) |
int target_finalize | ( | struct target * | target | ) |
Finalizes a target. This means the library drops its internal reference to the target — and thus, the user did not call target_hold() after target_open(), this will also have the effect of freeing the target struct – because the target library will remove the target struct from its internal structs, and drop a ref. Unless some other caller had held a ref to it for some other reason, this will deallocate it. Thus – if you want to hold onto the struct for subsequent calls, hold onto it first!
NB: the library will never drop its ref to the target struct object unless the user calls target_finalize() – or target_fini(). It may detach (on your behalf) from an exiting target, but that does not perform the work of target_finalize() by itself – you still get to do that so you can handle the exiting/exited target.
void target_fini | ( | void | ) |
This function should be called by the StackDB user when the user is done using StackDB, or when their program is about to exit. It cleans up global StackDB state. One way to do this is to to schedule it to be called via atexit(3) — although note that will not work in the case where the program is terminated by signal delivery.
target_fini() can safely be called at any point in your program, except from within a probe or action handler! It will result in any active, open target objects being closed and freed. After calling this function, you cannot use any other StackDB library target_* functions until you call target_init() again.
struct target_ops* target_get_ops | ( | target_type_t | target_type | ) |
target_status_t target_get_status | ( | struct target * | target | ) |
int target_gkv_insert | ( | struct target * | target, |
char * | key, | ||
void * | value, | ||
target_gkv_dtor_t | dtor | ||
) |
void* target_gkv_lookup | ( | struct target * | target, |
char * | key | ||
) |
void target_gkv_remove | ( | struct target * | target, |
char * | key | ||
) |
void* target_gkv_steal | ( | struct target * | target, |
char * | key | ||
) |
struct target_location_ctxt* target_global_tlctxt | ( | struct target * | target | ) |
Target location contexts (unwinding, symbol loading/address resolution).
We use a target_location_ctxt struct that wraps location_ctxt in dwdebug. Thus, you can lookup/load symbols in the current thread, or in an unwind context. You must supply a context, however – loading symbols is meaningless if you don't have a thread context and a memory context binding the symbol to an execution context.
A context keeps a notion of current frame, which it shares with its underlying location_ctxt (i.e., with the dwdebug library). This enables these two libraries to unwind cooperatively (dwdebug handles location resolution/computation and saved register resolution/computation; target caches restored registers and keeps a stack of frames and their metadata).
void target_init | ( | void | ) |
This file describes the publicly-accessible target API. The target library is really a library of debug routines that supports multiple backends. It is built atop the dwdebug library, which is a library for parsing DWARF debug information. It provides two backends: a Linux ptrace userspace backend, and a Xen virtual machine (assumes a Linux guest) backend. Both backends are x86-only at the moment. The linux ptrace backend supports 32/64-bit targets, but not 32-bit emulated atop 64-bit host. The Xen VM/Linux guest backend supports 32-bit Xen/guest; it has partial, nonfunctional support for 64-bit-ness. Right now, the backend code does not separate the logic for dealing with a target in an architecture-independent way – the arch stuff is jammed in with the target code. This should not be this way; eventually, hopefully, it will change into a target backend that supports different arch/machine ops. Also, there are probably some x86-isms that have leaked into the "generic" target and probe code :(.
The target library supports two modes of dealing with threads inside a target. Some targets provide control over executing threads (i.e., can the library pause random threads at will, or not); the Linux ptrace target of course supports this; the Xen VM target does not (it could mostly support "pausing" all non-current threads in a single CPU guest, BUT even this requires that the debug lib handle NMIs, asynch interrupts, and some synchronous exceptions – overloading the kernel's IDT – but right now we don't do this).
Targets that do not provide control over thread scheduling must still provide thread identification. This is important for shared (i.e., memory-based) breakpoints, which any thread could hit at any time – not just the thread the user is interested in. Our handling of such breakpoints must be context-aware, so that we maintain handling information on a per-thread basis.
So the library supports two kinds of targets: ones that provide thread control (ptrace), and ones that provide thread awareness (Xen).
The intent is that the target library provides a library above the dwdebug library, so you should never (or rarely) have to call into dwdebug to deal with symbol information. The reason for this attempted restriction is as follows. First, an in-memory representation of DWARF debug data that facilitates fast lookups is big. So, we want to share it between targets (or between all target library users) as much as possible (possible when targets use the same debuginfo, or a subset thereof). Second, memory locations are, naturally, virtual addresses in debuginfo. For the statically-linked core of an executable, there is no difference between virtual/physical; the core is mmap'd at the static addresses. But shared objects/libs may be mmap'd anywhere in the address space, so we have to translate. Rather than smacking the details of physical translation into the debuginfo data structures, for each target instance, we build this translation into the target library. This is perhaps annoying, but facilitates better sharing.
The target library is described via the API functions listed below. To build a new target backend, you must implement the target_ops operations; see the documentation for struct target_ops
below.
For information on how to probe a target, see probe_api.h . This function must be called by StackDB user before using any library functions.
int target_insert_probepoint | ( | struct target * | target, |
struct target_thread * | tthread, | ||
struct probepoint * | probepoint | ||
) |
int target_install_custom_sighandlers | ( | sigset_t * | ignored, |
sigset_t * | interrupt, | ||
sigset_t * | exit, | ||
void(*)(int signo, siginfo_t *siginfo, void *x) | sighandler | ||
) |
Install the library's default signal handler, but customize which signals it is set for!
ignored | A pointer to a sigset_t (see man 3 sigset) of signals to be ignored. |
interrupt | A pointer to a sigset_t of signals to cause target_monitor or target_monitor_evloop to be interrupted so that you can handle a signal synchronously with respect to target exception handling (i.e., safely!). |
exit | A pointer to a sigset_t of signals that will cause your program to be exit. Remember, if one of your targets is being handled when the handler is invoked, the library cannot free that target — and you must call target_default_cleanup() again yourself to finish the cleanup! |
sighandler | A signal handler function in your program (see man sigaction) that will be called by the target library's default signal handler. This function is called immediately after the handler saves off the siginfo into a global variable for later retrieval by your program, to give you notice that the target library is about to handle a signal for you. Usually, the only thing that your handler should do is clean up any state that the default handler is unaware of (i.e., remove any probes you placed on targets). Note that when your handler is called, the default handler has not yet paused all targets — so if you are going to modify any targets, you must pause them first. |
int target_install_default_sighandlers | ( | void(*)(int signo, siginfo_t *siginfo, void *x) | sighandler | ) |
Install some default signal handlers for the target library. It is very important to handle signals that would be fatal, because you must remove any probes placed on any targets — otherwise those programs will very likely crash when they hit the probes — because nothing is attached to them any longer.
This function installs the target_default_sighandler() on the following signals: SIGHUP, SIGINT, SIGQUIT, SIGILL, SIGABRT, SIGFPE, SIGSEGV, SIGPIPE, SIGTERM, SIGBUS, SIGXCPU, and SIGXFSZ. It sets up SIGUSR1, SIGUSR2, and SIGALRM to be ignored. If you want to change those signal sets, see target_install_custom_sighandlers().
sighandler | A signal handler function in your program (see man sigaction) that will be called by the target library's default signal handler. This function is called immediately after the handler saves off the siginfo into a global variable for later retrieval by your program, to give you notice that the target library is about to handle a signal for you. Usually, the only thing that your handler should do is clean up any state that the default handler is unaware of (i.e., remove any probes you placed on targets). Note that when your handler is called, the default handler has not yet paused all targets — so if you are going to modify any targets, you must pause them first. |
int target_invalidate_all_threads | ( | struct target * | target | ) |
int target_invalidate_thread | ( | struct target * | target, |
struct target_thread * | tthread | ||
) |
struct value* target_load_addr_obj | ( | struct target * | target, |
struct memregion * | region, | ||
ADDR | obj_addr, | ||
load_flags_t | flags, | ||
int | len | ||
) |
struct value* target_load_addr_real | ( | struct target * | target, |
ADDR | addr, | ||
load_flags_t | flags, | ||
int | len | ||
) |
unsigned char* target_load_raw_addr_real | ( | struct target * | target, |
ADDR | addr, | ||
load_flags_t | flags, | ||
unsigned char * | buf, | ||
int | bufsiz | ||
) |
struct value* target_load_symbol | ( | struct target * | target, |
struct target_location_ctxt * | tlctxt, | ||
struct bsymbol * | bsymbol, | ||
load_flags_t | flags | ||
) |
struct value* target_load_symbol_member | ( | struct target * | target, |
struct target_location_ctxt * | tlctxt, | ||
struct bsymbol * | bsymbol, | ||
const char * | member, | ||
const char * | delim, | ||
load_flags_t | flags | ||
) |
struct value* target_load_type | ( | struct target * | target, |
struct symbol * | type, | ||
ADDR | addr, | ||
load_flags_t | flags | ||
) |
struct value* target_load_value_member | ( | struct target * | target, |
struct target_location_ctxt * | tlctxt, | ||
struct value * | old_value, | ||
const char * | member, | ||
const char * | delim, | ||
load_flags_t | flags | ||
) |
struct target_location_ctxt* target_location_ctxt_create | ( | struct target * | target, |
tid_t | tid, | ||
struct memregion * | region | ||
) |
struct target_location_ctxt* target_location_ctxt_create_from_bsymbol | ( | struct target * | target, |
tid_t | tid, | ||
struct bsymbol * | bsymbol | ||
) |
struct target_location_ctxt_frame* target_location_ctxt_current_frame | ( | struct target_location_ctxt * | tlctxt | ) |
void target_location_ctxt_free | ( | struct target_location_ctxt * | tlctxt | ) |
struct target_location_ctxt_frame* target_location_ctxt_get_frame | ( | struct target_location_ctxt * | tlctxt, |
int | frame | ||
) |
struct target_location_ctxt_frame* target_location_ctxt_prev | ( | struct target_location_ctxt * | tlctxt | ) |
int target_location_ctxt_read_reg | ( | struct target_location_ctxt * | tlctxt, |
REG | reg, | ||
REGVAL * | o_regval | ||
) |
void target_location_ctxt_retarget_bsymbol | ( | struct target_location_ctxt * | tlctxt, |
struct bsymbol * | bsymbol | ||
) |
int target_location_ctxt_unwind | ( | struct target_location_ctxt * | tlctxt | ) |
struct probepoint* target_lookup_probepoint | ( | struct target * | target, |
struct target_thread * | tthread, | ||
ADDR | addr | ||
) |
int target_lookup_safe_disasm_range | ( | struct target * | target, |
ADDR | addr, | ||
ADDR * | start, | ||
ADDR * | end, | ||
void ** | data | ||
) |
Functions to deal with "widest range" lookup, text code loading and caching, and safe disassembly. We want to be sure we always start disassembly at a safe place in the text bytes we load – not wherever the library use requests (which might be in some weird place). Plus, we want to cache well-defined chunks of code to avoid fragmentation in the cache.
struct bsymbol* target_lookup_sym | ( | struct target * | target, |
const char * | name, | ||
const char * | delim, | ||
char * | srcfile, | ||
symbol_type_flag_t | ftype | ||
) |
struct target_thread* target_lookup_thread | ( | struct target * | target, |
tid_t | tid | ||
) |
loctype_t target_lsymbol_resolve_location | ( | struct target * | target, |
struct target_location_ctxt * | tlctxt, | ||
struct lsymbol * | lsymbol, | ||
ADDR | base_addr, | ||
load_flags_t | flags, | ||
struct location * | o_loc, | ||
struct symbol ** | o_datatype, | ||
struct memrange ** | o_range | ||
) |
struct target_memmod* target_memmod_create | ( | struct target * | target, |
tid_t | tid, | ||
ADDR | addr, | ||
int | is_phys, | ||
target_memmod_type_t | mmt, | ||
unsigned char * | code, | ||
unsigned int | code_len, | ||
int | nowrite | ||
) |
int target_memmod_free | ( | struct target * | target, |
tid_t | tid, | ||
struct target_memmod * | mmod, | ||
int | force | ||
) |
unsigned long target_memmod_length | ( | struct target * | target, |
struct target_memmod * | mmod | ||
) |
struct target_memmod* target_memmod_lookup | ( | struct target * | target, |
tid_t | tid, | ||
ADDR | addr, | ||
int | is_phys | ||
) |
int target_memmod_release | ( | struct target * | target, |
tid_t | tid, | ||
struct target_memmod * | mmod | ||
) |
int target_memmod_set | ( | struct target * | target, |
tid_t | tid, | ||
struct target_memmod * | mmod | ||
) |
int target_memmod_set_tmp | ( | struct target * | target, |
tid_t | tid, | ||
struct target_memmod * | mmod, | ||
unsigned char * | code, | ||
unsigned long | code_len | ||
) |
int target_memmod_set_writeable | ( | struct target * | target, |
struct target_memmod * | mmod, | ||
int | writeable | ||
) |
int target_memmod_unset | ( | struct target * | target, |
tid_t | tid, | ||
struct target_memmod * | mmod | ||
) |
void target_monitor_clear_global_interrupt | ( | void | ) |
int target_monitor_handling_exception | ( | struct target * | target | ) |
This function is useful only when using target_monitor() and employing your own custom signal handling. It may be useful to call it from your signal handler to see if the target you are monitoring is handling an exception. If it is handling an exception, it is unsafe to call any target_*() operations on it — for instance, you cannot attempt to remove a probe. In this case, the best thing to do is call target_monitor_schedule_interrupt(target), and wait for target_monitor() to return with a status of TSTATUS_INTERRUPTED. So, part of your signal handler might look like this:
if (target_monitor_handling_exception(t)) { needtodosomething = 1; target_monitor_schedule_interrupt(t); } else { target_pause(t); cleanup(); }
void target_monitor_schedule_global_interrupt | ( | void | ) |
int target_monitor_schedule_interrupt | ( | struct target * | target | ) |
Schedules an an interrupt to happen after target_monitor() finishes handling the current exception, if any. See target_monitor_handling_exception().
int target_monitor_was_interrupted | ( | siginfo_t * | last_siginfo | ) |
target_status_t target_notify_overlay | ( | struct target * | overlay, |
target_exception_flags_t | flags, | ||
tid_t | tid, | ||
ADDR | ipval, | ||
int * | again | ||
) |
int target_personality_attach | ( | struct target * | target, |
char * | personality, | ||
char * | personality_lib | ||
) |
int target_personality_load | ( | char * | filename | ) |
int target_personality_register | ( | char * | personality, |
target_personality_t | pt, | ||
struct target_personality_ops * | ptops, | ||
void * | pops | ||
) |
int target_regcache_copy_all | ( | struct target_thread * | sthread, |
thread_ctxt_t | stidctxt, | ||
struct target_thread * | dthread, | ||
thread_ctxt_t | dtidctxt | ||
) |
int target_regcache_copy_all_zero | ( | struct target_thread * | sthread, |
thread_ctxt_t | stidctxt, | ||
struct target_thread * | dthread, | ||
thread_ctxt_t | dtidctxt | ||
) |
int target_regcache_copy_dirty_to | ( | struct target_thread * | sthread, |
thread_ctxt_t | stidctxt, | ||
struct regcache * | dregcache | ||
) |
int target_regcache_copy_from | ( | struct target_thread * | dthread, |
thread_ctxt_t | dtidctxt, | ||
struct regcache * | sregcache | ||
) |
GHashTable* target_regcache_copy_registers_tidctxt | ( | struct target * | target, |
tid_t | tid, | ||
thread_ctxt_t | tidctxt | ||
) |
int target_regcache_foreach_dirty | ( | struct target * | target, |
struct target_thread * | tthread, | ||
thread_ctxt_t | tctxt, | ||
target_regcache_regval_handler_t | regh, | ||
target_regcache_rawval_handler_t | rawh, | ||
void * | priv | ||
) |
struct regcache* target_regcache_get | ( | struct target * | target, |
struct target_thread * | tthread, | ||
thread_ctxt_t | tctxt | ||
) |
int target_regcache_init_done | ( | struct target * | target, |
tid_t | tid, | ||
thread_ctxt_t | tctxt | ||
) |
int target_regcache_init_reg_tidctxt | ( | struct target * | target, |
struct target_thread * | tthread, | ||
thread_ctxt_t | tctxt, | ||
REG | reg, | ||
REGVAL | regval | ||
) |
int target_regcache_invalidate | ( | struct target * | target, |
struct target_thread * | tthread, | ||
thread_ctxt_t | tctxt | ||
) |
int target_regcache_isdirty | ( | struct target * | target, |
struct target_thread * | tthread, | ||
thread_ctxt_t | tctxt | ||
) |
int target_regcache_isdirty_reg | ( | struct target * | target, |
struct target_thread * | tthread, | ||
thread_ctxt_t | tctxt, | ||
REG | reg | ||
) |
int target_regcache_isdirty_reg_range | ( | struct target * | target, |
struct target_thread * | tthread, | ||
thread_ctxt_t | tctxt, | ||
REG | start, | ||
REG | end | ||
) |
int target_regcache_mark_flushed | ( | struct target * | target, |
struct target_thread * | tthread, | ||
thread_ctxt_t | tctxt | ||
) |
int target_regcache_readreg_ifdirty | ( | struct target * | target, |
struct target_thread * | tthread, | ||
thread_ctxt_t | tctxt, | ||
REG | reg, | ||
REGVAL * | regval | ||
) |
REGVAL target_regcache_readreg_tidctxt | ( | struct target * | target, |
tid_t | tid, | ||
thread_ctxt_t | tidctxt, | ||
REG | reg | ||
) |
int target_regcache_snprintf | ( | struct target * | target, |
struct target_thread * | tthread, | ||
thread_ctxt_t | tctxt, | ||
char * | buf, | ||
int | bufsiz, | ||
int | detail, | ||
char * | sep, | ||
char * | kvsep, | ||
int | flags | ||
) |
int target_regcache_writereg_tidctxt | ( | struct target * | target, |
tid_t | tid, | ||
thread_ctxt_t | tidctxt, | ||
REG | reg, | ||
REGVAL | value | ||
) |
int target_regcache_zero | ( | struct target * | target, |
struct target_thread * | tthread, | ||
thread_ctxt_t | tctxt | ||
) |
int target_remove_probepoint | ( | struct target * | target, |
struct target_thread * | tthread, | ||
struct probepoint * | probepoint | ||
) |
void target_reuse_thread_as_global | ( | struct target * | target, |
struct target_thread * | thread | ||
) |
void target_set_status | ( | struct target * | target, |
target_status_t | status | ||
) |
int target_spec_to_argv | ( | struct target_spec * | spec, |
char * | arg0, | ||
int * | argc, | ||
char *** | argv | ||
) |
int target_thread_filter_check | ( | struct target * | target, |
tid_t | tid, | ||
struct target_nv_filter * | tf | ||
) |
REFCNT target_thread_free | ( | struct target_thread * | tthread, |
int | force | ||
) |
void target_thread_gkv_destroy | ( | struct target * | target, |
struct target_thread * | tthread | ||
) |
int target_thread_gkv_insert | ( | struct target * | target, |
tid_t | tid, | ||
char * | key, | ||
void * | value, | ||
target_thread_gkv_dtor_t | dtor | ||
) |
int target_thread_obj_flags_propagate | ( | struct target_thread * | tthread, |
obj_flags_t | orf, | ||
obj_flags_t | nandf | ||
) |
void target_thread_set_status | ( | struct target_thread * | tthread, |
thread_status_t | status | ||
) |
void target_tid_set_status | ( | struct target * | target, |
tid_t | tid, | ||
thread_status_t | status | ||
) |
struct target_location_ctxt* target_unwind | ( | struct target * | target, |
tid_t | tid | ||
) |
int target_unwind_snprintf | ( | char * | buf, |
int | buflen, | ||
struct target * | target, | ||
tid_t | tid, | ||
target_unwind_style_t | fstyle, | ||
char * | frame_sep, | ||
char * | ksep | ||
) |
struct argp linux_userproc_argp |
Definition at line 485 of file target_linux_userproc.c.
char* linux_userproc_argp_header |
Definition at line 488 of file target_linux_userproc.c.
char* POLL_STRINGS[] |
char* REGION_TYPE_STRINGS[] |
struct argp_option target_argp_opts[] |
struct argp_option target_argp_opts_only_one[] |
char* THREAD_STATUS_STRINGS[] |