diff --git a/common/cli/skyeye_new_api.c b/common/cli/skyeye_new_api.c index b15d0c2bc4840d1949834a83d445f05b50758129..3702a351c77f5224e4fb11ce308c3e946b7267bb 100644 --- a/common/cli/skyeye_new_api.c +++ b/common/cli/skyeye_new_api.c @@ -324,8 +324,8 @@ SkyEyeAPIRetST skyeye_delete_breakpoint_by_addr(char *cpuname, uint64_t address) if (0 != iface->delete_bp(core, (uint32_t)address)) { - output_errmsg(0xffffffff, ApiRet.errMsg, "Can't get %s %s iface!\n", "Call %s delete_bp iface Failed!\n", cpuname); - output_log(Warning_log, "Can't get %s %s iface!\n", "Call %s delete_bp iface Failed!\n", cpuname); + output_errmsg(0xffffffff, ApiRet.errMsg, "Call %s delete_bp iface Failed!\n", cpuname); + output_log(Warning_log, "Call %s delete_bp iface Failed!\n", cpuname); ApiRet.result = API_ERROR; return ApiRet; } @@ -2896,11 +2896,19 @@ SkyEyeAPIRetST skyeye_enable_device_work(char *device_name) *16.设置和获取CPU PC API接口 */ -SkyEyeAPIRetST skyeye_set_pc(char *cpu_name, unsigned int pc) +SkyEyeAPIRetST skyeye_set_pc(char *cpu_name, uint64_t pc) { SkyEyeAPIRetST ApiRet = {0}; - if (!WIN_setPC(cpu_name, pc)) + if (pc > 0xFFFFFFFFUL) + { + output_errmsg(0xffffffff, ApiRet.errMsg, "The address is out of the supported range!\n"); + output_log(Error_log, "The address is out of the supported range!\n"); + ApiRet.result = API_ERROR; + return ApiRet; + } + + if (!WIN_setPC(cpu_name, (uint32_t)pc)) { output_errmsg(0xffffffff, ApiRet.errMsg, "Call WIN_setPC iface failed!\n"); output_log(Error_log, "Call WIN_setPC iface failed!\n"); diff --git a/common/include/skyeye_new_api.h b/common/include/skyeye_new_api.h index 97cd5180e7d8842b95acba7983043272f74b4ac3..918f9253a24b0128de472f9fb876397724e9b9b6 100644 --- a/common/include/skyeye_new_api.h +++ b/common/include/skyeye_new_api.h @@ -221,7 +221,7 @@ SkyEyeAPIRetST skyeye_disable_device_work(char *device_name); SkyEyeAPIRetST skyeye_enable_device_work(char *device_name); /*úͻȡCPU PC APIӿ*/ -SkyEyeAPIRetST skyeye_set_pc(char *cpu_name, unsigned int pc); +SkyEyeAPIRetST skyeye_set_pc(char *cpu_name, uint64_t pc); SkyEyeAPIRetST skyeye_get_pc(char *cpu_name); /*enable SkyEye debug iface*/