[binutils-gdb] Allocate dwp_file with new
sergiodj+buildbot@sergiodj.net
sergiodj+buildbot@sergiodj.net
Sat May 19 01:41:00 GMT 2018
*** TEST RESULTS FOR COMMIT 400174b12a46fffbfad7c2504c33bb3ac29f3ef9 ***
Author: Tom Tromey <tom@tromey.com>
Branch: master
Commit: 400174b12a46fffbfad7c2504c33bb3ac29f3ef9
Allocate dwp_file with new
This adds a constructor and initializer to dwp_file and changes it to
be allocated with "new". This removes a bit of manual refcount
management.
Tested by the buildbot.
gdb/ChangeLog
2018-05-18 Tom Tromey <tom@tromey.com>
* dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
unique_ptr.
* dwarf2read.c (struct dwp_file): Add constructor and
initializers.
(open_and_init_dwp_file): Return a unique_ptr.
(dwarf2_per_objfile, create_dwp_hash_table)
(create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
(lookup_dwo_unit_in_dwp): Update.
(open_and_init_dwp_file, get_dwp_file): Update.
More information about the Gdb-testers
mailing list