From: Tom Tromey <tom@tromey.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Philippe Waroquiers <philippe.waroquiers@skynet.be>,
gdb-patches@sourceware.org
Subject: Re: [RFA] Implement show | set can-call-inferior-functions [on|off]
Date: Thu, 25 Apr 2019 13:15:00 -0000 [thread overview]
Message-ID: <87bm0udy4r.fsf@tromey.com> (raw)
In-Reply-To: <83bm0u1ult.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 25 Apr 2019 09:12:30 +0300")
>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:
>> From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
>> Cc: gdb-patches@sourceware.org
>> Date: Wed, 24 Apr 2019 23:25:27 +0200
>>
>> Generally, returning 0 (or whatever value) can then later on
>> cause problems in a script.
>> For example, evaluating some function calls sometimes imply to first
>> call malloc in the inferior. When can-call-inferior-functions is off,
>> returning 0 (or whatever) from malloc will then cause further problems
>> (such as a SEGV).
Eli> Then perhaps a built-in variable to test whether inferior calls are
Eli> allowed would be of help? Then script writers could look at that
Eli> variable and avoid calling inferior functions if they want the script
Eli> to continue running regardless, perhaps with reduced functionality.
Eli> WDYT?
An error definitely seems like the correct thing to do here. Other
choices will give silently mysterious behavior.
A convenience variable is fine, too, though I suspect it will be little
used. I wouldn't require it for this patch to go in.
gdb could use better control over the handling of errors. There's a
catch/throw patch sitting in bugzilla that would be good to resurrect.
Or, the ignore-errors command (implemented in Python) could be checked in.
Tom
next prev parent reply other threads:[~2019-04-25 13:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-23 21:58 Philippe Waroquiers
2019-04-24 6:53 ` Eli Zaretskii
2019-04-24 21:25 ` Philippe Waroquiers
2019-04-25 6:12 ` Eli Zaretskii
2019-04-25 13:15 ` Tom Tromey [this message]
2019-04-25 19:44 ` Pedro Alves
2019-04-25 17:17 ` Pedro Alves
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=87bm0udy4r.fsf@tromey.com \
--to=tom@tromey.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=philippe.waroquiers@skynet.be \
/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