History log of /external/elfutils/libdw/dwarf_getmacros.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
1ccdfb683ad6c7e59793136c3a657ddf131cafd1 22-Sep-2015 Mark Wielaard <mjw@redhat.com> Remove old-style function definitions.

We already require -std=gnu99 and old-style function definitions might
hide some compiler warnings.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
/external/elfutils/libdw/dwarf_getmacros.c
1dcbe0c59a72eb1c6908ebce5209683769526349 18-Jun-2015 Mark Wielaard <mjw@redhat.com> libdw: Detect dwarf_formudata errors in dwarf_getmacros.

dwarf_formudata can return an error for bad DWARF. Don't ignore it.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
/external/elfutils/libdw/dwarf_getmacros.c
f98b99db09f80666d5cf491a2ce126a59af0fdb1 21-Apr-2015 Mark Wielaard <mjw@redhat.com> libdw: Don't overflow stack with user defined macro attributes array.

In theory user defined debug macros can have an arbitrary number of
arguments. Don't allocate them all on stack. If there are more than
8 (arbitrary number, but no sane macro should have more arguments),
then dynamically allocate and free the attributes.

Found by gcc -fsanitize=undefined. Which pointed out the nforms could
be zero, creating an empty vla (which could cause undefined behavior).

Signed-off-by: Mark Wielaard <mjw@redhat.com>
/external/elfutils/libdw/dwarf_getmacros.c
7a053473c7bedd22e3db39c444a4cd8f97eace25 14-Dec-2014 Mark Wielaard <mjw@redhat.com> libdw: Add get_uleb128 and get_sleb128 bounds checking.

Both get_uleb128 and get_sleb128 now take an end pointer to prevent
reading too much data. Adjust all callers to provide the end pointer.

There are still two exceptions. "Raw" dwarf_getabbrevattr and
read_encoded_valued don't have a end pointer associated yet.
They will have to be provided in the future.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
/external/elfutils/libdw/dwarf_getmacros.c
9202665816763fad8524dd78a664dbcaa157b8d4 12-Dec-2014 Mark Wielaard <mjw@redhat.com> libdw: Make sure all attributes come with a (fake) CU for bound checks.

All attributes now have a reference to a (fake) CU that has startp and
endp set to the data section where the form data comes from. Use that
for bounds checking in __libdw_form_val_len and dwarf_formblock to make
sure data read doesn't overflow any data section. Remove libdwP.h cu_data
and use cu startp and endp directly where appropriate.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
/external/elfutils/libdw/dwarf_getmacros.c
cb73b5a015606a02f952f7eddaba15327f6191fa 04-Dec-2014 Mark Wielaard <mjw@redhat.com> libdw: Add overflow checking to __libdw_form_val_len.

Pass endp as argument to __libdw_form_val_len and check we don't read
beyond the end of expected data and don't return lengths that would
overflow.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
/external/elfutils/libdw/dwarf_getmacros.c
edb079a596b25379828836e501d003f20afdb879 02-Dec-2014 Petr Machata <pmachata@redhat.com> Change calling convention of dwarf_getmacros to allow opcode 0xff

We now require callers to pass DWARF_GETMACROS_START to start the
iteration. 0 is still accepted, but signals to libdw that the
iteration request comes from an old-style caller, and that opcode 0xff
should be rejected when iterating .debug_macro, to avoid confusion.

Signed-off-by: Petr Machata <pmachata@redhat.com>
/external/elfutils/libdw/dwarf_getmacros.c
fb90bf3f84b5683bbc1f234ee05008ff26250e5c 17-Oct-2014 Petr Machata <pmachata@redhat.com> Support .debug_macro

- This code is based on the following proposal:
http://www.dwarfstd.org/ShowIssue.php?issue=110722.1

- dwarf_getmacros serves either of .debug_macinfo or .debug_macro
transparently, but if the latter uses opcode 0xff, it bails out with
an error. The reason is that in .debug_macro, 0xff is a custom code
that can mean anything, while in .debug_macinfo there's fixed
semantics associated with 0xff.

- dwarf_getmacros_off is a new interface used for requesting iteration
through transparently included units.

- dwarf_macro_getparamcnt and dwarf_macro_param are new interfaces
used for requesting number of parameters of an opcode and individual
parameters. dwarf_macro_getsrcfiles is a new interface used for
requesting a file part of .debug_line unit associated with macro
unit that the opcode comes from.

- The existing interfaces dwarf_macro_opcode, dwarf_macro_param1 and
dwarf_macro_param2 remain operational for old- as well as new-style
Dwarf macro sections, if applicable.

- dwarf_getsrclines was made into a light wrapper around a worker
function that loads line unit given its offset. The worker also
caches loaded units in an offset-keyed search tree, so that we don't
end up re-reading units even though they were read in a different
domain (e.g. a macro unit request can prime cache for later CU
lookup). dwarf_macro_getsrcfiles calls the worker function under
covers.

Signed-off-by: Petr Machata <pmachata@redhat.com>
/external/elfutils/libdw/dwarf_getmacros.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/libdw/dwarf_getmacros.c
e94b1b2bec403afb5fd4696a05e1ade09fdb3e59 08-May-2009 Roland McGrath <roland@redhat.com> Typo
/external/elfutils/libdw/dwarf_getmacros.c
e7c163324ebddf922f2827789b498ec1d7d9a2aa 08-May-2009 Roland McGrath <roland@redhat.com> Fix trivial regression in last commit.
/external/elfutils/libdw/dwarf_getmacros.c
e2eabd88c9a95e640fee4afc64d7445d323b0716 08-May-2009 Roland McGrath <roland@redhat.com> Slight optimization of dwarf_getmacros for loops.
/external/elfutils/libdw/dwarf_getmacros.c
f3df61f7514b4c217b4bf16a62c93493bb1fef56 07-May-2009 Petr Machata <pmachata@redhat.com> Fix dwarf_getmacros so that it passes newly-added test
/external/elfutils/libdw/dwarf_getmacros.c
1e9ef50681e20ef14c2ba38aef37a71ff148be08 05-Apr-2006 Ulrich Drepper <drepper@redhat.com> Fix FSF address. No exception for libdwarf.
/external/elfutils/libdw/dwarf_getmacros.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/libdw/dwarf_getmacros.c
b08d5a8fb42f4586d756068065186b5af7e48dad 26-Jul-2005 Ulrich Drepper <drepper@redhat.com> Adjust for monotone.
/external/elfutils/libdw/dwarf_getmacros.c