-
- Downloads
gdb: Delay releasing target_desc_up in more cases
After commit: commit 51a948fd 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.
Showing
- gdb/ChangeLog 19 additions, 0 deletionsgdb/ChangeLog
- gdb/arch/aarch32.c 6 additions, 6 deletionsgdb/arch/aarch32.c
- gdb/arch/aarch64.c 7 additions, 7 deletionsgdb/arch/aarch64.c
- gdb/arch/amd64.c 14 additions, 13 deletionsgdb/arch/amd64.c
- gdb/arch/arc.c 14 additions, 11 deletionsgdb/arch/arc.c
- gdb/arch/arc.h 1 addition, 1 deletiongdb/arch/arc.h
- gdb/arch/arm.c 8 additions, 8 deletionsgdb/arch/arm.c
- gdb/arch/i386.c 12 additions, 12 deletionsgdb/arch/i386.c
- gdb/arch/riscv.h 1 addition, 1 deletiongdb/arch/riscv.h
- gdb/arch/tic6x.c 7 additions, 7 deletionsgdb/arch/tic6x.c
- gdbserver/ChangeLog 5 additions, 0 deletionsgdbserver/ChangeLog
- gdbserver/linux-arc-low.cc 3 additions, 3 deletionsgdbserver/linux-arc-low.cc
Loading
Please register or sign in to comment