Click here to Skip to main content
15,898,134 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: display symbol at some address Pin
Hamid_RT30-Jun-08 23:33
Hamid_RT30-Jun-08 23:33 
GeneralRe: display symbol at some address Pin
George_George30-Jun-08 23:43
George_George30-Jun-08 23:43 
GeneralRe: display symbol at some address Pin
Hamid_RT30-Jun-08 23:53
Hamid_RT30-Jun-08 23:53 
GeneralRe: display symbol at some address Pin
George_George1-Jul-08 0:03
George_George1-Jul-08 0:03 
GeneralRe: display symbol at some address Pin
George_George2-Jul-08 1:44
George_George2-Jul-08 1:44 
GeneralRe: display symbol at some address Pin
Hamid_RT2-Jul-08 20:10
Hamid_RT2-Jul-08 20:10 
GeneralRe: display symbol at some address Pin
George_George4-Jul-08 2:45
George_George4-Jul-08 2:45 
AnswerRe: display symbol at some address Pin
cmk30-Jun-08 5:25
cmk30-Jun-08 5:25 
To get the module the address is in use SymGetModuleInfo64().
This will resolve for all 'global' variables (functions and global data in exe's or dll's).

To get the raw (mangled) symbol name use SymGetSymFromAddr64().
To get the unmangled name use UnDecorateSymbolName() or SymUnDName64().

To check if the address is on the _current_ stack:
// Use NtCurrentTeb (undocumented) to get info for the current thread - including stack limits.
// http://www.bluebytesoftware.com/blog/PermaLink,guid,eb98baaf-0837-498d-a1e7-e4e16788f912.aspx
// http://www.bluebytesoftware.com/blog/PermaLink,guid,db077b7d-47ed-4f2a-8300-44203f514638.aspx
//
bool  IsOnCurrStack( cvoid *ADDR )
{
	NT_TIB *tib((NT_TIB*)::NtCurrentTeb());
	return( tib->StackLimit < ADDR && ADDR < tib->StackBase );
}


You should never see/care about an address on the stack of another thread unlesss you are a debugger.

...cmk

The idea that I can be presented with a problem, set out to logically solve it with the tools at hand, and wind up with a program that could not be legally used because someone else followed the same logical steps some years ago and filed for a patent on it is horrifying.
- John Carmack

GeneralRe: display symbol at some address Pin
George_George30-Jun-08 15:52
George_George30-Jun-08 15:52 
GeneralRe: display symbol at some address Pin
cmk30-Jun-08 17:07
cmk30-Jun-08 17:07 
GeneralRe: display symbol at some address Pin
George_George30-Jun-08 17:32
George_George30-Jun-08 17:32 
GeneralRe: display symbol at some address Pin
cmk1-Jul-08 5:01
cmk1-Jul-08 5:01 
GeneralRe: display symbol at some address Pin
George_George2-Jul-08 2:04
George_George2-Jul-08 2:04 
GeneralRe: display symbol at some address Pin
cmk2-Jul-08 5:57
cmk2-Jul-08 5:57 
GeneralRe: display symbol at some address Pin
George_George4-Jul-08 2:42
George_George4-Jul-08 2:42 
GeneralRe: display symbol at some address Pin
cmk4-Jul-08 6:55
cmk4-Jul-08 6:55 
GeneralRe: display symbol at some address Pin
George_George6-Jul-08 16:29
George_George6-Jul-08 16:29 
GeneralRandom numbers [modified] Pin
gordon305629-Jun-08 19:04
gordon305629-Jun-08 19:04 
GeneralRe: Random numbers Pin
«_Superman_»29-Jun-08 19:16
professional«_Superman_»29-Jun-08 19:16 
GeneralRe: Random numbers Pin
gordon305629-Jun-08 19:24
gordon305629-Jun-08 19:24 
GeneralRe: Random numbers Pin
_AnsHUMAN_ 29-Jun-08 19:19
_AnsHUMAN_ 29-Jun-08 19:19 
QuestionNumber property(Use only digits) of EditBox. Pin
Le@rner29-Jun-08 18:46
Le@rner29-Jun-08 18:46 
AnswerRe: Number property(Use only digits) of EditBox. Pin
Naveen29-Jun-08 19:10
Naveen29-Jun-08 19:10 
GeneralRe: Number property(Use only digits) of EditBox. Pin
Le@rner29-Jun-08 19:44
Le@rner29-Jun-08 19:44 
GeneralRe: Number property(Use only digits) of EditBox. Pin
MANISH RASTOGI29-Jun-08 20:35
MANISH RASTOGI29-Jun-08 20:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.