Commit Graph

71 Commits

Author SHA1 Message Date
Arnaldo Carvalho de Melo f4f8e0e16d [LIB]: First stab at supporting vtables
Will just print the vtable as a comment on classes with vtables.

But we have to support multiple vtables when multiple inheritance exists.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-07-08 20:57:23 -03:00
Arnaldo Carvalho de Melo 9c92fc59fb [LIB]: Add vtable_entry to struct function
To support the DW_AT_vtable_elem_location attribute.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-07-08 20:35:49 -03:00
Arnaldo Carvalho de Melo ce516fb0cf [LIB]: Support DW_AT_MIPS_linkage_name
Another C++ specific case:

-       class TypeTemplate ByName(const string  &, size_t);
+       class TypeTemplate ByName(const string  &, size_t); /* linkage=_ZN4ROOT6Reflex12TypeTemplate6ByNameERKSsj */

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-07-08 19:47:26 -03:00
Arnaldo Carvalho de Melo 39a6eba82a [LIB]: Introduce suppress_offset_comment in conf_fprintf
And use it when expandind pointer types (using --expand_pointer).

This has to be done because the offset comments make no sense when expanding a
pointer.

Will be used as well in pahole --quiet.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-07-07 14:41:41 -03:00
Arnaldo Carvalho de Melo d653039ef4 [LIB]: Add conf->expand_pointers
So that we can expand pointer types, useful for ABI signature checking. And to
fully browse a type, when using --expand_types is also of interest.

I have yet to disable printing the offsets when expanding pointers, where the
information is not useful at all, for now just ignore it, it gets back to a
sane state in the next field, after the pointer type expansion.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-07-04 20:36:28 -03:00
Arnaldo Carvalho de Melo 59099b3481 [LIB]: Make array_type__fprintf use type__fprintf
This way it can handle arrays of anonymous structs.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-07-01 20:04:19 -03:00
Arnaldo Carvalho de Melo 0b3969bdb4 [LIB]: Introduce conf_fprintf.suppress_comments
pahole will use it in the --quiet mode.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-06-22 16:51:31 -03:00
Arnaldo Carvalho de Melo 3d010109c8 [LIB]: Add missing prototype for parameter__name
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-06-12 15:40:22 -03:00
Arnaldo Carvalho de Melo 59e957f8f9 [LIB]: Introduce {function,ftype}__for_each_parameter
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-06-12 15:01:23 -03:00
Arnaldo Carvalho de Melo 9cc29c8181 [LIB]: conf_fprintf.indent needs more than one bit...
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-06-07 16:15:03 -03:00
Arnaldo Carvalho de Melo 8ca9c293f1 [LIB]: tag__is_union should check if its a DW_TAG_union_type
Stupid cut'n'paste error.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-06-07 15:58:33 -03:00
Arnaldo Carvalho de Melo 9486197977 [LIB]: Introduce tag__is_{enumeration,union,namespace}
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-05-31 02:21:36 -03:00
Arnaldo Carvalho de Melo cf124f1636 [LIB]: Introduce tag__is_struct() for a common idiom
And also to get this less, ho-hum, DWARF specific.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-05-31 01:53:01 -03:00
Arnaldo Carvalho de Melo 48a1d89ec0 [LIB]: Introduce conf_fprintf.no_semicolon
To indicate wheter the semicolon should be supressed. Useful for
prototype/function emission, etc.

Also move the struct stats to be inside its body, to simplify tag__fprintf,
that now looks at conf.no_semicolon after calling the tag type specific
__fprintf method.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-05-31 01:39:44 -03:00
Arnaldo Carvalho de Melo 281955d800 [LIB]: Add the show_only_data_members field to struct conf_fprintf
So that tools can specify if they are interested in printing just the members
that use space in the class layout (DW_TAG_inheritance, DW_TAG_member) and not
things like constructors, private type definitions, etc.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-05-30 11:36:54 -03:00
Arnaldo Carvalho de Melo 911375f5c5 [LIB]: Introduce type__for_each_data_member
So that we traverse just the data members, mostly in the reorganize code, where
we can't care less where is that the compiler put the base classes in the
layout since we can't influence how the compiler does this, it has only to
respect the layout we specify for the data members.

Well, it may well be the case that the order of the ancestor classes in the
class declaration can influence this, but I haven't checked.

