[Dwarf-Discuss] How to create multiple CUs in a single creation

Xie Xianshan xiexs at cn.fujitsu.com
Wed Jul 11 06:26:41 PDT 2012


@David and @Andrew.
Thanks for your quick response.
I`ll be wating for your good news,and  i`ll try other way of making it now.
Thanks again.

Simen

David Anderson wrote:
> On 07/09/2012 01:28 AM, Xie Xianshan wrote:
>> Hi All,
>>
>>  I`m trying to generate my own dwarf files with libdwarf API.
>> But i don`t know how to create multiple complication units in a 
>> single creation.
>>  I`ve tried to call dwarf_new_die(dbg,DW_TAG_compile_unit,...) twice,
>> but there was only one CU header generated(two DW_TAG_compile_unit 
>> tag),as follows:
>> ----------------------------
>>  Compilation Unit @ 0:
>>   Length:        170
>>   Version:       2
>>   Abbrev Offset: 0
>>   Pointer Size:  4
>> <0><b>: Abbrev Number: 1 (DW_TAG_compile_unit)
>>     DW_AT_producer    : GNU C 4.6.12
>>     DW_AT_name        : test.c
>>     DW_AT_comp_dir    : /home/work/
>>     DW_AT_ranges      : 0
>>     DW_AT_stmt_list   : 0
>> <1><34>: Abbrev Number: 2 (DW_TAG_subprogram)
>> <0><47>: Abbrev Number: 4 (DW_TAG_compile_unit)
>> ----------------------------
>> Does anybody  have experience to this?
>
>
> libdwarf was not designed to prepare multiple CUs in a single 
> creation. Sorry.
> There is nothing inherent in DWARF or libdwarf preventing such, of 
> course.
> And clearly libdwarf needs updating on this point.   But libdwarf 
> cannot do
> what you ask in a single  producer dwarf-init call --- at present.
>
> Libdwarf can really only produce DWARF2 output at the moment as well.
> Another serious weakness.    While I've been working on the producer
> code for some time, progress has been slow, what with other tasks in 
> life.
> Again, sorry.
>
> David Anderson
>
>


-- 
Best Regards
Xie Xianshan
--------------------------------------------------
Xie Xianshan
Development Dept.I
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)
No. 6 Wenzhu Road, Nanjing, 210012, China
PHONE: +86+25-86630566-8517
FUJITSU INTERNAL: 7998-8517
MAIL: xiexs at cn.fujitsu.com
--------------------------------------------------
This communication is for use by the intended recipient(s) only and may
contain information that is privileged, confidential and exempt from
disclosure under applicable law. If you are not an intended recipient of
this communication, you are hereby notified that any dissemination,
distribution or copying hereof is strictly prohibited.  If you have
received this communication in error, please notify me by reply e-mail,
permanently delete this communication from your system, and destroy any
hard copies you may have printed 




More information about the Dwarf-Discuss mailing list