diff options
Diffstat (limited to 'agent/tcf/services/dwarfframe.h')
-rw-r--r-- | agent/tcf/services/dwarfframe.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/agent/tcf/services/dwarfframe.h b/agent/tcf/services/dwarfframe.h new file mode 100644 index 00000000..c4107f2a --- /dev/null +++ b/agent/tcf/services/dwarfframe.h @@ -0,0 +1,56 @@ +/******************************************************************************* + * Copyright (c) 2007, 2010 Wind River Systems, Inc. and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and Eclipse Distribution License v1.0 which accompany this distribution. + * The Eclipse Public License is available at + * http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * You may elect to redistribute this code under either of these licenses. + * + * Contributors: + * Wind River Systems - initial API and implementation + *******************************************************************************/ + +/* + * This module implements handling of .debug_frame and .eh_frame sections. + * + * Functions in this module use exceptions to report errors, see exceptions.h + */ + +#ifndef D_dwarfframe +#define D_dwarfframe + +#include <config.h> + +#if ENABLE_ELF && ENABLE_DebugContext + +#include <framework/context.h> +#include <services/dwarfcache.h> + +/* + * Lookup stack tracing information in ELF file, in .debug_frame and .eh_frame sections. + * + * Given register values in one frame, stack tracing information allows to calculate + * frame address and register values in the next frame. + * + * When function returns, dwarf_stack_trace_fp contains commands to calculate frame address, + * and dwarf_stack_trace_regs contains commands to calculate register values. + * In case of error reading frame data, the function throws an exception. + * + * 'ip' is link-time instruction address. + */ +extern void get_dwarf_stack_frame_info(Context * ctx, ELF_File * file, ELF_Section * sec, U8_T ip); + +extern U8_T dwarf_stack_trace_addr; +extern U8_T dwarf_stack_trace_size; + +extern StackTracingCommandSequence * dwarf_stack_trace_fp; + +extern int dwarf_stack_trace_regs_cnt; +extern StackTracingCommandSequence ** dwarf_stack_trace_regs; + +#endif /* ENABLE_ELF && ENABLE_DebugContext */ + +#endif /* D_dwarfframe */ |