[PATCH] Replace the block_found global with explicit data-flow

Pierre-Marie de Rodat derodat@adacore.com
Sat Aug 1 16:25:00 GMT 2015


On 08/01/2015 06:04 PM, Luis Machado wrote:
>> +    sym = lookup_symbol (MDEBUG_EFI_SYMBOL_NAME, b, LABEL_DOMAIN,
>> +                 0).symbol;
>>       }
>
> It is probably a matter of personal taste, but i find it easier and
> cleaner to get the result of lookup_symbol (...) assigned to a variable
> and then have the code access its 'symbol' field as opposed to chaining
> things like the above.
>
> The current codebase doesn't show many occurrences like the above.

Understood: here's an updated patch introducing a temporary to do this. 
Thank you!

-- 
Pierre-Marie de Rodat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Complete-the-previous-commit-block_found-refactoring.patch
Type: text/x-patch
Size: 4404 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20150801/b02d2459/attachment.bin>


More information about the Gdb-patches mailing list