make_corefile_notes: have caller free returned memory
authorMarkus Metzger <markus.t.metzger@intel.com>
Thu, 22 May 2014 06:47:42 +0000 (08:47 +0200)
committerMarkus Metzger <markus.t.metzger@intel.com>
Wed, 25 Jun 2014 07:54:31 +0000 (09:54 +0200)
commit1d1f1ccb331f1fe9825c3bb6f6231a3aeb560d6f
tree873d0ea4e5a1045e06bbbce37ef9e3f8ce54c0f3
parent31f0c4c1c653b59ce8552402ecc1b3249273f2de
make_corefile_notes: have caller free returned memory

The various make_corefile_notes implementations for gdbarch as well as target
currently make an xfree cleanup on the data they return.  This causes problems
when trying to put a TRY_CATCH around the make_corefile_notes call.
Specifically, we get a stale cleanup error in restore_my_cleanups.

Omit the make_cleanup and have the caller free the memory.

gdb/
* fbsd-nat.c (fbsd_make_corefile_notes): Remove make_cleanup call.
* gcore.c (write_gcore_file): Free memory returned from
make_corefile_notes.
* linux-tdep.c (linux_make_corefile_notes): Remove make_cleanup call.
* procfs.c (procfs_make_note_section): Remove make_cleanup call.
gdb/ChangeLog
gdb/fbsd-nat.c
gdb/gcore.c
gdb/linux-tdep.c
gdb/procfs.c
This page took 0.025545 seconds and 4 git commands to generate.