summaryrefslogtreecommitdiffstats
path: root/runtime/unwind.c
Commit message (Collapse)AuthorAgeFilesLines
* Properly read eh_frame and pass is_ehframe correctly.Mark Wielaard2009-05-201-6/+10
| | | | | | | | | * runtime/unwind.c (adjustStartLoc): Add extra dbug_unwind. (_stp_search_unwind_hdr): Always pass true for is_ehframe. (unwind_frame): Properly pass through is_ehframe to adjustStartLoc(). (unwind): Add extra dbug_unwind. * translate.cxx (dump_unwindsyms): Output and use correct eh_frame and eh_len.
* Use debug_frame table, then fallback to eh_frame when necessary.Mark Wielaard2009-05-201-24/+39
| | | | | | | * runtime/unwind.c (unwind): Call new unwind_frame() first with debug_frame data, then if that wasn't able to unwind again with eh_frame data. (unwind_frame): Adapted version of old unwind() function that takes a table, table length and whether it is an eh_frame table.
* Pass and use ptrType and is_ehframe to unwind adjustStartLoc.Mark Wielaard2009-05-201-53/+66
| | | | | | | * runtime/unwind.c (adjustStartLoc): Add ptrType and is_ehframe as arguments. Use these to adjust location when necessary. (DEBUG_UNWIND): Move block before adjustStartLoc. Pass false for is_ehframe throughout.
* Fetch and store both debug_frame and eh_frame tables.Mark Wielaard2009-05-201-14/+15
| | | | | | | | | | | | | * runtime/sym.h (_stp_module): Remove unwind_data, unwind_data_len and unwind_is_ehframe fields. Add debug_frame, eh_frame, debug_frame_len, eh_frame_len and eh_frame_addr fields. * runtime/unwind.c: Use debug_frame and debug_frame_len instead of unwind_data and unwind_data_len throughout. (cie_for_fde): Take unwind_data and is_ehframe as direct arguments. * runtime/unwind/unwind.h (cie_for_fde): New function declaration. * translate.cxx (get_unwind_data): Fetch and return both debug_frame and eh_frame tables. (dump_unwindsyms): Dump both debug_frame and eh_frame tables.
* Tidy/tighten DEBUG_UNWIND ptrType a bit.Mark Wielaard2009-05-151-14/+13
| | | | | | | * runtime/unwind.c (_stp_enc_hi_name): Include prefix for hi == 0. (_stp_enc_lo_name): Don't include prefix. (_stp_eh_enc_name): Always include hi_name. (unwind): Always include newline in dbug_unwind() calls.
* Pass task from tapset, through stack and unwind functions for lookup.Mark Wielaard2009-04-201-2/+2
| | | | | | | | | | | | | | | | | * runtime/stack-arm.c (__stp_stack_print): Take struct task_struct *. * runtime/stack-ia64.c (__stp_stack_print): Likewise. * runtime/stack-ppc64.c (__stp_stack_print): Likewise. * runtime/stack-s390.c (__stp_stack_print): Likewise. * runtime/stack-i386.c (__stp_stack_print): Likewise. And add check and pass to unwind() and _stp_func_print(). * runtime/stack-x86_64.c: Likewise. * runtime/stack.c *_stp_stack_print): Take and pass on task_struct. (_stp_stack_snprint): Likewise. * runtime/unwind.c (unwind): Take and use task_struct for _stp_mod_sec_lookup(). * tapset/context-unwind.stp (print_backtrace): Pass NULL to _stp_stack_print(). (backtrace): Pass NULL to _stp_stack_snprint().
* Handle .absolute and .dynamic (user space) addresses in adjustStartLoc.Mark Wielaard2009-04-191-6/+12
| | | | | * runtime/unwind.c (adjustStartLoc): .absolute sections don't need adjustment, .dynamic sections need the section addr to be added.
* Privatize MAX_STACK_DEPTHJosh Stone2009-04-161-1/+1
| | | | | | The kernel-tip tree also has a MAX_STACK_DEPTH defined in perf_counter.h, so we need to separate our definition. I've changed the definition in our unwinder to STP_MAX_STACK_DEPTH.
* Fix unwind _stp_mod_sec_lookup.Mark Wielaard2009-04-101-1/+1
| | | | * runtime/unwind.c (unwind): Pass current to _stp_mod_sec_lookup().
* Removed unused functions and variables.David Smith2009-02-181-124/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2009-02-18 David Smith <dsmith@redhat.com> * io.c (_stp_log): Removed unused function. * map.c (_stp_cmp): Replace _stp_log() with dbug(). * mempool.c (_stp_mempool_resize): Removed unused function. * print.c (next_fmt): Removed unused function. * procfs.c: Removed unused variable '_stp_num_procfs_files'. * regs.c (_stp_ret_addr): Removed unused function. * string.c (_stp_text_str): Removed unused variable 'len'. * string.h: Removed unused variable '_stdout_' and function declaration for deleted function '_stp_vsprintf'. * sym.c: Removed unused variables. * unwind.c (_stp_create_unwind_hdr): Removed unused function. 2009-02-18 David Smith <dsmith@redhat.com> * control.c: Removed unused variable '_stp_current_buffers'. * procfs.c (_stp_set_buffers): Removed unused function. (_stp_register_ctl_channel_fs): Removed unused variables and label. * symbols.c (u32_swap): Removed unused function. (generic_swap): Ditto. (_stp_sort): Ditto. (_stp_section_is_interesting): Ditto. * transport.c (_stp_transport_init): Removed unused variable 'ret'.
* Use 'static' as much as possibleJosh Stone2009-01-281-2/+2
| | | | | | | | | | This change just inserts 'static' on runtime, tapset, and generated C functions and globals, so the compiler can do a better job of optimizing. My tests with small scripts show ~10% reduction in compile time and ~20% reduction in module size. Larger scripts may show less benefit, but I expect purely positive results.
* Rename _stp_module module_base output to dwarf_module_base and document.Mark Wielaard2008-09-101-2/+4
|
* Record module base and use it for adjusting start locations in dwarf unwinder.Mark Wielaard2008-09-101-3/+24
|
* Feed dwarf unwinder data through _stp_mod_sec_lookup (), but disabled for now.Mark Wielaard2008-09-101-1/+2
|
* emit all symbol tables at compile time; don't do any module munging; new ↵Frank Ch. Eigler2008-07-041-14/+3
| | | | unwinder still disabled
* PR6410: unwinder-less architecture toleranceFrank Ch. Eigler2008-04-151-0/+5
|
* dded _stp_read_address() and changed code to use it.Martin Hunt2008-03-281-13/+4
|
* kretprobe trampoline fixesMartin Hunt2008-03-281-12/+74
| | | | | Recognize when a kretprobe trampoline was hit and continue with inexact stack dump. Also some testsuite changes.
* i386 fixes.Martin Hunt2008-03-261-1/+1
|
* Cleanup.Martin Hunt2008-03-251-48/+59
|
* rebased unwind_branch on top of current masterFrank Ch. Eigler2008-03-251-0/+895