returns: provide a split out list of all the return states
Take check_locking.c as an example, we want to look at the return states
and say "Are we locked for some returns and not for others?" But it's ok
to return unlocked if we fail and locked if we return zero. There are a
bunch of other things besides locking where we could use this information.
So the other thing that's going on here is that we have to record the range
of return values that we returning so that we can tell error returns from
success returns. That's stored in:
get_state(RETURN_ID, "return_ranges", NULL);
I considered saving an expression or a statement instead but it didn't work
and really what we want is just the ranges.
How you use this is you do something like this:
FOR_EACH_PTR(get_all_return_strees(), stree) {
return_sm = get_sm_state_stree(stree, RETURN_ID, "return_ranges", NULL);
if (!return_sm)
continue;
line.value = return_sm->line;
....
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>