From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22621 invoked by alias); 23 May 2011 10:35:10 -0000 Received: (qmail 22527 invoked by uid 22791); 23 May 2011 10:35:10 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,TW_BJ,TW_YM X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 23 May 2011 10:34:56 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 7C877CB02F0; Mon, 23 May 2011 12:29:16 +0200 (CEST) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Nbw8BV3hoVGs; Mon, 23 May 2011 12:29:13 +0200 (CEST) Received: from ulanbator.act-europe.fr (ulanbator.act-europe.fr [10.10.1.67]) by mel.act-europe.fr (Postfix) with ESMTP id 59CD2CB030F; Mon, 23 May 2011 12:29:13 +0200 (CEST) Received: by ulanbator.act-europe.fr (Postfix, from userid 501) id 5D5A7FE0267; Mon, 23 May 2011 12:29:13 +0200 (CEST) From: Tristan Gingold To: gdb-patches@sourceware.org Cc: Tristan Gingold Subject: [PATCH 3/4] aix: add support for dwarf2. Date: Mon, 23 May 2011 10:35:00 -0000 Message-Id: <1306146544-3925-4-git-send-email-gingold@adacore.com> In-Reply-To: <1306146544-3925-1-git-send-email-gingold@adacore.com> References: <1306146544-3925-1-git-send-email-gingold@adacore.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-05/txt/msg00516.txt.bz2 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 * 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); } -- 1.7.3.GIT