public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "orgads at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/29294] [REG 11.2->12.1] Internal error when stepping into a function
Date: Tue, 28 Jun 2022 19:54:45 +0000	[thread overview]
Message-ID: <bug-29294-4717-7YR5PNJtBR@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-29294-4717@http.sourceware.org/bugzilla/>

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

--- Comment #4 from Orgad Shaneh <orgads at gmail dot com> ---
In field::loc_bitpos, m_loc_kind is FIELD_LOC_KIND_PHYSNAME (3). m_name is
m_MsgIdx.

The field is a static field in a class. Its type is a typedef of
std::atomic<unsigned int> derivative.

Something like this (notice it *doesn't reproduce* with this example):

#include <atomic>

template<typename T>
struct ac_atomic:public std::atomic<T>
{
    ac_atomic(T value = 0) : std::atomic<T>(value) {}
    using std::atomic<T>::operator=;
};

typedef ac_atomic<unsigned int> ac_atomic_uint;

class Foo
{
public:
    static ac_atomic_uint m_MsgIdx;
    const char *Bar;
};

enum class E { V1, V2 };

static void CheckField(const char* Foo::*StrField, E Enum)
{
}

int main() {
    CheckField(&Foo::Bar, E::V1); // Break here and execute "step"
}

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

  parent reply	other threads:[~2022-06-28 19:54 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-27 20:03 [Bug gdb/29294] New: " orgads at gmail dot com
2022-06-27 20:10 ` [Bug gdb/29294] " orgads at gmail dot com
2022-06-28 17:31 ` tromey at sourceware dot org
2022-06-28 17:42 ` orgads at gmail dot com
2022-06-28 19:22 ` orgads at gmail dot com
2022-06-28 19:54 ` orgads at gmail dot com [this message]
2022-06-30  8:53 ` orgads at gmail dot com
2022-06-30  9:14 ` orgads at gmail dot com
2022-06-30 12:27 ` orgads at gmail dot com
2022-06-30 12:35 ` vries at gcc dot gnu.org
2022-06-30 12:56 ` vries at gcc dot gnu.org
2022-06-30 13:19 ` vries at gcc dot gnu.org
2022-06-30 13:22 ` [Bug exp/29294] " vries at gcc dot gnu.org
2022-06-30 13:44 ` vries at gcc dot gnu.org
2022-06-30 13:45 ` orgads at gmail dot com
2022-06-30 13:54 ` vries at gcc dot gnu.org
2022-06-30 14:09 ` vries at gcc dot gnu.org
2022-06-30 15:00 ` vries at gcc dot gnu.org
2022-07-05 20:43 ` vries at gcc dot gnu.org

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-29294-4717-7YR5PNJtBR@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).