Tobias Frost
3afc8f0a3f
Fix process_munmap not handling munmap correctly.
...
munmap(2) will unmap any page "it touches", the parameters
given to it do not necessarily need to match the ones given to mmap(2).
It is legit to specify pages that are not mapped at all, ranges that
span multiple mappings, with or without holes…
Beside that, a logic error in calculating the size for
process_release_mem() is fixed in the case a munmap would split
a previous allocation in two maps.
Similar fix also for the case where the freed page is at the end
of the allocated area.
2022-06-24 10:55:50 +02:00
Tobias Frost
be3b4c22ae
Fix logic error in process_rb_search_range()
...
The function would not properly check if addr is within the block
due to inversed logic in the comparasion.
2022-06-23 09:18:43 +02:00
Tobias Frost
871a79f35b
mremap handling in case of error and creating a duplicate mapping.
...
- mremap can fail, in this case the old mapping is retained.
- mremap, when oldsize is 0, a new mapping is created without freeing
the old one.
See mremap(2) for details.
2022-06-22 15:17:48 +02:00
Tobias Frost
f090e95e83
munmap can fail.
...
According to munmap(2), the call can fail, e.g if the adress given is
not at a page boundary.
2022-06-22 15:15:14 +02:00
Tobias Frost
61a32cf95e
Consider page size in report_mmap / report_unmap.
...
mmaps are full of quirks ;-)
- mmap(2) will always allocate whole memory pages, even if the
caller only reuqests a partial page.
This is considered by calculating the "real" size of the mmap.
- munmap(2) also operates on pages, unmapping every page it "touches.",
so the size parameter is adjusted if needed.
2022-06-22 15:13:56 +02:00
sstefani
4007678321
Merge pull request #9 from coldtobi/fix_libz_liberty_linkage
...
find_library(liberty)
2022-06-21 12:46:18 +02:00
Tobias Frost
ce552acad2
find_library(liberty) will also take care of the demangle header
...
so, CHECK_INCLUDE_FILES_ERROR(libiberty/demangle.h) is not needed and
actually fails to find the header if the header is in some non-standard
location. (e.g if it comes from a conan package)
2022-06-21 10:42:45 +02:00
sstefani
811a3b75e2
Merge pull request #8 from coldtobi/fix_older_gcc
...
Fix add_compile_options spelling.
2022-06-21 10:25:25 +02:00
Tobias Frost
fd12122c86
Fix add_compile_options spelling.
2022-06-13 09:48:17 +02:00
sstefani
a6feaf045a
Merge pull request #7 from coldtobi/fix_arm_compile_issues
...
Fix arm compile issues
2022-06-10 14:48:40 +02:00
sstefani
d5ba7df9ae
Merge pull request #6 from coldtobi/fix_older_gcc
...
Wimplicit_fallthrough requires gcc7 or newer, so only enable it there.
2022-06-10 14:48:03 +02:00
sstefani
cb502b8676
Merge pull request #5 from coldtobi/fix_4_ancient_readline
...
Use rl_clear_history only if available, fallback to clear_history if not
2022-06-10 14:47:39 +02:00
sstefani
521b1a2bca
Merge pull request #4 from coldtobi/update-bfd
...
Fix compilation issue with newer binutils
2022-06-10 14:47:25 +02:00
sstefani
7e789d5555
Merge pull request #3 from coldtobi/fix_disable_client
...
Fix compilation when DISABLED_CLIENT is engaged.
2022-06-10 14:47:00 +02:00
Tobias Frost
c39c76a284
More unused parameters fixed.
2022-06-10 14:23:32 +02:00
Tobias Frost
83f3e2b1be
struct libref members have been renamed previously.
...
Do also in the arm specific code.
2022-06-10 14:06:33 +02:00
Tobias Frost
d103e4f4fb
Fix include path for dwarf.h and add missing define
...
the compiler included system dwarf.h, not with the project one.
DWARF_STOPUNWIND was not defined in the project's dwarf.h
2022-06-10 13:43:14 +02:00
Tobias Frost
f6b3158574
SW_BP is not defined, it seems to be BP_SW
...
(at least that is what breakpoint.h has)
2022-06-10 13:27:15 +02:00
Tobias Frost
e49367d214
Fix unused parameter warning.
2022-06-10 13:12:42 +02:00
Tobias Frost
7d8fb9ec75
Wimplicit_fallthrough requires gcc7 or newer, so only enable it there.
...
Also disable -Werror, as this is a great annoyance and breaks the build
with (newer) gccs or when some hardening options are enabled.
2022-06-10 12:57:21 +02:00
Tobias Frost
5f0dd75c1f
Use rl_clear_history only if available, fallback to clear_history if not.
...
For ancient readline (I'm stuck to it on my embedded target...),
rl_clear_history is not available, so using clear_history instead.
2022-06-10 12:25:25 +02:00
Tobias Frost
9fb6465fb8
Define "PACKAGE" to have bfd from binutils 2.31 happy.
...
bfd 2.31 checks for this define and #errors out if it is not there.
2022-06-10 09:44:16 +02:00
Tobias Frost
8f3f225afe
Fix compilation when DISABLED_CLIENT is engaged.
2022-06-09 13:50:42 +02:00
Tobias Frost
c38415317c
Fix compilation issue with newer binutils
...
- Fixes for binutuils 2.31 / 2.34
- Fix CMake fails to error out if libbfd is not found.
- Fix conditiopnal linking if libbfd is not available. (e.g for client mode)
2022-06-09 13:33:16 +02:00
Stefani Seibold
6f097d37e6
cleanup cmake
2018-05-07 22:33:29 +02:00
sstefani
c6c446f1c2
Merge pull request #2 from xmw/xenial
...
Minor fixes on Ubuntu 16.04 with newer gcc and old CMake.
2018-05-07 22:30:30 +02:00
Michael Weber
05427b0efb
Disable unused return code warning for unreachable code.
2018-05-07 17:49:47 +02:00
Michael Weber
c97313611e
update dependencies for ubuntu/xenial
2018-05-07 17:48:05 +02:00
Michael Weber
935c0cff36
Remove IPO disabled artefacts.
2018-05-07 17:47:46 +02:00
Stefani Seibold
42e3f9ad79
fix auxv parser
2018-04-25 17:36:14 +02:00
Stefani Seibold
badc8d24fd
code cleanup
2018-04-18 12:47:43 +02:00
Stefani Seibold
31e24c9426
fix debug option
2018-04-18 08:48:20 +02:00
Stefani Seibold
ed95193efe
fix help messages
2018-04-18 08:46:07 +02:00
Stefani Seibold
7970712f70
minor fixes
2018-04-18 08:43:17 +02:00
Stefani Seibold
da9ae73ea9
bump to new version
2018-04-17 18:01:57 +02:00
Stefani Seibold
ae7d7d5afb
minor dwarf fix
2018-04-17 17:32:45 +02:00
Stefani Seibold
6ac727d143
minor dwarf improvments
2018-04-17 14:57:49 +02:00
Stefani Seibold
98a3c4a942
fix non debug build
2018-04-17 11:36:52 +02:00
Stefani Seibold
495a9d535d
fix dwarf unwinding
2018-04-17 11:28:37 +02:00
Stefani Seibold
73a4eca5ce
fix address spaces
2018-04-16 16:24:19 +02:00
Stefani Seibold
87f73f3220
fixes
2018-04-16 09:10:19 +02:00
Stefani Seibold
a6c7ba8fcc
code cleanup
2018-04-12 13:03:16 +02:00
Stefani Seibold
dc6b85bd8b
fix process attach
2018-04-12 11:14:11 +02:00
Stefani Seibold
b58a41680a
fix copyright
2018-04-12 11:11:58 +02:00
Stefani Seibold
e1e243e25a
various bug fixes
2018-04-12 11:00:20 +02:00
Stefani Seibold
0155d789b4
bump to version 0.8
...
tons of fixes. On the way to a final release 1.0
2018-04-06 22:10:20 +02:00
Stefani Seibold
4c5f0c20b4
fix echo_all_cmake_variable_values function
...
clean up the output
2017-12-19 11:18:31 +01:00
Stefani Seibold
4ce01bc3fe
switch to cmake build system
...
kick out automake and use cmake instead
2017-12-19 11:13:07 +01:00
Stefani Seibold
3b7a0d0552
clean up, option for invalid free releases
2016-05-24 10:01:41 +02:00
Stefani Seibold
3e2980613c
more accurate single step, prelink fixes, cleanup
2016-05-23 10:27:47 +02:00