On Fri, 12 Feb 2016 15:10:46 +0100, Mark Wielaard wrote:
> We used to assume any unknown ELF note provider name was "GNU" and didn't
> recognize any of the "Go" provider types. We now check the provider name
> explictly in ebl_object_note_type_name and recognize the following Go
> note names: PKGLI
On Fri, 12 Feb 2016 18:05:42 +0100, Mark Wielaard wrote:
> Linux kernel 3.18 added the NT_ARM_SYSTEM_CALL regset for aarch64.
> Recognize and print this new core item.
It works and looks OK to me FYI.
Thanks,
Jan
On Sat, 06 Jun 2015 16:00:08 +0200, Mark Wielaard wrote:
> dwfl_segment_report_module can take the NT_FILE note contents to find
> the matching file for the module on the file system from the core file.
> If the file exists but the build-id didn't match we would not report the
> module. But we shou
On Fri, 06 Feb 2015 09:04:25 +0100, Mark Wielaard wrote:
> I do think that is by accident, and actually a bug. It might be that no
> alignment works here because the result isn't relinked ever and they
> make sure the ELF file they write out is hand aligned. But it is at
> least a little sloppy. If
ot;.rel.plt");
ELF spec says:
Values 0 and 1 mean the section has no alignment constraints.
and libelf/elf32_updatenull.c really parses it that way at line 204
ElfW2(LIBELFBITS,Word) sh_align = shdr->sh_addralign ?: 1;
but unfortunately the later line
On Fri, 19 Dec 2014 19:06:33 +0100, Mark Wielaard wrote:
> At least aarch64 puts 0xA as p_align value in the phdrs.
OK, I agree 0xa is bogus.
Jan
On Fri, 19 Dec 2014 18:13:04 +0100, Mark Wielaard wrote:
> But on some architectures the kernel inserts a vdso with
> a completely bogus p_align for some PT_LOAD segments.
It would be better to know what is "some" and what is "bogus".
Jan
On Fri, 12 Dec 2014 21:55:31 +0100, Mark Wielaard wrote:
> Some systems don't add a PT_GNU_EH_FRAME segment by default, but the
> deleted test depends on it so that it can get at the .eh_frame_hdr table
> through the phdrs from the remote memory ELF image. Request one explicitly
> with -fasynchrono
On Thu, 27 Nov 2014 12:17:39 +0100, Mark Wielaard wrote:
> On Wed, 2014-11-26 at 15:44 +0100, Jan Kratochvil wrote:
> > I was trying to figure out some more generic functionality than
> > --core-pattern
> > but given that for core_pattern one needs to:
> > P
On Thu, 27 Nov 2014 12:05:51 +0100, Mark Wielaard wrote:
> We have -o,--output support in other utilities.
Those are ld, strip and unstrip. That is not for text output but for the
resulting ELF files which is IMO a different case.
BTW I am not against it, I just find it redundant. If thiAny pro
On Thu, 27 Nov 2014 12:04:39 +0100, Mark Wielaard wrote:
> On Wed, 2014-11-26 at 15:32 +0100, Jan Kratochvil wrote:
> > Therefore they are dead at the core_pattern time, they cannot be ptraced and
> > therefore they cannot be unwound. One could only find them in the core file
>
implemented as a demo in
eu-stack's core_pattern function invoked by eu-stack's --core-pattern option.
The code of core_pattern function has been suggested by Oleg Nesterov.
src/
2014-11-26 Jan Kratochvil
* stack.c: Include sys/ptrace.h and sys/wait.h.
(OPT_CO
On Wed, 26 Nov 2014 21:08:22 +0100, Oleg Nesterov wrote:
> Yes. I guess PTRACE_ATTACH should work but it is pointless, this
> thread can't report an event and other ptrace requests won't work.
>
> In fact I think PTRACE_ATTACH should fail in this case...
I have used PTRACE_SEIZE instead:
ptrace(
On Mon, 03 Nov 2014 14:22:23 +0100, Mark Wielaard wrote:
> For reference. Attached is the cleaned up -o support patch I added.
As I wrote I find that unrelated to --core-pattern which should IMO use
a shell script (or other language) wrapper.
Additionally the eu-stack patch may be also considered
done. This is implemented as a demo in
eu-stack's core_pattern function invoked by eu-stack's --core-pattern option.
The code of core_pattern function has been suggested by Oleg Nesterov.
src/
2014-11-26 Jan Kratochvil
* stack.c: Include sys/ptrace.h and sys/wait.h.
(O
On Thu, 30 Oct 2014 22:55:41 +0100, Mark Wielaard wrote:
> On Thu, 2014-10-09 at 23:25 +0200, Jan Kratochvil wrote:
> > + if (opt_core_pattern == true && show_one_tid == false)
> > + argp_error (state,
> > + N_("--core-pattern requires -1&quo
On Thu, 09 Oct 2014 23:32:47 +0200, Jan Kratochvil wrote:
> jankratochvil/corepattern
just a very minor simplification of the code.
Jan
--- Begin Message ---
To backtrace crashed thread from Linux core_pattern handler a special operation
similar to PTRACE_ATTACH needs to be done. This
ttern handler a special operation
similar to PTRACE_ATTACH needs to be done. This is implemented as a demo in
eu-stack's core_pattern function invoked by eu-stack's --core-pattern option.
The code of core_pattern function has been suggested by Oleg Nesterov.
src/
2014-10-09 Jan Kratoc
On Tue, 23 Sep 2014 16:04:58 +0200, Mark Wielaard wrote:
> On Tue, 2014-09-09 at 23:00 +0200, Jan Kratochvil wrote:
> > tests/test-core.core.bz2 had to have its NT_FILE disabled as
> > run-unstrip-n.sh
> > otherwise FAILs:
> > FAIL: 0x7f67f2aaf000+0x202000 - . -
On Tue, 23 Sep 2014 17:18:05 +0200, Mark Wielaard wrote:
> Sure, that avoids one cast, which is always nice. Patch updated.
That looks more OK with me to keep ctags working.
Thanks,
Jan
On Tue, 23 Sep 2014 14:50:13 +0200, Mark Wielaard wrote:
> Updated cleanup based on current master attached.
FYI I find that patch rather hiding what the code really does, in summary it
has done:
-if (ehdr.e32.e_ident[EI_DATA] == MY_ELFDATA)
+ ei_data = ((const unsigned char *) buffer)[EI_DA
On Wed, 10 Sep 2014 22:33:50 +0200, Mark Wielaard wrote:
> On Wed, 2014-09-10 at 21:22 +0200, Jan Kratochvil wrote:
> > libdwfl/
> > 2014-09-10 Jan Kratochvil
> >
> > * dwfl_build_id_find_elf.c (dwfl_build_id_find_elf): Use IS_EXECUTABLE.
> >
On Thu, 18 Sep 2014 16:56:59 +0200, Mark Wielaard wrote:
> Also we shouldn't add such a partial type struct to the public gelf.h
> header since that is kind of a shared standard type, so if other
> libelf/gelf implementations don't support it we shouldn't export it
> IMHO.
BTW there could be #ifde
ping, so that the patchset can move forward
On Thu, 11 Sep 2014 21:00:49 +0200, Jan Kratochvil wrote:
> On Wed, 10 Sep 2014 22:15:42 +0200, Mark Wielaard wrote:
> > So I propose a cleanup like the attached first.
>
> While I find that as an improvement in general IMO on top of
On Wed, 10 Sep 2014 22:15:42 +0200, Mark Wielaard wrote:
> So I propose a cleanup like the attached first.
While I find that as an improvement in general IMO on top of your patch the
changes could be done a bit differently.
Patricularly I at least miss there that 'e_ident'.
Jan
diff --git a/lib
t;[exe]" or "[pie]".
-e|--executable still should be able to override such module.
libdwfl/
2014-09-10 Jan Kratochvil
* dwfl_build_id_find_elf.c (dwfl_build_id_find_elf): Use IS_EXECUTABLE.
* dwfl_segment_report_module.c (dwfl_segment_report_module): Set
On Tue, 09 Sep 2014 23:55:34 +0200, Roland McGrath wrote:
> >int segment; /* Index of first segment table entry.
> > */
> >bool gc; /* Mark/sweep flag. */
> > + bool is_executable : 1; /* Use Dwfl::executable_for_core? */
>
> If you're going to use
nd on the disk). Updating the expected text would be
also sufficient.
libdwfl/
2014-09-09 Jan Kratochvil
Support NT_FILE for locating files.
* core-file.c (dwfl_core_file_report): New variables note_file and
note_file_size, set them and pass them to dwfl_segment_report_m
--- Begin Message ---
Next patch will find module names from NT_FILE note so that main executable
will no longer necessarily have the name "[exe]" or "[pie]".
-e|--executable still should be able to override such module.
libdwfl/
2014-09-09 Jan Kratochvil
* dwfl
On Fri, 29 Aug 2014 23:00:37 +0200, Mark Wielaard wrote:
> Yes, please push.
Checked in.
Thanks,
Jan
On Fri, 29 Aug 2014 22:15:50 +0200, Jan Kratochvil wrote:
> When I remove the check on 2.6.32 (tested on kernel-2.6.32-431.el6.x86_64) the
> testcase really FAILs:
> .../elfutils/src/stack: dwfl_thread_getframes tid 26376 at 0x4006c8 in
> .../elfutils/tests/deleted: no matc
On Fri, 29 Aug 2014 11:55:32 +0200, Mark Wielaard wrote:
> On Thu, 2014-08-28 at 22:12 +0200, Jan Kratochvil wrote:
> > +# Older Linux (such as 2.6.32) required PTRACE_ATTACH to read
> > /proc/PID/mem.
> > +sleep 60 & p=$!; sleep 0.1
> > +addr=0x$(cat /proc/$p/maps
produce:
#2 0x7f61094876d6 libfunc
#3 0x00400938 main
Signed-off-by: Jan Kratochvil
---
libdwfl/ChangeLog | 6 +
libdwfl/dwfl_module_getdwarf.c | 11 +-
tests/ChangeLog| 9
tests/Makefile.am | 10
On Thu, 07 Aug 2014 18:10:40 +0200, daggs wrote:
> Greetings,
>
> I'm trying to compile elfutils-0.159 on a 64 bit system.
> in the configure stage I'm getting to this situation:
> checking whether gcc -m32 makes executables we can run.. and it fails.
>
> I assume that this is because I don't hav
On Sun, 27 Jul 2014 22:53:58 +0200, Mark Wielaard wrote:
> Just one nitpick with the following comment:
> >
> > - GElf_Addr l_addr = addrs[0];
> > + // unused:
> > + // GElf_Addr l_addr = addrs[0];
> >GElf_Addr l_name = addrs[1];
> >GElf_Addr l_ld = addrs[2];
>
> C
right positions. Trying to exploit failure of the add-on code of mine always
ended up on the former code placing it right on its own.
Thanks,
Jan
--- Begin Message ---
Signed-off-by: Jan Kratochvil
---
libdwfl/ChangeLog | 6 ++
libdwfl/link_map.c | 10 +++---
2 files changed, 13 i
On Wed, 11 Jun 2014 15:33:28 +0200, Mark Wielaard wrote:
> When dwfl_attach_state fails functions that need the process state should
> return the error that caused the attach to fail. Use this in the backtrace
> test to signal any attach failure. This makes sure that architectures that
> don't prov
On Tue, 21 Jan 2014 17:26:51 +0100, Jan Kratochvil wrote:
> To make a summary what can remain from this patch to get it accepted:
> * "__morestack" check is forbidden
> * frames ordering by $sp0 < $sp1 is forbidden
> * dynamicsizehash.[ch] is forbidden
> * only $sp
On Wed, 12 Mar 2014 11:46:29 +0100, Mark Wielaard wrote:
> The test whether the shdrs are included in the mapped in segments is
> contents_size >= shdrs_end. And contents_size depends on segments_end
> (the last actual mapped file contents of the segment). segments_end is
> rounded up based on the
On Mon, 03 Mar 2014 15:31:28 +0100, Mark Wielaard wrote:
[...]
> --- a/libdwfl/elf-from-memory.c
> +++ b/libdwfl/elf-from-memory.c
> @@ -196,12 +196,14 @@ elf_from_remote_memory (GElf_Addr ehdr_vma,
>/* Scan for PT_LOAD segments to find the total size of the file image. */
>size_t contents
On Mon, 10 Mar 2014 21:27:54 +0100, Mark Wielaard wrote:
> Normally we either get all of the shdrs or can easily detect that the
> end of the ELF file (where the shdrs are normally located) doesn't fall
> completely in the last segment mapped in. The exception is needed only
> in some corner cases
On Mon, 10 Mar 2014 21:38:31 +0100, Mark Wielaard wrote:
> On Thu, 2014-03-06 at 20:55 +0100, Jan Kratochvil wrote:
> > In general I believe reading /proc/PID/maps is safer than the guessing by
> > elf_from_remote_memory(), for example because the image may come from mmap()
> >
On Mon, 03 Mar 2014 15:31:28 +0100, Mark Wielaard wrote:
> If the last PT_LOAD segment that contains the whole shdrs also extends
> the segment in memory beyond the end of file the program might be reusing
> the memory space that we expect the shdrs to be in. Don't trust the shdrs
> are valid in th
On Mon, 03 Mar 2014 15:31:27 +0100, Mark Wielaard wrote:
> --- a/libdwfl/elf-from-memory.c
> +++ b/libdwfl/elf-from-memory.c
[...]
> @@ -195,21 +200,28 @@ elf_from_remote_memory (GElf_Addr ehdr_vma,
>bool found_base = false;
>switch (ehdr.e32.e_ident[EI_CLASS])
> {
The return value co
On Tue, 04 Mar 2014 11:40:21 +0100, Mark Wielaard wrote:
[...]
> --- a/libdwfl/libdwflP.h
> +++ b/libdwfl/libdwflP.h
[...]
> @@ -387,6 +388,39 @@ struct dwfl_arange
> };
>
>
> +/* Structure used for keeping track of ptrace attaching a thread.
> + Shared by linux-pid-attach and linux-proc-map
On Tue, 04 Mar 2014 11:51:36 +0100, Mark Wielaard wrote:
> On Mon, 2014-03-03 at 23:55 +0100, Jan Kratochvil wrote:
> > On Mon, 03 Mar 2014 15:28:22 +0100, Mark Wielaard wrote:
> > > First the elf_from_remote_memory used the p_align value to see calculate
> > > the f
On Tue, 04 Mar 2014 11:40:21 +0100, Mark Wielaard wrote:
> Attached is a patch that does this. I'll push it to the mjw/pending
> branch.
It would be more readable if the " (deleted)" part was separated from the code
move/refactorization.
Jan
On Mon, 03 Mar 2014 17:05:39 +0100, Mark Wielaard wrote:
> On Sun, 2014-03-02 at 22:35 +0100, Jan Kratochvil wrote:
> > 2014-03-02 Jan Kratochvil
> >
> > Fix abort() on missing section headers.
> > * dwarf_begin_elf.c (check_section): Replace abort call by
On Mon, 03 Mar 2014 16:48:27 +0100, Mark Wielaard wrote:
> I didn't know BFD does something similar. Is that just for ELF or does
> BFD handle multiple formats from memory?
The only BFD implementation of that method is for ELF - in bfd/elfcode.h:
NAME(_bfd_elf,bfd_from_remote_memory)
Jan
On Mon, 03 Mar 2014 15:28:22 +0100, Mark Wielaard wrote:
> First the elf_from_remote_memory used the p_align value to see calculate
> the file offset and sizes of the segments in memory. But the dynamic
> loader doesn't p_align, it uses the actual pagesize,
The elfutils code really seems incorrect
On Tue, 25 Feb 2014 23:03:43 +0100, Mark Wielaard wrote:
> On Sat, 2014-02-22 at 22:08 +0100, Jan Kratochvil wrote:
> > jankratochvil/devmem
>
> The name, the subject and some of the comments talks about /dev.
> But I assume this is really about /proc?
Right, there isn't a
On Tue, 25 Feb 2014 23:56:23 +0100, Mark Wielaard wrote:
> - Could we reuse dwfl_pid () instead of adding another pid concept to
> struct Dwfl_Module? Then a user could just use dwfl_linux_proc_attach
> which might also help us get into the ptrace attach state if needed
> for reading /proc/PI
nk it makes sense to cleanup
> and return NULL; instead.
>
> See how we cleanup and return NULL just below this code when elf_strptr
> fails.
Yes, I agree.
Thanks,
Jan
libdw/
2014-03-02 Jan Kratochvil
Fix abort() on missing section headers.
* dwarf_begin_elf.c (check
On Tue, 25 Feb 2014 23:12:04 +0100, Mark Wielaard wrote:
> I rather not extend the libelf interface if possible. The various libelf
> implementations are already a little diverged. Lets not unnecessarily
> make the divergence even bigger.
I was aware of this issue but I had no other idea.
> If p
On Wed, 26 Feb 2014 17:42:26 +0100, Mark Wielaard wrote:
> I'll try and understand what I was trying to do,
> clean it up and post it, if it looks useful/sane.
OK, I think we can talk about it even in abstract.
The primary problem of bfd_from_remote_memory (bfd/elfcode.h) always IMO was
that it d
On Wed, 26 Feb 2014 17:29:38 +0100, Mark Wielaard wrote:
> I got something somewhat working some time back, but I don't understand my
> own patches... (most are really just lots of extra debug output).
And are those patches posted somewhere?
Jan
On Wed, 26 Feb 2014 09:18:44 +0100, Jean Pihet wrote:
> While at it, I have a concern about the compat mode: profiling an
> ARMv7 binary on an ARMv8 system.
> Is this supported by libdw?
elfutils target support is always independent of the host.
And every build of elfutils always contains all the
On Tue, 25 Feb 2014 18:17:24 +0100, Jean Pihet wrote:
> I am trying to compile libdw for ARM,
There is no need/possibility to specify ARM target or any other target, every
build of elfutils will always handle all the supported targets.
> *** missing i386_dis.h; configure with --enable-maintainer
Hi,
the core. The testcase mostly comes from the former patch.
Thanks,
Jan
--- Begin Message ---
libdwfl/
2014-02-22 Jan Kratochvil
Access deleted files by /dev/PID/mem.
* dwfl_module.c (dwfl_report_module_pid): New function.
* dwfl_module_getdwarf.c (open_elf
Hi,
probably obvious, easy to debug with [patch 3/3] applied.
Thanks,
Jan
--- Begin Message ---
libdw/
2014-02-22 Jan Kratochvil
Fix abort() on missing section headers.
* dwarf_begin_elf.c (check_section): Replace abort call by a return;
Signed-off-by: Jan Kratochvil
Hi,
jankratochvil/devmem
this is a different approach to:
[patch] Support live PIDs with deleted files
https://lists.fedorahosted.org/pipermail/elfutils-devel/2013-December/003637.html
Message-ID: <20131218191326.ga8...@host2.jankratochvil.net>
The patch above required /
Hi,
small refactorization / extension, no functionality change.
Thanks,
Jan
--- Begin Message ---
./
2014-02-22 Jan Kratochvil
Extend __libdw_open_file and elf_begin as *_at_offset.
* NEWS (libelf): New, with elf_begin_at_offset.
libdwfl/
2014-02-22 Jan Kratochvil
On Tue, 21 Jan 2014 17:04:32 +0100, Mark Wielaard wrote:
> Sorry I thought that was obvious. It disables consistency checking
> completely when a magic symbol can be found.
As on the real world supported platforms this magic symbol is the only way
when ebl-defined arch frames ordering can be viola
On Mon, 20 Jan 2014 11:08:45 +0100, Mark Wielaard wrote:
> On Sat, 2014-01-18 at 21:53 +0100, Jan Kratochvil wrote:
> > OK, so the patch can also already implement the GDB logic:
> >
> > https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=ebedcab50d2c7699ced
On Mon, 20 Jan 2014 10:55:25 +0100, Mark Wielaard wrote:
> it uses dl_iterate_phdr and only works for the current executable.
OK, I did not notice this one. I agree now making libbacktrace usable for
other / non-self programs may not be so easy.
Jan
On Sat, 18 Jan 2014 21:29:40 +0100, Mark Wielaard wrote:
> On Sat, Jan 18, 2014 at 07:27:50PM +0100, Jan Kratochvil wrote:
> > I agree there should be something like ' || true' but which system cannot
> > unwind 'main'? IIUC the 2 frames (and not 3 frames).
>
On Sat, 18 Jan 2014 21:34:41 +0100, Mark Wielaard wrote:
> On Sat, Jan 18, 2014 at 09:01:57PM +0100, Jan Kratochvil wrote:
> > tests/
> > 2014-01-18 Jan Kratochvil
> >
> > Fix false FAILs on testsuite with ulimit -c unlimited.
> > * backtrace-chi
On Sat, 18 Jan 2014 21:25:51 +0100, Mark Wielaard wrote:
> I don't think it is coincidence that split-stack would work. I believe we
> don't assume anything about the stack values and so it should work as
> expected since DWARF is expressive enough to describe it.
> http://gcc.gnu.org/wiki/SplitSta
On Wed, 15 Jan 2014 22:55:27 +0100, Mark Wielaard wrote:
> I forgot about that one. It is completely different from what we provide
> since it was designed to be used in-process and doesn't actually do
> unwinding (it just uses the system/libgcc _Unwind_Backtrace to get the
> raw call stack). Since
ust let the child exit
> normally after raise () returns.
The stack is corrupt at this point but OK, it can be done.
Thanks,
Jan
--- Begin Message ---
tests/
2014-01-18 Jan Kratochvil
Fix false FAILs on testsuite with ulimit -c unlimited.
* backtrace-child.c (si
On Thu, 16 Jan 2014 09:45:51 +0100, Mark Wielaard wrote:
> There can be more than 3 frames, but depending on the system/installed
> glibc we might not be able to unwind fully till the end.
> cxxfunc -> f -> main
> Expect to see the top two and a warning that there are more frames
> (exit code 1)
I
On Wed, 15 Jan 2014 16:16:34 +0100, Mark Wielaard wrote:
> - Maybe tweak the defaults for eu-stack based on feedback.
> Maybe use more debug information than just the line numbers if
> available (e.g. use the subprogram or inlined_subroutine names for the
> addresses found).
There is also li
On Wed, 15 Jan 2014 17:39:09 +0100, Mark Wielaard wrote:
> Looks good.
Checked in: 7c6e785e6eca774080a64801f950bd61785c469e
Thanks,
Jan
abort ();
223 }
Probably obvious.
Thanks,
Jan
>From 9909d959fe48b08682760ba8a615ccc87423f638 Mon Sep 17 00:00:00 2001
From: Jan Kratochvil
Date: Wed, 15 Jan 2014 14:16:13 +0100
Subject: [PATCH] Fix false FAILs on testsuite with ulimit -c unlimited.
tests/
2014-01-15 Jan Kratochvil
On Tue, 14 Jan 2014 10:00:59 +0100, Mark Wielaard wrote:
> The __GLOBAL__.[ID]_xxx functions are wrappers generated when a module
> xxx contains constructors and destructors of static objects, which will
> call the actual static initialization and destruction functions for all
> globals in the modu
GLOBAL_DTORS but I
could not find a compliant symbol without leading _Z for it.
DCT_TYPE is apparently inappropriate for the unwinder.
Thanks,
Jan
commit e1b6b9d3131f32ef54932388c814adc02ca6a329
Author: Jan Kratochvil
Date: Mon Jan 13 23:04:03 2014 +0100
Fix corruption of non-C++ symbo
Hi Mark,
On Tue, 07 Jan 2014 10:03:26 +0100, Mark Wielaard wrote:
> Defaulting to infinite backtraces for all threads in a process will just
> flood console or log files. That isn't useful.
Not printing the reason for the crash is also not useful.
Jan
On Mon, 06 Jan 2014 15:52:08 +0100, Mark Wielaard wrote:
> The default output should be useful as is.
Which it is not. As for the common case of stack overflow by infinite loop it
does not show the reason.
> Of course they can tweak if however they want.
> eu-stack has many options to tailor th
On Thu, 02 Jan 2014 23:52:05 +0100, Mark Wielaard wrote:
> On Thu, Jan 02, 2014 at 08:45:47PM +0100, Jan Kratochvil wrote:
> > On Mon, 23 Dec 2013 11:21:19 +0100, Mark Wielaard wrote:
> > > Limit the number of frames printed per thread (defaults to 64)
> >
> > The
.
Thanks,
Jan
--- Begin Message ---
libdwfl/
2014-01-03 Jan Kratochvil
Detect infinite backtraces.
* dwfl_frame.c (state_alloc): Initialize CFA.
* frame_unwind.c (expr_eval): Remove parameter frame, add parameter
elfclass. Move elfclass to handle_cfi. Replace
On Thu, 02 Jan 2014 10:40:38 +0100, Mark Wielaard wrote:
> After that I would like to push for a 0.158 release on Monday after
> testing it on various setups this weekend. Unless any critical
> regressions are found.
I did not expect you would release elfutils as is. According to our very long
pp
On Fri, 03 Jan 2014 00:01:13 +0100, Mark Wielaard wrote:
> --- a/src/stack.c
> +++ b/src/stack.c
> @@ -255,7 +255,8 @@ print_frames (struct frames *frames, pid_t tid, int
> dwflerr, const char *what)
> do
> printf ("%02" PRIx8, *id++);
> while (--id_len > 0);
On Fri, 03 Jan 2014 00:09:04 +0100, Mark Wielaard wrote:
> --- a/src/stack.c
> +++ b/src/stack.c
> @@ -47,9 +47,7 @@ static bool show_build_id = false;
> static bool show_source = false;
> static bool show_one_tid = false;
> static bool show_quiet = false;
> -#ifdef USE_DEMANGLE
> static bool s
On Mon, 23 Dec 2013 23:28:21 +0100, Mark Wielaard wrote:
> We might already have allocated memory to hold the build_id early in
> consider_notes when we called consider_phdr for the program headers
> we've read from the image. We would leak that memory when we don't use
> it then because we return
On Fri, 27 Dec 2013 22:37:52 +0100, Mark Wielaard wrote:
> Check up front whether we attached correctly, if not error out. Make sure
> callbacks report -1 only on real errors and DWARF_CB_ABORT if exiting early
> (but not in error). Handle all errors from frame callback in print_frames
> after prin
On Mon, 23 Dec 2013 21:35:41 +0100, Mark Wielaard wrote:
> +#ifdef USE_DEMANGLE
> +case 'r':
> + show_raw = true;
> + break;
> +#endif
It is more a nitpick but I do not find too great that a build without
demangling support will fail "eu-stack -r ..." with:
eu-stack: invalid
On Mon, 23 Dec 2013 11:21:52 +0100, Mark Wielaard wrote:
[...]
> + {
> + printf ("\n[");
> + do
> + printf ("%02" PRIx8, *id++);
> + while (--id_len > 0);
> + printf ("]@0x%0" PRIx64 "+%" PRIx64, start, pc_adjusted - start);
why not:
On Mon, 23 Dec 2013 11:21:19 +0100, Mark Wielaard wrote:
> Limit the number of frames printed per thread (defaults to 64)
The new option is sure OK but any non-infinite default is not right:
* Normal applications have deeper stack than 64. When I broke into my
GTK running app it has 103 fram
On Wed, 25 Dec 2013 23:10:50 +0100, Mark Wielaard wrote:
> On Wed, Dec 25, 2013 at 08:23:25PM +0100, Jan Kratochvil wrote:
> > On Mon, 23 Dec 2013 14:22:24 +0100, Mark Wielaard wrote:
> > > + {
> > > +pid = atoi (&buffer[5]);
> > > +
On Thu, 19 Dec 2013 14:01:26 +0100, Mark Wielaard wrote:
> Do you have a reference to do documentation of /proc/PID/map_files?
[...]
> But it would be good to see the "official" documentation if there is any
> to make sure we are using the kernel interface/contract as intended.
There is nothing in
On Mon, 23 Dec 2013 14:22:24 +0100, Mark Wielaard wrote:
[...]
> --- a/libdwfl/linux-pid-attach.c
> +++ b/libdwfl/linux-pid-attach.c
> @@ -301,6 +301,27 @@ bool
> internal_function
> __libdwfl_attach_state_for_pid (Dwfl *dwfl, pid_t pid)
> {
> + char buffer[36];
> + FILE *procfile;
> +
> + /*
On Sat, 21 Dec 2013 21:56:35 +0100, Mark Wielaard wrote:
> On PPC64 there are two DWARF registers numbers that can represent the
> same register. If that register is the CIE return register then we only
> want to set it once. The second setting will confuse the unwinder.
OK with the patch. It is
On Mon, 23 Dec 2013 13:54:19 +0100, Mark Wielaard wrote:
> On Sun, 2013-12-22 at 16:51 +0100, Jan Kratochvil wrote:
> > If I have PID=12000 and I do 'eu-stack -p 12001' (its thread TID) then for
> > elfutils in fact PID is 12001. So if Dwfl_Thread_Callbacks.next_thread
&
On Sat, 21 Dec 2013 21:56:35 +0100, Mark Wielaard wrote:
> On PPC64 there are two DWARF registers numbers that can represent the
> same register. If that register is the CIE return register then we only
> want to set it once. The second setting will confuse the unwinder.
Could you provide reproduc
On Mon, 23 Dec 2013 14:22:24 +0100, Mark Wielaard wrote:
> --- a/src/ChangeLog
> +++ b/src/ChangeLog
> @@ -1,5 +1,9 @@
> 2013-12-23 Mark Wielaard
>
> + * stack.c (main): Print pid of process or core.
> +
> +2013-12-23 Mark Wielaard
> +
> * stack.c (OPT_DEBUGINFO): New define.
>
Hi Mark,
this whole discussion is difficult without seeing how you want to use it.
I am considering only the eu-stack case as you supplied patch for it.
On Sun, 22 Dec 2013 00:51:39 +0100, Mark Wielaard wrote:
> On Sat, 2013-12-21 at 22:33 +0100, Jan Kratochvil wrote:
> > [...]
&g
On Fri, 20 Dec 2013 15:23:54 +0100, Mark Wielaard wrote:
> While playing with the new unwinder interfaces I noticed that I was
> writing the same extra wrapper callbacks every time.
Glad you agree the callbacks without lambda functions are a pain. :-)
[...]
> --- a/libdwfl/libdwfl.h
> +++ b/libd
On Sat, 21 Dec 2013 19:44:28 +0100, Mark Wielaard wrote:
> On some architectures gcc might introduce some "padding instructions"
> at the end of the function (like on ppc64). So only assert we are at the
> last instruction of backtracegen if on x86_64 native. In theory the assert
> could even fail
Hi Mark,
I forgot the demo:
# cd tests;make deleted deleted-lib.so;./deleted&p=$!;sleep 0.1;rm deleted
deleted-lib.so;../src/stack -m -p $p
[...]
TID 7712:
#0 0x0033472bd360 __nanosleep - /usr/lib64/libc-2.17.so
#1 0x0033472bd214 sleep - /usr/lib64/libc-2.17.so
#2 0x7f9aa725b6d6 l
is skipped when /proc/PID/map_files/ gives permission error.
OK for check-in?
I am not completely sure setting just mod->main.name is right but it looks so.
Thanks,
Jan
--- Begin Message ---
libdwfl/
2013-12-18 Jan Kratochvil
Support live PIDs with deleted files.
* linux-p
1 - 100 of 443 matches
Mail list logo