From: Greg McFarlane (gregm_at_iname.com)
Date: Fri Aug 07 1998 - 05:05:04 BST
ups version 3.32 (build date: Thu Jun 18 12:00:27 PDT 1998) I was trying out the suggestion in question 4 of the UPS FAQ <http://www.concerto.demon.co.uk/UPS/upsfaq.html#4>, using the file sample.c supplied with ups. I used "add expr" in main to add this: (struct argst *)0x21dc0 but when I tried to expand it, ups said: Can't expand undefined structure If I do the same in the stash function, it works fine. This is what the screen looks like: Functions main sample.c:18 (struct argst *)0x21dc0 0x21dc0 stash sample.c:13 struct argst <a{0}> *0x21dc0 char <a_name{0}> "foo" struct argst *<a_next> 0x0 (struct argst *)0x21dc0 0x21dc0 char <a_name{0}> "foo" struct argst *<a_next> 0x0 Is it me is is it ups? PS. Here is sample.c, if you don't have it handy: struct argst { char *a_name; struct argst *a_next; }; struct argst *listhead = 0; void stash(name) char *name; { struct argst *a; char *malloc(); a = (struct argst *)malloc(sizeof(struct argst)); a->a_name = name; a->a_next = listhead; listhead = a; } int main() { stash("foo"); stash("bar"); } -- Greg McFarlane INMS Telstra Australia (gregm_at_iname.com)
This archive was generated by hypermail 2.1.4 : Wed Feb 13 2002 - 21:55:21 GMT