This is the mail archive of the gdb-prs@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]

[Bug python/11407] -stack-list-locals should catch python exceptions and return the error per variable


------- Additional Comments From asmwarrior at gmail dot com  2010-06-19 03:23 -------
(In reply to comment #20)
> Created an attachment (id=4845)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4845&action=view)
> another draft patch
> 
> This patch assumes that apply_val_pretty_printer can raise errors.  val_print
> is called most commonly in the pretty printers by print_children.  This
> function makes n*children calls to PyIter, which usually results in errors
> arising from uninitialized data. These errors can come from *anywhere* within
> Python.  If the exception is not handled here,	it will bubble up to the top
> and GDB will stop executing.  In this patch, I catch the exception and print
> the error and attempt to print out the data in raw format.  I guess we could
> exit if we wanted to. This fixes the error cases in this bug.  This is draft
> patch, what do you think?

Thanks, I will test this patch as soon as I return to my work place. By the way,
the way you use is try to catch all the exceptions from the python, this way,
gdb are protected. But I'm not sure you have understand my post #18, I said that
is there any "debug infor" that we can get, if one local variable has been
initialized. There is a discussion at Codeblocks' forum

http://forums.codeblocks.org/index.php/topic,12747.msg86349.html#msg86349

I have give an example, that if gcc can add some extra code to indicate that one
local variable is initialized.

Thanks

Asmwarrior ollydbg from codeblocks' forum






-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11407

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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