]> sbz's 6dev Repos - elfdbg/.git/log
7 months agoReport missing binary if test suite is run w/o prior install master origin/HEAD origin/master 1.0
Sofian Brabez [Sat, 9 Apr 2022 07:32:57 +0000 (07:32 +0000)]
Report missing binary if test suite is run w/o prior install

If the elfdbg binary is missing in $PATH it makes the tests executions to fail,
instead report the missing binary. `make test` will only succeed if the binary
is present and installed using `make install`

17 months agoAdd const and unsigned when it make sense and use size_t. Also use -Wall
Sofian Brabez [Sat, 12 Jun 2021 09:43:41 +0000 (09:43 +0000)]
Add const and unsigned when it make sense and use size_t. Also use -Wall
to raise all possible warnings during compilation

Reported by: miod

18 months agoAdd SPDX identifier
Sofian Brabez [Wed, 5 May 2021 15:39:21 +0000 (15:39 +0000)]
Add SPDX identifier

SPDX [1] is a specification to identify License in software with some kind of
metadata use to process machine readable output.

[1] https://spdx.org/licenses

20 months agoExit test test if kyua is missing
Sofian Brabez [Sun, 7 Mar 2021 17:58:46 +0000 (17:58 +0000)]
Exit test test if kyua is missing

20 months agoForgot to update the cirrus Linux task. Fix build on Linux
Sofian Brabez [Sat, 6 Mar 2021 07:37:30 +0000 (07:37 +0000)]
Forgot to update the cirrus Linux task. Fix build on Linux

20 months agoRename GNU Makefile to avoid using -f and let make pick it by default.
Sofian Brabez [Sat, 6 Mar 2021 07:30:54 +0000 (07:30 +0000)]
Rename GNU Makefile to avoid using -f and let make pick it by default.

Reported by: ericpruitt

Closes #1

21 months agoDisplay continous integration build status per task
Sofian Brabez [Tue, 16 Feb 2021 15:09:47 +0000 (15:09 +0000)]
Display continous integration build status per task

21 months agoEnsure ELF string table is not NULL
Sofian Brabez [Tue, 16 Feb 2021 15:00:19 +0000 (15:00 +0000)]
Ensure ELF string table is not NULL

shstr was reported by clang-analyzer scan-build as unused variable

21 months agoDifferentiate when same error message using func and line C macros
Sofian Brabez [Tue, 16 Feb 2021 14:59:33 +0000 (14:59 +0000)]
Differentiate when same error message using func and line C macros

21 months agoEnable cirrus continous integration task for linux
Sofian Brabez [Tue, 16 Feb 2021 14:46:41 +0000 (14:46 +0000)]
Enable cirrus continous integration task for linux

21 months agoAdd build status badge in readme
Sofian Brabez [Tue, 16 Feb 2021 13:42:11 +0000 (13:42 +0000)]
Add build status badge in readme

21 months agoEnable cirrus continous integration task for freebsd
Sofian Brabez [Tue, 16 Feb 2021 13:27:15 +0000 (13:27 +0000)]
Enable cirrus continous integration task for freebsd

2 years agoFix C99 compilation warning on OpenBSD
Sofian Brabez [Sat, 27 Jun 2020 17:56:31 +0000 (19:56 +0200)]
Fix C99 compilation warning on OpenBSD

Similar to Linux, OpenBSD does not defined `strnstr()`, this change
define the function implementation and chase the C99 warning implicit

warning: implicit declaration of function 'strnstr' is invalid in C99 [-Wimplicit-function-declaration]

Thx mpi@ gaston@

2 years agoRename function elf_debug() to elf_debug_count()
Sofian Brabez [Mon, 1 Jun 2020 16:26:25 +0000 (18:26 +0200)]
Rename function elf_debug() to elf_debug_count()

This function count the number of debug sections so it's more
logic to rename it elf_debug_count()

2 years agoRe-indent using clang-format
Sofian Brabez [Mon, 1 Jun 2020 16:24:05 +0000 (18:24 +0200)]
Re-indent using clang-format

2 years agoAdd support for Linux
Sofian Brabez [Mon, 1 Jun 2020 15:36:11 +0000 (17:36 +0200)]
Add support for Linux

2 years agoSkip sections which are not PROGBITS
Sofian Brabez [Mon, 1 Jun 2020 14:56:05 +0000 (16:56 +0200)]
Skip sections which are not PROGBITS

ELF debug sections type are all SHT_PROGBITS so avoid looping on all other
types for nothing

2 years agoUpdate readme
Sofian Brabez [Mon, 1 Jun 2020 14:16:52 +0000 (16:16 +0200)]
Update readme

2 years agoDisplay output when ATF test case is failing
Sofian Brabez [Mon, 1 Jun 2020 14:04:55 +0000 (16:04 +0200)]
Display output when ATF test case is failing

2 years agoAdd arguments flag -q for quiet mode and -v for verbose mode
Sofian Brabez [Mon, 1 Jun 2020 13:59:01 +0000 (15:59 +0200)]
Add arguments flag -q for quiet mode and -v for verbose mode

Quiet mode is not printing any output and verbose mode is listing the
name of the debug sections in standard output.

Quiet mode is designed to be used in shell script like above:

if elfdbg -q /bin/date; then
    echo "No symbols"
    echo "Binary with debug symbols"

2 years agoError handling when argument file is not ELF object and style(9)
Sofian Brabez [Mon, 1 Jun 2020 13:57:27 +0000 (15:57 +0200)]
Error handling when argument file is not ELF object and style(9)

2 years agoRewrite ELF parsing from scratch w/o dependency of elf(3) and gelf(3)
Sofian Brabez [Tue, 19 May 2020 18:25:20 +0000 (20:25 +0200)]
Rewrite ELF parsing from scratch w/o dependency of elf(3) and gelf(3)

In order to make it portable on other Unix operating systems, use ELF
structure definitions and memory mapping to parse the ELF binary.

2 years agoAdd tests cases for expected output
Sofian Brabez [Thu, 16 Apr 2020 23:25:20 +0000 (01:25 +0200)]
Add tests cases for expected output

Use [kyua](https://github.com/jmmv/kyua) FreeBSD test suite framework to
add elfdbg test cases to cover with symbols and without symbols.

The FreeBSD test suite framework require a Kyuafile and to declare the
AFT test case. Everything is documented in kyua(1), atf(7) and tests(7)
man pages.

2 years agoAdd usage and avoid execution when there is no argument
Sofian Brabez [Thu, 16 Apr 2020 01:42:12 +0000 (03:42 +0200)]
Add usage and avoid execution when there is no argument

2 years agoUpdate makefile
Sofian Brabez [Thu, 16 Apr 2020 01:08:29 +0000 (03:08 +0200)]
Update makefile

We do not to define BINDIR, DESTDIR and library flags should be handed
by LDADD. Also install manpage properly.

7 years agoFormat elfdbg source code using clang-format
Sofian Brabez [Tue, 20 Jan 2015 20:00:00 +0000 (20:00 +0000)]
Format elfdbg source code using clang-format

7 years agoInitial commit
Sofian Brabez [Tue, 20 Jan 2015 19:43:47 +0000 (19:43 +0000)]
Initial commit