Re: Use enum to declare errno values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



moreau francis writes:
 > 

[...]

 > int foo(void)
 > {
 >         int tmp;
 > 
 >         tmp = bar();
 >         [...]
 >         return tmp;
 > }
 > 
 > How do you know if tmp store an errno value ? You have to look into bar and  so

Of course you should. How to debug anything without knowing what called
function is doing? This is kernel programming after all. Which, by the
way, means that debugging convenience is not at all important.

 > on...By using "enum errnoval", gdb can directly tell you that a variable stores
 > an errno value.
 > 
 > Thanks

Nikita.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux