Topic created on: September 29, 2009 07:42 CDT by
icewall 
.
Hi,
like in topic, I would like to know whether there is any possibility to change local variable symbolical name from e.g:
LOCAL.1
to
LOCAL.hFile
using Olly PDK functions.
I have found quite nice function called : Insertname
which works perfectly for a CALL/JMP/immAddr/OFFSET/ but unfortunatelly no for symbols like LOCAL or ARG.
Any kind of information will be usefull.
Thx ;).
> icewall: Hi,
> like in topic, I would like to know whether there is any possibility to change local variable symbolical name from e.g:
> LOCAL.1
> to
> LOCAL.hFile
> using Olly PDK functions.
> I have found quite nice function called : Insertname
> which works perfectly for a CALL/JMP/immAddr/OFFSET/ but unfortunatelly no for symbols like LOCAL or ARG.
I don't think it can be done. I tried an experiment with this plug-in code:
void lookup_name_for_address()
{
int i;
char name[TEXTLEN];
unsigned address = 0;
int cch;
Getlong("Address:", &address, 4, 0, DIA_HEXONLY);
ollyList_dbgprintf(OLLYLIST_RED, "OllyDbg names for address %08X", address);
for (i = NM_NONAME; i <= NM_ANYNAME; i++ )
{
cch = Findname(address, i, name);
if (cch)
{
name[cch]='\0';
ollyList_dbgprintf(OLLYLIST_RED, "%02X: '%s'\n", i, name);
}
}
ollyList_dbgprintf(OLLYLIST_RED, "End of names list.");
}
and when I provide the absolute stack address of a local or arg (displayed as you describe in CPU dump window), there are no names reported for the address.
Looking at the t_dump structure in plugin.h makes me wonder if the locals/args names feature is specific to the CPU dump window.
|