[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: PDBs and the debugger
From:       Ulrich Weigand <weigand () informatik ! uni-erlangen ! de>
Date:       2000-03-27 23:10:34
[Download RAW message or body]


David Lassonde wrote:

>     Incredible as it sounds, we have symbols that take up to 245 characters
> (and surely some of 256).. So I only casted the ptr.c[16] to (unsigned char)
> ptr.c[16]. It goes through perfectly now, but I'm wondering if it really is
> the length of the symbol name? I put a trace for strlen(symname) and
> (unsigned char)ptr.c[16] and they are not often equal...

Well, for the symbol types in question (S_PROCREF etc.) you'll notice that
the 'symname' array is never filled in by the debugger/msc.c code, so you're 
comparing with the length of the previous symbol ;-)

The length-prefixed string following a S_PROCREF entry is really a symbol
name; it is simply the name of the symbol being referenced by that entry.

[ B.t.w. the point of those reference entries is just to include the per-module
symbols into the global symbol hash table.  The symbol hash table contains
normally only the global symbols, not the per-module symbols.  Thus, by adding
a symbol reference entry pointing to a per-module symbol into the global
symbol table, you can include those per-module symbols into the hash table
for fast lookup.  As Wine simply reads all symbols, gobal and per-module,
and ignores the hash table, we can just ignore the reference entries ... ]

Bye,
Ulrich

-- 
  Ulrich Weigand,
  IMMD 1, Universitaet Erlangen-Nuernberg,
  Martensstr. 3, D-91058 Erlangen, Phone: +49 9131 85-27688

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic