Remove nested functions from libdwfl V2

Mark Wielaard mark@klomp.org
Wed Nov 25 16:33:33 GMT 2020


Hi Timm,

On Mon, 2020-11-23 at 13:27 +0100, Timm Bäder via Elfutils-devel wrote:
> version 2 of this patch set. I removed segmend_read() entirely now,
> which meant modifying a bunch of later patches. Other than that, they
> are the same.
> 
> Hope the --from to git send-email worked out, too.

It did, thanks.

I immediately picked up 9 of these patches that clearly looked like
they improved the code. I added ChangeLog entries and might have
slightly tweaked the large lines to be a little shorter (also fixed up
some tab vs space indents, but the file wasn't really consistent to
begin with).

The last three I skipped for now were:

- segment_report_module: Pull finish_portion() info file scope
- segment_report_module: Pull read_portion() into file scope
- segment_report_module: Pull consider_notes() into file scope

The first two aren't so bad, but maybe we can find a way to not pass so
many arguments around (have a state struct with dwfl,
memory_callback[_arg], data and size maybe?)

consider_notes might be better just inlined because it is used only
once.

Let me know what you think.

Cheers,

Mark


More information about the Elfutils-devel mailing list