public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
From: gdb-buildbot@sergiodj.net
To: gdb-testers@sourceware.org
Subject: [binutils-gdb] Use symbol_set_language to set a symbol's language
Date: Mon, 16 Dec 2019 19:22:00 -0000	[thread overview]
Message-ID: <747cfc8c6bb23d40b3fa987f6c3df9d3a0d7b817@gdb-build> (raw)

*** TEST RESULTS FOR COMMIT 747cfc8c6bb23d40b3fa987f6c3df9d3a0d7b817 ***

commit 747cfc8c6bb23d40b3fa987f6c3df9d3a0d7b817
Author:     Christian Biesinger <cbiesinger@google.com>
AuthorDate: Sat Dec 14 15:47:22 2019 -0500
Commit:     Christian Biesinger <cbiesinger@google.com>
CommitDate: Mon Dec 16 00:39:50 2019 -0600

    Use symbol_set_language to set a symbol's language
    
    Instead of using SYMBOL_LANGUAGE (sym) = foo.
    
    Having only a single way to set a symbol's language is clearer and this
    is also a requirement for making set_language a member function.
    
    gdb/ChangeLog:
    
    2019-12-15  Christian Biesinger  <cbiesinger@google.com>
    
            * ada-exp.y (write_ambiguous_var): Call symbol_set_language to
            set the language of sym.
            * language.c (language_alloc_type_symbol): Likewise.
    
    Change-Id: I85338ea2e4121155f2da222fe0aa6b7d3ffe26f7

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 1a452be175..8cc1c6b594 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2019-12-15  Christian Biesinger  <cbiesinger@google.com>
+
+	* ada-exp.y (write_ambiguous_var): Call symbol_set_language to
+	set the language of sym.
+	* language.c (language_alloc_type_symbol): Likewise.
+
 2019-12-14  Sergio Durigan Junior  <sergiodj@redhat.com>
 
 	https://bugzilla.redhat.com/show_bug.cgi?id=1728147
diff --git a/gdb/ada-exp.y b/gdb/ada-exp.y
index 00020cd067..6b1bdfa139 100644
--- a/gdb/ada-exp.y
+++ b/gdb/ada-exp.y
@@ -1106,7 +1106,7 @@ write_ambiguous_var (struct parser_state *par_state,
 
   SYMBOL_DOMAIN (sym) = UNDEF_DOMAIN;
   sym->set_linkage_name (obstack_strndup (&temp_parse_space, name, len));
-  SYMBOL_LANGUAGE (sym) = language_ada;
+  symbol_set_language (sym, language_ada, nullptr);
 
   write_exp_elt_opcode (par_state, OP_VAR_VALUE);
   write_exp_elt_block (par_state, block);
diff --git a/gdb/language.c b/gdb/language.c
index 6ab0ca323d..ed850350b1 100644
--- a/gdb/language.c
+++ b/gdb/language.c
@@ -1051,7 +1051,7 @@ language_alloc_type_symbol (enum language lang, struct type *type)
   symbol = new (gdbarch_obstack (gdbarch)) struct symbol ();
 
   symbol->name = TYPE_NAME (type);
-  symbol->language = lang;
+  symbol_set_language (symbol, lang, nullptr);
   symbol->owner.arch = gdbarch;
   SYMBOL_OBJFILE_OWNED (symbol) = 0;
   SYMBOL_TYPE (symbol) = type;


             reply	other threads:[~2019-12-16 19:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-16 19:22 gdb-buildbot [this message]
2019-12-16 19:07 ` Failures on Ubuntu-Aarch64-native-gdbserver-m64, branch master gdb-buildbot
2019-12-18 10:13 ` Failures on Fedora-x86_64-m32, " gdb-buildbot
2019-12-18 10:15 ` Failures on Fedora-x86_64-m64, " gdb-buildbot
2019-12-18 10:22 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " gdb-buildbot
2019-12-18 10:50 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " gdb-buildbot
2019-12-18 11:22 ` Failures on Fedora-x86_64-native-gdbserver-m64, " gdb-buildbot

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=747cfc8c6bb23d40b3fa987f6c3df9d3a0d7b817@gdb-build \
    --to=gdb-buildbot@sergiodj.net \
    --cc=gdb-testers@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).