SN and C Struct's

dave.banham@tde.alstom.com dave.banham@tde.alstom.com
Thu Aug 3 03:52:00 GMT 2000


Dear all,
I am about to make some suggestions for some improvements to SN4.5.1, but
thought it best to make my introductions first.

I am a senior software engineer in the UK working for a large engineering
Company. The products that I am involved with have a reasonably large code base
of around 400KLOC, most of which is C with a small amount of assembler. All of
this is embedded with a real time operating system, which is partly why we
haven't yet made the move to C++, and developed on Win NT4 workstations with
Clear Case CM. It is also worth noting that the software is partitioned into a
number of distinct sections, each in its own Clear Case VOB (that is root
folder), which are maintained by distinct groups of engineers and used by
several projects/products.

I have recently taken on an existing project and have the dubious job of
supporting and extending the software. This is where SN comes in. I had
previously purchased the SN99r1 Developer Edition, but found that I could not
use it fully on this project due to its 250KLOC limit. Thankfully the full
enterprise edition has been made Open Source, so I no longer have to go begging
to my manager for some money!

I have found SN to be extremely useful and use it most with the Retriever -
Editor window to locate symbols in the code base. I would also like to use the
XREF and Class views to visualise and navigate the convoluted relationships in
the software's data structures (i.e. C struct's). This is where I find that SN
is, err, deficient.

1. The Hierarchy Browser does not draw graphs of C struct's (or typedef'd
struct's).
2. Class Browser only shows the contents of the specified struct and not of any
embedded or referred (i.e. via a pointer) struct's (i.e. augmented). Moreover,
it will not show typedef'd structures unless a structure tag name is used, e.g.
typedef struct mystruct_tag {int a; int b;} mystruct; only 'mystruct_tag' works
in Class Browser and most typedef struct declarations do not provide a tag name.
3. The Xref Browser only appears to show what symbols are used by a function and
not what functions use it - the 'refers by' option is disabled. It would be very
useful to know what functions use a given symbol.
4. If SN has a complete database of all symbol references, then why is the grep
tool the only way of finding all references to a symbol in the code base? Could
the Retriever tool have an option to display all instances, rather than just the
declaration of the symbol.

I have had a quick look through the SN SDK manual. It is not very obvious where
to even start such customisations, and since I am not a TCL/TK programmer it is
difficult to know where to start. Moreover, it sounds like setting up a MS VC++
5 build of SN is going to be a little tricky. Does any one have any suggestions?

Best Regards
Dave Banham






More information about the Sourcenav mailing list