public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "kevinb at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/31563] Problems with accessing errno
Date: Tue, 14 May 2024 03:00:48 +0000	[thread overview]
Message-ID: <bug-31563-4717-9Vc7ol7gAc@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-31563-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=31563

--- Comment #6 from Kevin Buettner <kevinb at redhat dot com> ---
(In reply to Pedro Alves from comment #5)

> It would also be interesting to test accessing errno in a program that never
> references it.  Like:
> 
> int main()
> {
>   return 0; // stop here and access errno.
> }
> 
> This models a program that actually calls some function that sets errno, but
> in a different translation unit, potentially even in a library, and then the
> user wants to inspect errno.
> 
> Does your testcase cover this scenario?

No.  I'd be inclined to write another/different test for that scenario.

Also, I think that such a test should make a library/system call since the
above example need not provide access to errno.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

      parent reply	other threads:[~2024-05-14  3:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-27  2:10 [Bug gdb/31563] New: " kevinb at redhat dot com
2024-03-27  2:10 ` [Bug gdb/31563] " kevinb at redhat dot com
2024-05-10  7:00 ` vries at gcc dot gnu.org
2024-05-10 10:56 ` pedro at palves dot net
2024-05-10 20:10 ` kevinb at redhat dot com
2024-05-13 15:05 ` pedro at palves dot net
2024-05-14  3:00 ` kevinb at redhat dot com [this message]

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=bug-31563-4717-9Vc7ol7gAc@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /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).