[PATCH 1/2] libdwfl: specify optional sysroot to search for shared libraries and binaries

2024-07-01 Thread Michal Sekletar
x86 host. This change adds a new function, dwfl_set_sysroot(), which then gets used when searching for libraries and binaries. Signed-off-by: Luke Diamand Signed-off-by: Michal Sekletar --- libdw/libdw.map | 5 +++ libdwfl/Makefile.am | 1 + libdwfl/core

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

2024-07-01 Thread Michal Sekletar
From: 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 Signed-off-by: Michal Sekletar --- src/stack.c | 9 + 1 file changed, 9

Re: [PATCH 1/2] libdwfl: specify optional sysroot to search for shared libraries and binaries

2024-07-02 Thread Michal Sekletar
On Mon, Jul 1, 2024 at 7:06 PM Frank Ch. Eigler wrote: > > Hi - > > > [...] For example, we might be looking at a core file from an ARM > > system using elfutils running on an x86 host. [...] > > Makes sense. By the way, to what extent would debuginfod (serving > files from that sysroot) work fo

Re: [PATCH 1/2] libdwfl: specify optional sysroot to search for shared libraries and binaries

2024-07-02 Thread Michal Sekletar
On Tue, Jul 2, 2024 at 1:04 PM Dmitry V. Levin wrote: > > On Mon, Jul 01, 2024 at 06:56:21PM +0200, Michal Sekletar wrote: > [...] > > --- a/libdwfl/link_map.c > > +++ b/libdwfl/link_map.c > > @@ -416,8 +416,22 @@ report_r_debug (uint_fast8_t elfclass, uint_fast8_t e

[PATCH v2 1/3] libdwfl: specify optional sysroot to search for shared libraries and binaries

2024-07-02 Thread Michal Sekletar
x86 host. This change adds a new function, dwfl_set_sysroot(), which then gets used when searching for libraries and binaries. Signed-off-by: Luke Diamand Signed-off-by: Michal Sekletar --- libdw/libdw.map | 5 ++ libdwfl/Makefile.am | 1 + libdwfl/core

[PATCH v2 2/3] eu-stack: add support for sysroot option

2024-07-02 Thread Michal Sekletar
From: 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 Signed-off-by: Michal Sekletar --- src/stack.c | 9 + 1 file changed, 9

Re: [PATCH 1/2] libdwfl: specify optional sysroot to search for shared libraries and binaries

2024-07-02 Thread Michal Sekletar
On Tue, Jul 2, 2024 at 1:04 PM Dmitry V. Levin wrote: > On Mon, Jul 01, 2024 at 06:56:21PM +0200, Michal Sekletar wrote: > [...] > > --- a/libdwfl/link_map.c > > +++ b/libdwfl/link_map.c > > @@ -416,8 +416,22 @@ report_r_debug (uint_fast8_t elfclass, uint_fast8_t > e

Re: [PATCH v2 1/3] libdwfl: specify optional sysroot to search for shared libraries and binaries

2024-07-03 Thread Michal Sekletar
On Wed, Jul 3, 2024 at 4:38 PM Dmitry V. Levin wrote: > On Tue, Jul 02, 2024 at 07:30:58PM +0200, Michal Sekletar wrote: > [...] > > +int > > +dwfl_set_sysroot (Dwfl *dwfl, const char *sysroot) > > +{ > > + if (!sysroot) > > +{ > > + free

Re: [PATCH 1/2] libdwfl: specify optional sysroot to search for shared libraries and binaries

2024-07-08 Thread Michal Sekletar
On Fri, Jul 5, 2024 at 12:58 AM Aaron Merey wrote: > Hi Michal, > > On Tue, Jul 2, 2024 at 1:34 PM Michal Sekletar > wrote: > > > > I've sent out v2 where I tried to incorporate the feedback. Also I've > added a test case. > > Thanks for adding the t

Re: [PATCH v2 3/3] tests: add test for eu-stack --sysroot

2024-07-15 Thread Michal Sekletar
On Fri, Jul 12, 2024 at 5:38 PM Aaron Merey wrote: > > Hi Ying, > > On Wed, Jul 10, 2024 at 2:06 PM Aaron Merey wrote: > > > > On Wed, Jul 10, 2024 at 4:33 AM Ying Huang wrote: > > > > > > + testrun diff /tmp/tmp.bCCbATKu43/stack.out - > > > + built_testrun diff /tmp/tmp.bCCbATKu43/stack.out - >

[PATCH] libdwfl: resolve all paths relative to sysroot

2025-03-19 Thread Michal Sekletar
Whenever possible, resolve all symlinks as if the sysroot path were a chroot environment. This prevents potential interactions with files from the host filesystem. Signed-off-by: Michal Sekletar --- configure.ac | 17 + libdwfl