Vdsp处理未命名union的BUG

来源:互联网 发布:手机动态壁纸软件 编辑:程序博客网 时间:2024/05/07 18:49

快乐虾

http://blog.csdn.net/lights_joy/

lights@hb165.com

 

 

 

 

本文适用于

ADSP-BF561

Visual DSP++ 5.0 (update 7)

 

 

 

 

欢迎转载,但请保留作者信息

 

VDSP处理结构体中的未命名union时有一个BUG,如下面的结构体:

struct restart_block {

     long (*fn)(struct restart_block *);

     union {

         struct {

              unsigned long arg0, arg1, arg2, arg3;

         };

         /* For futex_wait */

         struct {

              u32 *uaddr;

              u32 val;

              u32 flags;

              u32 bitset;

              u64 time;

         } futex;

         /* For nanosleep */

         struct {

              clockid_t index;

              struct timespec __user *rmtp;

              u64 expires;

         } nanosleep;

         /* For poll */

         struct {

              struct pollfd __user *ufds;

              int nfds;

              int has_timeout;

              unsigned long tv_sec;

              unsigned long tv_nsec;

         } poll;

     };

};

VDSP的调试器里,你将看不到未命名union的值,就像这样的:

 

但是当我们给这个未命名union一个名字,它就一切OK了:

 

 

 

 

近日,我家6岁的小姑娘参加了第六届POP全国少儿英语风采大赛,拉票进行中(2011-6-15前)。

请帮忙点击新东方网站的链接:

http://popdasai.xdf.cn/toupiao.php?do=space&uid=4237

投她一票,谢谢!

 

原创粉丝点击