Commit Graph

14 Commits

Author SHA1 Message Date
Arnaldo Carvalho de Melo 80af0fbbf3 dutils: Allow for having a priv area per strlist
We'll use it to parse args to a class, before we find it.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2020-08-05 15:16:19 -03:00
Arnaldo Carvalho de Melo 42b7a759f3 dutil: Add a strlwr() helper to lowercase a string, returning it
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2020-08-05 15:16:19 -03:00
Arnaldo Carvalho de Melo 37a5c7c5ba strlist: Allow iterating a strlist in the original order
I.e. when we do:

	pahole -C a,b,c,d binary

We want that the 'a' type be processed first, etc. So add a list for
that.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2020-08-05 15:16:19 -03:00
Domenico Andreoli e714d2eaa1 Adopt SPDX-License-Identifier
Signed-off-by: Domenico Andreoli <domenico.andreoli@linux.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2019-01-18 15:41:48 -03:00
Arnaldo Carvalho de Melo a54515fa6e dwarves: Stop using 'self'
As Thomas Gleixner wisely pointed out, using 'self' is stupid, it
doesn't convey useful information, so use sensible names.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-08-17 18:47:15 -03:00
Arnaldo Carvalho de Melo 1009bc9fe7 dutil: Convert strlist to use rb_trees
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2009-06-18 14:02:29 -03:00
Arnaldo Carvalho de Melo 1701b6d68d dutil: Allow returning the section index in elf_section_by_name
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2009-04-03 11:53:05 -03:00
Arnaldo Carvalho de Melo 08d41fb4d2 strlist: Return false if NULL is passed to strlist__has_entry
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2009-04-03 11:49:46 -03:00
Arnaldo Carvalho de Melo 57ae9740d8 strlist: Allow strlist__add to distinguish ENOMEM from EEXIST
I.e. the operation may fail because the string is already there or
because there wasn't enough memory.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2009-04-03 11:47:28 -03:00
Arnaldo Carvalho de Melo 8bf5eb9bc8 dutil: Move elf_section_by_name to dutil
Will be used by more than one file.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2009-03-24 16:56:19 -03:00
Arnaldo Carvalho de Melo ccc808b88e dutil: Move zalloc to dutil
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2009-03-18 11:08:23 -03:00
Arnaldo Carvalho de Melo 4d44276d85 coding style: remove trailing whitespaces, etc
Amazing how many crept up over time, should have set the
execute bit of .git/hooks/pre-commit already, duh.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2009-03-14 13:50:36 -03:00
Arnaldo Carvalho de Melo 66b7191c18 [DUTIL]: Generalise fstrlist
Now at creation time we specify if the strings must be allocated or if using
the pointer directly.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-12-16 14:55:50 -02:00
Arnaldo Carvalho de Melo 06b3a1073e [DUTIL]: utilities for the dwarves
Can be used in other projects too.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-11-17 18:05:40 -02:00