Re: Detecting Reads of Global Uninitialized Variables
- From: "Alexei A. Frounze" <alexfru@xxxxxxx>
- Date: Fri, 30 Sep 2005 03:53:22 +0400
"Mike Wahler" <mkwahler@xxxxxxxxxxxx> wrote in message
news:jJ__e.1161$4h2.796@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> <jyu.james@xxxxxxxxx> wrote in message
> news:1128034028.587595.231600@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> > I'm trying to detect reads of uninitialized global variables (that are
> > declared in one file, and used in another as an extern).
....
> > Is there a tool out there that can do this? Or is there a particular
> > technique that can be used to automate this?
>
> You'll need some kind of C parser.
If these variables are grouped into a special section, it might be possible
to trap on each and every access to the pages in which the section lies. It
may not be easy to do, though, or not easy to find everything if you have
many variables in there and need to stop every time... Just an idea...
Alex
.
- References:
- Re: Detecting Reads of Global Uninitialized Variables
- From: Mike Wahler
- Re: Detecting Reads of Global Uninitialized Variables
- Prev by Date: Re: how to convert an unsigned char to byte
- Next by Date: Re: Getting rid of excess #includes
- Previous by thread: Re: Detecting Reads of Global Uninitialized Variables
- Next by thread: Re: Detecting Reads of Global Uninitialized Variables
- Index(es):
Relevant Pages
|