[PATCH 1/2] Minor reorganization of fetch_registers/store_registers in windows-nat.c

Joel Brobecker brobecker@adacore.com
Tue Jun 26 21:41:00 GMT 2018


> I agree this looks clearer without the recursion.
> 
> LGTM.  A couple nits on comments below.

Thanks, Pedro. Attached is the version I ended up pushing.

gdb/ChangeLog:

        * windows-nat.c (do_windows_fetch_inferior_registers): Rename
        to windows_fetch_one_register, and only handle the case of
        fetching one register.  Move the code that reloads the context
        and iterates over all registers if R is negative to...
        (windows_nat_target::fetch_registers): ... here.
        (do_windows_store_inferior_registers): Rename to
        windows_store_one_register, and only handle the case of storing
        one register.  Move the code that handles the case where r is
        negative to...
        (windows_nat_target::store_registers) ... here.

Tested on x86-windows and x86_64-windows using AdaCore's testsuite.

-- 
Joel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Minor-reorganization-of-fetch_registers-store_regist.patch
Type: text/x-diff
Size: 6907 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20180626/6e8a57d9/attachment.bin>


More information about the Gdb-patches mailing list