This is an automated email from Gerrit.

Spencer Oliver ([email protected]) just uploaded a new patch set to Gerrit, 
which you can find at http://openocd.zylin.com/1618

-- gerrit

commit db2609271a4bc0faecb89395ea01a6596f228839
Author: Spencer Oliver <[email protected]>
Date:   Wed Sep 11 16:14:30 2013 +0100

    gdb: enable target desciption support by default
    
    This enables gdb target description support by default, it will check that
    this is supported by the active target.
    
    Change-Id: Iea5a5b94c5e373af30dacb780020b79536caa1e3
    Signed-off-by: Spencer Oliver <[email protected]>

diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c
index ab7d40d..d8a4ffb 100644
--- a/src/server/gdb_server.c
+++ b/src/server/gdb_server.c
@@ -122,8 +122,8 @@ static int gdb_report_data_abort;
 
 /* set if we are sending target descriptions to gdb
  * via qXfer:features:read packet */
-/* disabled by default */
-static int gdb_use_target_description;
+/* enabled by default */
+static int gdb_use_target_description = 1;
 
 /* current processing free-run type, used by file-I/O */
 static char gdb_running_type;
@@ -2111,6 +2111,12 @@ static int gdb_generate_target_description(struct target 
*target, char **tdesc)
        if (features != NULL)
                free(features);
 
+       if (current_feature == 0) {
+               /* no features found so disable target description support */
+               gdb_use_target_description = 0;
+               LOG_INFO("Disabling Target Description Support");
+       }
+
        return ERROR_OK;
 }
 
@@ -2220,6 +2226,12 @@ static int gdb_query_packet(struct connection 
*connection,
                int pos = 0;
                int size = 0;
 
+               /* we need to test that the target supports target descriptions 
*/
+               char *tdesc = NULL;
+               gdb_generate_target_description(target, &tdesc);
+               if (tdesc)
+                       free(tdesc);
+
                xml_printf(&retval,
                        &buffer,
                        &pos,

-- 

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to