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/634

-- gerrit

commit c5706df491bdabc69c3bce38c7aa51321bc900f3
Author: Spencer Oliver <[email protected]>
Date:   Thu May 10 21:32:04 2012 +0100

    target: remove legacy target events
    
    These events have been deprecated for a number of years, update any
    remaining scripts to the new events.
    
    Change-Id: Ic31ff388545ac8b3a500045699ca92c541b13f12
    Signed-off-by: Spencer Oliver <[email protected]>

diff --git a/doc/openocd.texi b/doc/openocd.texi
index 7bd872a..38591fd 100644
--- a/doc/openocd.texi
+++ b/doc/openocd.texi
@@ -4129,12 +4129,6 @@ depending on whether the breakpoint is in RAM or read 
only memory.
 @* Before the target steps, gdb is trying to start/resume the target
 @item @b{halted}
 @* The target has halted
-@ignore
-@item @b{old-gdb_program_config}
-@* DO NOT USE THIS: Used internally
-@item @b{old-pre_resume}
-@* DO NOT USE THIS: Used internally
-@end ignore
 @item @b{reset-assert-pre}
 @* Issued as part of @command{reset} processing
 after @command{reset_init} was triggered
diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c
index 755c1e7..1c0ee08 100644
--- a/src/server/gdb_server.c
+++ b/src/server/gdb_server.c
@@ -735,7 +735,6 @@ static int gdb_target_callback_event_handler(struct target 
*target,
                        target_call_event_callbacks(target, 
TARGET_EVENT_GDB_END);
                        break;
                case TARGET_EVENT_GDB_FLASH_ERASE_START:
-                       target_handle_event(target, 
TARGET_EVENT_OLD_gdb_program_config);
                        retval = jtag_execute_queue();
                        if (retval != ERROR_OK)
                                return retval;
@@ -1367,7 +1366,6 @@ static int gdb_step_continue_packet(struct connection 
*connection,
 
        if (packet[0] == 'c') {
                LOG_DEBUG("continue");
-               target_handle_event(target, TARGET_EVENT_OLD_pre_resume);
                retval = target_resume(target, current, address, 0, 0); /* 
resume at current
                                                                         
*address, don't handle
                                                                         
*breakpoints, not debugging
diff --git a/src/target/target.c b/src/target/target.c
index 450a8bd..ccaa6e3 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -156,8 +156,6 @@ static const char *target_strerror_safe(int err)
 }
 
 static const Jim_Nvp nvp_target_event[] = {
-       { .value = TARGET_EVENT_OLD_gdb_program_config , .name = 
"old-gdb_program_config" },
-       { .value = TARGET_EVENT_OLD_pre_resume         , .name = 
"old-pre_resume" },
 
        { .value = TARGET_EVENT_GDB_HALT, .name = "gdb-halt" },
        { .value = TARGET_EVENT_HALTED, .name = "halted" },
@@ -168,10 +166,7 @@ static const Jim_Nvp nvp_target_event[] = {
        { .name = "gdb-start", .value = TARGET_EVENT_GDB_START },
        { .name = "gdb-end", .value = TARGET_EVENT_GDB_END },
 
-       /* historical name */
-
-       { .value = TARGET_EVENT_RESET_START, .name = "reset-start" },
-
+       { .value = TARGET_EVENT_RESET_START,         .name = "reset-start" },
        { .value = TARGET_EVENT_RESET_ASSERT_PRE,    .name = "reset-assert-pre" 
},
        { .value = TARGET_EVENT_RESET_ASSERT,        .name = "reset-assert" },
        { .value = TARGET_EVENT_RESET_ASSERT_POST,   .name = 
"reset-assert-post" },
@@ -523,6 +518,8 @@ int target_resume(struct target *target, int current, 
uint32_t address, int hand
                return ERROR_FAIL;
        }
 
+       target_call_event_callbacks(target, TARGET_EVENT_RESUME_START);
+
        /* note that resume *must* be asynchronous. The CPU can halt before
         * we poll. The CPU can even halt at the current PC as a result of
         * a software breakpoint being inserted by (a bug?) the application.
@@ -531,6 +528,8 @@ int target_resume(struct target *target, int current, 
uint32_t address, int hand
        if (retval != ERROR_OK)
                return retval;
 
+       target_call_event_callbacks(target, TARGET_EVENT_RESUME_END);
+
        return retval;
 }
 
@@ -2507,7 +2506,6 @@ COMMAND_HANDLER(handle_resume_command)
                return ERROR_COMMAND_SYNTAX_ERROR;
 
        struct target *target = get_current_target(CMD_CTX);
-       target_handle_event(target, TARGET_EVENT_OLD_pre_resume);
 
        /* with no CMD_ARGV, resume from current pc, addr = 0,
         * with one arguments, addr = CMD_ARGV[0],
diff --git a/src/target/target.h b/src/target/target.h
index 9dc928f..7b707d5 100644
--- a/src/target/target.h
+++ b/src/target/target.h
@@ -197,12 +197,6 @@ static inline const char *target_name(struct target 
*target)
 const char *debug_reason_name(struct target *t);
 
 enum target_event {
-       /* LD historical names
-        * - Prior to the great TCL change
-        * - June/July/Aug 2008
-        * - Duane Ellis */
-       TARGET_EVENT_OLD_gdb_program_config,
-       TARGET_EVENT_OLD_pre_resume,
 
        /* allow GDB to do stuff before others handle the halted event,
         * this is in lieu of defining ordering of invocation of events,
diff --git a/tcl/target/aduc702x.cfg b/tcl/target/aduc702x.cfg
index f06dc33..fca0a7f 100644
--- a/tcl/target/aduc702x.cfg
+++ b/tcl/target/aduc702x.cfg
@@ -50,4 +50,4 @@ proc watchdog_service {} {
 }
 
 $_TARGETNAME configure -event reset-halt-post {  watchdog_service }
-$_TARGETNAME configure -event old-pre_resume { global watchdog_hdl; after 
cancel $watchdog_hdl }
+$_TARGETNAME configure -event resume-start { global watchdog_hdl; after cancel 
$watchdog_hdl }

-- 

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to