winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
December 2006
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
4 participants
720 discussions
Start a n
N
ew thread
Eric Pouech : dbghelp: Added a field to the hash table to store the number of elements in the hash table .
by Alexandre Julliard
06 Dec '06
06 Dec '06
Module: wine Branch: master Commit: a1a879363d63f12bdfa59b2f38bd3a731ba01d24 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a1a879363d63f12bdfa59b2f3…
Author: Eric Pouech <eric.pouech(a)wanadoo.fr> Date: Tue Dec 5 22:13:27 2006 +0100 dbghelp: Added a field to the hash table to store the number of elements in the hash table. Make use of it to get rid to module_compute_num_syms. --- dlls/dbghelp/dbghelp_private.h | 2 +- dlls/dbghelp/module.c | 16 ++-------------- dlls/dbghelp/storage.c | 9 +++++---- dlls/dbghelp/symbol.c | 3 ++- 4 files changed, 10 insertions(+), 20 deletions(-) diff --git a/dlls/dbghelp/dbghelp_private.h b/dlls/dbghelp/dbghelp_private.h index f575bcf..9c6abc0 100644 --- a/dlls/dbghelp/dbghelp_private.h +++ b/dlls/dbghelp/dbghelp_private.h @@ -82,6 +82,7 @@ struct hash_table_elt struct hash_table { + unsigned num_elts; unsigned num_buckets; struct hash_table_elt** buckets; }; @@ -422,7 +423,6 @@ extern int elf_is_in_thunk_area extern DWORD WINAPI addr_to_linear(HANDLE hProcess, HANDLE hThread, ADDRESS* addr); /* module.c */ -extern int module_compute_num_syms(struct module* module); extern struct module* module_find_by_addr(const struct process* pcs, unsigned long addr, enum module_type type); diff --git a/dlls/dbghelp/module.c b/dlls/dbghelp/module.c index 1b84121..a58ee6f 100644 --- a/dlls/dbghelp/module.c +++ b/dlls/dbghelp/module.c @@ -284,7 +284,7 @@ BOOL module_get_debug(struct module_pair } if (!ret) pair->effective->module.SymType = SymNone; assert(pair->effective->module.SymType != SymDeferred); - module_compute_num_syms(pair->effective); + pair->effective->module.NumSyms = pair->effective->ht_symbols.num_elts; } return pair->effective->module.SymType != SymNone; } @@ -372,18 +372,6 @@ enum module_type module_get_type_by_name return DMT_PE; } -int module_compute_num_syms(struct module* module) -{ - struct hash_table_iter hti; - void* ptr; - - module->module.NumSyms = 0; - hash_table_iter_init(&module->ht_symbols, &hti, NULL); - while ((ptr = hash_table_iter_up(&hti))) - module->module.NumSyms++; - return module->module.NumSyms; -} - /*********************************************************************** * SymLoadModule (DBGHELP.@) */ @@ -429,7 +417,7 @@ DWORD WINAPI SymLoadModule(HANDLE hProce WARN("Couldn't locate %s\n", ImageName); return 0; } - module_compute_num_syms(module); + module->module.NumSyms = module->ht_symbols.num_elts; done: /* by default pe_load_module fills module.ModuleName from a derivation * of ImageName. Overwrite it, if we have better information diff --git a/dlls/dbghelp/storage.c b/dlls/dbghelp/storage.c index 3aef566..3aee97d 100644 --- a/dlls/dbghelp/storage.c +++ b/dlls/dbghelp/storage.c @@ -327,6 +327,7 @@ unsigned hash_table_hash(const char* nam void hash_table_init(struct pool* pool, struct hash_table* ht, unsigned num_buckets) { + ht->num_elts = 0; ht->buckets = pool_alloc(pool, num_buckets * sizeof(struct hash_table_elt*)); assert(ht->buckets); ht->num_buckets = num_buckets; @@ -338,7 +339,7 @@ void hash_table_destroy(struct hash_tabl #if defined(USE_STATS) int i; unsigned len; - unsigned num = 0, min = 0xffffffff, max = 0, sq = 0; + unsigned min = 0xffffffff, max = 0, sq = 0; struct hash_table_elt* elt; double mean, variance; @@ -347,13 +348,12 @@ void hash_table_destroy(struct hash_tabl for (len = 0, elt = ht->buckets[i]; elt; elt = elt->next) len++; if (len < min) min = len; if (len > max) max = len; - num += len; sq += len * len; } - mean = (double)num / ht->num_buckets; + mean = (double)ht->num_elts / ht->num_buckets; variance = (double)sq / ht->num_buckets - mean * mean; FIXME("STATS: elts[num:%-4u size:%u mean:%f] buckets[min:%-4u variance:%+f max:%-4u]\n", - num, ht->num_buckets, mean, min, variance, max); + ht->num_elts, ht->num_buckets, mean, min, variance, max); #if 1 for (i = 0; i < ht->num_buckets; i++) { @@ -382,6 +382,7 @@ void hash_table_add(struct hash_table* h for (p = &ht->buckets[hash]; *p; p = &((*p)->next)); *p = elt; elt->next = NULL; + ht->num_elts++; } void* hash_table_find(const struct hash_table* ht, const char* name) diff --git a/dlls/dbghelp/symbol.c b/dlls/dbghelp/symbol.c index f4b0612..b9e2f2a 100644 --- a/dlls/dbghelp/symbol.c +++ b/dlls/dbghelp/symbol.c @@ -623,7 +623,8 @@ static BOOL resort_symbols(struct module struct symt_ht* sym; struct hash_table_iter hti; - if (!module_compute_num_syms(module)) return FALSE; + if (!(module->module.NumSyms = module->ht_symbols.num_elts)) + return FALSE; if (module->addr_sorttab) module->addr_sorttab = HeapReAlloc(GetProcessHeap(), 0,
1
0
0
0
Eric Pouech : dbghelp: In find_nearest, now return the symbol instead of its index in module->sorttable.
by Alexandre Julliard
06 Dec '06
06 Dec '06
Module: wine Branch: master Commit: 4806320b4829c7007fce3d796fbe6cef9682d2a8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4806320b4829c7007fce3d796…
Author: Eric Pouech <eric.pouech(a)wanadoo.fr> Date: Tue Dec 5 22:13:23 2006 +0100 dbghelp: In find_nearest, now return the symbol instead of its index in module->sorttable. --- dlls/dbghelp/dbghelp_private.h | 3 ++- dlls/dbghelp/dwarf.c | 8 ++++---- dlls/dbghelp/elf_module.c | 21 ++++++++++----------- dlls/dbghelp/symbol.c | 34 ++++++++++++++-------------------- 4 files changed, 30 insertions(+), 36 deletions(-) diff --git a/dlls/dbghelp/dbghelp_private.h b/dlls/dbghelp/dbghelp_private.h index 19864db..f575bcf 100644 --- a/dlls/dbghelp/dbghelp_private.h +++ b/dlls/dbghelp/dbghelp_private.h @@ -485,7 +485,8 @@ extern BOOL dwarf2_parse(struct /* symbol.c */ extern const char* symt_get_name(const struct symt* sym); extern int symt_cmp_addr(const void* p1, const void* p2); -extern int symt_find_nearest(struct module* module, DWORD addr); +extern struct symt_ht* + symt_find_nearest(struct module* module, DWORD addr); extern struct symt_compiland* symt_new_compiland(struct module* module, unsigned long address, unsigned src_idx); diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c index aaab3fb..a3af469 100644 --- a/dlls/dbghelp/dwarf.c +++ b/dlls/dbghelp/dwarf.c @@ -1700,15 +1700,15 @@ static void dwarf2_set_line_number(struc struct vector* v, unsigned file, unsigned line) { struct symt_function* func; - int idx; + struct symt_ht* symt; unsigned* psrc; if (!file || !(psrc = vector_at(v, file - 1))) return; TRACE("%s %lx %s %u\n", module->module.ModuleName, address, source_get(module, *psrc), line); - if ((idx = symt_find_nearest(module, address)) == -1 || - module->addr_sorttab[idx]->symt.tag != SymTagFunction) return; - func = (struct symt_function*)module->addr_sorttab[idx]; + if (!(symt = symt_find_nearest(module, address)) || + symt->symt.tag != SymTagFunction) return; + func = (struct symt_function*)symt; symt_add_func_line(module, func, *psrc, line, address - func->address); } diff --git a/dlls/dbghelp/elf_module.c b/dlls/dbghelp/elf_module.c index 78a8962..9a90d43 100644 --- a/dlls/dbghelp/elf_module.c +++ b/dlls/dbghelp/elf_module.c @@ -543,7 +543,7 @@ static int elf_new_wine_thunks(struct mo struct hash_table_iter hti; struct symtab_elt* ste; DWORD addr; - int idx; + struct symt_ht* symt; hash_table_iter_init(ht_symtab, &hti, NULL); while ((ste = hash_table_iter_up(&hti))) @@ -562,11 +562,10 @@ static int elf_new_wine_thunks(struct mo { ULONG64 ref_addr; - idx = symt_find_nearest(module, addr); - if (idx != -1) - symt_get_info(&module->addr_sorttab[idx]->symt, - TI_GET_ADDRESS, &ref_addr); - if (idx == -1 || addr != ref_addr) + symt = symt_find_nearest(module, addr); + if (symt) + symt_get_info(&symt->symt, TI_GET_ADDRESS, &ref_addr); + if (!symt || addr != ref_addr) { /* creating public symbols for all the ELF symbols which haven't been * used yet (ie we have no debug information on them) @@ -596,14 +595,14 @@ static int elf_new_wine_thunks(struct mo */ module->sortlist_valid = TRUE; } - else if (strcmp(ste->ht_elt.name, module->addr_sorttab[idx]->hash_elt.name)) + else if (strcmp(ste->ht_elt.name, symt->hash_elt.name)) { ULONG64 xaddr = 0, xsize = 0; DWORD kind = -1; - symt_get_info(&module->addr_sorttab[idx]->symt, TI_GET_ADDRESS, &xaddr); - symt_get_info(&module->addr_sorttab[idx]->symt, TI_GET_LENGTH, &xsize); - symt_get_info(&module->addr_sorttab[idx]->symt, TI_GET_DATAKIND, &kind); + symt_get_info(&symt->symt, TI_GET_ADDRESS, &xaddr); + symt_get_info(&symt->symt, TI_GET_LENGTH, &xsize); + symt_get_info(&symt->symt, TI_GET_DATAKIND, &kind); /* If none of symbols has a correct size, we consider they are both markers * Hence, we can silence this warning @@ -615,7 +614,7 @@ static int elf_new_wine_thunks(struct mo FIXME("Duplicate in %s: %s<%08x-%08x> %s<%s-%s>\n", module->module.ModuleName, ste->ht_elt.name, addr, ste->symp->st_size, - module->addr_sorttab[idx]->hash_elt.name, + symt->hash_elt.name, wine_dbgstr_longlong(xaddr), wine_dbgstr_longlong(xsize)); } } diff --git a/dlls/dbghelp/symbol.c b/dlls/dbghelp/symbol.c index b318bb7..f4b0612 100644 --- a/dlls/dbghelp/symbol.c +++ b/dlls/dbghelp/symbol.c @@ -154,7 +154,7 @@ struct symt_public* symt_new_public(stru TRACE_(dbghelp_symt)("Adding public symbol %s:%s @%lx\n", module->module.ModuleName, name, address); if ((dbghelp_options & SYMOPT_AUTO_PUBLICS) && - symt_find_nearest(module, address) != -1) + symt_find_nearest(module, address) != NULL) return NULL; if ((sym = pool_alloc(&module->pool, sizeof(*sym)))) { @@ -648,14 +648,14 @@ static BOOL resort_symbols(struct module } /* assume addr is in module */ -int symt_find_nearest(struct module* module, DWORD addr) +struct symt_ht* symt_find_nearest(struct module* module, DWORD addr) { int mid, high, low; ULONG64 ref_addr, ref_size; if (!module->sortlist_valid || !module->addr_sorttab) { - if (!resort_symbols(module)) return -1; + if (!resort_symbols(module)) return NULL; } /* @@ -665,13 +665,13 @@ int symt_find_nearest(struct module* mod high = module->module.NumSyms; symt_get_info(&module->addr_sorttab[0]->symt, TI_GET_ADDRESS, &ref_addr); - if (addr < ref_addr) return -1; + if (addr < ref_addr) return NULL; if (high) { symt_get_info(&module->addr_sorttab[high - 1]->symt, TI_GET_ADDRESS, &ref_addr); if (!symt_get_info(&module->addr_sorttab[high - 1]->symt, TI_GET_LENGTH, &ref_size) || !ref_size) ref_size = 0x1000; /* arbitrary value */ - if (addr >= ref_addr + ref_size) return -1; + if (addr >= ref_addr + ref_size) return NULL; } while (high > low + 1) @@ -703,12 +703,12 @@ int symt_find_nearest(struct module* mod } /* finally check that we fit into the found symbol */ symt_get_info(&module->addr_sorttab[low]->symt, TI_GET_ADDRESS, &ref_addr); - if (addr < ref_addr) return -1; + if (addr < ref_addr) return NULL; if (!symt_get_info(&module->addr_sorttab[high - 1]->symt, TI_GET_LENGTH, &ref_size) || !ref_size) ref_size = 0x1000; /* arbitrary value */ - if (addr >= ref_addr + ref_size) return -1; + if (addr >= ref_addr + ref_size) return NULL; - return low; + return module->addr_sorttab[low]; } static BOOL symt_enum_locals_helper(struct module_pair* pair, @@ -758,7 +758,6 @@ static BOOL symt_enum_locals(struct proc struct module_pair pair; struct symt_ht* sym; DWORD pc = pcs->ctx_frame.InstructionOffset; - int idx; se->sym_info->SizeOfStruct = sizeof(*se->sym_info); se->sym_info->MaxNameLen = sizeof(se->buffer) - sizeof(SYMBOL_INFO); @@ -766,9 +765,8 @@ static BOOL symt_enum_locals(struct proc pair.pcs = pcs; pair.requested = module_find_by_addr(pair.pcs, pc, DMT_UNKNOWN); if (!module_get_debug(&pair)) return FALSE; - if ((idx = symt_find_nearest(pair.effective, pc)) == -1) return FALSE; + if ((sym = symt_find_nearest(pair.effective, pc)) == NULL) return FALSE; - sym = pair.effective->addr_sorttab[idx]; if (sym->symt.tag == SymTagFunction) { BOOL ret; @@ -998,15 +996,12 @@ BOOL WINAPI SymFromAddr(HANDLE hProcess, { struct module_pair pair; struct symt_ht* sym; - int idx; pair.pcs = process_find_by_handle(hProcess); if (!pair.pcs) return FALSE; pair.requested = module_find_by_addr(pair.pcs, Address, DMT_UNKNOWN); if (!module_get_debug(&pair)) return FALSE; - if ((idx = symt_find_nearest(pair.effective, Address)) == -1) return FALSE; - - sym = pair.effective->addr_sorttab[idx]; + if ((sym = symt_find_nearest(pair.effective, Address)) == NULL) return FALSE; symt_fill_sym_info(&pair, NULL, &sym->symt, Symbol); *Displacement = Address - Symbol->Address; @@ -1252,7 +1247,7 @@ BOOL WINAPI SymGetLineFromAddr(HANDLE hP PDWORD pdwDisplacement, PIMAGEHLP_LINE Line) { struct module_pair pair; - int idx; + struct symt_ht* symt; TRACE("%p %08x %p %p\n", hProcess, dwAddr, pdwDisplacement, Line); @@ -1262,11 +1257,10 @@ BOOL WINAPI SymGetLineFromAddr(HANDLE hP if (!pair.pcs) return FALSE; pair.requested = module_find_by_addr(pair.pcs, dwAddr, DMT_UNKNOWN); if (!module_get_debug(&pair)) return FALSE; - if ((idx = symt_find_nearest(pair.effective, dwAddr)) == -1) return FALSE; + if ((symt = symt_find_nearest(pair.effective, dwAddr)) == NULL) return FALSE; - if (pair.effective->addr_sorttab[idx]->symt.tag != SymTagFunction) return FALSE; - if (!symt_fill_func_line_info(pair.effective, - (struct symt_function*)pair.effective->addr_sorttab[idx], + if (symt->symt.tag != SymTagFunction) return FALSE; + if (!symt_fill_func_line_info(pair.effective, (struct symt_function*)symt, dwAddr, Line)) return FALSE; *pdwDisplacement = dwAddr - Line->Address; return TRUE;
1
0
0
0
Eric Pouech : dbghelp: Simplify the way we find the debug header.
by Alexandre Julliard
06 Dec '06
06 Dec '06
Module: wine Branch: master Commit: 08712bc3a96a49bc3ebccdff323be5a11749892d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=08712bc3a96a49bc3ebccdff3…
Author: Eric Pouech <eric.pouech(a)wanadoo.fr> Date: Tue Dec 5 22:02:05 2006 +0100 dbghelp: Simplify the way we find the debug header. --- dlls/dbghelp/elf_module.c | 38 ++++++++------------------------------ 1 files changed, 8 insertions(+), 30 deletions(-) diff --git a/dlls/dbghelp/elf_module.c b/dlls/dbghelp/elf_module.c index ca6a01b..78a8962 100644 --- a/dlls/dbghelp/elf_module.c +++ b/dlls/dbghelp/elf_module.c @@ -1030,32 +1030,6 @@ BOOL elf_fetch_file_info(const char* nam } /****************************************************************** - * is_dt_flag_valid - * returns true iff the section tag is valid - */ -static unsigned is_dt_flag_valid(unsigned d_tag) -{ -#ifndef DT_PROCNUM -#define DT_PROCNUM 0 -#endif -#ifndef DT_EXTRANUM -#define DT_EXTRANUM 0 -#endif -#ifndef DT_GNU_HASH -#define DT_GNU_HASH 0x6ffffef5 -#endif - return (d_tag >= 0 && d_tag < DT_NUM + DT_PROCNUM + DT_EXTRANUM) - || (d_tag == DT_GNU_HASH) -#if defined(DT_LOOS) && defined(DT_HIOS) - || (d_tag >= DT_LOOS && d_tag < DT_HIOS) -#endif -#if defined(DT_LOPROC) && defined(DT_HIPROC) - || (d_tag >= DT_LOPROC && d_tag < DT_HIPROC) -#endif - ; -} - -/****************************************************************** * elf_load_file * * Loads the information for ELF module stored in 'filename' @@ -1107,12 +1081,16 @@ static BOOL elf_load_file(struct process do { if (!ReadProcessMemory(pcs->handle, ptr, &dyn, sizeof(dyn), &len) || - len != sizeof(dyn) || !is_dt_flag_valid(dyn.d_tag)) - dyn.d_tag = DT_NULL; + len != sizeof(dyn)) + goto leave; + if (dyn.d_tag == DT_DEBUG) + { + elf_info->dbg_hdr_addr = dyn.d_un.d_ptr; + break; + } ptr += sizeof(dyn); - } while (dyn.d_tag != DT_DEBUG && dyn.d_tag != DT_NULL); + } while (dyn.d_tag != DT_NULL); if (dyn.d_tag == DT_NULL) goto leave; - elf_info->dbg_hdr_addr = dyn.d_un.d_ptr; } } elf_unmap_section(&fmap, fmap.elfhdr.e_shstrndx);
1
0
0
0
Detlef Riekenberg : dplayx: Display requested provider.
by Alexandre Julliard
06 Dec '06
06 Dec '06
Module: wine Branch: master Commit: ec8393d3d52446f2db468fa4169f64018b22993f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ec8393d3d52446f2db468fa41…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Tue Dec 5 19:25:46 2006 +0100 dplayx: Display requested provider. --- dlls/dplayx/dplay.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/dplayx/dplay.c b/dlls/dplayx/dplay.c index 9322bf3..f5c630a 100644 --- a/dlls/dplayx/dplay.c +++ b/dlls/dplayx/dplay.c @@ -4227,7 +4227,7 @@ static HRESULT WINAPI DP_IF_InitializeCo if( hServiceProvider == 0 ) { - ERR( "Unable to load service provider\n" ); + ERR( "Unable to load service provider %s\n", debugstr_guid(&guidSP) ); return DPERR_UNAVAILABLE; }
1
0
0
0
Roderick Colenbrander : wgl: Cleanup wglMakeCurrent.
by Alexandre Julliard
06 Dec '06
06 Dec '06
Module: wine Branch: master Commit: 900094cbfe8d803bed3c5378a3ac783cdce16dbc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=900094cbfe8d803bed3c5378a…
Author: Roderick Colenbrander <thunderbird2k(a)gmx.net> Date: Tue Dec 5 23:12:24 2006 +0100 wgl: Cleanup wglMakeCurrent. --- dlls/winex11.drv/opengl.c | 31 ++++++++++--------------------- 1 files changed, 10 insertions(+), 21 deletions(-) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 5779bce..3eb98b9 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -1464,28 +1464,17 @@ BOOL X11DRV_wglMakeCurrent(X11DRV_PDEVIC Wine_GLContext *ctx = (Wine_GLContext *) hglrc; Drawable drawable = physDev->drawable; if (ctx->ctx == NULL) { - int draw_vis_id, ctx_vis_id; - VisualID visualid = (VisualID)GetPropA( GetDesktopWindow(), "__wine_x11_visual_id" ); - TRACE(" Wine desktop VISUAL_ID is 0x%x\n", (unsigned int) visualid); - draw_vis_id = describeDrawable(ctx, drawable); - ctx_vis_id = describeContext(ctx); - - if (-1 == draw_vis_id || (draw_vis_id == visualid && draw_vis_id != ctx_vis_id)) { - /** - * Inherits from root window so reuse desktop visual - */ - XVisualInfo template; - XVisualInfo *vis; - int num; - template.visualid = visualid; - vis = XGetVisualInfo(ctx->display, VisualIDMask, &template, &num); - - TRACE(" Creating GLX Context\n"); - ctx->ctx = pglXCreateContext(ctx->display, vis, NULL, type == OBJ_MEMDC ? False : True); - } else { - TRACE(" Creating GLX Context\n"); - ctx->ctx = pglXCreateContext(ctx->display, ctx->vis, NULL, type == OBJ_MEMDC ? False : True); + /* The describe lines below are for debugging purposes only */ + if (TRACE_ON(wgl)) { + describeDrawable(ctx, drawable); + describeContext(ctx); } + + /* Create a GLX context using the same visual as chosen earlier in wglCreateContext. + * We are certain that the drawable and context are compatible as we only allow compatible formats. + */ + TRACE(" Creating GLX Context\n"); + ctx->ctx = pglXCreateContext(ctx->display, ctx->vis, NULL, type == OBJ_MEMDC ? False : True); TRACE(" created a delayed OpenGL context (%p)\n", ctx->ctx); } TRACE(" make current for dis %p, drawable %p, ctx %p\n", ctx->display, (void*) drawable, ctx->ctx);
1
0
0
0
Huw Davies : wineps.drv: When we' re using a GlyphDirectory we should clear the offsets and lengths of the loca and glyf tables in addition to changing their names .
by Alexandre Julliard
06 Dec '06
06 Dec '06
Module: wine Branch: master Commit: 9a2c4f7114231d7e99a9966840c23b58161f9b1f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9a2c4f7114231d7e99a996684…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Dec 5 15:13:06 2006 +0000 wineps.drv: When we're using a GlyphDirectory we should clear the offsets and lengths of the loca and glyf tables in addition to changing their names. Should fix printing on Mac based cups servers. --- dlls/wineps.drv/type42.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/dlls/wineps.drv/type42.c b/dlls/wineps.drv/type42.c index 27b4174..8c6b9b7 100644 --- a/dlls/wineps.drv/type42.c +++ b/dlls/wineps.drv/type42.c @@ -161,7 +161,10 @@ TYPE42 *T42_download_header(PSDRV_PDEVIC static const char storage[] ="]\nhavetype42gdir{pop}{{string} forall}ifelse\n"; static const char end[] = "] def\n" "havetype42gdir{/GlyphDirectory 256 dict def\n" - " sfnts 0 get dup %d (locx) putinterval %d (glfx) putinterval}if\n" + " sfnts 0 get dup\n" + " %d <6c6f6378000000000000000000000000> putinterval\n" /* replace loca entry with dummy locx */ + " %d <676c6678000000000000000000000000> putinterval\n" /* replace glyf entry with dummy glfx */ + " }if\n" "currentdict end dup /FontName get exch definefont pop\n";
1
0
0
0
Detlef Riekenberg : kernel32/tests: Add tests for GetWindowsDirectory.
by Alexandre Julliard
06 Dec '06
06 Dec '06
Module: wine Branch: master Commit: 44f663e8a442627ac12fa7882f52db60a350cdcb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=44f663e8a442627ac12fa7882…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Sun Dec 3 22:38:50 2006 +0100 kernel32/tests: Add tests for GetWindowsDirectory. --- dlls/kernel32/tests/path.c | 61 ++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 61 insertions(+), 0 deletions(-) diff --git a/dlls/kernel32/tests/path.c b/dlls/kernel32/tests/path.c index 971fc44..ead5e75 100644 --- a/dlls/kernel32/tests/path.c +++ b/dlls/kernel32/tests/path.c @@ -1012,6 +1012,66 @@ static void test_GetSystemDirectory(void res, GetLastError(), buffer, total); } +static void test_GetWindowsDirectory(void) +{ + CHAR buffer[MAX_PATH + 4]; + DWORD res; + DWORD total; + + SetLastError(0xdeadbeef); + res = GetWindowsDirectory(NULL, 0); + /* res includes the terminating Zero */ + ok(res > 0, "returned %d with 0x%x (expected '>0')\n", res, GetLastError()); + + total = res; +#if 0 + /* this test crash on XP */ + res = GetWindowsDirectory(NULL, total); +#endif + + SetLastError(0xdeadbeef); + res = GetWindowsDirectory(NULL, total-1); + /* 95+NT: total (includes the terminating Zero) + 98+ME: 0 with ERROR_INVALID_PARAMETER */ + ok( (res == total) || (!res && (GetLastError() == ERROR_INVALID_PARAMETER)), + "returned %d with 0x%x (expected '%d' or: '0' with " \ + "ERROR_INVALID_PARAMETER)\n", res, GetLastError(), total); + + if (total > MAX_PATH) return; + + buffer[0] = '\0'; + SetLastError(0xdeadbeef); + res = GetWindowsDirectory(buffer, total); + /* res does not include the terminating Zero */ + ok( (res == (total-1)) && (buffer[0]), + "returned %d with 0x%x and '%s' (expected '%d' and a string)\n", + res, GetLastError(), buffer, total-1); + + buffer[0] = '\0'; + SetLastError(0xdeadbeef); + res = GetWindowsDirectory(buffer, total + 1); + /* res does not include the terminating Zero */ + ok( (res == (total-1)) && (buffer[0]), + "returned %d with 0x%x and '%s' (expected '%d' and a string)\n", + res, GetLastError(), buffer, total-1); + + memset(buffer, '#', total + 1); + buffer[total + 2] = '\0'; + SetLastError(0xdeadbeef); + res = GetWindowsDirectory(buffer, total-1); + /* res includes the terminating Zero) */ + ok( res == total, "returned %d with 0x%x and '%s' (expected '%d')\n", + res, GetLastError(), buffer, total); + + memset(buffer, '#', total + 1); + buffer[total + 2] = '\0'; + SetLastError(0xdeadbeef); + res = GetWindowsDirectory(buffer, total-2); + /* res includes the terminating Zero) */ + ok( res == total, "returned %d with 0x%x and '%s' (expected '%d')\n", + res, GetLastError(), buffer, total); +} + START_TEST(path) { CHAR origdir[MAX_PATH],curdir[MAX_PATH], curDrive, otherDrive; @@ -1026,4 +1086,5 @@ START_TEST(path) test_GetTempPath(); test_GetLongPathNameW(); test_GetSystemDirectory(); + test_GetWindowsDirectory(); }
1
0
0
0
Detlef Riekenberg : kernel32/tests: Add tests for GetSystemDirectory.
by Alexandre Julliard
06 Dec '06
06 Dec '06
Module: wine Branch: master Commit: ef851bc6dd2c35ae517cd5fc085386f8ebd47165 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ef851bc6dd2c35ae517cd5fc0…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Sun Dec 3 22:38:21 2006 +0100 kernel32/tests: Add tests for GetSystemDirectory. --- dlls/kernel32/tests/path.c | 64 +++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 63 insertions(+), 1 deletions(-) diff --git a/dlls/kernel32/tests/path.c b/dlls/kernel32/tests/path.c index b4165e6..971fc44 100644 --- a/dlls/kernel32/tests/path.c +++ b/dlls/kernel32/tests/path.c @@ -1,7 +1,8 @@ /* - * Unit test suite for Get*PathNamesA and (Get|Set)CurrentDirectoryA. + * Unit test suite for various Path and Directory Functions * * Copyright 2002 Geoffrey Hausheer + * Copyright 2006 Detlef Riekenberg * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -951,6 +952,66 @@ static void test_GetLongPathNameW(void) } } +static void test_GetSystemDirectory(void) +{ + CHAR buffer[MAX_PATH + 4]; + DWORD res; + DWORD total; + + SetLastError(0xdeadbeef); + res = GetSystemDirectory(NULL, 0); + /* res includes the terminating Zero */ + ok(res > 0, "returned %d with 0x%x (expected '>0')\n", res, GetLastError()); + + total = res; +#if 0 + /* this test crash on XP */ + res = GetSystemDirectory(NULL, total); +#endif + + SetLastError(0xdeadbeef); + res = GetSystemDirectory(NULL, total-1); + /* 95+NT: total (includes the terminating Zero) + 98+ME: 0 with ERROR_INVALID_PARAMETER */ + ok( (res == total) || (!res && (GetLastError() == ERROR_INVALID_PARAMETER)), + "returned %d with 0x%x (expected '%d' or: '0' with " \ + "ERROR_INVALID_PARAMETER)\n", res, GetLastError(), total); + + if (total > MAX_PATH) return; + + buffer[0] = '\0'; + SetLastError(0xdeadbeef); + res = GetSystemDirectory(buffer, total); + /* res does not include the terminating Zero */ + ok( (res == (total-1)) && (buffer[0]), + "returned %d with 0x%x and '%s' (expected '%d' and a string)\n", + res, GetLastError(), buffer, total-1); + + buffer[0] = '\0'; + SetLastError(0xdeadbeef); + res = GetSystemDirectory(buffer, total + 1); + /* res does not include the terminating Zero */ + ok( (res == (total-1)) && (buffer[0]), + "returned %d with 0x%x and '%s' (expected '%d' and a string)\n", + res, GetLastError(), buffer, total-1); + + memset(buffer, '#', total + 1); + buffer[total + 2] = '\0'; + SetLastError(0xdeadbeef); + res = GetSystemDirectory(buffer, total-1); + /* res includes the terminating Zero) */ + ok( res == total, "returned %d with 0x%x and '%s' (expected '%d')\n", + res, GetLastError(), buffer, total); + + memset(buffer, '#', total + 1); + buffer[total + 2] = '\0'; + SetLastError(0xdeadbeef); + res = GetSystemDirectory(buffer, total-2); + /* res includes the terminating Zero) */ + ok( res == total, "returned %d with 0x%x and '%s' (expected '%d')\n", + res, GetLastError(), buffer, total); +} + START_TEST(path) { CHAR origdir[MAX_PATH],curdir[MAX_PATH], curDrive, otherDrive; @@ -964,4 +1025,5 @@ START_TEST(path) test_CleanupPathA(origdir,curdir); test_GetTempPath(); test_GetLongPathNameW(); + test_GetSystemDirectory(); }
1
0
0
0
Paul Vriens : version/tests: Free memory after use.
by Alexandre Julliard
06 Dec '06
06 Dec '06
Module: wine Branch: master Commit: d01e76de05877ef2fb67f35c86d73344b6071323 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d01e76de05877ef2fb67f35c8…
Author: Paul Vriens <paul.vriens.wine(a)gmail.com> Date: Mon Dec 4 22:21:24 2006 +0100 version/tests: Free memory after use. --- dlls/version/tests/info.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dlls/version/tests/info.c b/dlls/version/tests/info.c index b7ac14d..c71ecc6 100644 --- a/dlls/version/tests/info.c +++ b/dlls/version/tests/info.c @@ -214,12 +214,12 @@ static void test_info(void) boolret = GetFileVersionInfoA( "kernel32.dll", 0, retval, pVersionInfo ); ok (boolret, "GetFileVersionInfoA failed: GetLastError = 0x%08x\n", GetLastError()); if (!boolret) - return; + goto cleanup; boolret = VerQueryValueA( pVersionInfo, backslash, (LPVOID *)&pFixedVersionInfo, &uiLength ); ok (boolret, "VerQueryValueA failed: GetLastError = 0x%08x\n", GetLastError()); if (!boolret) - return; + goto cleanup; dwlVersion = (((DWORDLONG)pFixedVersionInfo->dwFileVersionMS) << 32) + pFixedVersionInfo->dwFileVersionLS; @@ -234,6 +234,9 @@ static void test_info(void) boolret = VerQueryValueA( pVersionInfo, "\\", (LPVOID *)&pFixedVersionInfo, 0); ok (boolret, "VerQueryValue failed: GetLastError = 0x%08lx\n", GetLastError()); #endif + +cleanup: + HeapFree( GetProcessHeap(), 0, pVersionInfo); } static void test_32bit_win(void)
1
0
0
0
Paul Vriens : wininet/test: Free memory after use.
by Alexandre Julliard
06 Dec '06
06 Dec '06
Module: wine Branch: master Commit: cae03f7658374523c3ceabed7495690f9084743f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cae03f7658374523c3ceabed7…
Author: Paul Vriens <paul.vriens.wine(a)gmail.com> Date: Mon Dec 4 22:14:48 2006 +0100 wininet/test: Free memory after use. --- dlls/wininet/tests/url.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/wininet/tests/url.c b/dlls/wininet/tests/url.c index 93e60e7..90008f0 100644 --- a/dlls/wininet/tests/url.c +++ b/dlls/wininet/tests/url.c @@ -612,6 +612,8 @@ static void InternetCreateUrlA_test(void ok(len == strlen(CREATE_URL1), "Expected len %d, got %d\n", lstrlenA(CREATE_URL1), len); ok(!strcmp(szUrl, CREATE_URL1), "Expected %s, got %s\n", CREATE_URL1, szUrl); + HeapFree(GetProcessHeap(), 0, szUrl); + memset(&urlComp, 0, sizeof(urlComp)); urlComp.dwStructSize = sizeof(URL_COMPONENTS); urlComp.lpszScheme = https;
1
0
0
0
← Newer
1
...
56
57
58
59
60
61
62
...
72
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
Results per page:
10
25
50
100
200