Watch
1
Fork
You've already forked debugedit-mirror
0
mirror of https://sourceware.org/git/debugedit.git synced 2026-10-06 17:12:53 +00:00
No description
  • C 73.6%
  • Shell 14.3%
  • C++ 5.8%
  • M4 3.8%
  • Makefile 2.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Mark Wielaard 655aba6a8f debugedit: Handle CUs that aren't zero terminated
commit e683355819 ("debugedit: Add CU sanity check to edit_info")
added a check to make sure a CU is always zero terminate. This was
incorrect. Although a CU is often zero terminated because of padding,
it isn't strictly needed.

This means we need to introduce other checks to make sure embedded
strings (DW_FORM_string) in the .debug_info section are properly
terminated. Keep the the test to see if the section or the CU is
explicitly zero terminated, since that is most often the case. But if
not check there is a zero terminator before the cu ends.

	* tools/debugedit.c (struct CU): Add end pointer and
	zero_terminated fields.
	(struct debug_section): Add zero_terminated field.
	(skip_form): Use cu zero_terminated or explicit check for
	DW_FORM_string.
	(edit_attributes): Likewise.
	(edit_info): Set CU end and zero_terminated.
	(edit_dwarf2): Set zero_terminated, add checks for DEBUG_INFO
	and DEBUG_TYPES.

Signed-off-by: Mark Wielaard <mark@klomp.org>
2026-09-21 12:41:04 +02:00
scripts find-debuginfo: Add --check-elf[-strict] to invoke eu-elflint 2026-03-06 16:38:40 +01:00
tests tests: check eu-elflint works before testing --check-elf 2026-03-17 14:33:22 +01:00
tools debugedit: Handle CUs that aren't zero terminated 2026-09-21 12:41:04 +02:00
.gitignore Add debugedit-classify-ar and use it before running do_ar_file 2025-09-08 17:29:48 +02:00
configure.ac configure: Set version to 5.3 2026-03-10 12:12:12 +01:00
COPYING Add COPYING files for imported code 2021-03-21 18:44:07 +01:00
COPYING.LIB Add COPYING files for imported code 2021-03-21 18:44:07 +01:00
COPYING3 Add COPYING files for imported code 2021-03-21 18:44:07 +01:00
Makefile.am Add debugedit-classify-ar and use it before running do_ar_file 2025-09-08 17:29:48 +02:00
README README: update release URL 2025-07-08 11:52:14 +02:00
upload-release.sh upload-release.sh: Use xz, not bz2 for release tar 2021-05-06 00:06:56 +02:00

DEBUGEDIT

The debugedit project provides programs and scripts for creating
debuginfo and source file distributions, collect build-ids and rewrite
source paths in DWARF data for debugging, tracing and profiling.

It is based on code originally from the rpm project plus libiberty and
binutils.  It depends on the elfutils libelf and libdw libraries to
read and write ELF files, DWARF data and build-ids.

The project home is https://sourceware.org/debugedit/

RELEASES and CODE

Releases are published at https://sourceware.org/pub/debugedit/

To build a release do:
  ./configure && make && make check

The current debugedit source code can be checked out with
git clone git://sourceware.org/git/debugedit.git

To build a git checkout do:
  autoreconf -i -f && ./configure && make && make check

There should be no failures after make check.

BUGS

Please reports bugs at https://sourceware.org/bugzilla/

CONTRIBUTING

The developer mailinglist to send patches to is
debugedit@sourceware.org.
https://sourceware.org/ml/debugedit/

To subscribe send an email to debugedit-subscribe@sourceware.org
Or use the form at https://sourceware.org/mailman/listinfo/debugedit

Please supply patches using git format-patch or using git send-email.

Sign your work

To facilitate tracking of who did what, we've adopted a "sign-off"
procedure for patches based on the procedure used by the Linux kernel
project.

The sign-off is a simple line at the end of the explanation for the
patch, which certifies that you wrote it or otherwise have the right
to pass it on as a patch under the appropriate licenses. The rules are
pretty simple: if you can certify the below:

        Developer's Certificate of Origin

        By making a contribution to this project, I certify that:

	(a) The contribution was created in whole or in part by me,
	    and I have the right to submit the contribution under each
	    license indicated in, or otherwise designated as being
	    applicable to, the file.

        (b) The contribution was provided directly to me by some other
            person who certified (a), and I have not modified it.

        (c) I understand and agree that the project and the
            contribution are public and that a record of the
            contribution (including all personal information I submit
            with it, including my sign-off) is maintained indefinitely
            and may be redistributed.

then you just add a line saying

Signed-off-by: Random J Developer <random@developer.example.org>

using your real name (sorry, no pseudonyms or anonymous contributions.)

git commit --signoff will add such a Signed-off-by line at the end of
the commit log message for you.

LICENSES

The debuginfo project as a whole can be redistributed under the GPLv3+
as described in the COPYING3 file.

Some individual source files may also be redistributed under the
GPLv2+ as described in the COPYING file or under the LGPLv2+ as
described in the COPYING.LIB file.  See the headers of the individual
files to learn which licenses apply.  All licenses used are upward
compatible with GPLv3+.