From 316a8b214511686e1eccdaca157cf7aecedd47dd Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Tue, 7 Jun 2011 12:31:07 +0000 Subject: [PATCH] 2011-06-07 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/ChangeLog | 7 +++++++ gdb/xcoffread.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b2bd23832fe..b9083e80764 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2011-06-07 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. + 2011-06-06 Pedro Alves * infcall.c (run_inferior_call): Don't mask async. Instead force diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c index 0967529e06a..0c4cbd15206 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,10 @@ return_after_cleanup: static void aix_process_linenos (void) { + /* There is no linenos to read if there are only dwarf info. */ + 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 +1930,8 @@ xcoff_symfile_finish (struct objfile *objfile) inclTable = NULL; } inclIndx = inclLength = inclDepth = 0; + + dwarf2_free_objfile (objfile); } @@ -3022,6 +3044,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); } -- 2.30.2