Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1485472

Re: [PATCH v2] scripts: add script for translating stack dump function offsets

From Linus Torvalds <torvalds@linux-foundation.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2] scripts: add script for translating stack dump function offsets
Date 2016-09-17 04:40 +0200
Message-ID <sidHP-52b-1@gated-at.bofh.it> (permalink)
References (7 earlier) <si6ZH-ym-19@gated-at.bofh.it> <si8RP-1P5-7@gated-at.bofh.it> <sibmF-3x5-3@gated-at.bofh.it> <sibZn-3MK-5@gated-at.bofh.it> <sid57-4pC-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Sep 16, 2016 at 6:59 PM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> And finally, I suspect (5) is not reasonably fixable. Oh well. It
> would require some kind of "figure out the largest common prefix of
> all the filenames in the whole object file". So I'm *not* talking
> about just passing "--basenames" to addr2line.
>
> Hmm. Maybe looking up the "DW_AT_comp_dir" tag in the debug info would
> work? And just stripping that off?

Thinking more about this, that actually sounds like it might be the
right thing to do.

It doesn't work for most projects, but the way the kernel build system
is set up, we don't actually recursively descend into subdirectories,
we always build at the top level. So DW_AT_comp_dir should always (?)
be the actual top-level build directory, and we could just scrape that
off from the addr2line output.

That said, I don't even know what the "real" way to dump the debug
symbol data is. I do *not* believe that you should use

  readelf -W --debug-dump vmlinux | grep DW_AT_comp_dir | head -1

to get the information. There is bound to be something much better.
Somebody who knows the ELF tools can now pipe in and show the world
what a maroon I am.

               Linus

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

perf: perf_fuzzer lockup in perf_cgroup_attach Vince Weaver <vincent.weaver@maine.edu> - 2016-09-15 04:50 +0200
  Re: perf: perf_fuzzer lockup in perf_cgroup_attach Stephane Eranian <eranian@google.com> - 2016-09-15 07:40 +0200
    Re: perf: perf_fuzzer lockup in perf_cgroup_attach Peter Zijlstra <peterz@infradead.org> - 2016-09-15 09:30 +0200
      Re: perf: perf_fuzzer lockup in perf_cgroup_attach Josh Poimboeuf <jpoimboe@redhat.com> - 2016-09-15 14:20 +0200
        [PATCH] scripts: add script for translating stack dump function  offsets Josh Poimboeuf <jpoimboe@redhat.com> - 2016-09-16 16:50 +0200
          Re: [PATCH] scripts: add script for translating stack dump function offsets Linus Torvalds <torvalds@linux-foundation.org> - 2016-09-16 20:20 +0200
            Re: [PATCH] scripts: add script for translating stack dump function  offsets Josh Poimboeuf <jpoimboe@redhat.com> - 2016-09-16 21:20 +0200
              Re: [PATCH] scripts: add script for translating stack dump function offsets Linus Torvalds <torvalds@linux-foundation.org> - 2016-09-16 21:30 +0200
                [PATCH v2] scripts: add script for translating stack dump function  offsets Josh Poimboeuf <jpoimboe@redhat.com> - 2016-09-16 23:30 +0200
                Re: [PATCH v2] scripts: add script for translating stack dump  function offsets Linus Torvalds <torvalds@linux-foundation.org> - 2016-09-17 02:10 +0200
                Re: [PATCH v2] scripts: add script for translating stack dump  function offsets Josh Poimboeuf <jpoimboe@redhat.com> - 2016-09-17 02:50 +0200
                Re: [PATCH v2] scripts: add script for translating stack dump  function offsets Linus Torvalds <torvalds@linux-foundation.org> - 2016-09-17 04:00 +0200
                Re: [PATCH v2] scripts: add script for translating stack dump  function offsets Linus Torvalds <torvalds@linux-foundation.org> - 2016-09-17 04:40 +0200
                Re: [PATCH v2] scripts: add script for translating stack dump  function offsets Josh Poimboeuf <jpoimboe@redhat.com> - 2016-09-17 20:50 +0200
                [PATCH v3] scripts: add script for translating stack dump function Josh Poimboeuf <jpoimboe@redhat.com> - 2016-09-19 18:00 +0200
                Re: [PATCH v3] scripts: add script for translating stack dump function Linus Torvalds <torvalds@linux-foundation.org> - 2016-09-19 21:00 +0200
                Re: [PATCH v3] scripts: add script for translating stack dump function Linus Torvalds <torvalds@linux-foundation.org> - 2016-09-19 21:20 +0200
                Re: [PATCH v3] scripts: add script for translating stack dump  function Josh Poimboeuf <jpoimboe@redhat.com> - 2016-09-19 21:30 +0200
                Re: [PATCH v3] scripts: add script for translating stack dump  function Rabin Vincent <rabin@rab.in> - 2016-09-19 22:10 +0200
                Re: [PATCH v3] scripts: add script for translating stack dump function Linus Torvalds <torvalds@linux-foundation.org> - 2016-09-19 22:30 +0200
                Re: [PATCH v3] scripts: add script for translating stack dump  function Josh Poimboeuf <jpoimboe@redhat.com> - 2016-09-19 23:00 +0200
                Re: [PATCH v3] scripts: add script for translating stack dump  function Josh Poimboeuf <jpoimboe@redhat.com> - 2016-09-19 23:10 +0200
                Re: [PATCH v3] scripts: add script for translating stack dump function Linus Torvalds <torvalds@linux-foundation.org> - 2016-09-19 23:10 +0200
                Re: [PATCH v2] scripts: add script for translating stack dump  function offsets Peter Zijlstra <peterz@infradead.org> - 2016-09-17 03:30 +0200
                Re: [PATCH v2] scripts: add script for translating stack dump  function offsets Rabin Vincent <rabin@rab.in> - 2016-09-17 10:20 +0200
                Re: [PATCH v2] scripts: add script for translating stack dump  function offsets Josh Poimboeuf <jpoimboe@redhat.com> - 2016-09-17 20:50 +0200
              Re: [PATCH] scripts: add script for translating stack dump function offsets Vegard Nossum <vegard.nossum@gmail.com> - 2016-09-17 11:20 +0200
                Re: [PATCH] scripts: add script for translating stack dump function  offsets Josh Poimboeuf <jpoimboe@redhat.com> - 2016-09-17 21:00 +0200
    Re: perf: perf_fuzzer lockup in perf_cgroup_attach Vince Weaver <vincent.weaver@maine.edu> - 2016-09-15 14:50 +0200
  Re: perf: perf_fuzzer lockup in perf_cgroup_attach Peter Zijlstra <peterz@infradead.org> - 2016-09-15 09:20 +0200
    Re: perf: perf_fuzzer lockup in perf_cgroup_attach Vince Weaver <vincent.weaver@maine.edu> - 2016-09-15 14:50 +0200

csiph-web