This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA 08/13] Use gdbpy_ref in python.c
>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
>> Additionally, previously gdbpy_apply_type_printers would return
>> EXT_LANG_RC_ERROR if a type printer returned None. However, that
>> doesn't seem correct to me; this patch changes it to return
>> EXT_LANG_RC_NOP in this case.
Pedro> Agreed, this is what the value printers do, AFAICT from
Pedro> gdbpy_apply_val_pretty_printer.
Pedro> Does that result in user/script-visible behavior? Should
Pedro> this be covered by some test?
The caller is apply_ext_lang_type_printers and it does:
ALL_ENABLED_EXTENSION_LANGUAGES (i, extlang)
...
switch (rc)
{
...
case EXT_LANG_RC_ERROR:
return NULL;
case EXT_LANG_RC_NOP:
break;
So, error means all the subsequent printer will be skipped, but nop
means they will be considered.
I think a test case would be reasonable, but I would rather not write
it. I'm going to push this series in, but if you think the test is
required, I will write a follow-up patch to just revert this bit to the
status quo ante.
Tom