This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA] Fix New ARI warning Tue Nov 6 01:58:48 UTC 2012



> -----Message d'origine-----
> De?: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de GDB Administrator
> Envoyé?: mardi 6 novembre 2012 02:59
> À?: gdb-patches@sourceware.org
> Objet?: New ARI warning Tue Nov 6 01:58:48 UTC 2012
> 
> 281a282,283
> > gdb/dwarf2read.c:8612: regression: xasprintf: Do not use xasprintf(),
> instead use xstrprintf
> gdb/dwarf2read.c:8612:  xasprintf (&virtual_dwo_name, ',
> > gdb/dwarf2read.c:8984: regression: xasprintf: Do not use xasprintf(),
> instead use xstrprintf
> gdb/dwarf2read.c:8984:  xasprintf (&dwp_name, ', dwarf2_per_objfile-
> >objfile->name);

Doug, 

could you check the patch below
which removes the new ARI warnings about use of 
xasprintf function in the commit

http://sourceware.org/ml/gdb-cvs/2012-11/msg00027.html



Pierre Muller

ChangeLog entry:
2012-11-06  Pierre Muller  <muller@sourceware.org>

        ARI xasprintf rule fixes.
        * dwarf2read.c (create_dwo_in_dwp): Use xstrprintf function
        instead of xasprintf.
        (open_and_init_dwp_file): Ditto.

Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.710
diff -u -p -r1.710 dwarf2read.c
--- dwarf2read.c        5 Nov 2012 15:50:21 -0000       1.710
+++ dwarf2read.c        6 Nov 2012 11:00:17 -0000
@@ -8609,13 +8609,14 @@ create_dwo_in_dwp (struct dwp_file *dwp_
      (fewer struct dwo_file objects to allocated).  Remember that for
really
      large apps there can be on the order of 8K CUs and 200K TUs, or more.
*/

-  xasprintf (&virtual_dwo_name, "virtual-dwo/%d-%d-%d-%d",
-            sections.abbrev.asection ? sections.abbrev.asection->id : 0,
-            sections.line.asection ? sections.line.asection->id : 0,
-            sections.loc.asection ? sections.loc.asection->id : 0,
-            (sections.str_offsets.asection
-             ? sections.str_offsets.asection->id
-             : 0));
+  virtual_dwo_name =
+    xstrprintf ("virtual-dwo/%d-%d-%d-%d",
+               sections.abbrev.asection ? sections.abbrev.asection->id : 0,
+               sections.line.asection ? sections.line.asection->id : 0,
+               sections.loc.asection ? sections.loc.asection->id : 0,
+               (sections.str_offsets.asection
+               ? sections.str_offsets.asection->id
+               : 0));
   make_cleanup (xfree, virtual_dwo_name);
   /* Can we use an existing virtual DWO file?  */
   dwo_file_slot = lookup_dwo_file_slot (virtual_dwo_name);
@@ -8981,7 +8982,7 @@ open_and_init_dwp_file (const char *comp
   bfd *dbfd;
   struct cleanup *cleanups;

-  xasprintf (&dwp_name, "%s.dwp", dwarf2_per_objfile->objfile->name);
+  dwp_name = xstrprintf ("%s.dwp", dwarf2_per_objfile->objfile->name);
   cleanups = make_cleanup (xfree, dwp_name);

   dbfd = open_dwop_file (dwp_name, comp_dir, 1);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]