Yes, another C++ism :-)

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-05-29 14:06:33 -03:00
Arnaldo Carvalho de Melo eba595f958 [LIB]: Add accessibility and virtuality members to struct function
Will be used in the following csets, where we'll print the accessibility
info in C++ classes.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-05-25 16:42:49 -03:00
Arnaldo Carvalho de Melo 9e48067e92 [LIB]: Some stopgap hacks on DW_TAG_inheritance + DW_AT_virtuality == DW_VIRTUALITY_virtual
The offsets doesn't make sense, /me lazy right now to look at untangling the
expressions in the DW_AT_data_member_location.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-05-24 19:11:53 -03:00
Arnaldo Carvalho de Melo e59b1ebb05 [LIB]: Support DW_AT_specification in DW_TAG_structure_type tags
C++ uses this, and to cache the result of the lookup at type__name time we need
to pass the cu to class__name and type__name. Big fallout because of that :-\

But now the output is mucho embelished by the humongous strings representing
C++ templates.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-05-24 18:45:34 -03:00
Arnaldo Carvalho de Melo ad24e0a00c [LIB]: Introduce cus__find_tag_by_id
Using it in the --dwarf_offset/-O new pahole command line option, useful in
debugging. Prints the tag in the dwarf offset supplied.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-05-24 17:41:16 -03:00
Arnaldo Carvalho de Melo 5463bc5419 [LIB]: Support DW_AT_accessibility and DW_AT_virtuality
So that in DW_TAG_inheritance we can should "virtual", "virtual public", etc.

This has yet to be supported for normal class members, constructors, etc.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-05-24 13:57:08 -03:00
Arnaldo Carvalho de Melo 37204266b1 [LIB]: Allow specifying in conf_fprintf if the decl info is to be printed
By default it is not, was getting too much in the way with the namespace support.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-05-24 12:45:45 -03:00
Arnaldo Carvalho de Melo 8562640b58 [LIB]: Rename type__find_tag_by_id to namespace__find_tag_by_id
Go down the rabbit hole baby, oops, the namespace hole that is. Now we find
types inside namespaces. Off to implement namespace__fprintf so that we can see
more brunnetes and blondes out of the DWARF encoding 8)

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-05-24 12:40:43 -03:00
Arnaldo Carvalho de Melo 2b47267e23 [LIB]: Introduce tag__namespace()
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-05-24 12:31:40 -03:00
Arnaldo Carvalho de Melo 9bf0fda9b0 [LIB]: Introduce struct namespace
For now its just the direct ancestor of struct type. But it will exists by
itself, to represent the DW_TAG_namespace DWARF tag, that is how the C++
'namespace' (and other languages too, heck, I'd love to get my hands on a
binary with DWARF info built from, say, ADA source code, objectiveC... COBOL!
:-P).

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-05-24 12:16:59 -03:00
Arnaldo Carvalho de Melo c1eff2b2ca [LIB]: Introduce class__tags()
Also preparatory for struct namespace.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-05-24 12:07:41 -03:00
Arnaldo Carvalho de Melo 230d9310aa [LIB]: Introduce type__name()
This is in preparation for the introduction of struct namespace, that will be
struct type ancestor.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-05-24 11:56:12 -03:00
Arnaldo Carvalho de Melo 2b480348e9 [LIB]: Make class__fprintf print non DW_TAG_member entries
Such as types within types and class methods. This greatly improves support for
C++. Next improvements will be supporting DW_TAG_namespace and properly
supporting DW_TAG_inheritance.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-05-24 00:16:23 -03:00
Arnaldo Carvalho de Melo 2f7f49b107 [LIB]: Put infrastructure for type scoping in place
Now it is possible to have types defined inside types.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-05-23 22:38:29 -03:00
Arnaldo Carvalho de Melo e905635260 [LIB]: Introduce type__last_member
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-05-23 22:10:50 -03:00
Arnaldo Carvalho de Melo c0cbf4fa94 [LIB]: Introduce type__for_each_member
Will be useful to show that the intent is to traverse just the DW_TAG_member
entries in the type list. Right now there are both DW_TAG_inheritance and
DW_TAG_member entries in the ->members type list. But there will be many more
tags, like enumerations, classes, etc, that are defined inside classes, a C++
feature. This will also help with DW_TAG_namespace support.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-05-23 21:43:01 -03:00
Arnaldo Carvalho de Melo 7401af38db [LIB]: Introduce class__has_hole_ge()
That returns if the class has a hole greater or equal to the size specified.

