Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to index page
Thread view  Board view
Ninho(R)

E-mail

03.06.2014, 20:14
 

HXDOS : how do you identify import missing from system dll ? (DOSX)

Hi, Pals ! Long time no see...

I'm back with a question re. HXDOS : having SET DPMILDR=128,
if a PE fails at run time because an unresolved import is called,
how do you determine which was the missing function ?

Is there a relatively quick and straightforward method, or would
you need long and painful debugging sessions ?

Test case : my version of Bochs.exe, compiled from CVS with personal
options fails early in DKRNL32.DLL, whereas the official build works well under the HX extender. This is the failure being logged :

....
init_dev of 'vga' plugin device by virtual method

DPMILD32: unresolved import called

dkrnl32: exception 80000003, flags=0 occured at 97:2EAA
ax=225624 bx=0 cx=7079926D dx=2252C7
si=1EBDE5C di=2258A8 bp=22587C sp=2255EC
[eip] = 00 00 00 00 00 00 00 08 00 0D 0A 00
[esp] = 005A51A2 01EBDE5C 00000000 00225624 00000000 00000000
dkrnl32: fatal exit!


Is there a way to identify the missing import name and or ordinal just
from the register dump ?

Regards

--
Ninho

DOS386(R)

19.06.2014, 10:05

@ Ninho
 

HXDOS : how do you identify import missing from system dll ?

> Hi, Pals !

Hi NTSC's :-)

> I'm back with a question re. HXDOS : having SET DPMILDR=128,
> if a PE fails at run time because an unresolved import is called,
> how do you determine which was the missing function ?

No way :-( (IIRC I had proposed exactly this already 1'000'000'000'000 times ... look at the source of DPMILDR ...)

> Is there a relatively quick and straightforward method, or would
> you need long and painful debugging sessions ?

Compare the import list of your PE (usually NOT sorted) with the export lists of the HX DLL's.

> Test case : my version of Bochs.exe, compiled from CVS with personal
> options fails early in DKRNL32.DLL, whereas the official build works well
> under the HX extender. This is the failure being logged

> Is there a way to identify the missing import name and or ordinal just
> from the register dump ?

I fear NO ...

Again, look at the import list of your PE, identify the missing imports, and try to track them in the source. AFAIK the official BOCHS binaries do use even some obscure imports by ordinal:

; BOCHS needs 4 imports by ordinal:
; $04 GetEffectiveClientRect
; $06 CreateStatusWindowA
; $10 CreateUpDownControl (unconditionally imported but not called)
; $11 InitCommonControls

PS:

http://board.flatassembler.net/download.php?id=6422
http://www.bttr-software.de/forum/board_entry.php?id=10855
http://www.bttr-software.de/forum/board_entry.php?id=7492

---
This is a LOGITECH mouse driver, but some software expect here
the following string:*** This is Copyright 1983 Microsoft ***

Ninho(R)

E-mail

23.06.2014, 16:08

@ DOS386
 

HXDOS : how do you identify import missing from system dll ?

Hi, agent#386 ! thanks for chiming in !

>> Hi, Pals !
> Hi NTSC's :-)

I'm more of a SECAM guy myself...

>> I'm back with a question re. HXDOS : having SET DPMILDR=128,
>> if a PE fails at run time because an unresolved import is called,
>> how do you determine which was the missing function ?

> No way :-( (IIRC I had proposed exactly this already 1'000'000'000'000
> times ... look at the source of DPMILDR ...)

Aw! I'd feared such would be the case

> Compare the import list of your PE (usually NOT sorted) with the export
> lists of the HX DLL's.

I'll do that, time allowing. It's not particularly important that I find out out exactly what's missing, since AFAIU (from personal mail), Japheth has got got other business now than caring after HX. I was a bit surprised that Bochs compiled by me with a vastly restricted set of capabilities than the official build (removing AMD64, VMX & more) did not work using HX, while their version does. Either due to using different MSC++ compilers, or some device I included and they did not. Again not a real grief, I was just being curious.

> and try to track them in the source. AFAIK the official BOCHS binaries do
> use even some obscure imports by ordinal:

Yes, by-ordinal-imports are an additional liability

> ; BOCHS needs 4 imports by ordinal:
> ; $04 GetEffectiveClientRect
> ; $06 CreateStatusWindowA
> ; $10 CreateUpDownControl (unconditionally imported but not called)
> ; $11 InitCommonControls

> PS:
>
> http://board.flatassembler.net/download.php?id=6422
> http://www.bttr-software.de/forum/board_entry.php?id=10855
> http://www.bttr-software.de/forum/board_entry.php?id=7492

thanks again, regards

--
Ninho

Ninho(R)

E-mail

15.07.2014, 20:36

@ Ninho
 

HXDOS : how do you identify import missing from system dll ?

Hi,again, DOS386 !

>> Compare the import list of your PE (usually NOT sorted) with the export
>> lists of the HX DLL's.

I've had a look. (You're right, sorting is a PITA. Can you suggest a ready made, preferably free-ware program that will sort exports / imports and optionally dump info to a text file ?)

For the record, I found the following imports listed by my build of Bochs, which _unless I goofed_ are NOT exported (not listed by name) by HX's win emulation :

KERNEL32:
307 FindFirstFileExA

USER32:
516 MapDialogRect
688 SetScrollInfo

I'm not in Windows programming and my set of toolz therefore very limited : can you please check for the above functions?
Assuming they're missing indeed, ... how would we proceed if we needed them added, given Japheth is no more available to work on the libs for HX?

> Yes, by-ordinal-imports are an additional liability

I've looked up only regular imports by "my" bochs, not checked imports-by-ordinal or using "getprocaddress".

---
Ninho

DOS386(R)

17.08.2014, 19:41

@ Ninho
 

HXDOS : how do you identify import missing from system dll ?

> Can you suggest a ready made, preferably free-ware program that will
> sort exports / imports and optionally dump info to a text

My excellent UPET ... I had been working on it some centuries ago, then my periods of death got more frequent and longer, and yeah, guess the result :-(

> KERNEL32:
> 307 FindFirstFileExA

Never had problems with this one before. Yeah "FindFirstFileExA" is missing in DKRNL32 ... and not very useful ... what strange did you do that your binary needs it?

> USER32:
> 516 MapDialogRect
> 688 SetScrollInfo

Dummy enough for official binary.

> Assuming they're missing indeed, ... how would we proceed if we needed them
> added, given Japheth is no more available to work on the libs for HX?

Download the source (it's slightly outdated compared to the released binaries), get it compiling, fix it ...

---
This is a LOGITECH mouse driver, but some software expect here
the following string:*** This is Copyright 1983 Microsoft ***

Back to index page
Thread view  Board view
15108 Postings in 1358 Threads, 246 registered users, 9 users online (0 registered, 9 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum