From: Pedro Alves <palves@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>, gdb-patches@sourceware.org
Cc: Phil Muldoon <pmuldoon@redhat.com>
Subject: Re: [PATCH 0/6] framefilter quit: PR cli/17716
Date: Tue, 10 Feb 2015 17:40:00 -0000 [thread overview]
Message-ID: <54DA4289.4090701@redhat.com> (raw)
In-Reply-To: <20150207144501.14897.90709.stgit@host1.jankratochvil.net>
Hi Jan,
I read this, and it looks pretty good to me.
Phil, any comments?
Thanks,
Pedro Alves
On 02/07/2015 02:45 PM, Jan Kratochvil wrote:
> 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.
next prev parent reply other threads:[~2015-02-10 17:40 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-07 14:45 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 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 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 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 5/6] framefilter quit: Use RETURN_MASK_ERROR Jan Kratochvil
2015-02-11 13:52 ` [commit+7.9] " 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-10 17:40 ` Pedro Alves [this message]
2015-02-10 19:19 ` [PATCH 0/6] framefilter quit: PR cli/17716 Phil Muldoon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54DA4289.4090701@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=pmuldoon@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox