Listing global variables

0 views
Skip to first unread message

Howard Rubin - change nospam to nyx

unread,
Dec 20, 2001, 1:50:24 PM12/20/01
to
I'm working on a large (100s of files) legacy program, and my latest
task is to make it multithreaded. One issue is the global variables.
Is there any way to automatically get a list of them? I see some of
them (the nonstatics) in the map file, but even those aren't
identified as globals.

Help!

Thanks,
Howard Rubin
(email replies appreciated)

Agathocles, Tyrant of Syracuse

unread,
Dec 21, 2001, 8:08:37 AM12/21/01
to
On Thu, 20 Dec 2001 18:50:24 GMT, hru...@nospam.net (Howard Rubin - change nospam
to nyx) wrote:
> I'm working on a large (100s of files) legacy program, and my latest
> task is to make it multithreaded. One issue is the global variables.
> Is there any way to automatically get a list of them?
Not that I know of. You can save yourself a bit by running some cross-referencer
on your source and get a list of *all* vars -- this way you at least won't need to
hunt for them manually.

> I see some of them (the nonstatics)

Of course, statics (file-statics) are in reality global as well and still might
need protection. I'm sure you knew that, just wanted to mention for clarity here.

Howard Rubin - change nospam to nyx

unread,
Jan 8, 2002, 1:10:11 PM1/8/02
to
hru...@nospam.net (Howard Rubin - change nospam to nyx) wrote:
> I'm working on a large (100s of files) legacy program, and my latest
> task is to make it multithreaded. One issue is the global variables.
> Is there any way to automatically get a list of them?

The nonstatics are available in ClassView (the leftmost tab of the
Alt0 Workspace). At the bottom of the list of classes is a Globals
folder, and at the bottom of the list of global functions are the
nonstatic global variables.
(Thanks to David Hochhauser for this discovery)

Reply all
Reply to author
Forward
0 new messages