<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:12pt"><div style="RIGHT: auto"><SPAN style="RIGHT: auto">Any recent bug fixes in the dbghelp.dll (since 1.36.3 which is my development base)?  For some reason, symt_find_nearest()  is not finding the address which corresponds to the MessageBoxW() in user32.dll.   I have stepped through the function and it appears that the address for MessageBoxW is not in the sorted list of addresses as shown in the log below</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN> </div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">symt_find_nearest (module=0x455604b8, addr=0x458bc19c) at symbol.c:976<BR>973         if (cmp_sorttab_addr(module, mid, addr) < 0)<BR>(gdb) p low<BR>$235 = 0xa85<BR>(gdb) p high<BR>$236 = 0xa88<BR>(gdb) p mid<BR>$237 = 0xa86<BR>(gdb) s<BR>cmp_sorttab_addr (module=0x455604b8, idx=0xa86, addr=0x458bc19c) at symbol.c:54<BR>54     symt_get_address(&module->addr_sorttab[idx]->symt, &ref);<BR>(gdb) n<BR>55     return cmp_addr(ref, addr);<BR>(gdb) p ref<BR>$239 = 0x458bc458 <-- this address at idx=0xa86 is past the one I'm looking for<BR>(gdb) p addr<BR>$240 = 0x458bc19c   <---- this is the address of MessageBoxW that I am searching for.<BR></SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">After returning from this call, we exit the while (high > low + 1) and then return the "incorrect" symbol at idx=0xa85 which is the closest given the sorted address but not the one I was looking for.</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN> </div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">98     symt_get_address(&module->addr_sorttab[low]->symt, &ref_addr);<BR>(gdb) p low<BR>$249 = 0xa85<BR>(gdb) p ref_addr<BR>$250 = 0x458bbb18<BR>(gdb) info symbol ref_addr<BR>MSGBOX_OnInit + 3044 in section .text of /development/rcruz/sandbox/wine/installs/wine-1.3.36/lib/wine/user32.dll.so<BR>(gdb) n<BR>1003     return module->addr_sorttab[low];<BR></div></SPAN>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">So why isn't the address 0x458bc19c for MessageBoxW found in the sorted array between addr 0x458bbb18  and 0x458bc458?  did it not get added to the sorted list of symbols at all? or incorrectly?  There are close to 8000 symbols in user32.dll so obviously I haven't looked through this entire array to see if this function got inserted into the wrong place.  I will continue to debug this but I figure I ask first in case there is a known issue which has been address in a subsequent release.</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN> </div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">Regards</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">Roger<VAR id=yui-ie-cursor></VAR></SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"> </div></SPAN>
<div><BR></div>
<DIV style="FONT-FAMILY: arial, helvetica, sans-serif; FONT-SIZE: 12pt">
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">
<DIV dir=ltr><FONT size=2 face=Arial>
<DIV style="BORDER-BOTTOM: #ccc 1px solid; BORDER-LEFT: #ccc 1px solid; PADDING-BOTTOM: 0px; LINE-HEIGHT: 0; MARGIN: 5px 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; HEIGHT: 0px; FONT-SIZE: 0px; BORDER-TOP: #ccc 1px solid; BORDER-RIGHT: #ccc 1px solid; PADDING-TOP: 0px" class=hr contentEditable=false readonly="true"></DIV><B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Roger Cruz <roger_r_cruz@yahoo.com><BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> Andr� Hentschel <nerv@dawncrow.de>; "wine-devel@winehq.org" <wine-devel@winehq.org> <BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Tuesday, April 17, 2012 11:11 PM<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> Re: SymEnumSymbolsForAddr in dbghelp.dll<BR></FONT></DIV><BR>
<DIV id=yiv1815799728>
<DIV>
<DIV style="BACKGROUND-COLOR: #fff; FONT-FAMILY: arial, helvetica, sans-serif; COLOR: #000; FONT-SIZE: 12pt">
<DIV id=yiv1815799728>
<DIV>
<DIV style="BACKGROUND-COLOR: #fff; FONT-FAMILY: arial, helvetica, sans-serif; COLOR: #000; FONT-SIZE: 12pt">
<DIV>I already changed the code to use SymEnumSymbols and SymSetContext to specify the address of the symbol I want to look for.  A little more cumbersome but equivalent in functionality.  I'm currently in the process of debugging why symt_find_nearest() is not properly identifying the correct function symbol associated with the address it is being passed in.  The binary search in that function seems to stop short of the actual symbol.</DIV>
<DIV> </DIV>
<DIV>With regards to winebuild and *.spec files,  I had examined the code and was pretty sure that stub meant not implemented but I just wanted to confirm.  Sometimes I ask also to see if anyone else is working on something similar so I don't duplicate the work and to get additional pointers on who to talk to like Juan did.  </DIV>
<DIV> </DIV>
<DIV>Much greatful for your help and all of you other wine developers out there</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Regards,</DIV>
<DIV>Roger R. Cruz<VAR id=yiv1815799728yui-ie-cursor></VAR></DIV>
<DIV><BR id=yiv1815799728yui_3_2_0_20_133469484390551></DIV>
<DIV style="FONT-FAMILY: arial, helvetica, sans-serif; FONT-SIZE: 12pt" id=yiv1815799728yui_3_2_0_20_133469484390556 class=yiv1815799728yui_3_2_0_20_133469484390554>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt" class=yiv1815799728yui_3_2_0_20_133469484390561>
<DIV dir=ltr><FONT size=2 face=Arial>
<DIV style="BORDER-BOTTOM: #ccc 1px solid; BORDER-LEFT: #ccc 1px solid; PADDING-BOTTOM: 0px; LINE-HEIGHT: 0; MARGIN: 5px 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; HEIGHT: 0px; FONT-SIZE: 0px; BORDER-TOP: #ccc 1px solid; BORDER-RIGHT: #ccc 1px solid; PADDING-TOP: 0px" class=yiv1815799728hr></DIV></FONT><B><FONT size=2 face=Arial></FONT></B>> *From:* Roger Cruz <<A href="mailto:roger_r_cruz@yahoo.com" rel=nofollow target=_blank ymailto="mailto:roger_r_cruz@yahoo.com">roger_r_cruz@yahoo.com</A>><BR>> *To:* "<A href="mailto:wine-devel@winehq.org" rel=nofollow target=_blank ymailto="mailto:wine-devel@winehq.org">wine-devel@winehq.org</A>" <<A href="mailto:wine-devel@winehq.org" rel=nofollow target=_blank ymailto="mailto:wine-devel@winehq.org">wine-devel@winehq.org</A>><BR>> *Sent:* Monday, April 16, 2012 9:13 PM<BR>> *Subject:* SymEnumSymbolsForAddr in dbghelp.dll<BR>> <BR>> <BR>> I wrote a simple piece of code that uses
 dbghelp.dll's  SymEnumSymbolsForAddr() but when I went to search for its code in Wine, it looks to be missing.  The dbghelp.spec has that function listed as "stub".  What does stub mean in this context? Does it mean the function is not implemented?  Are there any plans to?<BR>> <BR>> Thanks<BR>> Roger R. Cruz<BR><BR>Have a look at SymEnumSymbols (and SymEnumSymbolsW), it seems everything needed for SymEnumSymbolsForAddr is already available or needs only minor changes.<BR><BR>PS: The fact that you don't know Wine basics like spec files is putting you in a bad position to attack wine internals like winebuild/ntdll,<BR>i suggest to read the docs (http://www.winehq.org/documentation) and the regarding wiki Developer pages (http://wiki.winehq.org/Developers).<BR><BR>-- <BR><BR>Best Regards, Andr� Hentschel<BR><BR><BR><BR><BR></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV><BR><BR></DIV></DIV></div></body></html>