Pahole now has a --hole_size_ge command line option to use it.

Example on a linux kernel built for x86_64 where we list the structs that have
holes bigger than 32 bytes, that provides an approximation of structs with
____cacheline_aligned_in_smp annotated members:

[acme@filo pahole]$ pahole --hole_size_ge 32 examples/vmlinux-x86_64
inet_hashinfo
rcu_ctrlblk
hh_cache
net_device
files_struct
module
zone

For instance, look at struct zone clever use of such construct:

_pad1_ is defined with ZONE_PADDING(_pad1_), that is:

/* <40e> /home/acme/git/net-2.6.22/include/linux/mmzone.h:179 */
struct zone {
	long unsigned int          pages_min;            /*     0     8 */
	long unsigned int          pages_low;            /*     8     8 */
	long unsigned int          pages_high;           /*    16     8 */
	long unsigned int          lowmem_reserve[3];    /*    24    24 */
	int                        node;                 /*    48     4 */

	/* XXX 4 bytes hole, try to pack */

	long unsigned int          min_unmapped_pages;   /*    56     8 */
	/* --- cacheline 1 boundary (64 bytes) --- */
	long unsigned int          min_slab_pages;       /*    64     8 */
	struct per_cpu_pageset *   pageset[255];         /*    72  2040 */
	/* --- cacheline 33 boundary (2112 bytes) --- */
	spinlock_t                 lock;                 /*  2112     4 */

	/* XXX 4 bytes hole, try to pack */

	struct free_area           free_area[11];        /*  2120   264 */

	/* XXX 48 bytes hole, try to pack */

	/* --- cacheline 38 boundary (2432 bytes) --- */
	struct zone_padding        _pad1_;               /*  2432     0 */
	spinlock_t                 lru_lock;             /*  2432     4 */

	/* XXX 4 bytes hole, try to pack */

	struct list_head           active_list;          /*  2440    16 */
	struct list_head           inactive_list;        /*  2456    16 */
	long unsigned int          nr_scan_active;       /*  2472     8 */
	long unsigned int          nr_scan_inactive;     /*  2480     8 */
	long unsigned int          pages_scanned;        /*  2488     8 */
	/* --- cacheline 39 boundary (2496 bytes) --- */
	int                        all_unreclaimable;    /*  2496     4 */
	atomic_t                   reclaim_in_progress;  /*  2500     4 */
	atomic_long_t              vm_stat[20];          /*  2504   160 */
	/* --- cacheline 41 boundary (2624 bytes) was 40 bytes ago --- */
	int                        prev_priority;        /*  2664     4 */

	/* XXX 20 bytes hole, try to pack */

	/* --- cacheline 42 boundary (2688 bytes) --- */
	struct zone_padding        _pad2_;               /*  2688     0 */
	wait_queue_head_t *        wait_table;           /*  2688     8 */
	long unsigned int          wait_table_hash_nr_entries; /*  2696     8 */
	long unsigned int          wait_table_bits;      /*  2704     8 */
	struct pglist_data *       zone_pgdat;           /*  2712     8 */
	long unsigned int          zone_start_pfn;       /*  2720     8 */
	long unsigned int          spanned_pages;        /*  2728     8 */
	long unsigned int          present_pages;        /*  2736     8 */
	const char  *              name;                 /*  2744     8 */
	/* --- cacheline 43 boundary (2752 bytes) --- */
}; /* size: 2752, cachelines: 43 */
   /* sum members: 2672, holes: 5, sum holes: 80 */
   /* definitions: 933 */

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-05-11 13:32:53 -03:00
Arnaldo Carvalho de Melo eaf77f1e5a [LIB]: Introduce type__nr_members_of_type
First user is pahole, that now has a --contains CLASS_NAME option, that will
show which classes contains CLASS_NAME, i.e.:

struct foo {
	struct bar baz;
	int i;
};

on an object file called with '--contains bar' will produce:

foo

if --verbose is used it will tell the number of CLASS_NAME members, so, in the
above example:

foo:1

Next thing will be a --recursive flag, that will show all the structs that
contains CLASS_NAME and the ones that contains the ones which contains and...
:-)

