From: Simon Marchi <simon.marchi@polymtl.ca>
To: Philippe Waroquiers <philippe.waroquiers@skynet.be>,
Simon Marchi <simon.marchi@efficios.com>,
gdb-patches@sourceware.org
Subject: Re: [PATCH 1/2] gdb/testsuite: make gdb_test_multiple return immediately if send_gdb fails
Date: Wed, 23 Nov 2022 09:12:00 -0500 [thread overview]
Message-ID: <3b11b8a8-c062-84ef-3e79-a1b9d8a1e5be@polymtl.ca> (raw)
In-Reply-To: <6460c6b9c161ee2d17edaa8ce0ed78af3cc3dbaf.camel@skynet.be>
On 11/23/22 05:59, Philippe Waroquiers wrote:
> Thanks for this, it will for sure help me in the future to not miss anymore
> some regressions I introduce.
>
> One small question:
> Is a GDB crash the only reason for which we could have a message such as:
> Couldn't send python print(objfile.filename) to GDB.
> ?
> Possibly better then to indicate that GDB crashed (on an internal error) ?
> Or if there are some other reasons, it might be good to give more details about the
> reason ?
If send_gdb fails, it's generally because the underlying send (the
expect proc) has failed, because GDB's spawn id is no longer valid. And
that is normally due to a crash. But the reality is that we do not know
for sure, it could also be a testsuite problem, where we closed GDB and
failed to reinitialize $gdb_spawn_id. So saying GDB crashed could also
give you a wrong lead. I prefer to stick with what we know.
> Note that if this is not straightforward to do, not a big deal
> as just making the problem visible with UNRESOLVED should draw the attention
> and the detailed log will show the crash I guess.
I think that's the important part, it's the previous command that caused
the crash, that one should show up in the logs. Looking at lib/gdb.exp
there are many more uses of gdb_expect that could be converted to
gdb_test_multiple.
Simon
next prev parent reply other threads:[~2022-11-23 14:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-22 15:55 Simon Marchi
2022-11-22 15:55 ` [PATCH 2/2] gdb/testsuite: make gdb_unload use gdb_test_multiple Simon Marchi
2022-11-29 16:28 ` Tom de Vries
2022-11-29 16:43 ` Simon Marchi
2022-11-23 10:59 ` [PATCH 1/2] gdb/testsuite: make gdb_test_multiple return immediately if send_gdb fails Philippe Waroquiers
2022-11-23 14:12 ` Simon Marchi [this message]
2022-11-29 16:21 ` Tom de Vries
2022-11-29 16:41 ` Simon Marchi
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=3b11b8a8-c062-84ef-3e79-a1b9d8a1e5be@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb-patches@sourceware.org \
--cc=philippe.waroquiers@skynet.be \
--cc=simon.marchi@efficios.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).