This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [python][patch] Fix 11036


>>>>> "Phil" == Phil Muldoon <pmuldoon@redhat.com> writes:

Phil> 2010-02-25  Phil Muldoon  <pmuldoon@redhat.com>
Phil> 	PR python/11036
Phil> 	* python/py-frame.c (frapy_read_var): Add block argument and logic
Phil> 	to cope with user provided blocks.

Phil> +   argument must be an instance of gdb.Block.  Returns None if GDB
Phil> +   can't find the specified variable.  */

This last sentence in this comment seems to be wrong.
Sometimes the function returns None, sometimes it throws an exception.
I think the function should behave more predictably somehow.

Phil> +	  block = block_object_to_block (block_obj);
Phil> +	  if (block == NULL)
Phil> +	    return NULL;

When block_object_to_block returns NULL, it does not set the Python
exception.  That makes this code erroneous.

In other respects the code bits seem reasonable to me.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]