Re: Use enum to declare errno values

From: moreau francis
Date: Wed Nov 23 2005 - 11:41:51 EST



--- Nikita Danilov <nikita@xxxxxxxxxxxxx> a écrit :

>
> (gdb) p (enum side)$1
> $2 = LEFT
>
> (This works when debugging information about enum was stored in ELF
> object.)
>

not really convenient. For example:

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
on...By using "enum errnoval", gdb can directly tell you that a variable stores
an errno value.

Thanks






___________________________________________________________________________
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
Téléchargez cette version sur http://fr.messenger.yahoo.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/