i do have 1 question

int function(...)
{
int x;
int q;


if (condition)
{
}

<-----is there a way to put a marker here...then use a pointer to store the address of the marker...right before the 2nd conditional statement in my code?

if (condition2)
{

}


return val;
}

Huh??? Why would you want to do that? Care to clarify your reasoning? If we have a reason, it may be easier to give you a more valuable response and/or suggest a better alternative.

im trying to use the address,hardcoded at compile time, at that address, to read in the bytes starting at that address till the end of the return..... -thx

That doesn't make sense. Do you want that section of code to repeat or something? If so, it would be much easier for you if you used a loop construct.

Otherwise, I have no clue what you're talking about...

>>im trying to use the address,hardcoded at compile time, at that address, to read in the bytes starting at that address till the end of the return..... -thx

??????

If you want the "address hardcoded at compile time" that won't be of any use at run-time. At compile-time, all function addresses are relative to the file, while at run-time they are in a virtual address space of the process (i.e. they are no longer the same).

If you want the address at run-time, then there is no native way to do this easily (I mean you are talking about extracting the value of the "instruction register"? I don't know of anyway to extract that without writing assembly code).

It looks more to me like you want to take a peak at the machine code of a function. For that, you can either set a break-point in your IDE/debugger and inspect the assembly there. Or you can just compile your program into an assembly listing (using option -S on gcc and others).

Please say what you want to accomplish, not the means by which you are trying to do so, because, from the unusual nature of it, it doesn't seem like it's the best method.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.