[PATCH 3/3] Convert default_child_has_foo functions to process_stratum_target methods
Tom Tromey
tom@tromey.com
Thu Nov 29 18:31:00 GMT 2018
>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
Pedro> +bool
Pedro> +process_stratum_target::has_all_memory ()
Pedro> +{
Pedro> + /* If no inferior selected, then we can't read memory here. */
Pedro> + if (inferior_ptid == null_ptid)
Pedro> + return false;
Pedro> +
Pedro> + return true;
I don't really care too much but I was wondering why not just
return inferior_ptid != null_ptid;
Pedro> +bool
Pedro> +process_stratum_target::has_execution (ptid_t the_ptid)
Pedro> +{
Pedro> + /* If there's no thread selected, then we can't make it run through
Pedro> + hoops. */
Pedro> + if (the_ptid == null_ptid)
Pedro> + return 0;
Pedro> +
Pedro> + return 1;
This one should use true/false.
Tom
More information about the Gdb-patches
mailing list