]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tm.texi: Update.
authorTom Tromey <tromey@redhat.com>
Wed, 7 Jul 2010 17:23:39 +0000 (17:23 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Wed, 7 Jul 2010 17:23:39 +0000 (17:23 +0000)
gcc
* doc/tm.texi: Update.
* doc/tm.texi.in (SDB and DWARF) <TARGET_WANT_DEBUG_PUB_SECTIONS>:
Add @hook.
* target.def (want_debug_pub_sections): New hook.
* config/darwin.h (TARGET_WANT_DEBUG_PUB_SECTIONS): Define.
* dwarf2out.c (add_pubname_string): Check
targetm.want_debug_pub_sections.
(add_pubname): Likewise.
(add_pubtype): Likewise.
gcc/testsuite
* g++.dg/debug/dwarf2/pubnames-1.C: Make darwin-specific.

From-SVN: r161924

gcc/ChangeLog
gcc/config/darwin.h
gcc/doc/tm.texi
gcc/doc/tm.texi.in
gcc/dwarf2out.c
gcc/target.def
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C

index 832cf30a5db63674a28c5c513d7e090daa75d910..45e211a531fa31640674474fe170a1b077f9dd51 100644 (file)
@@ -1,3 +1,15 @@
+2010-07-07  Tom Tromey  <tromey@redhat.com>
+
+       * doc/tm.texi: Update.
+       * doc/tm.texi.in (SDB and DWARF) <TARGET_WANT_DEBUG_PUB_SECTIONS>:
+       Add @hook.
+       * target.def (want_debug_pub_sections): New hook.
+       * config/darwin.h (TARGET_WANT_DEBUG_PUB_SECTIONS): Define.
+       * dwarf2out.c (add_pubname_string): Check
+       targetm.want_debug_pub_sections.
+       (add_pubname): Likewise.
+       (add_pubtype): Likewise.
+
 2010-07-07  Jie Zhang  <jie@codesourcery.com>
 
        * genautomata.c (output_automata_list_min_issue_delay_code):
index a1e805c6d5b1da9229dd77dd081d4ab0a99968ac..6b681ee4509a8339108e50741a2992c396ab2712 100644 (file)
@@ -471,6 +471,8 @@ extern GTY(()) int darwin_ms_struct;
 #define DEBUG_STR_SECTION      "__DWARF,__debug_str,regular,debug"
 #define DEBUG_RANGES_SECTION   "__DWARF,__debug_ranges,regular,debug"
 
+#define TARGET_WANT_DEBUG_PUB_SECTIONS true
+
 /* When generating stabs debugging, use N_BINCL entries.  */
 
 #define DBX_USE_BINCL
index 17b582f77b2311f666fed1619868013c5be1337c..cb878afbe5717554d0d563ded2421efa011800be 100644 (file)
@@ -9278,6 +9278,10 @@ line debug info sections.  This will result in much more compact line number
 tables, and hence is desirable if it works.
 @end defmac
 
+@deftypevr {Target Hook} bool TARGET_WANT_DEBUG_PUB_SECTIONS
+True if the @code{.debug_pubtypes} and @code{.debug_pubnames} sections should be emitted.  These sections are not used on most platforms, and in particular GDB does not use them.
+@end deftypevr
+
 @defmac ASM_OUTPUT_DWARF_DELTA (@var{stream}, @var{size}, @var{label1}, @var{label2})
 A C statement to issue assembly directives that create a difference
 @var{lab1} minus @var{lab2}, using an integer of the given @var{size}.
index e79341d5db52981f476b900fc6ffc97fbed5c61b..bab073e5ae02dead71fb226e3ed2ee143240c766 100644 (file)
@@ -9277,6 +9277,8 @@ line debug info sections.  This will result in much more compact line number
 tables, and hence is desirable if it works.
 @end defmac
 
+@hook TARGET_WANT_DEBUG_PUB_SECTIONS
+
 @defmac ASM_OUTPUT_DWARF_DELTA (@var{stream}, @var{size}, @var{label1}, @var{label2})
 A C statement to issue assembly directives that create a difference
 @var{lab1} minus @var{lab2}, using an integer of the given @var{size}.
index 55fef55ed3f33007147a2880ce54a4c717d314e0..434783ac2a506ead2698409bfa73a17e7ad506cc 100644 (file)
@@ -11238,17 +11238,20 @@ dwarf2_name (tree decl, int scope)
 static void
 add_pubname_string (const char *str, dw_die_ref die)
 {
-  pubname_entry e;
+  if (targetm.want_debug_pub_sections)
+    {
+      pubname_entry e;
 
-  e.die = die;
-  e.name = xstrdup (str);
-  VEC_safe_push (pubname_entry, gc, pubname_table, &e);
+      e.die = die;
+      e.name = xstrdup (str);
+      VEC_safe_push (pubname_entry, gc, pubname_table, &e);
+    }
 }
 
 static void
 add_pubname (tree decl, dw_die_ref die)
 {
-  if (TREE_PUBLIC (decl))
+  if (targetm.want_debug_pub_sections && TREE_PUBLIC (decl))
     {
       const char *name = dwarf2_name (decl, 1);
       if (name)
@@ -11263,6 +11266,9 @@ add_pubtype (tree decl, dw_die_ref die)
 {
   pubname_entry e;
 
+  if (!targetm.want_debug_pub_sections)
+    return;
+
   e.name = NULL;
   if ((TREE_PUBLIC (decl)
        || die->die_parent == comp_unit_die)
index 627092537f16ed07b41899f534f23f132281c939..3eb52a6fe54647e2cf63ae08b21c31a0c0ed86af 100644 (file)
@@ -2337,6 +2337,13 @@ DEFHOOKPOD
  "",
  bool, false)
 
+DEFHOOKPOD
+(want_debug_pub_sections,
+ "True if the @code{.debug_pubtypes} and @code{.debug_pubnames} sections\
+ should be emitted.  These sections are not used on most platforms, and\
+ in particular GDB does not use them.",
+ bool, false)
+
 /* Leave the boolean fields at the end.  */
 
 /* Empty macro arguments are undefined in C90, so use an empty macro.  */
index a031acc4098c2344b44fec0616e7586e71376ed9..189c556e1306fb2105971e0697c5e72b501d7f7f 100644 (file)
@@ -1,3 +1,7 @@
+2010-07-07  Tom Tromey  <tromey@redhat.com>
+
+       * g++.dg/debug/dwarf2/pubnames-1.C: Make darwin-specific.
+
 2010-07-07  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR target/44844
index 543439da323e0190ba00b81526600acef68de0ce..18d1df0d952c12f15fdfd2408f3cf1004d265e99 100644 (file)
@@ -1,7 +1,7 @@
 // Contributed by Dodji Seketeli <dodji@redhat.com>
 // Origin PR debug/39706
+// { dg-do compile { target *-*-darwin* } }
 // { dg-options "-g -dA -fno-merge-debug-strings" }
-// { dg-do compile }
 //
 // There should be one debug_pubnames section generated.
 // On Darwin though, there is also a label pointing at the begining of the