summaryrefslogtreecommitdiffstats
path: root/libdwfl/argp-std.c
Commit message (Collapse)AuthorAgeFilesLines
* libdwfl: Add dwfl_core_file_attach and dwfl_linux_proc_attach.Mark Wielaard2013-12-311-0/+10
| | | | | | | | | | | | | | Rewrite __libdwfl_attach_state_for_pid and __libdwfl_attach_state_for_core as public functions and don't call them from dwfl_linux_proc_report and dwfl_core_file_report anymore. This lets the user attach state explicitly independ from how the dwfl modules have been reported. Since attaching state is an explicit action now the error can be returned directly and we don't need to keep track of process_attach_error. dwfl_linux_proc_attach lets the user can tell libdwfl whether caller takes care of ptrace attaching and stopping the threads under inspection, or whether the callback needs to take care of that and detaching again. Signed-off-by: Mark Wielaard <[email protected]>
* Use executable_for_core in dwfl_build_id_find_elf.Jan Kratochvil2013-12-181-27/+1
| | | | Signed-off-by: Jan Kratochvil <[email protected]>
* Fix executable_for_core for non-dwfl_standard_argpJan Kratochvil2013-10-301-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | ./ 2013-10-30 Jan Kratochvil <[email protected]> * NEWS (Version 0.158): New. libdw/ 2013-10-30 Jan Kratochvil <[email protected]> * libdw.map (ELFUTILS_0.158): New. libdwfl/ 2013-10-30 Jan Kratochvil <[email protected]> * argp-std.c (parse_opt): Use executable parameter of dwfl_core_file_report. * core-file.c (dwfl_core_file_report): Add parameter executable. Set it to DWFL. Add NEW_VERSION for it. (_compat_without_executable_dwfl_core_file_report): New. Twice. * libdwfl.h (dwfl_core_file_report): Add parameter executable, update the function comment. Signed-off-by: Jan Kratochvil <[email protected]>
* Use DT_DEBUG library search first.Jan Kratochvil2013-05-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libdwfl/ 2013-05-30 Jan Kratochvil <[email protected]> * argp-std.c (parse_opt) <ARGP_KEY_SUCCESS> <opt->core> <opt->e>: Set executable_for_core before calling dwfl_core_file_report. * core-file.c (clear_r_debug_info): New function. (dwfl_core_file_report): Move raw segments reporting lower. New variable r_debug_info, pass it to dwfl_segment_report_module. Call clear_r_debug_info in the end. Return sum of LISTED and SNIFFED. * dwfl_module_build_id.c (check_notes): Move into __libdwfl_find_elf_build_id. (__libdwfl_find_build_id): Rename to ... (__libdwfl_find_elf_build_id): ... here. Add parameters build_id_bits, build_id_elfaddr and build_id_len. Verify MOD vs. ELF. (__libdwfl_find_elf_build_id) (check_notes): Remove parameters mod and set, rename data_vaddr to data_elfaddr. Do not call found_build_id. (__libdwfl_find_elf_build_id): Update the check_notes caller, do not adjust its data_elfaddr parameter. (__libdwfl_find_build_id): New wrapper of __libdwfl_find_elf_build_id. * dwfl_segment_report_module.c (dwfl_segment_report_module): New parameter r_debug_info. New variable name_is_final. Adjust addresses according to R_DEBUG_INFO->MODULE. Check conflicts against DWFL. Do not overwrite NAME by SONAME if NAME_IS_FINAL. * libdwflP.h (__libdwfl_find_elf_build_id): New declaration. (struct r_debug_info_module, struct r_debug_info): New definitions. (dwfl_segment_report_module, dwfl_link_map_report): Add parameter r_debug_info. * link_map.c: Include fcntl.h. (report_r_debug): Add parameter r_debug_info, describe it in the function comment. Delete dwfl_addrmodule call and its dependent code. Verify build-id before calling dwfl_report_elf, also supply executable_for_core to it. Store r_debug_info->module info when appropriate. (dwfl_link_map_report): Add parameter r_debug_info. New variable in_ok. Try to read IN from EXECUTABLE_FOR_CORE. Update report_r_debug caller parameters. tests/ 2013-05-30 Jan Kratochvil <[email protected]> * Makefile.am (EXTRA_DIST): Add test-core-lib.so.bz2, test-core.core.bz2 and test-core.exec.bz2. * run-addrname-test.sh: New test for these files. * run-unstrip-n.sh: Update expected output. New test for these files. * test-core-lib.so.bz2: New file. * test-core.core.bz2: New file. * test-core.exec.bz2: New file. Signed-off-by: Jan Kratochvil <[email protected]>
* libdwfl: Use actual file names in parse_opt failure cases.Mark Wielaard2013-02-101-3/+7
| | | | | | | | | When handling ARGP_KEY_SUCCESS the failure handling code would use 'arg' as failure string. But 'arg' would be NULL in such cases leading to failure messages like: "cannot open '(null)': No such file or directory". Use opt->e and opt->core explicitly to show file names that caused failure. Signed-off-by: Mark Wielaard <[email protected]>
* libdwfl/Jan Kratochvil2012-11-291-104/+185
| | | | | | | | | | | | | | | | | | | | | | | | | * argp-std.c: Update Copyright year. (offline_find_elf): New function. (offline_callbacks): Use it for find_elf. (struct parse_opt): New. (parse_opt): New key ARGP_KEY_INIT. In other make hook struct parse_opt pointer from former Dwfl pointer. Delay 'e and OPT_COREFILE processing till ARGP_KEY_SUCCESS. Initialize state->input already from ARGP_KEY_SUCCESS. Modify the cleanup in ARGP_KEY_ERROR. Make the final state->input initialization optional. * dwfl_end.c: Update Copyright year. (dwfl_end): Free executable_for_core. * libdwflP.h: Update Copyright year. (struct Dwfl): New field executable_for_core. tests/ * run-addrname-test.sh: New test for PIE relocation. * testfile70.core.bz2: New file. * testfile70.exec.bz2: New file. * Makefile.am (EXTRA_DIST): Add testfile70.core.bz2 and testfile70.exec.bz2 . Signed-off-by: Jan Kratochvil <[email protected]>
* Update name, license and contributor policy.Mark Wielaard2012-06-051-40/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Change name from "Red Hat elfutils" to "elfutils". * Update license of standalone tools and test from GPLv2 to GPLv3+. * Change license of libraries from GPLv2+exception to GPLv2/LGPLv3+. * Add Developer Certificate of Origin based contributor policy. top-level: - COPYING: Upgraded from GPLv2 to GPLv3. - CONTRIBUTING, COPYING-GPLv2, COPYING-LGPLv3: New files. - NEWS: Added note about new contribution and license policy. - Makefile.am: Updated to GPLv3, added new files to EXTRA_DIST. - configure.ac: Update to GPLv3, changed AC_INIT name to 'elfutils'. backends, lib, libasm, libcpu, libdw, libdwfl, libebl, libelf: - All files updated to GPLv2/LGPLv3+. Except some very small files (<5 lines) which didn't have any headers at all before, the linker .maps files and the libcpu/defs files which only contain data and libelf/elf.h which comes from glibc and is under LGPLv2+. config: - elfutils.spec.in: Add new License: headers and new %doc files. - Update all license headers to GPLv2/LGPLv3+ for files used by libs. src, tests: - All files updated to GPLv3+. Except for the test bz2 data files, the linker maps and script files and some very small files (<5 lines) that don't have any headers. Signed-off-by: Richard Fontana <[email protected]> Signed-off-by: Mark Wielaard <[email protected]>
* Export dwfl_core_file_report.Roland McGrath2010-03-111-4/+2
|
* libdwfl automagic decompression supportRoland McGrath2009-01-051-6/+6
|
* Fix up bogon and missing log entries from .pmachata.threads branch.Roland McGrath2008-08-251-3/+56
|
* libdwfl/Roland McGrath2008-03-261-3/+3
| | | | | * dwfl_module_getdwarf.c (load_symtab): Don't return success for SHT_DYNSYM, just set *SYMSCN like the comment says.
* 2007-04-24 Roland McGrath <[email protected]>Roland McGrath2007-04-251-3/+9
| | | | | * run-strip-test.sh: When we saved the debug info, test unstrip too.
* propagate from branch 'com.redhat.elfutils.roland.pending' (head ↵Ulrich Drepper2007-02-051-1/+5
| | | | | | c44dcfac5b545aecb173fede31f34cb003be0173) to branch 'com.redhat.elfutils' (head 4196d4e01486bdeb0c0632291881d1c6d7163fab)
* Fix FSF address. No exception for libdwarf.Ulrich Drepper2006-04-041-1/+1
|
* propagate from branch 'com.redhat.elfutils.roland.pending' (head ↵Ulrich Drepper2006-04-041-8/+44
| | | | | | 4f8fc821345feef58624f0aa5b470d4827577d8c) to branch 'com.redhat.elfutils' (head 76e26cb54695fd3b21ee8fb5be3036bd68200633)
* 2005-12-22 Roland McGrath <[email protected]>Roland McGrath2005-12-231-10/+37
| | | | | | | | | | | | * argp-std.c (parse_opt): Call dwfl_end in failure cases. * linux-proc-maps.c (proc_maps_report): New function, broken out of ... (dwfl_linux_proc_report): ... here. Call it. (dwfl_linux_proc_maps_report): New function. * libdwfl.h: Declare it. * libdwflP.h: Add INTDECL. * argp-std.c (options, parse_opt): Grok -M/--linux-process-map.
* 2005-08-24 Roland McGrath <[email protected]>Roland McGrath2005-08-241-0/+12
| | | | | | * argp-std.c [_MUDFLAP] (__libdwfl_argp_mudflap_options): New function, magic initializer to set -heur-stack-bound option.
* 2005-08-23 Roland McGrath <[email protected]>Roland McGrath2005-08-231-15/+49
| | | | | | * dwarf_attr_integrate.c (dwarf_attr_integrate): Treat DW_AT_specification the same as DW_AT_abstract_origin.
* Adjust for monotone.Ulrich Drepper2005-07-261-0/+164