public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/6] framefilter quit: PR cli/17716
@ 2015-02-07 14:45 Jan Kratochvil
  2015-02-07 14:45 ` [PATCH 6/6] framefilter quit: New test Jan Kratochvil
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Jan Kratochvil @ 2015-02-07 14:45 UTC (permalink / raw)
  To: gdb-patches; +Cc: Phil Muldoon

Hi Phil,

as I have seen gdb-7.9 may get released with this annoying bug I have attempted
a fix.  It is far from complete but it should hopefully handle most of the
uninterruptable cases - although some of them will apparently still remain
there.

Primarily I do not understand intentions of the code:

gdbpy_convert_exception() is required in code called from Python, such as for
bpfinishpy_init() as one of many examples.  But if I haven't make mistake I do
not see any of the GDB functions changed in this patchset (py_print_single_arg,
enumerate_locals, py_print_frame) would be called by Python.  Therefore I do
not see why they should call gdbpy_convert_exception() at all (moreover they
call it so many times).  These functions are normally called by GDB and GDB is
GDB exception safe so GDB exceptions can be safely thrown.  Not all of the
gdb/python/ code was GDB exception safe, this is why I had to change for
example also gdbpy_apply_frame_filter().  I find more safe to write code as
exception safe in general.  Hopefully I did not forget to make exception safe
any of the possible callers of the involved functions.

Then I do not understand why there is EXT_LANG_BT_ERROR.  GDB has exceptions so
it does not need error return values.  Error return values can be used in cases
when it is more simple for the code (As current implementation of GDB
exceptions is needlessly complicated to use) - when callee detects a problem on
its own.  But if caller has to TRY_CATCH exceptions from futher callees and
convert them into EXT_LANG_BT_ERROR so that its caller can check for
EXT_LANG_BT_ERROR...  Why hasn't the caller just do TRY_CATCH on its own?
I haven't tried to remove EXT_LANG_BT_ERROR at all myself in this patchset,
though.  That would be larger work.

As I said the patch is not complete but I believe the direction of this patch
is correct and futher fixes can extend it.


Jan

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2015-02-11 13:56 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-07 14:45 [PATCH 0/6] framefilter quit: PR cli/17716 Jan Kratochvil
2015-02-07 14:45 ` [PATCH 6/6] framefilter quit: New test Jan Kratochvil
2015-02-11 13:56   ` [commit+7.9] " Jan Kratochvil
2015-02-07 14:45 ` [PATCH 1/6] framefilter quit: Obvious whitespacing fixes Jan Kratochvil
2015-02-11 13:37   ` [commit+7.9] " Jan Kratochvil
2015-02-07 14:45 ` [PATCH 3/6] framefilter quit: Code cleanup: Avoid gotos Jan Kratochvil
2015-02-11 13:43   ` [commit+7.9] " Jan Kratochvil
2015-02-07 14:45 ` [PATCH 2/6] framefilter quit: Code cleanup: Reindentation Jan Kratochvil
2015-02-11 13:39   ` [commit+7.9] " Jan Kratochvil
2015-02-07 14:45 ` [PATCH 4/6] framefilter quit: Make it exception safe Jan Kratochvil
2015-02-11 13:45   ` [commit+7.9] " Jan Kratochvil
2015-02-07 14:45 ` [PATCH 5/6] framefilter quit: Use RETURN_MASK_ERROR Jan Kratochvil
2015-02-11 13:52   ` [commit+7.9] " Jan Kratochvil
2015-02-10 17:40 ` [PATCH 0/6] framefilter quit: PR cli/17716 Pedro Alves
2015-02-10 19:19   ` Phil Muldoon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).