/* ebp points on stack base */
/* esp points on stack pointer, ie on last stacked element (current element) */
_asm call $ + 5
- _asm pop eax
- _asm mov context.Eip, eax
- _asm mov eax, esp
- _asm mov context.Esp, eax
- _asm mov context.Ebp, ebp dbg_hlp_init(GetCurrentProcess());
+ _asm pop eax
+ _asm mov context.Eip, eax
+ _asm mov eax, esp
+ _asm mov context.Esp, eax
+ _asm mov context.Ebp, ebp
+
+ dbg_hlp_init(GetCurrentProcess());
if ((NULL == dbg_hlp) || (size <= 0) || (NULL == buffer)) {
errno = EINVAL;
while (pos < size) {
stack_frame = (void *) xbt_new0(STACKFRAME, 1);
- if (!stack_frame) {
- errno = ENOMEM;
- break;
- }
-
stack_frame->AddrPC.Offset = context.Eip;
stack_frame->AddrPC.Mode = AddrModeFlat;
strings = xbt_new0(char *, size);
- if (NULL == strings) {
- errno = ENOMEM;
- return NULL;
- }
-
pSym = (IMAGEHLP_SYMBOL *) __buffer;
pSym->SizeOfStruct = sizeof(IMAGEHLP_SYMBOL);
/* allocation */
dbg_hlp = xbt_new0(s_xbt_debug_hlp_t, 1);
- if (!dbg_hlp)
- return ENOMEM;
-
/* load the library */
dbg_hlp->instance = LoadLibraryA("Dbghelp.dll");