Useful to evaluate the impact that increasing or decreasing the size of some
important struct will have on the whole project that uses the struct.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-05-10 15:28:00 -03:00
Arnaldo Carvalho de Melo fbb50fc851 [LIB]: Move class__reorganize & friends to a new lib: libdwarves_reorganize
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-05-07 00:30:02 -03:00
Arnaldo Carvalho de Melo 05351ece16 [LIB]: Move the __emit functions to a separate library, libdwarves_emit
To isolate functionality only used in utilities such as ctracer.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-05-06 14:50:28 -03:00
Eugene Teo 93183ec9ee [PAHOLE]: Added an option -r to use rel_offset when printing inner structs
By default, pahole will display the offsets of the inner struct members from
the top level struct. If the user wants to focus on some inner structs, just
call the tool with the -r option to use relative offset instead of the base
offset.

Signed-off-by: Eugene Teo <eteo@redhat.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-05-02 16:14:20 -03:00
Arnaldo Carvalho de Melo 262a5d24ea [LIB]: Introduce conf_fprintf
So that we can go on adding more config knobs without requiring adding new
parameters to lots of functions.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-04-28 16:13:35 -03:00
Arnaldo Carvalho de Melo 711d96943a [LIB]: Use a base_offset when printing inner structs
That way we can have the offsets from the top level struct. If the user wants
to focus some inner struct, just call the tool again specifying the inner
struct name.

Perhaps this is not so clear, shoot me, erm, no, an example should help. Look
at the member offsets (first column in the comment after each member), before
and after:

before:

acme@filo pahole]$ pahole -C tcp_sock --expand_types examples/net
/* <12a> examples/expand.c:18 */
struct tcp_sock {
	struct inet_sock {
		struct sock {
			int        protocol;     /*     0     4 */
			struct spinlock {
				int magic;       /*     0     4 */
				int counter;     /*     4     4 */
			} sklock; /*     4     8 */
			int        b;            /*    12     4 */
			int        c;            /*    16     4 */
		} sk; /*     0    20 */
		long int           daddr;        /*    20     4 */
	} inet; /*     0    24 */
	long int                   cwnd;         /*    24     4 */
	struct spinlock {
		int                magic;        /*     0     4 */
		int                counter;      /*     4     4 */
	} lock; /*    28     8 */
}; /* size: 36, cachelines: 1 */
   /* last cacheline: 36 bytes */

After:

acme@filo pahole]$ pahole -C tcp_sock --expand_types examples/net
/* <12a> examples/expand.c:18 */
struct tcp_sock {
	struct inet_sock {
		struct sock {
			int        protocol;     /*     0     4 */
			struct spinlock {
				int magic;       /*     4     4 */
				int counter;     /*     8     4 */
			} sklock; /*     4     8 */
			int        b;            /*    12     4 */
			int        c;            /*    16     4 */
		} sk; /*     0    20 */
		long int           daddr;        /*    20     4 */
	} inet; /*     0    24 */
	long int                   cwnd;         /*    24     4 */
	struct spinlock {
		int                magic;        /*    28     4 */
		int                counter;      /*    32     4 */
	} lock; /*    28     8 */
}; /* size: 36, cachelines: 1 */
   /* last cacheline: 36 bytes */

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-04-28 10:01:54 -03:00
Arnaldo Carvalho de Melo f85781d5b9 [LIB]: Allow of not specifying -e
cus__loadfl will just insert the -e and pass it up to dwfl_standard_argp.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-04-24 16:09:34 -03:00
Diego "Flameeyes" Pettenò 18d620ee3c [LIB]: Expand the size of offset field for class_member to 32-bit.
The offset of a member in a class can be higher than 64KB (even if it doesn't
sound sane), without this change, if the offset overflowed, you would have got
the bitfield warning.

Committer note: I haven't bumped the SONAME because I haven't released yet the
		0.0 release, so there is not yet a stable ABI.

Signed-off-by: Diego "Flameeyes" Pettenò <flameeyes@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-04-01 22:08:21 -03:00
Arnaldo Carvalho de Melo df2a515d4f [LIB]: Allow passing a NULL argp to cus__loadfl
For tools such as pdwtags, that don't have any further options.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-03-30 13:54:14 -03:00
Arnaldo Carvalho de Melo c87d8d831a [ALL]: Emit better diagnostic messages
[acme@mica pahole]$ pahole lala
pahole: Permission denied
[acme@mica pahole]$ pahole foo
pahole: No such file or directory
[acme@mica pahole]$ pahole ctracer.c
pahole: couldn't load DWARF info from ctracer.c
[acme@mica pahole]$

