History log of /external/elfutils/libdwfl/linux-proc-maps.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
9d1e2365db8499b50ffc767ec42fbd6e49d669ac 18-Nov-2015 Chih-Hung Hsieh <chh@google.com> Move nested functions in linux-proc-maps.c to file scope.

* Move nested function 'report' to file scope to compile with clang.

Signed-off-by: Chih-Hung Hsieh <chh@google.com>
/external/elfutils/libdwfl/linux-proc-maps.c
3425454a10d307fae891fb667cf7969e945cde79 09-Oct-2015 Josh Stone <jistone@redhat.com> Trust AC_SYS_LARGEFILE to provide large file support

AC_SYS_LARGEFILE defines _FILE_OFFSET_BITS in config.h if needed for
LFS, and this automatically maps things like open to open64. But quite
a few places used explicit 64-bit names, which won't work on platforms
like FreeBSD where off_t is always 64-bit and there are no foo64 names.
It's better to just trust that AC_SYS_LARGEFILE is doing it correctly.

But we can verify this too, as some file could easily forget to include
config.h. The new tests/run-lfs-symbols.sh checks all build targets
against lfs-symbols (taken from lintian) to make sure everything was
implicitly mapped to 64-bit variants when _FILE_OFFSET_BITS is set.

Signed-off-by: Josh Stone <jistone@redhat.com>
/external/elfutils/libdwfl/linux-proc-maps.c
f17d101232d6d40e192e61441aa02a12ee8cf9b8 09-Oct-2015 Jose E. Marchesi <jose.marchesi@oracle.com> Use seek+read instead of pread to read from /dev/$$/mem files.

pread[64] always returns EINVAL when negative offsets are used.
read+seek allows us to read in-memory vdso objects mapped high in the
address space.

Signed-off-by: Jose E. Marchesi <jose.marchesi@oracle.com>
/external/elfutils/libdwfl/linux-proc-maps.c
0f5b632a72bf0a33e3f2ec9270dd16d266a7b54b 15-May-2014 Mark Wielaard <mjw@redhat.com> libdwfl: Don't leak fd on error in linux-proc-maps.c (grovel_auxv).

Signed-off-by: Mark Wielaard <mjw@redhat.com>
/external/elfutils/libdwfl/linux-proc-maps.c
4b9e1433d2272f5f68b3227abdd9cf6817a0afd3 04-Mar-2014 Mark Wielaard <mjw@redhat.com> libdwfl: dwfl_linux_proc_find_elf use elf_from_remote_memory for (deleted).

If a module has a "(deleted)" main ELF file, then try to read it from
remote memory if the Dwfl has process state attached by reusing the ptrace
mechanism from linux-pid-attach.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
/external/elfutils/libdwfl/linux-proc-maps.c
f15bcda4137446d4773bb54cb99cc18497e9822c 03-Mar-2014 Mark Wielaard <mjw@redhat.com> libdwfl: elf_from_remote_memory should use pagesize, not p_align.

elf_from_remote_memory would use the actual p_align of the PT_LOAD segments
to calculate the loadbase, end and start of a segment. But the dynamic
loader aligns the segments using the pagesize and only sanity checks the
p_align values. So we should do the same to get accurate segment addresses.
Also fixes a small memory leak in case the ELF image appears to be bad.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
/external/elfutils/libdwfl/linux-proc-maps.c
8f4402f7cd1a8b82f890a219d97106cbf918cf92 26-Feb-2014 Mark Wielaard <mjw@redhat.com> libdwfl: linux-proc-maps.c (proc_maps_report): Don't assert on bad input.

If ino == last_ino && dmajor == last_dmajor && dminor == last_dminor then
we expect the file names to be the same as well. Which is reasonable if
the input came from the /proc file system. But there could be bad user
input if the file was supplied through dwfl_linux_proc_maps_report.
Instead of asserting on the bad input, just signal a bad_report.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
/external/elfutils/libdwfl/linux-proc-maps.c
19108019192ab273c53ae324be448d29dac806ca 30-Dec-2013 Mark Wielaard <mjw@redhat.com> libdwfl: Add dwfl_core_file_attach and dwfl_linux_proc_attach.

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 <mjw@redhat.com>
/external/elfutils/libdwfl/linux-proc-maps.c
ac65261cc5f4b313d4f852e0a7f2b1b91918550b 28-Dec-2013 Mark Wielaard <mjw@redhat.com> libdwfl: dwfl_linux_proc_find_elf should only return regular files.

