summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
ff3028c)
Change-Id: I583cddf5e62ed77f108786a085569ab8699ad50d
Signed-off-by: Michel JAOUEN <michel.jaouen@stericsson.com>
Reviewed-on: http://openocd.zylin.com/344
Tested-by: jenkins
Reviewed-by: Evan Hunter <evan@ozhiker.com>
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
int rtos_thread_packet(struct connection *connection, char *packet, int packet_size);
int rtos_thread_packet(struct connection *connection, char *packet, int packet_size);
+int rtos_smp_init(struct target *target)
+{
+ if (target->rtos->type->smp_init)
+ return target->rtos->type->smp_init(target);
+ return ERROR_TARGET_INIT_FAILED;
+}
+
int rtos_create(Jim_GetOptInfo *goi, struct target * target)
{
int rtos_create(Jim_GetOptInfo *goi, struct target * target)
{
{
struct target *target = get_target_from_connection(connection);
int64_t current_threadid = target->rtos->current_threadid;
{
struct target *target = get_target_from_connection(connection);
int64_t current_threadid = target->rtos->current_threadid;
- if ( ( target->rtos != NULL ) &&
- ( current_threadid != -1 ) &&
- ( current_threadid != 0 ) &&
- ( current_threadid != target->rtos->current_thread ) )
+ if ((target->rtos != NULL) &&
+ (current_threadid != -1) &&
+ (current_threadid != 0) &&
+ ((current_threadid != target->rtos->current_thread) ||
+ (target->smp))) /* in smp several current thread are possible */
{
char * hex_reg_list;
target->rtos->type->get_thread_reg_list( target->rtos, current_threadid, &hex_reg_list );
{
char * hex_reg_list;
target->rtos->type->get_thread_reg_list( target->rtos, current_threadid, &hex_reg_list );
char * name;
int (*detect_rtos) ( struct target* target );
int (*create) ( struct target* target );
char * name;
int (*detect_rtos) ( struct target* target );
int (*create) ( struct target* target );
+ int (*smp_init)(struct target *target);
int (*update_threads) ( struct rtos* rtos );
int (*get_thread_reg_list) ( struct rtos *rtos, int64_t thread_id, char ** hex_reg_list );
int (*get_symbol_list_to_lookup) (symbol_table_elem_t * symbol_list[] );
int (*update_threads) ( struct rtos* rtos );
int (*get_thread_reg_list) ( struct rtos *rtos, int64_t thread_id, char ** hex_reg_list );
int (*get_symbol_list_to_lookup) (symbol_table_elem_t * symbol_list[] );
+ int (*clean)(struct target *target);
int gdb_thread_packet(struct connection *connection, char *packet, int packet_size);
int rtos_get_gdb_reg_list(struct connection *connection);
int rtos_update_threads( struct target *target );
int gdb_thread_packet(struct connection *connection, char *packet, int packet_size);
int rtos_get_gdb_reg_list(struct connection *connection);
int rtos_update_threads( struct target *target );
+int rtos_smp_init(struct target *target);
breakpoint_clear_target(gdb_service->target);
watchpoint_clear_target(gdb_service->target);
breakpoint_clear_target(gdb_service->target);
watchpoint_clear_target(gdb_service->target);
+ /* clean previous rtos session if supported*/
+ if ((gdb_service->target->rtos) &&
+ (gdb_service->target->rtos->type->clean))
+ gdb_service->target->rtos->type->clean(gdb_service->target);
+
/* remove the initial ACK from the incoming buffer */
if ((retval = gdb_get_char(connection, &initial_ack)) != ERROR_OK)
return retval;
/* remove the initial ACK from the incoming buffer */
if ((retval = gdb_get_char(connection, &initial_ack)) != ERROR_OK)
return retval;
gdb_actual_connections++;
LOG_DEBUG("New GDB Connection: %d, Target %s, state: %s",
gdb_actual_connections++;
LOG_DEBUG("New GDB Connection: %d, Target %s, state: %s",
- gdb_actual_connections,
- target_name(gdb_service->target),
- target_state_name(gdb_service->target));
+ gdb_actual_connections,
+ target_name(gdb_service->target),
+ target_state_name(gdb_service->target));
/* DANGER! If we fail subsequently, we must remove this handler,
* otherwise we occasionally see crashes as the timer can invoke the
/* DANGER! If we fail subsequently, we must remove this handler,
* otherwise we occasionally see crashes as the timer can invoke the
+ gdb_thread_packet(connection, packet, packet_size);
log_add_callback(gdb_log_callback, connection);
if (gdb_con->mem_write_error)
log_add_callback(gdb_log_callback, connection);
if (gdb_con->mem_write_error)
int i;
const char *targetname;
int retval,len;
int i;
const char *targetname;
int retval,len;
- struct target *target;
- struct target_list *head, *curr;
- curr = (struct target_list*) NULL;
- head = (struct target_list*) NULL;
-
+ struct target *target = (struct target *) NULL;
+ struct target_list *head, *curr, *new;
+ curr = (struct target_list *) NULL;
+ head = (struct target_list *) NULL;
+ new = (struct target_list *) NULL;
+
retval = 0;
LOG_DEBUG("%d",argc);
/* argv[1] = target to associate in smp
retval = 0;
LOG_DEBUG("%d",argc);
/* argv[1] = target to associate in smp
LOG_DEBUG("%s ",targetname);
if (target)
{
LOG_DEBUG("%s ",targetname);
if (target)
{
- struct target_list *new;
new=malloc(sizeof(struct target_list));
new->target = target;
new->next = (struct target_list*)NULL;
new=malloc(sizeof(struct target_list));
new->target = target;
new->next = (struct target_list*)NULL;
while(curr!=(struct target_list *)NULL)
{
while(curr!=(struct target_list *)NULL)
{
- target=curr->target;
- target->smp = 1;
- target->head = head;
- curr=curr->next;
+ target = curr->target;
+ target->smp = 1;
+ target->head = head;
+ curr = curr->next;
+ if (target->rtos)
+ retval = rtos_smp_init(head->target);
Linking to existing account procedure
If you already have an account and want to add another login method
you
MUST first sign in with your existing account and
then change URL to read
https://review.openocd.org/login/?link
to get to this page again but this time it'll work for linking. Thank you.
SSH host keys fingerprints
1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=.. |
|+o.. . |
|*.o . . |
|+B . . . |
|Bo. = o S |
|Oo.+ + = |
|oB=.* = . o |
| =+=.+ + E |
|. .=o . o |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)