[Bug 1567219]

2016-04-17 Thread Aleksandar-rikalo
Created attachment 98375
Test cases - rev2

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1567219

Title:
  Valgrind does not support compressed debug info

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-z-systems/+bug/1567219/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1567219]

2016-04-17 Thread Aleksandar-rikalo
Created attachment 98374
Compressed debug sections support for Valgrind - rev 2

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1567219

Title:
  Valgrind does not support compressed debug info

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-z-systems/+bug/1567219/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1567219]

2016-04-17 Thread Aleksandar-rikalo
(In reply to Ivo Raisr from comment #31)

Thank You for reviewing.

I have fixed all things that you mention. The full patch is attached,
and the new version of tests is also attached.

> 2) When including "tinfl.c", do we want to define "TINFL_HEADER_FILE_ONLY"?
> 20) I don't see any coregrind/Makefile changes to build m_debuginfo/tinfl.c?

In case we use #include "tinfl.c" without defining TINFL_HEADER_FILE_ONLY, we 
don't need tinfl.c in Makefile.
If we include header only (by defining TINFL_HEADER_FILE_ONLY before #include) 
then tinfl.c needs to be compiled separately (this solution is applied in rev2 
patch). 

> 5) CEnt.data has now non-fixed size. Why CACHE_ENTRY_SIZE is still used in
> various places
> around image.c; for example in alloc_CEnt() and realloc_CEnt()?

CACHE_ENTRY_SIZE is still in use as default (and minimal) size of cache
entry. Larger entries will be allocated in case size of the uncompressed
data is grater than CACHE_ENTRY_SIZE.

> However I don't have any system with toolchain supporting '-gz' at hand.
> I assume you tested on MIPS. Anyone can test on a different architecture or
> distribution?

It seems that nobody has GCC which supports -gz, so the test is useless
for now.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1567219

Title:
  Valgrind does not support compressed debug info

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-z-systems/+bug/1567219/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1567219]

2016-04-09 Thread Aleksandar-rikalo
Thank you for suggestions.

I've prepared few patches:

ElfXX_Chdr-build-fixup.diff - tinfl is moved to m_debuginfo, checking
for Elf32/64_Chdr structs is placed into "configure" and line endings in
tinfl.c are converted to Unix style.

Elf32/64_Chdr, SHF_COMPRESSED and ELFCOMPRESS_ZLIB come from libc
() and exist only in newer versions of libc. These
structures/constants are not present in Kernel, so I didn't move them to
vki. We can place them to separate header or pub_tool_libcbase.h, if you
think it's more appropriate.

zdebug-support.diff - support for .zdebug sections is added to
readelf.c.

Three kinds of compressed debug sections are supported by Binutils 2.26
(zlib, zlib-gnu and zlib-gabi) and I have tested Valgrind with all of
them on MIPS/X86 Linux.

According to the manual (https://gcc.gnu.org/onlinedocs/gcc/Debugging-
Options.html), GCC should support -gz=zlib and -gz=zlib-gnu options for
generating compressed debug sections, but I haven't succeeded to set up
the environment in which it works. I've written two simple Memchek tests
(compressed_sections_test.diff) which use these options, but they are
not tested properly.

The order of applying patches (after applying compressed-dwarf-
support.diff and tinfl-modifications.diff) :

patch -p1 < ElfXX_Chdr-build-fixup.diff
patch -p1 < zdebug-support.diff
patch -p1 < compressed_sections_test.diff

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1567219

Title:
  Valgrind does not support compressed debug info

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-z-systems/+bug/1567219/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1567219]

2016-04-09 Thread Aleksandar-rikalo
Created attachment 98288
Test cases

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1567219

Title:
  Valgrind does not support compressed debug info

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-z-systems/+bug/1567219/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1567219]

2016-04-09 Thread Aleksandar-rikalo
Created attachment 98287
.zdebug sections support

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1567219

Title:
  Valgrind does not support compressed debug info

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-z-systems/+bug/1567219/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1567219]

2016-04-09 Thread Aleksandar-rikalo
Created attachment 98286
Corrections according to comment #26

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1567219

Title:
  Valgrind does not support compressed debug info

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-z-systems/+bug/1567219/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs