[dbghelp 2/11] Return TRUE in SymInitializeW if process is already initialized and add a number of TRACEs

Alexandre Julliard julliard at winehq.org
Tue Nov 27 05:43:46 CST 2007


"Jason Green" <jave27 at gmail.com> writes:

> @@ -216,11 +216,17 @@ static BOOL WINAPI process_invade_cb(PCSTR name, ULONG base, ULONG size, PVOID u
>      char        tmp[MAX_PATH];
>      HANDLE      hProcess = (HANDLE)user;
>  
> -    if (!GetModuleFileNameExA(hProcess, (HMODULE)base, 
> -                              tmp, sizeof(tmp)))
> +
> +    TRACE("found module %s {base = 0x%08x, size = 0x%08x, user = %p}\n", debugstr_a(name), base, size, user);
> +
> +    if (!GetModuleFileNameExA(hProcess, (HMODULE)base, tmp, sizeof(tmp))){
> +        WARN("could not find the full path name of the module.  Using the base name of %s instead\n", debugstr_a(name));
>          lstrcpynA(tmp, name, sizeof(tmp));
> +    }
>  
> +    TRACE("loading the module %s {base = 0x%08x}\n", debugstr_a(name), base);
>      SymLoadModule(hProcess, 0, tmp, name, base, size);
> +    TRACE("done loading the module\n");
>      return TRUE;

You are adding way too many traces, most of which are not necessary.
Here for instance, SymLoadModule already contains traces, so there's no
need to add traces around the call. It's fine to do that sort of thing
to help following things when you are trying to understand the code, but
afterwards they should be removed.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list