Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tristan Gingold <gingold@adacore.com>
To: gdb-patches@sourceware.org
Cc: Tristan Gingold <gingold@adacore.com>
Subject: [PATCH 3/4] aix: add support for dwarf2.
Date: Mon, 23 May 2011 10:35:00 -0000	[thread overview]
Message-ID: <1306146544-3925-4-git-send-email-gingold@adacore.com> (raw)
In-Reply-To: <1306146544-3925-1-git-send-email-gingold@adacore.com>

This patch simply adds support for dwarf2 to AIX.  This is a matter of calling
the dwarf2 reader with the xcoff dwarf2 section names.

gdb/
2011-05-23  Tristan Gingold  <gingold@adacore.com>

	* xcoffread.c (dwarf2_xcoff_names): New variable.
	(aix_process_linenos): Add a guard.
	(xcoff_symfile_finish): Free dwarf2.
	(xcoff_initial_scan): Add dwarf2 support.
---
 gdb/xcoffread.c |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 23decae..bf3a9ec 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -152,6 +152,22 @@ struct coff_symfile_info
     CORE_ADDR toc_offset;
   };
 
+/* XCOFF names for dwarf sections.  There is no compressed sections.  */
+
+static const struct dwarf2_debug_sections dwarf2_xcoff_names = {
+  { ".dwinfo", NULL },
+  { ".dwabrev", NULL },
+  { ".dwline", NULL },
+  { ".dwloc", NULL },
+  { NULL, NULL }, /* debug_macinfo */
+  { ".dwstr", NULL },
+  { ".dwrnges", NULL },
+  { NULL, NULL }, /* debug_types */
+  { ".dwframe", NULL },
+  { NULL, NULL }, /* eh_frame */
+  { NULL, NULL } /* gdb_index */
+};
+
 static void
 bf_notfound_complaint (void)
 {
@@ -757,6 +773,9 @@ return_after_cleanup:
 static void
 aix_process_linenos (void)
 {
+  if (this_symtab_psymtab == NULL)
+    return;
+
   /* Process line numbers and enter them into line vector.  */
   process_linenos (last_source_start_addr, cur_src_end_addr);
 }
@@ -1910,6 +1929,8 @@ xcoff_symfile_finish (struct objfile *objfile)
       inclTable = NULL;
     }
   inclIndx = inclLength = inclDepth = 0;
+
+  dwarf2_free_objfile (objfile);
 }
 
 
@@ -3022,6 +3043,13 @@ xcoff_initial_scan (struct objfile *objfile, int symfile_flags)
 
   install_minimal_symbols (objfile);
 
+  /* DWARF2 sections.  */
+
+  if (dwarf2_has_info (objfile, &dwarf2_xcoff_names))
+    dwarf2_build_psymtabs (objfile);
+
+  dwarf2_build_frame_info (objfile);
+
   do_cleanups (back_to);
 }
 \f
-- 
1.7.3.GIT


  parent reply	other threads:[~2011-05-23 10:35 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-23 10:29 [RFA] Add dwarf2 support to xcoff (aix) Tristan Gingold
2011-05-23 10:29 ` [PATCH 2/4] dwarf2read.c: handle alternate dwarf2 debug sections name Tristan Gingold
2011-05-23 15:22   ` Tom Tromey
2011-05-23 15:32     ` Tristan Gingold
2011-05-23 15:40   ` Tom Tromey
2011-05-26  7:48     ` Tristan Gingold
2011-05-23 10:29 ` [PATCH 1/4] Really make dwarf2_get_section_info public Tristan Gingold
2011-05-23 15:15   ` Tom Tromey
2011-05-24 12:41     ` Tristan Gingold
2011-05-23 10:29 ` [PATCH 4/4] bfd.c: hancle aixcoff in bfd_get_sign_extend_vma Tristan Gingold
2011-05-23 10:35 ` Tristan Gingold [this message]
2011-05-23 15:35   ` [PATCH 3/4] aix: add support for dwarf2 Tom Tromey
2011-05-23 15:42     ` Tom Tromey
2011-05-23 15:47       ` Tristan Gingold
2011-05-23 15:50   ` Tom Tromey
2011-05-24  7:20     ` Tristan Gingold
2011-05-24 13:37       ` Tom Tromey
2011-05-24 13:44         ` Tristan Gingold
2011-05-24 14:56           ` Tom Tromey
2011-05-24 15:11             ` Tristan Gingold
2011-06-01 15:37         ` Tristan Gingold
2011-06-02 19:11           ` Tom Tromey
2011-06-07 12:32             ` Tristan Gingold
2011-05-23 16:00 ` [RFA] Add dwarf2 support to xcoff (aix) Yao Qi
2011-05-24  7:06   ` Tristan Gingold

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=1306146544-3925-4-git-send-email-gingold@adacore.com \
    --to=gingold@adacore.com \
    --cc=gdb-patches@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