[committed][gdb/symtab] Make find_block_in_blockvector more robust

Tom de Vries tdevries@suse.de
Thu Oct 22 21:21:21 GMT 2020


On 10/22/20 8:56 PM, Tom Tromey wrote:
>>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
> 
> Tom> +      if (!(BLOCK_START (b) <= pc))
> Tom> +	return NULL;
> 
> This seems a bit weird to me, in that if BLOCK_START(b) == pc, then I
> would be inclined to say that the pc is in fact in that block.
> 

So if BLOCK_START(b) == pc, indeed the pc is in the block, and we have:
...
      if (!(true))
	return NULL;
...
which I'd say correctly handles that case.

Thanks,
- Tom



More information about the Gdb-patches mailing list