From zhouxuzhu1985@gmail.com  Tue Dec  4 04:53:26 2007
From: zhouxuzhu1985@gmail.com (xu zhou)
Date: Tue, 4 Dec 2007 12:53:26 +0800
Subject: [Dwarf-Discuss] how to find all the compile unit using libdwarf
Message-ID: <4b53d62c0712032053y6bda6741n73663e6c7ea7f3e8@mail.gmail.com>

Hello everyone,
    I use libdwarf to build my own debugging program, here is my problem:
    I use the function "dwarf_next_cu_header()" to search every
compile unit of the Linux kernel(vmlinux). But I cannot get every
compile unit corresponding to the source file. The number of compile
units I get is much smaller than the actually number of source files.
I don't know why. Does every source corresponds to a single compiled
unit or they have other relationship?
    I want to find the memory address of a line in source file. How can I do it?
     Thank you!!!

                  zhouxu



From davea42@earthlink.net  Tue Dec  4 15:55:36 2007
From: davea42@earthlink.net (David Anderson)
Date: Tue, 04 Dec 2007 07:55:36 -0800
Subject: [Dwarf-Discuss] how to find all the compile unit using libdwarf
In-Reply-To: <4b53d62c0712032053y6bda6741n73663e6c7ea7f3e8@mail.gmail.com>
References: <4b53d62c0712032053y6bda6741n73663e6c7ea7f3e8@mail.gmail.com>
Message-ID: <47557878.3090300@earthlink.net>

xu zhou wrote:
> Hello everyone,
>     I use libdwarf to build my own debugging program, here is my problem:
>     I use the function "dwarf_next_cu_header()" to search every
> compile unit of the Linux kernel(vmlinux). But I cannot get every
> compile unit corresponding to the source file. The number of compile
> units I get is much smaller than the actually number of source files.
> I don't know why. Does every source corresponds to a single compiled
> unit or they have other relationship?
>     I want to find the memory address of a line in source file. How can I do it?
>      Thank you!!!
>
>                   zhouxu
>   
It is quite possible that the compiler is simply not emitting
all the data you expect.  Or that the data is being stripped
from some object files or the executable.

Or that the kernel (as built) does not have some
sections related to duplicate-dwarf-emission removed (it should be
removed from any executable, but the kernel is not a normal executable,
so) ... does the linker remove such COMDAT-like sections?
libdwarf does not really deal with those yet.  Somebody give me some
objects with same, please?

Hard to say what is going on.
david anderson



From dwarf@pedriana.com  Wed Dec 12 21:57:47 2007
From: dwarf@pedriana.com (Paul)
Date: Wed, 12 Dec 2007 13:57:47 -0800
Subject: [Dwarf-Discuss] How might I get libdwarf/dwarfdump to compile?
Message-ID: <4760595B.6080704@pedriana.com>

I downloaded libdwarf and libelf and am trying to build dwarfdump. 
However, it appears that there are missing files and that the user is 
expected to run some script to generate (at least some of) these files. 
There are no default versions of the files nor a portable set of them. 
The configure script mentioned in the readme file is not portable and so 
cannot run on my system.

How might I get dwarfdump to compile?

Thanks.








From davea42@earthlink.net  Wed Dec 12 22:45:49 2007
From: davea42@earthlink.net (David Anderson)
Date: Wed, 12 Dec 2007 14:45:49 -0800
Subject: [Dwarf-Discuss] How might I get libdwarf/dwarfdump to compile?
In-Reply-To: <4760595B.6080704@pedriana.com>
References: <4760595B.6080704@pedriana.com>
Message-ID: <4760649D.8040206@earthlink.net>

Paul wrote:
> I downloaded libdwarf and libelf and am trying to build dwarfdump. 
> However, it appears that there are missing files and that the user is 
> expected to run some script to generate (at least some of) these files. 
> There are no default versions of the files nor a portable set of them. 
> The configure script mentioned in the readme file is not portable and so 
> cannot run on my system.
Your email does not have any specific information, so
I don't have any immediate suggestions.  

libdwarf is  not relevant to the  DWARF committee.

Please direct libdwarf questions to me...

The configure is as portable as I know how to make it.
It's generated by autoconf 2.59 and that has worked for most folks.
But of course there is no guarantee.

The Makefile should generate all that is needed (aside from
system header files and libraries).

Please direct libdwarf questions to me...

My first questions would be:
   What operating system and cpu in use here?
   What 'shell' in use to run configure?  sh? bash? other?
   What does 'configure' say when you run it? (the entire
      output, not just some selected part of it)





DavidAnderson
davea42
-at-
earthlink  -dot- net.



