From: Ajit Kumar Agarwal <ajit.kumar.agarwal@xilinx.com>
To: Pedro Alves <palves@redhat.com>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Cc: Vinod Kathail <vinodk@xilinx.com>,
Vidhumouli Hunsigida <vidhum@xilinx.com>,
Nagaraju Mekala <nmekala@xilinx.com>
Subject: [Patch, microblaze]: Added cleanup data for invalid target description
Date: Tue, 07 Oct 2014 10:16:00 -0000 [thread overview]
Message-ID: <07638ee5ff984d21a51b468a841f9dba@BN1AFFO11FD045.protection.gbl> (raw)
[-- Attachment #1: Type: text/plain, Size: 1187 bytes --]
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
[-- Attachment #2: 0001-Patch-microblaze-Added-cleanup-data-for-invalid-targ.patch --]
[-- Type: application/octet-stream, Size: 1196 bytes --]
From 00f2692d10e0254366471095516d657693aeff42 Mon Sep 17 00:00:00 2001
From: Ajit Kumar Agarwal <ajitkum@xhdspdgnu.(none)>
Date: Tue, 7 Oct 2014 15:06:08 +0530
Subject: [PATCH] [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
next reply other threads:[~2014-10-07 10:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-07 10:16 Ajit Kumar Agarwal [this message]
2014-10-07 16:07 ` Pedro Alves
2014-10-07 16:37 ` Ajit Kumar Agarwal
2014-10-07 17:09 ` Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=07638ee5ff984d21a51b468a841f9dba@BN1AFFO11FD045.protection.gbl \
--to=ajit.kumar.agarwal@xilinx.com \
--cc=gdb-patches@sourceware.org \
--cc=nmekala@xilinx.com \
--cc=palves@redhat.com \
--cc=vidhum@xilinx.com \
--cc=vinodk@xilinx.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox