On Wed, 04 Sep 2013 17:03:55 +0200, Mark Wielaard wrote:
> We can use -1. Which should never match. I'll test the same patch with:
OK.
> diff --git a/libdw/dwarf_getlocation.c b/libdw/dwarf_getlocation.c
> index cb4b483..c9df8f4 100644
> --- a/libdw/dwarf_getlocation.c
> +++ b/libdw/dwarf_getlocation.c
> @@ -678,8 +678,8 @@ getlocations_addr (attr, offset, basep, startp, endp,
> address,
> *startp = *basep + begin;
> *endp = *basep + end;
>
> - /* If address is zero we want them all, otherwise only those that match.
> */
> - if (address != 0 && (address < *endp || address >= *startp))
> + /* If address is minus one we want them all, otherwise only matching. */
> + if (address != (Dwarf_Word) -1 && (address < *endp || address >= *startp))
I did not test it and I am curious it can work but I think here should be:
if (address != (Dwarf_Word) -1 && (address < *startp || address >= *endp))
> goto next;
Thanks,
Jan