[PATCH] readelf: Pull advance_pc() in file scope

2021-03-18 Thread Timm Bäder via Elfutils-devel
From: Timm Bäder Make advance_pc() a static function so we can get rid of another nested function. Rename it to run_advance_pc() and use a local advance_pc() macro to pass all the local variables. This is similar to what the equivalent code in libdw/dwarf_getsrclines.c is doing. Signed-off-by: T

readelf: Pull advance_pc() in file scope

2021-03-18 Thread Timm Bäder via Elfutils-devel
Giving this another shot since pulling all the parsing code into libdwP.h seems a bit overkill (and potentially buggy of course). The downside is that run_advance_pc() takes 6 arguments instead of the 4 that it takes in libdwarf_getsrclines.c