[Patch, microblaze]: Added cleanup data for invalid target description
Ajit Kumar Agarwal
ajit.kumar.agarwal@xilinx.com
Tue Oct 7 10:16:00 GMT 2014
Please find the following patch based on Pedro Suggestion.
[Patch, microblaze]: Added cleanup data for invalid target description.
Cleanup the tdesc data if the target description check is invalid.
2014-10-07 Ajit Agarwal <ajitkum@xilinx.com>
* microblaze-tdep.c (microblaze_gdbarch_init): Use of
tdesc_data_cleanup.
Signed-off-by:Ajit Agarwal ajitkum@xilinx.com
---
gdb/microblaze-tdep.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c
index 6a9f11f..f257b96 100644
--- a/gdb/microblaze-tdep.c
+++ b/gdb/microblaze-tdep.c
@@ -722,7 +722,13 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
MICROBLAZE_SHR_REGNUM,
"rshr");
}
- }
+
+ if (!valid_p)
+ {
+ tdesc_data_cleanup (tdesc_data);
+ return NULL;
+ }
+ }
/* Allocate space for the new architecture. */
tdep = XNEW (struct gdbarch_tdep);
--
1.7.1
Thanks & Regards
Ajit
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Patch-microblaze-Added-cleanup-data-for-invalid-targ.patch
Type: application/octet-stream
Size: 1196 bytes
Desc: 0001-Patch-microblaze-Added-cleanup-data-for-invalid-targ.patch
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20141007/73fcce81/attachment.obj>
More information about the Gdb-patches
mailing list