Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Api,assembler e softice

2 views
Skip to first unread message

Michele Costantino

unread,
Sep 2, 2002, 2:39:17 PM9/2/02
to
Salve ragà, innanzitutto scusate il crosspost...ma sono veramente incasinato
per questo mio problema del cavolo....

Mi spiego bene (spero)

Ho configurato softice per intercettare delle chiamate ad alcune API.
Quando vengono intercettate, dove vengono restituiti i valori? (intendo i
registri).

Faccio un esempio pratico (che in fondo è il mio problema).

Setto il breakpoint sulla chiamata "recv" delle winsock
Mi viene intercettato benissimo il messaggio, ma adesso, dove vengono messi
i valori di ritorno della chiamata???

Questo è il modo in cui viene chiamata l'API.


Declare Function recv Lib "wsock32.dll" (ByVal s As Long, buf As Any, ByVal
length As Long, ByVal flags As Long) As Long

I valori al momento dell'intercettazione (mediante softice) della chiamata
dove vengono messi????

Grazie in anticipo a chi mi risponderà.


Ivan Brugiolo [MS]

unread,
Sep 3, 2002, 11:51:31 AM9/3/02
to
Cross-posting in Italian on a public newsgroup hosted on
msnews.microsoft.com
and asking about softice will not help you in getting an answer.

On the IA-32 architecture, the return value of a function is normally in the
eax register.
in cdb/nstd/windbg you can use
0:001> bp wsock32!recv "g@$ra;r eax"
to set a breakpoint that will jump at the return address of a function
and that will display the return value of the same function.

If you want to see the parameters passed to the function use this breakpoint
0:001>bp wsock32!recv "dc poi(esp+4) l1;db poi(poi(esp+8));dc poi(esp+c)
l1;dc poi(esp+10) l1"

--
This posting is provided "As Is" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm


"Michele Costantino" <giovanni.c...@tin.it> wrote in message
news:pfOc9.53139$pX1.1...@news2.tin.it...

0 new messages