From: Magne Hov <mhov@undo.io>
To: "Aktemur, Tankut Baris" <tankut.baris.aktemur@intel.com>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: RE: [PATCH v2] gdb: fix eval.c assert during inferior exit event
Date: Fri, 14 May 2021 17:22:19 +0100 [thread overview]
Message-ID: <5smtsxjnes.fsf@undo.io> (raw)
In-Reply-To: <SN6PR11MB289323AD8F76872EABC63C80C4539@SN6PR11MB2893.namprd11.prod.outlook.com>
Thanks for these comments, I'll make sure to address them in a revised
patch.
On 11 May 2021 07:16, "Aktemur, Tankut Baris" <tankut.baris.aktemur@intel.com> wrote:
> On Monday, May 10, 2021 7:21 PM, Magne Hov wrote:
>> diff --git a/gdb/eval.c b/gdb/eval.c
>> index 1b3c974009a..34c6c6160d4 100644
>> --- a/gdb/eval.c
>> +++ b/gdb/eval.c
>> @@ -93,7 +93,7 @@ struct value *
>> expression::evaluate (struct type *expect_type, enum noside noside)
>> {
>> gdb::optional<enable_thread_stack_temporaries> stack_temporaries;
>> - if (target_has_execution ()
>> + if (target_has_execution () && inferior_ptid != null_ptid
>
> Nit: there is an extra space before `&&`.
>
>> && language_defn->la_language == language_cplus
>> && !thread_stack_temporaries_enabled_p (inferior_thread ()))
>> stack_temporaries.emplace (inferior_thread ());
>> diff --git a/gdb/testsuite/gdb.python/py-events.exp b/gdb/testsuite/gdb.python/py-events.exp
>> index e89cd8b021b..9aa0680fd0e 100644
>> --- a/gdb/testsuite/gdb.python/py-events.exp
>> +++ b/gdb/testsuite/gdb.python/py-events.exp
>> @@ -197,18 +197,33 @@ gdb_test_multiple "continue" $test {
>> gdb_test_no_output "delete $second_breakpoint"
>>
>> #test exited event.
>> +proc get_process_id {test} {
>> + global gdb_prompt
>> + gdb_test_multiple "info proc" $test {
>> + -re "process (\\d+).*$gdb_prompt $" {
>> + set process_id $expect_out(1,string)
>> + pass $test
>
> Using `$gdb_test_name` is preferable here, I believe.
>
> -Baris
>
>
>
> Intel Deutschland GmbH
> Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
> Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
> Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva
> Chairperson of the Supervisory Board: Nicole Lau
> Registered Office: Munich
> Commercial Register: Amtsgericht Muenchen HRB 186928
next prev parent reply other threads:[~2021-05-14 16:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-05 15:56 [RFC PATCH] " Magne Hov
2021-05-06 1:59 ` Simon Marchi
2021-05-10 16:57 ` Magne Hov
2021-05-10 17:33 ` Simon Marchi
2021-05-10 17:21 ` [PATCH v2] " Magne Hov
2021-05-10 17:44 ` Simon Marchi
2021-05-14 16:24 ` Magne Hov
2021-05-11 7:16 ` Aktemur, Tankut Baris
2021-05-14 16:22 ` Magne Hov [this message]
2021-05-24 19:23 ` Joel Brobecker
2021-05-26 13:02 ` [PATCH v3] " Magne Hov
2021-05-29 2:25 ` Simon Marchi
2021-06-02 11:34 ` Magne Hov
2021-06-03 21:07 ` Magne Hov
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=5smtsxjnes.fsf@undo.io \
--to=mhov@undo.io \
--cc=gdb-patches@sourceware.org \
--cc=tankut.baris.aktemur@intel.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).