• Advertisement

Archived

This topic is now archived and is closed to further replies.

about variables....

This topic is 5530 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

is it possible to return the name of the variable at some address? don''t know if it''s necessary, but it would be cool in a debugger... "What is darkness? It doesn''t exist where there''s light, and without light, it''s nothing..."

Share this post


Link to post
Share on other sites
Advertisement
quote:
Original post by doxxan
is it possible to return the name of the variable at some address?

In which language?

Share this post


Link to post
Share on other sites
oops, forgot hehe. VC++.

"What is darkness? It doesn''t exist where there''s light, and without light, it''s nothing..."

Share this post


Link to post
Share on other sites
VC++''s debugger (6 & 7) already keeps track of variable names for you (providing you have debugging information on).

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by doxxan
is it possible to return the name of the variable at some address?


quote:
Original post by sark
VC++''s debugger (6 & 7) already keeps track of variable names for you


This is one of those "Can you tell me what time it is?" - "Yes. So?" - kind of situations, right?

Share this post


Link to post
Share on other sites
Not from the program code. The only way is to find the debug info section in the exe (or it may be an external file). To be honest, its too complicated to bother with.

Share this post


Link to post
Share on other sites
ok, would be fun to actually have it work though. tnx anywayz guys.

"What is darkness? It doesn''t exist where there''s light, and without light, it''s nothing..."

Share this post


Link to post
Share on other sites
I''m pretty sure that once the program is compiled the variable names are lost. It would have no sense to store them into the executable file.

Share this post


Link to post
Share on other sites
quote:
Original post by xaxa
I''m pretty sure that once the program is compiled the variable names are lost. It would have no sense to store them into the executable file.


The symbol table may or may not be present in the executable depending on the compiler. *NIX have a strip utility whose explicit purpose is to ... strip executables from their symbol table.

In Visual Studio, see this.

Documents [ GDNet | MSDN | STL | OpenGL | Formats | RTFM | Asking Smart Questions ]
C++ Stuff [ MinGW | Loki | SDL | Boost. | STLport | FLTK | ACCU Recommended Books ]

Share this post


Link to post
Share on other sites

  • Advertisement