Help Logs Database

Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Ircnet  |  Dalnet
<kik> keke how would i go about setting the value of "[edi].u1.Function" ?
<kik> mov edi, [edi].u1.Function
<kik> mov [edi], dwNewAddr
<kik> crashes
<Robert> What does [edi].u1.Function mean?
<kik> edi is a pointer to a structure
<kik> IMAGE_THUNK_DATA to be precise
<Robert> Ah, which ***embler is this?
<Robert> Never seen any that uses this syntax for structures.
<Robert> ...that I know of.
<kik> masm
<edcba> masm/tasm
<kik> i just want to set its value to dwNewAddr
<Robert> Oh, OK.
<Robert> I haven't used TASM for years.
<edcba> are you sure you don't want [edi+u1*A+Function*B] ?
<edcba> or maybe you forgot the base too
<kik> what's that A and B all about?
<edcba> [01:36:46] <kik> mov edi, [edi].u1.Function
<edcba> [01:36:47] <kik> mov [edi], dwNewAddr
<edcba> lea edi,[edi].u1.Function
<edcba> mov [edi],dwNewAddr
<edcba> or directly mov [edi].u1.Function,dwNewAddr
<edcba> except if dwNewAddr is a memory reference
<edcba> use a debugger and check what you acces if it is a runtime problem
<kik> hmm
<kik> well dwNewAddr is the functions argument
<kik> in a debugger:
<kik> LEA EDI,DWORD PTR DS:[EDI]
<kik> MOV DWORD PTR DS:[EDI],EBX ;crashes here
<major_payne> heh, I will have fun (In a cl*** called Digital Logic and ***embly Language)
<edcba> lea edi,[edi] is nop like operation
<edcba> mov ebx,dwNewAddr
<edcba> mov [edi].u1.Function,ebx
<edcba> but be aware that arrays in C are not the same than array in asm
<edcba> so you may have to use a multiplier *2 *4 *8 depending on the size of the elements in your array
<kik> hmm crashes again
<kik> MOV EBX,DWORD PTR SS:[EBP+10]
<kik> MOV DWORD PTR DS:[EDI],EBX ;crashes here
<Bender``> Heh..
<Bender``> fooling around?
<edcba> kik: look at the value of edi
<edcba> and see if you didn't forget to add something to it
<edcba> verify if edi contains really a pointer
<edcba> and not an index
<kik> edis value is 0x00402018
<kik> i can read from it fine
<kik> mov edx, [edi].u1.Function
<kik> .if dwOldAddr == edx
<kik> that works as it should
<kik> http://pastebin.com/392952
<edcba> lea ebx,foo mov [ebx],eax -> mov foo,eax
<edcba> i don't really see a bug
<asmbanm> anyone here familiar with mips?
<iojkl> hello
<exe> Hello iojkl
<zoly> 'morning
<Robert> Hi.
<zoly> hehe...
<Robert> Hehe.
<zoly> http://www.foxnews.com/story/0,2933,172194,00.html
<BobtheAvenger> hey
<zoly> hi
<BobtheAvenger> howz u?
<zoly> queue stalled
<BobtheAvenger> ok
<zoly> have some relaxant
<BobtheAvenger> weed or beer?
<zoly> http://www.foxnews.com/story/0,2933,172194,00.html
<BobtheAvenger> i always knew weed was good for me
<zoly> according the article, only when used over longer periods :)
<BobtheAvenger> its all good then
<zoly> you're not far form the northern downs, right?
<BobtheAvenger> erm
<BobtheAvenger> dont think so
<zoly> harvesting season commences soon
<BobtheAvenger> does it?
<zoly> in the downs, i think it is mostly stropharia coronilla, with some speckles of stopharia cubensis.
<BobtheAvenger> ok
<BobtheAvenger> i wouldnt know
<Robert> No. Of course not.
<zoly> nor would i
<BobtheAvenger> the closest thing to a field i can see is a park, which doesnt have any druggies in it yet
<zoly> ah, that's why you were swearing.
<BobtheAvenger> no
<BobtheAvenger> i was swearing for other reasons
<habbaQuake> whats the -S flag?
<adoroas> hi
<Robert> Hi, adoroas.
<Robert> habbaQuake: Are you serious?
<habbaQuake> yes I am
<Robert> OK.
<Robert> Do you expect an answer to what's the -S flag is for, without even specifying which PROGRAM you're refering to?
<habbaQuake> what is it in general terms
<habbaQuake> when someone talks about it
<Robert> Hmm...
<Robert> Could be a gcc flag, for example.
<Robert> That creates ***embly language output.
<habbaQuake> ah
<habbaQuake> if you put -g -S will that include debugging info
<Robert> Not quite sure what's included in th ***embly file.
<cow> habbaQuake, i'm not possitive on that last one too. try gcc options -gstabs, -da short of knowing how to use -Wa,-you-name-it that isYMMV
<cow> habbaQuake, iirc there was an option to $CC to emit comments in .S but that obviously depends on what $CC expands for you
<xark> If you want asm debugging info, then there is an ***embler option that will let you "source debug" .S files (for gdb from example).


Return to asm
or
Go to some related logs:

politics
ps2
politics
funny movies doffen har daua
Volumemanger

Copyright © 2005 www.irclogs.ws. All rights reserved. » disclaimer » contact