binutils-gdb/gdb/arch
Andrew Burgess bbb826f5e9 gdb: Delay releasing target_desc_up in more cases
After commit:

  commit 51a948fdf0
  Date:   Mon Jul 20 14:18:04 2020 +0100

      gdb: Have allocate_target_description return a unique_ptr

There were a few places where we could (should?) have delayed
releasing the target_desc_up until a little later.  This commit
catches these cases.

In the case of ARC, the target_desc_up is now exposed right out to
gdbserver, which means making a small change there too.

There should be no user visible changes after this commit.

gdb/ChangeLog:

	* arch/aarch32.c (aarch32_create_target_description): Release the
	target_desc_up as late as possible.
	* arch/aarch64.c (aarch64_create_target_description): Likewise.
	* arch/amd64.c (amd64_create_target_description): Likewise.
	* arch/arc.c (arc_create_target_description): Return a
	target_desc_up, don't release it.
	* arch/arc.h (arc_create_target_description): Update declaration.
	(arc_lookup_target_description): Move target_desc_up into the
	cache, and return a borrowed pointer.
	* arch/arm.c (arm_create_target_description): Release the
	target_desc_up as late as possible.
	* arch/i386.c (i386_create_target_description): Likewise.
	* arch/riscv.h (riscv_create_target_description): Update
	declaration to match definition.
	* arch/tic6x.c (tic6x_create_target_description): Release the
	target_desc_up as late as possible.

gdbserver/ChangeLog:

	* linux-arc-low.cc (arc_linux_read_description): Release the
	unique_ptr returned from arc_create_target_description.
2020-10-09 11:45:44 +01:00
..
aarch32.c gdb: Delay releasing target_desc_up in more cases 2020-10-09 11:45:44 +01:00
aarch32.h
aarch64-insn.c
aarch64-insn.h
aarch64.c gdb: Delay releasing target_desc_up in more cases 2020-10-09 11:45:44 +01:00
aarch64.h
amd64.c gdb: Delay releasing target_desc_up in more cases 2020-10-09 11:45:44 +01:00
amd64.h
arc.c gdb: Delay releasing target_desc_up in more cases 2020-10-09 11:45:44 +01:00
arc.h gdb: Delay releasing target_desc_up in more cases 2020-10-09 11:45:44 +01:00
arm-get-next-pcs.c
arm-get-next-pcs.h
arm-linux.c
arm-linux.h
arm.c gdb: Delay releasing target_desc_up in more cases 2020-10-09 11:45:44 +01:00
arm.h
i386.c gdb: Delay releasing target_desc_up in more cases 2020-10-09 11:45:44 +01:00
i386.h
ppc-linux-common.c
ppc-linux-common.h
ppc-linux-tdesc.h
riscv.c gdb: Have allocate_target_description return a unique_ptr 2020-10-08 10:14:14 +01:00
riscv.h gdb: Delay releasing target_desc_up in more cases 2020-10-09 11:45:44 +01:00
tic6x.c gdb: Delay releasing target_desc_up in more cases 2020-10-09 11:45:44 +01:00
tic6x.h
xtensa.h