Thanks to Matthew Wilcox for noticing how lame it was :-)

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-03-28 12:54:46 -03:00
Arnaldo Carvalho de Melo 7bd8fb3c43 [LIB]: Fix compiler warnings on 64bits
Mostly related to size_t, Dwarf_Off -> (unsigned long long), etc.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-03-28 11:38:32 -03:00
Arnaldo Carvalho de Melo 3005b6b7e1 [LIB]: Reorganize struct tag
Erm, eating my dog food now that I have access to a 64bit machine here at home:

[acme@mica pahole]$ pahole build/libdwarves.so.1.0.0 tag
/* <b7e> /home/acme/git/pahole/dwarves.h:48 */
struct tag {
        struct list_head      node;          /*     0    16 */
        Dwarf_Off             type;          /*    16     8 */
        Dwarf_Off             id;            /*    24     8 */
        uint16_t              tag;           /*    32     2 */
        uint16_t              decl_line;     /*    34     2 */

        /* XXX 4 bytes hole, try to pack */

        const char  *         decl_file;     /*    40     8 */
        uint32_t              refcnt;        /*    48     4 */
}; /* size: 56, cachelines: 1 */
   /* sum members: 48, holes: 1, sum holes: 4 */
   /* padding: 4 */
   /* last cacheline: 56 bytes */
[acme@mica pahole]$

[acme@mica pahole]$ pahole --reorganize build/libdwarves.so.1.0.0 tag
/* <b7e> /home/acme/git/pahole/dwarves.h:48 */
struct tag {
        struct list_head      node;          /*     0    16 */
        Dwarf_Off             type;          /*    16     8 */
        Dwarf_Off             id;            /*    24     8 */
        uint16_t              tag;           /*    32     2 */
        uint16_t              decl_line;     /*    34     2 */
        uint32_t              refcnt;        /*    36     4 */
        const char  *         decl_file;     /*    40     8 */
}; /* size: 48, cachelines: 1 */
   /* last cacheline: 48 bytes */
   /* saved 8 bytes! */
[acme@mica pahole]$

[acme@mica pahole]$ codiff build/libdwarves.so.1.0.0.before build/libdwarves.so.1.0.0
/home/acme/git/pahole/dwarves.c:
  struct tag              |   -8
  struct type             |   -8
  struct class            |   -8
  struct base_type        |   -8
  struct array_type       |   -8
  struct class_member     |   -8
  struct lexblock         |   -8
  struct ftype            |   -8
  struct function         |  -16
  struct parameter        |   -8
  struct variable         |   -8
  struct inline_expansion |   -8
  struct label            |   -8
  struct enumerator       |   -8
 14 structs changed
  class_member__clone     |   -8
  class__clone            |   -8
 2 functions changed, 16 bytes removed
[acme@mica pahole]$

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-03-07 12:10:56 -03:00
Arnaldo Carvalho de Melo 5a420cc24e [LIB]: Make tag__fprintf return the number of bytes printed
For consistency with all the other __fprintf routines.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-02-15 12:03:47 -02:00
Arnaldo Carvalho de Melo c3103abfef [LIB]: Rename function__print_stats to function__fprintf_stats, for consistency
Also make it return the number of bytes printed.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-02-15 12:01:01 -02:00
Arnaldo Carvalho de Melo d5a0c78a4c [LIB]: Rename lexblock__print to lexblock__fprintf, for consistency
Also make it return the number of bytes printed.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-02-15 11:56:16 -02:00
Arnaldo Carvalho de Melo 70f9135467 [LIB]: Rename tag__print to tag__fprintf, for consistency
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-02-15 11:40:51 -02:00
Arnaldo Carvalho de Melo f411354f05 [LIB]: Convert the __snprintf routines to __fprintf semantics
So that we get rid of all the buffer limits, if we need to format into strings
we can use string streams, like we're doing now in just one case, tag__name for
DW_TAG_subroutine_type, that is bogus as it is, as we need to have the name of
the type inside the type declaration (void (*type_name)(parameters)) and not
after (void (*)(parameters) type_name)), but leave this for an upcoming cset.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-02-15 11:36:49 -02:00
Arnaldo Carvalho de Melo d37f41df58 [LIB]: Pass a FILE pointer to the cus__emit routines
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-02-02 12:52:46 -02:00