public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Tom de Vries <vries@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] [gdb/symtab] Support DW_AT_main_subprogram with -readnow. Date: Mon, 10 Jun 2019 07:28:00 -0000 [thread overview] Message-ID: <20190610072841.27677.qmail@sourceware.org> (raw) [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain; charset="us-ascii", Size: 1973 bytes --] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=81873cc81effbd657efe5f525d369e430ce77d7a commit 81873cc81effbd657efe5f525d369e430ce77d7a Author: Tom de Vries <tdevries@suse.de> Date: Mon Jun 10 09:28:30 2019 +0200 [gdb/symtab] Support DW_AT_main_subprogram with -readnow. DW_AT_main_subprogram is supported in normal mode in read_partial_die, but not in -readnow mode. Fix this by adding support for DW_AT_main_subprogram in read_func_scope. Tested on x86_64-linux with native and RFC target board readnow ( https://sourceware.org/ml/gdb-patches/2019-05/msg00073.html ). gdb/ChangeLog: 2019-06-10 Tom de Vries <tdevries@suse.de> PR symtab/16264 PR symtab/24517 * dwarf2read.c (read_func_scope): Handle DW_AT_main_subprogram. Diff: --- gdb/ChangeLog | 6 ++++++ gdb/dwarf2read.c | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index efe4618..3a40ecc 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2019-06-10 Tom de Vries <tdevries@suse.de> + + PR symtab/16264 + PR symtab/24517 + * dwarf2read.c (read_func_scope): Handle DW_AT_main_subprogram. + 2019-06-06 Ð ÑÑлан ÐжбÑлаÑов <lrn1986@gmail.com> * source.c (find_and_open_source): Also rewrite relative file diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index e1d6bb2..9d9bc99 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -13746,6 +13746,10 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu) newobj->name = new_symbol (die, read_type_die (die, cu), cu, (struct symbol *) templ_func); + if (dwarf2_flag_true_p (die, DW_AT_main_subprogram, cu)) + set_objfile_main_name (objfile, SYMBOL_LINKAGE_NAME (newobj->name), + cu->language); + /* If there is a location expression for DW_AT_frame_base, record it. */ attr = dwarf2_attr (die, DW_AT_frame_base, cu);
reply other threads:[~2019-06-10 7:28 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20190610072841.27677.qmail@sourceware.org \ --to=vries@sourceware.org \ --cc=gdb-cvs@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: linkBe 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).