When the dwfl_linux_proc_find_elf callback is used together with the
dwfl_linux_proc_report callback that reads /proc/PID/maps files we might
see and try to open special character device files that cannot be normally
read and processed by libelf (and might hang the library on the initial
open or read from the file). Make sure we only try to open and return
regular files.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
/external/elfutils/libdwfl/linux-proc-maps.c
0b867460075c9f02cb305abc91a0e12b90017583 30-May-2013 Jan Kratochvil <jan.kratochvil@redhat.com> Unwinder for x86*.

Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
Signed-off-by: Mark Wielaard <mjw@redhat.com>
/external/elfutils/libdwfl/linux-proc-maps.c
d182974079c7205973ae7885b95216a5b83b6f82 15-Oct-2013 Mark Wielaard <mjw@redhat.com> libdwfl: Don't report and abort on non-file mappings in maps.

proc_maps_report, used for -p or -M, could report modules with names
that were not absolute file names (and not the special vdso marker).
dwfl_linux_proc_find_elf would abort on such names. This isn't a very
nice thing to do in a library. Make sure only real (absolute) file
mappings are reported and don't abort when unexpected file names are
found, just report failure.

Test case with some examples as found in Linux /proc/PID/maps added.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
/external/elfutils/libdwfl/linux-proc-maps.c
cc3924843b9bc04ff7aae3b491b16bd1bd175613 12-Sep-2013 Mark Wielaard <mjw@redhat.com> libdwfl: proc_maps_report should not fclose the given file.

Calling fclose only on bad_report, but not on other errors or success
is confusing. The caller is always responsible for calling fclose on
the given file. Otherwise flcose might be called twice (e.g. in
dwfl_linux_proc_report).

Signed-off-by: Mark Wielaard <mjw@redhat.com>
/external/elfutils/libdwfl/linux-proc-maps.c
8447637a4e32b0c19177ba23cd58548b990bdc17 10-Oct-2012 Jan Kratochvil <jan.kratochvil@redhat.com> libdwfl/
linux-proc-maps.c: Include system.h.
(PROCEXEFMT, get_pid_class): New.
(grovel_auxv): Detect 32-bit vs. 64-bit auxv, possibly call get_pid_class.

Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
/external/elfutils/libdwfl/linux-proc-maps.c
de2ed97f33139af5c7a0811e4ec66fc896a13cf2 05-Jun-2012 Mark Wielaard <mjw@redhat.com> Update name, license and contributor policy.

* 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 <rfontana@redhat.com>
Signed-off-by: Mark Wielaard <mjw@redhat.com>
/external/elfutils/libdwfl/linux-proc-maps.c
a0635db0fbe13ad7b531ee99eeb063a8eded923c 20-May-2010 Roland McGrath <roland@redhat.com> Fix some libdwfl bias calculations.
/external/elfutils/libdwfl/linux-proc-maps.c
9cf28e4f899f97ecdc983a0af8e2be62f3d69058 30-Sep-2008 Roland McGrath <roland@redhat.com> libdwfl/
2008-09-29 Roland McGrath <roland@redhat.com>

* segment.c (insert): Must realloc DWFL->lookup_module here too.
(dwfl_report_segment): Clear DWFL->lookup_module before insert calls.
/external/elfutils/libdwfl/linux-proc-maps.c
bfc01703fe30815b450526ebcfbb37ec9f5fe9c7 06-Apr-2008 Roland McGrath <roland@redhat.com> libdwfl/
* linux-proc-maps.c (proc_maps_report): Don't leak LAST_FILE.
/external/elfutils/libdwfl/linux-proc-maps.c
d39384c10b8cba1e1d583e65743a653ee6224320 11-Jan-2007 Roland McGrath <roland@redhat.com> Same as last commit, for linux-proc-maps.c
/external/elfutils/libdwfl/linux-proc-maps.c
1e9ef50681e20ef14c2ba38aef37a71ff148be08 05-Apr-2006 Ulrich Drepper <drepper@redhat.com> Fix FSF address. No exception for libdwarf.
/external/elfutils/libdwfl/linux-proc-maps.c
361df7da6dfecd817b27e62b91752ac316d7cdd4 04-Apr-2006 Ulrich Drepper <drepper@redhat.com> propagate from branch 'com.redhat.elfutils.roland.pending' (head 4f8fc821345feef58624f0aa5b470d4827577d8c)
to branch 'com.redhat.elfutils' (head 76e26cb54695fd3b21ee8fb5be3036bd68200633)
/external/elfutils/libdwfl/linux-proc-maps.c
1656bc00ae97fa16a941a8cefacc4e01488d0e8a 23-Dec-2005 Roland McGrath <roland@redhat.com> 2005-12-22 Roland McGrath <roland@redhat.com>

* 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.
/external/elfutils/libdwfl/linux-proc-maps.c
b08d5a8fb42f4586d756068065186b5af7e48dad 26-Jul-2005 Ulrich Drepper <drepper@redhat.com> Adjust for monotone.
/external/elfutils/libdwfl/linux-proc-maps.c