Re: Openwrt porting

2023-12-24 Thread Luke Diamand
On 2023-12-24 07:12, taehee Park wrote: I think elfutils is very useful in debugging. But i cant use this in openwrt package. Because only library is built and utility like eu-stack or eu-readelf not built Could someone help thus? I don't know anything about openwrt, but quickly looking at the

Re: [EXTERNAL] Re: [PATCH 1/5] strip: Adapt src/strip -o -f on mips

2023-05-16 Thread Luke Diamand via Elfutils-devel
On 09/05/2023 16:15, Mark Wielaard wrote: Hi, On Tue, 2023-04-11 at 16:12 +0800, Ying Huang wrote: From: Ying Huang In mips64 little-endian, r_info consists of four byte fields(contains three reloc types) and a 32-bit symbol index. In order to adapt GELF_R_SYM and GELF_R_TYPE, need convert

[PATCHv2 1/1] report_r_debug: handle `-z separate-code' and find more modules

2023-05-12 Thread Luke Diamand via Elfutils-devel
. The example I found had: - 36 elements - 109 iterations See also discussion here: https://sourceware.org/pipermail/elfutils-devel/2023q2/006149.html Signed-off-by: Luke Diamand --- libdwfl/link_map.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/libdwfl

[PATCHv2 0/1] In report_r_debug, iterate more segments

2023-05-12 Thread Luke Diamand via Elfutils-devel
and the fix. Luke Diamand (1): report_r_debug: handle `-z separate-code' and find more modules libdwfl/link_map.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) -- 2.40.1

Re: [EXTERNAL] Re: Hitting g dwfl->lookup_elts limit in report_r_debug, so not all modules show up and backtracing fails

2023-05-12 Thread Luke Diamand via Elfutils-devel
On 08/05/2023 17:35, Mark Wielaard wrote: Hi Florian, Hi Luke, On Tue, 2023-05-02 at 09:57 +0200, Florian Weimer via Elfutils-devel wrote: * Luke Diamand via Elfutils-devel: I've got a few cores where report_r_debug() in link_map.c fails to find all of the modules - for example

[RFC PATCH 1/1] report_r_debug: handle `-z separate-code' and find more modules

2023-05-12 Thread Luke Diamand via Elfutils-devel
rmail/elfutils-devel/2023q2/006149.html Signed-off-by: Luke Diamand --- libdwfl/link_map.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/libdwfl/link_map.c b/libdwfl/link_map.c index 06d85eb6..975910a9 100644 --- a/libdwfl/link_map.c +++ b/libdwfl/link_

[RFC PATCH 0/1] In report_r_debug, iterate more segments

2023-05-12 Thread Luke Diamand via Elfutils-devel
unable to reproduce the problem in a suitably small example. Luke Diamand (1): report_r_debug: handle `-z separate-code' and find more modules libdwfl/link_map.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) -- 2.39.1

Hitting g dwfl->lookup_elts limit in report_r_debug, so not all modules show up and backtracing fails

2023-04-25 Thread Luke Diamand via Elfutils-devel
I've got a few cores where report_r_debug() in link_map.c fails to find all of the modules - for example I had libc.so missing. This obviously meant that elfutils could not backtrace my core. It seems to be related to this code: /* There can't be more elements in the link_map list than there

[PATCHv2 2/2] eu-stack: add support for sysroot option

2019-01-22 Thread Luke Diamand
Use the dwfl_set_sysroot() function to set the sysroot to be used when analysing a core: e.g. $ eu-stack --core core --sysroot /path/to/sysroot -e crashing_prog Signed-off-by: Luke Diamand --- src/stack.c | 9 + 1 file changed, 9 insertions(+) diff --git a/src/stack.c b/src/stack.c

[PATCHv2 1/2] libdwfl: specify optional sysroot to search for shared libraries

2019-01-22 Thread Luke Diamand
change adds a new function, dwfl_set_sysroot(), which then gets used when searching for libraries. Signed-off-by: Luke Diamand --- libdw/libdw.map| 7 ++- libdwfl/dwfl_end.c | 1 + libdwfl/libdwfl.h | 5 + libdwfl/libdwflP.h | 1 + libdwfl/link_map.c | 26 -- 5

[PATCHv2 0/2] specify a sysroot to search when examining a core file

2019-01-22 Thread Luke Diamand
This updates my patch to check for a NULL sysroot, as pointed out by Dmitry, and to canonicalize sysroot. https://sourceware.org/ml/elfutils-devel/2019-q1/msg00071.html Luke Diamand (2): libdwfl: specify optional sysroot to search for shared libraries eu-stack: add support for sysroot option

MIPS Elfutils support?

2019-01-20 Thread Luke Diamand
Hi! I was hoping to use elfutils on some MIPS core files. So I was wondering what the status is? There is a patch in Debian (apparently originally from RedHat?) here: https://sources.debian.org/src/elfutils/0.175-2/debian/patches/mips_backend.diff/ That's not in the mainline code though, and a

[PATCHv1 1/2] libdwfl: specify optional sysroot to search for shared libraries

2019-01-20 Thread Luke Diamand
change adds a new function, dwfl_set_sysroot(), which then gets used when searching for libraries. Signed-off-by: Luke Diamand --- libdw/libdw.map| 7 ++- libdwfl/libdwfl.h | 5 + libdwfl/libdwflP.h | 1 + libdwfl/link_map.c | 25 +++-- 4 files changed, 35

[PATCHv1 2/2] eu-stack: add support for sysroot option

2019-01-20 Thread Luke Diamand
Use the dwfl_set_sysroot() function to set the sysroot to be used when analysing a core: e.g. $ eu-stack --core core --sysroot /path/to/sysroot -e crashing_prog Signed-off-by: Luke Diamand --- src/stack.c | 9 + 1 file changed, 9 insertions(+) diff --git a/src/stack.c b/src/stack.c

[PATCHv1 0/2] specify a sysroot to search when examining a core file

2019-01-20 Thread Luke Diamand
a virt-qemu platform built from buildroot. Luke Diamand (2): libdwfl: specify optional sysroot to search for shared libraries eu-stack: add support for sysroot option libdw/libdw.map| 7 ++- libdwfl/libdwfl.h | 5 + libdwfl/libdwflP.h | 1 + libdwfl/link_map.c | 25

Re: dwfl_link_map_report() on a core file with sysroot? Opens the wrong solibs?

2019-01-06 Thread Luke Diamand
On Sun, 6 Jan 2019 at 21:04, Mark Wielaard wrote: > > On Fri, Dec 14, 2018 at 01:44:17PM +, Luke Diamand wrote: > > On Thu, 13 Dec 2018 at 22:37, Roland McGrath wrote: > > > > > > I think it's just missing. The hardest part is just deciding how t

Re: dwfl_link_map_report() on a core file with sysroot? Opens the wrong solibs?

2018-12-14 Thread Luke Diamand
I can just use the find_elf callback instead. > > On Thu, Dec 13, 2018, 12:27 Luke Diamand > >> I'm trying to get callstacks out of a core file using libdwfl where >> the ELF files live in a sysroot (and are from a different >> architecture, ARM). >> &

dwfl_link_map_report() on a core file with sysroot? Opens the wrong solibs?

2018-12-13 Thread Luke Diamand
I'm trying to get callstacks out of a core file using libdwfl where the ELF files live in a sysroot (and are from a different architecture, ARM). I'm possibly doing something stupid as I find that dwfl_link_map_report() opens /lib/libpthread.so on the *host* rather than the libpthread.so from my s