[eresi-dev] Is etrace able to trace (GCC)c++ simbols ?
Julien Vanegue
julien.vanegue at gmail.com
Wed Sep 16 20:40:37 UTC 2009
Yes, but the problem is not this. The problem is "cant find arguments" for
foo (it has no arguments! so its normal)
And since we only trace functions with arguments, and you requested only a
single function to be traced, nothing is traced.
This can be considered as a bug (I actually noticed it recently) and I will
patch it ASAP.
Julien
On Wed, Sep 16, 2009 at 5:06 AM, Groleo Marius <groleo at gmail.com> wrote:
> Could it be elfsh_extplt_mirror_sections at libelfsh/extplt.c:185 ?
>
>
> On Wed, Sep 16, 2009 at 2:26 PM, Groleo Marius <groleo at gmail.com> wrote:
>
>>
>>
>> On Wed, Sep 16, 2009 at 11:56 AM, Groleo Marius <groleo at gmail.com> wrote:
>>
>>> (etrace-0.82-b2-dev at local) profile enable warn
>>>
>>> .:: Profiling enabled warnings
>>>
>>> (etrace-0.82-b2-dev at local) traces add foo
>>>
>>> [W] <elfsh_get_section_by_name_withlist at section.c:264> Section not
>>> found[.strtab]
>>>
>>
>>
>> Correction, it's < Section not found[.elfsh.dynsym] >. I was printing
>> the wrong string.
>> Any ideea who puts .elfsh.dynsym section inside the binary ?
>> readelf -S ./a.out doesn't seem to know anything about it.
>>
>>
>>
>>
>>
>>> [W] <elfsh_get_section_by_name at section.c:302> Section not
>>> found[.elfsh.dynsym]
>>> [W] <trace_search_uni at func_search.c:60> No debugging
>>> informations available
>>> [W] <elfsh_args_count_ia32 at ia32.c:1112> Can't find arguments
>>> [*] Unable to add func at 0x08048394 into trace
>>> [*] Added function foo successfully into trace global
>>> (etrace-0.82-b2-dev at local)
>>>
>>>
>>>
>>>
>>> On Wed, Sep 16, 2009 at 2:48 AM, Julien Vanegue <
>>> julien.vanegue at gmail.com> wrote:
>>>
>>>> I see the following error:
>>>>
>>>> (etrace-0.82-b2-dev at local) traces add foo
>>>>
>>>> [*] Unable to add func at 0x08048394 into trace
>>>> <-----------------------
>>>> [*] Added function foo successfully into trace global
>>>>
>>>>
>>>> Can you profile-warn for the traces command too ?
>>>>
>>>> Also, make sure you use the trace commands in the same way as in the
>>>> example of the testsuite (testsuite/tracing)
>>>>
>>>> Julien
>>>>
>>>>
>>>>
>>>> On Tue, Sep 15, 2009 at 12:46 PM, Groleo Marius <groleo at gmail.com>wrote:
>>>>
>>>>> I managed to get the profiler to print the section name. This is the
>>>>> first page of tracerun with profile enable warn
>>>>>
>>>>>
>>>>> (etrace-0.82-b2-dev at local) tracerun
>>>>>
>>>>> [W] <elfsh_get_section_by_type_withlist at section.c:363>
>>>>> Section not found ..
>>>>> [W] <elfsh_get_section_by_type at section.c:410> Section
>>>>> remained unfound
>>>>> [W] <elfsh_get_reloc at reloc.c:279> Unable to
>>>>> get reloc section
>>>>> [W] <elfsh_get_section_by_name_withlist at section.c:264>
>>>>> Section not found[.strtab]
>>>>> [W] <elfsh_get_section_by_name at section.c:302> Section
>>>>> not found[.debug_macinfo]
>>>>> [W] <elfsh_get_dwarf_macinfo at dwarf.c:301> Unable to
>>>>> find Dwarf abbrev table
>>>>> [W] <elfsh_get_section_by_name_withlist at section.c:264>
>>>>> Section not found[.strtab]
>>>>> [W] <elfsh_get_section_by_name at section.c:302> Section not
>>>>> found[.stab]
>>>>> [W] <elfsh_get_stab at stab.c:63> Unable to
>>>>> get STABS by name
>>>>> [W] <elfsh_get_section_by_name_withlist at section.c:264>
>>>>> Section not found[.strtab]
>>>>> [W] <elfsh_get_section_by_name at section.c:302> Section not
>>>>> found[.stab]
>>>>>
>>>>> [W] <elfsh_get_stab at stab.c:63> Unable to
>>>>> get STABS by name
>>>>> [W] <elfsh_get_section_by_type_withlist at section.c:363>
>>>>> Section not found ..
>>>>> [W] <elfsh_get_section_by_type at section.c:410> Section
>>>>> remained unfound
>>>>> [W] <elfsh_get_verdeftab at version.c:1408> Unable to
>>>>> find Definition Version section
>>>>> [W] <elfsh_get_notes at notes.c:59> Corrupted
>>>>> Notes section
>>>>> [W] <elfsh_get_sym_by_value at sym_common.c:308> No exact
>>>>> symbol matching
>>>>> [W] <elfsh_get_dynsymbol_by_name at dynsym.c:386> Symbol not
>>>>> found
>>>>> [W] <elfsh_get_dynsymbol_by_name at dynsym.c:386> Symbol not
>>>>> found
>>>>> [W] <elfsh_get_dynsymbol_by_name at dynsym.c:386> Symbol not
>>>>> found
>>>>> [W] <elfsh_get_dynsymbol_by_name at dynsym.c:386> Symbol not
>>>>> found
>>>>> [W] <elfsh_get_dynsymbol_by_name at dynsym.c:386> Symbol not
>>>>> found
>>>>> [W] <elfsh_get_dynsymbol_by_name at dynsym.c:386> Symbol not
>>>>> found
>>>>> [W] <elfsh_get_dynsymbol_by_name at dynsym.c:386> Symbol not
>>>>> found
>>>>> [W] <elfsh_get_dynsymbol_by_name at dynsym.c:386> Symbol not
>>>>> found
>>>>> [W] <elfsh_load_pht at pht.c:402> No PHT
>>>>> [W] <elfsh_get_parent_segment at pht.c:465> Unable to
>>>>> get parent PHDR
>>>>> [W] <elfsh_load_pht at pht.c:402> No PHT
>>>>> [W] <elfsh_get_parent_segment at pht.c:465> Unable to
>>>>> get parent PHDR
>>>>> [W] <elfsh_load_pht at pht.c:402> No PHT
>>>>> [W] <elfsh_get_parent_segment at pht.c:465> Unable to
>>>>> get parent PHDR
>>>>> [W] <elfsh_load_pht at pht.c:402> No PHT
>>>>> [W] <elfsh_get_parent_segment at pht.c:465> Unable to
>>>>> get parent PHDR
>>>>> [W] <elfsh_load_pht at pht.c:402> No PHT
>>>>> [W] <elfsh_get_parent_segment at pht.c:465> Unable to
>>>>> get parent PHDR
>>>>> [W] <elfsh_load_pht at pht.c:402> No PHT
>>>>> [W] <elfsh_get_parent_segment at pht.c:465> Unable to
>>>>> get parent PHDR
>>>>> [W] <elfsh_load_pht at pht.c:402> No PHT
>>>>> [W] <elfsh_get_parent_segment at pht.c:465> Unable to
>>>>> get parent PHDR
>>>>> [W] <elfsh_load_pht at pht.c:402> No PHT
>>>>> [W] <elfsh_get_parent_segment at pht.c:465> Unable to
>>>>> get parent PHDR
>>>>> [W] <elfsh_load_pht at pht.c:402> No PHT
>>>>> [W] <elfsh_get_parent_segment at pht.c:465> Unable to
>>>>> get parent PHDR
>>>>> [W] <elfsh_load_pht at pht.c:402> No PHT
>>>>> [W] <elfsh_get_parent_segment at pht.c:465> Unable to
>>>>> get parent PHDR
>>>>> [W] <elfsh_load_pht at pht.c:402> No PHT
>>>>> [W] <elfsh_get_parent_segment at pht.c:465> Unable to
>>>>> get parent PHDR
>>>>> [W] <elfsh_load_pht at pht.c:402> No PHT
>>>>> [W] <elfsh_get_pht at pht.c:538> Unable to
>>>>> load PHT
>>>>> [W] <elfsh_get_section_by_type_withlist at section.c:363>
>>>>> Section not found ..
>>>>> [W] <elfsh_get_section_by_type at section.c:410> Section
>>>>> remained unfound
>>>>> [W] <elfsh_get_reloc at reloc.c:279> Unable to
>>>>> get reloc section
>>>>> [W] <elfsh_get_section_by_name_withlist at section.c:264>
>>>>> Section not found[.strtab]
>>>>> [W] <elfsh_get_section_by_name at section.c:302> Section
>>>>> not found[.interp]
>>>>> [W] <elfsh_get_interp at interp.c:63> Unable to
>>>>> get .interp by name
>>>>> [W] <elfsh_get_section_by_name_withlist at section.c:264>
>>>>> Section not found[.strtab]
>>>>> [W] <elfsh_get_section_by_name at section.c:302> Section
>>>>> not found[.interp]
>>>>> [W] <elfsh_get_interp at interp.c:63> Unable to
>>>>> get .interp by name
>>>>> [W] <elfsh_get_section_by_name_withlist at section.c:264>
>>>>> Section not found[.strtab]
>>>>> [W] <elfsh_get_section_by_name at section.c:302> Section
>>>>> not found[.debug_info]
>>>>> [W] <elfsh_get_dwarf_info at dwarf.c:71> Unable to
>>>>> find Dwarf info table
>>>>> [W] <elfsh_get_section_by_name_withlist at section.c:264>
>>>>> Section not found[.strtab]
>>>>> [W] <elfsh_get_section_by_name at section.c:302> Section
>>>>> not found[.debug_abbrev]
>>>>> [W] <elfsh_get_dwarf_abbrev at dwarf.c:117> Unable to
>>>>> find Dwarf abbrev table
>>>>> [W] <elfsh_get_section_by_name_withlist at section.c:264>
>>>>> Section not found[.strtab]
>>>>> [W] <elfsh_get_section_by_name at section.c:302> Section
>>>>> not found[.debug_aranges]
>>>>> [W] <elfsh_get_dwarf_aranges at dwarf.c:163> Unable to
>>>>> find Dwarf aranges table
>>>>> [W] <elfsh_get_section_by_name_withlist at section.c:264>
>>>>> Section not found[.strtab]
>>>>> [W] <elfsh_get_section_by_name at section.c:302> Section
>>>>> not found[.debug_frame]
>>>>> [W] <elfsh_get_dwarf_frame at dwarf.c:209> Unable to
>>>>> find Dwarf frame table
>>>>> [W] <elfsh_get_section_by_name_withlist at section.c:264>
>>>>> Section not found[.strtab]
>>>>> [W] <elfsh_get_section_by_name at section.c:302> Section
>>>>> not found[.debug_line]
>>>>> [W] <elfsh_get_dwarf_line at dwarf.c:255> Unable to
>>>>> find Dwarf line table
>>>>> [W] <elfsh_get_section_by_name_withlist at section.c:264>
>>>>> Section not found[.strtab]
>>>>> [W] <elfsh_get_section_by_name at section.c:302> Section
>>>>> not found[.debug_macinfo]
>>>>> [W] <elfsh_get_dwarf_macinfo at dwarf.c:301> Unable to
>>>>> find Dwarf abbrev table
>>>>> [W] <elfsh_get_section_by_name_withlist at section.c:264>
>>>>> Section not found[.strtab]
>>>>> [W] <elfsh_get_section_by_name at section.c:302> Section
>>>>> not found[.debug_pubnames]
>>>>> [W] <elfsh_get_dwarf_pubnames at dwarf.c:347> Unable to
>>>>> find Dwarf pubnames table
>>>>> [W] <elfsh_get_section_by_name_withlist at section.c:264>
>>>>> Section not found[.strtab]
>>>>> [W] <elfsh_get_section_by_name at section.c:302> Section
>>>>> not found[.debug_str]
>>>>>
>>>>>
>>>>> On Tue, Sep 15, 2009 at 8:59 PM, Julien Vanegue <
>>>>> julien.vanegue at gmail.com> wrote:
>>>>>
>>>>>> Etrace has never been tested on C++ and the reason why it doesnt work
>>>>>> I think is because mangled symbols, for which we have no support.
>>>>>>
>>>>>> I guess supporting a C++ aware e2dbg/etrace would be a nice project
>>>>>> but we have no resource for it by now!
>>>>>>
>>>>>> Julien
>>>>>>
>>>>>> On Tue, Sep 15, 2009 at 1:10 AM, Groleo Marius <groleo at gmail.com>wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I've checked out the svn tree and run a simple test to see if etrace
>>>>>>> can
>>>>>>> trace a foo() function inside a c++ program. I tried to trace using
>>>>>>> the _Z encoded function name but with no luck; does etrace support
>>>>>>> tracing c++ symbols ?
>>>>>>>
>>>>>>> --
>>>>>>> Regards, Groleo!
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> eresi-dev mailing list
>>>>>>> eresi-dev at lists.einherjar.de
>>>>>>> http://lists.einherjar.de/mailman/listinfo/eresi-dev
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> eresi-dev mailing list
>>>>>> eresi-dev at lists.einherjar.de
>>>>>> http://lists.einherjar.de/mailman/listinfo/eresi-dev
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Regards, Groleo!
>>>>>
>>>>> _______________________________________________
>>>>> eresi-dev mailing list
>>>>> eresi-dev at lists.einherjar.de
>>>>> http://lists.einherjar.de/mailman/listinfo/eresi-dev
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> eresi-dev mailing list
>>>> eresi-dev at lists.einherjar.de
>>>> http://lists.einherjar.de/mailman/listinfo/eresi-dev
>>>>
>>>>
>>>
>>>
>>> --
>>> Regards, Groleo!
>>>
>>
>>
>>
>> --
>> Regards, Groleo!
>>
>
>
>
> --
> Regards, Groleo!
>
> _______________________________________________
> eresi-dev mailing list
> eresi-dev at lists.einherjar.de
> http://lists.einherjar.de/mailman/listinfo/eresi-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.einherjar.de/pipermail/eresi-dev/attachments/20090916/20425624/attachment-0001.html>
More information about the eresi-dev
mailing list