executing crt functions in immidiate window

  • Thread starter Thread starter Abubakar
  • Start date Start date
A

Abubakar

Hi,

While debugging, can I execute functions like strlen() in immediate window?
I tried strlen () on some pointer to char array and it said:

CXX0017: Error: symbol "strlen" not found

Regards,

-ab.
 
While debugging, can I execute functions like strlen() in immediate window?
I tried strlen () on some pointer to char array and it said:

CXX0017: Error: symbol "strlen" not found

In general, you can execute a function if its type is known to the debugger,
and if the list of function's parameters is not too complicated.

Often you have to specify the module where the function is located,
e.g. if strlen is in msvcr71d.dll, you can use:
{,,msvcr71d.dll}strlen(0x123456)

If the function's type information is not available (then the debugger will usually
display its type as "void" in Watch window if you enter the function's name there),
you can implement a wrapper function whose sole purpose is to call the target function.

Regards,
Oleg
[VC++ MVP http://www.debuginfo.com/]
 
Ok, cool.

Thanks,

-ab.

Oleg Starodumov said:
While debugging, can I execute functions like strlen() in immediate window?
I tried strlen () on some pointer to char array and it said:

CXX0017: Error: symbol "strlen" not found

In general, you can execute a function if its type is known to the debugger,
and if the list of function's parameters is not too complicated.

Often you have to specify the module where the function is located,
e.g. if strlen is in msvcr71d.dll, you can use:
{,,msvcr71d.dll}strlen(0x123456)

If the function's type information is not available (then the debugger will usually
display its type as "void" in Watch window if you enter the function's name there),
you can implement a wrapper function whose sole purpose is to call the target function.

Regards,
Oleg
[VC++ MVP http://www.debuginfo.com/]
 
Back
Top