public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: Simon Marchi <simon.marchi@polymtl.ca>
Cc: Tom Tromey <tromey@adacore.com>,  gdb-patches@sourceware.org
Subject: Re: [PATCH] Add initializers to bound_minimal_symbol
Date: Tue, 15 Feb 2022 08:41:48 -0700	[thread overview]
Message-ID: <877d9wrvb7.fsf@tromey.com> (raw)
In-Reply-To: <bdbd18f4-bc10-d8fe-6667-0545bad088fd@polymtl.ca> (Simon Marchi's message of "Mon, 14 Feb 2022 10:53:11 -0500")

Simon> Hmm, I see this with g++-11:

I'm also using gcc 11 and I don't see this error.

Simon> Not sure what's the best way to fix this, possibly to add constructors
Simon> to bound_minimal_symbols.

I wrote the appended and this also built fine.  But I don't know if it
would work for you.

Tom

diff --git a/gdb/minsyms.h b/gdb/minsyms.h
index ed31d32483a..519702494ed 100644
--- a/gdb/minsyms.h
+++ b/gdb/minsyms.h
@@ -28,6 +28,14 @@ struct type;
 
 struct bound_minimal_symbol
 {
+  bound_minimal_symbol (struct minimal_symbol *msym, struct objfile *objf)
+    : minsym (msym),
+      objfile (objf)
+  {
+  }
+
+  bound_minimal_symbol () = default;
+
   /* The minimal symbol that was found, or NULL if no minimal symbol
      was found.  */
 

  reply	other threads:[~2022-02-15 15:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-08 20:42 Tom Tromey
2022-02-11 13:34 ` Simon Marchi
2022-02-14 15:53   ` Simon Marchi
2022-02-15 15:41     ` Tom Tromey [this message]
2022-02-16 14:31       ` Enze Li
2022-02-16 15:29         ` Simon Marchi
2022-02-16 20:47           ` Tom Tromey

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=877d9wrvb7.fsf@tromey.com \
    --to=tromey@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@polymtl.ca \
    /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).