aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorPierre Muller <muller@sourceware.org>2012-11-15 08:31:23 +0000
committerPierre Muller <muller@sourceware.org>2012-11-15 08:31:23 +0000
commit2792b94d6b9ffb46c239ccb871119b41e449ed03 (patch)
tree3c00b048ea6fe560d562e2e6079bf63d530dce70 /gdb/dwarf2read.c
parentedccdf7c8bac7e4d0d6750076dedc4884c1f127c (diff)
downloadgdb-2792b94d6b9ffb46c239ccb871119b41e449ed03.zip
gdb-2792b94d6b9ffb46c239ccb871119b41e449ed03.tar.gz
gdb-2792b94d6b9ffb46c239ccb871119b41e449ed03.tar.bz2
ARI xasprintf rule fixes.
* dwarf2read.c (create_dwo_in_dwp): Use xstrprintf function instead of xasprintf. (open_and_init_dwp_file): Ditto.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 8cdecde..078eb50 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -8610,13 +8610,14 @@ create_dwo_in_dwp (struct dwp_file *dwp_file,
(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);
@@ -8982,7 +8983,7 @@ open_and_init_dwp_file (const char *comp_dir)
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);