From: Cliff W. <cp...@sg...> - 2008-09-04 12:42:42
|
On Thu, Sep 04, 2008 at 05:16:40PM +0530, Indraneel Mukherjee wrote: > Hello Cliff, > > On Tue, Sep 2, 2008 at 7:14 PM, Cliff Wickman <cp...@sg...> wrote: > > Hi Indro, > > > > On Mon, Sep 01, 2008 at 05:30:31PM +0530, Indraneel Mukherjee wrote: > >> Hi All, > >> We're running dwarfextract on a linux-2.6.23 vmlinux for ARM > >> architecture to extract typeinfo. The structure for runqueue(struct > >> rq) is not found by dwarfextract. Other structures from the same > >> file(kernel/sched.c) like cfs_rq, rt_rq are found by dwarfextract. Any > >> pointers as to why struct rq type info is missing will be highly > >> appreciated. > > > > I guess I own the bugs in dwarfextract. > > Things like uniquely identifying every structure and resolving the > > pointer to each are a bit messy. But I haven't seen it fail on the scale > > of your below sample. > > But I've never tested it on the ARM architecture. > > > > I assume your dwarfextract source is from the lkcd project. I'll send > > you what should be the latest source, in a separate mail, so you can compare. > > We've taken the latest sources from svn. > > > > > Can dwarfextract running on a different architecture (e.g. x86_64 or > > ia64) successfully handle your ARM vmlinux? > > So that means dwarfextract has not been tested to work like this - x86 > build and use for ARM vmlinux. But do you think it should ideally work > and there is some minor problem that we can fix or is this > fundamentally not possible with dwarfextract? We'll post a patch if we > find s'thing amiss in this regard. It's untested but I would have expected it to work. The dwarf format is supposed to be portable. ARM can be big or little endian, correct? As Max suggested, there might be an issue there. dwarfextract has only been tested on little-endian architectures. > And yes, even dwarfdump on sched.o did not show up any 'struct rq' > info. But we declared a dummy struct exacttly similar to rq on top of > rq and it was found by dwarfextract. Any guesses why this behaviour? > Some compiler optimisation? I couldn't find any.. Do you have a readelf command? Try readelf --debug-dump=info sched.o Also dwarfextract -t sched.o -Cliff |