rtos : compilation error on amd64
authorMichel Jaouen <michel.jaouen@stericsson.com>
Mon, 18 Apr 2011 15:43:51 +0000 (17:43 +0200)
committerØyvind Harboe <oyvind.harboe@zylin.com>
Tue, 19 Apr 2011 10:53:56 +0000 (12:53 +0200)
src/rtos/FreeRTOS.c
src/rtos/ThreadX.c
src/rtos/rtos.c
src/rtos/rtos.h

index 000741607282f80915f01df3d3d4b648403b6f69..2aa4565a352a4c06be63f58d0c0161feac154a68 100644 (file)
@@ -73,7 +73,7 @@ const struct FreeRTOS_params FreeRTOS_params_list[] =
 static int FreeRTOS_detect_rtos( struct target* target );
 static int FreeRTOS_create( struct target* target );
 static int FreeRTOS_update_threads( struct rtos *rtos );
-static int FreeRTOS_get_thread_reg_list(struct rtos *rtos, long long thread_id, char ** hex_reg_list );
+static int FreeRTOS_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, char ** hex_reg_list );
 static int FreeRTOS_get_symbol_list_to_lookup(symbol_table_elem_t * symbol_list[]);
 
 
@@ -253,7 +253,7 @@ static int FreeRTOS_update_threads( struct rtos *rtos )
                }
 
                // Read the number of threads in this list
-               long long list_thread_count = 0;
+               int64_t list_thread_count = 0;
                retval = target_read_buffer( rtos->target, list_of_lists[i], param->thread_count_width, (uint8_t *)&list_thread_count);
                if ( retval != ERROR_OK )
                {
@@ -267,8 +267,8 @@ static int FreeRTOS_update_threads( struct rtos *rtos )
                }
 
                // Read the location of first list item
-               unsigned long long prev_list_elem_ptr = -1;
-               unsigned long long list_elem_ptr = 0;
+               uint64_t prev_list_elem_ptr = -1;
+               uint64_t list_elem_ptr = 0;
                retval = target_read_buffer( rtos->target, list_of_lists[i] + param->list_next_offset, param->pointer_width, (uint8_t *)&list_elem_ptr);
                if ( retval != ERROR_OK )
                {
@@ -345,11 +345,11 @@ static int FreeRTOS_update_threads( struct rtos *rtos )
        return 0;
 }
 
-static int FreeRTOS_get_thread_reg_list(struct rtos *rtos, long long thread_id, char ** hex_reg_list )
+static int FreeRTOS_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, char ** hex_reg_list )
 {
        int retval;
        const struct FreeRTOS_params* param;
-       long long stack_ptr = 0;
+       int64_t stack_ptr = 0;
 
 
        *hex_reg_list = NULL;
index da841118aacc07b3abee5c3fbb3e3fe78ce6e8af..8dc4640eb282e684ee30c951f9524d3f710ba0d7 100644 (file)
@@ -34,7 +34,7 @@
 static int ThreadX_detect_rtos( struct target* target );
 static int ThreadX_create( struct target* target );
 static int ThreadX_update_threads( struct rtos* rtos);
-static int ThreadX_get_thread_reg_list(struct rtos *rtos, long long thread_id, char ** hex_reg_list );
+static int ThreadX_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, char ** hex_reg_list );
 static int ThreadX_get_symbol_list_to_lookup(symbol_table_elem_t * symbol_list[]);
 
 
@@ -238,7 +238,7 @@ static int ThreadX_update_threads( struct rtos* rtos)
 
 
        // Read the pointer to the first thread
-       long long thread_ptr = 0;
+       int64_t thread_ptr = 0;
        retval = target_read_buffer( rtos->target, rtos->symbols[ThreadX_VAL_tx_thread_created_ptr].address, param->pointer_width, (uint8_t *)&thread_ptr);
        if ( retval != ERROR_OK )
        {
@@ -248,14 +248,14 @@ static int ThreadX_update_threads( struct rtos* rtos)
 
 
        // loop over all threads
-       long long prev_thread_ptr = 0;
+       int64_t prev_thread_ptr = 0;
        while ( ( thread_ptr != prev_thread_ptr ) && ( tasks_found < thread_list_size ) )
        {
 
                #define THREADX_THREAD_NAME_STR_SIZE (200)
            char tmp_str[THREADX_THREAD_NAME_STR_SIZE];
                unsigned int i = 0;
-               long long name_ptr = 0;
+               int64_t name_ptr = 0;
 
                // Save the thread pointer
                rtos->thread_details[tasks_found].threadid = thread_ptr;
@@ -290,7 +290,7 @@ static int ThreadX_update_threads( struct rtos* rtos)
 
 
                // Read the thread status
-               long long thread_status = 0;
+               int64_t thread_status = 0;
                retval = target_read_buffer( rtos->target, thread_ptr + param->thread_state_offset, 4, (uint8_t *)&thread_status);
                if ( retval != ERROR_OK )
                {
@@ -343,7 +343,7 @@ static int ThreadX_update_threads( struct rtos* rtos)
        return 0;
 }
 
-static int ThreadX_get_thread_reg_list(struct rtos *rtos, long long thread_id, char ** hex_reg_list )
+static int ThreadX_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, char ** hex_reg_list )
 {
 
        int retval;
@@ -369,7 +369,7 @@ static int ThreadX_get_thread_reg_list(struct rtos *rtos, long long thread_id, c
        param = (const struct ThreadX_params*) rtos->rtos_specific_params;
 
        // Read the stack pointer
-       long long stack_ptr = 0;
+       int64_t stack_ptr = 0;
        retval = target_read_buffer( rtos->target, thread_id + param->thread_stack_offset, param->pointer_width, (uint8_t*)&stack_ptr);
        if ( retval != ERROR_OK )
        {
@@ -452,7 +452,7 @@ static int ThreadX_get_thread_detail( struct rtos*   rtos, threadid_t   thread_i
 
        detail->threadid = thread_id;
 
-       long long name_ptr = 0;
+       int64_t name_ptr = 0;
        // read the name pointer
        retval = target_read_buffer( rtos->target, thread_id + param->thread_name_offset, param->pointer_width, (uint8_t *)&name_ptr);
        if ( retval != ERROR_OK )
@@ -479,7 +479,7 @@ static int ThreadX_get_thread_detail( struct rtos*   rtos, threadid_t   thread_i
 
 
        // Read the thread status
-       long long thread_status = 0;
+       int64_t thread_status = 0;
        retval = target_read_buffer( rtos->target, thread_id + param->thread_state_offset, 4, (uint8_t *)&thread_status);
        if ( retval != ERROR_OK )
        {
index 129770e80137666044246dfae4faaa5eaeb10b95..9a4af74920ae753735b89a95b935d7f68f8f9074 100644 (file)
@@ -29,7 +29,7 @@
 #include "server/gdb_server.h"
 
 
-static long long current_threadid = -1;
+static int64_t current_threadid = -1;
 
 static void hex_to_str( char* dst, char * hex_src );
 static int str_to_hex( char* hex_dst, char* src );
@@ -306,7 +306,7 @@ int gdb_thread_packet(struct connection *connection, struct target *target, char
                        }
                        else
                        {
-                               long long value = 0;
+                               int64_t value = 0;
                                char * hex_name_str = malloc( strlen(packet));
                                char * name_str;
                                int symbol_num;
@@ -512,11 +512,11 @@ int rtos_get_gdb_reg_list(struct connection *connection, struct target *target,
 
 
 
-int rtos_generic_stack_read( struct target * target, const struct rtos_register_stacking* stacking, long long stack_ptr, char ** hex_reg_list )
+int rtos_generic_stack_read( struct target * target, const struct rtos_register_stacking* stacking, int64_t stack_ptr, char ** hex_reg_list )
 {
        int list_size = 0;
        char * tmp_str_ptr;
-       long long new_stack_ptr;
+       int64_t new_stack_ptr;
        int i;
        int retval;
 
index cd4bbb27b4ac6882239906f5a82dac67238ac7fd..a6378c63050d4bd0b1746cf82430aa8bbe8df5c6 100644 (file)
@@ -26,8 +26,8 @@
 #include <helper/types.h>
 #include <jim-nvp.h>
 
-typedef long long threadid_t;
-typedef long long symbol_address_t;
+typedef int64_t threadid_t;
+typedef int64_t symbol_address_t;
 
 struct reg;
 
@@ -74,7 +74,7 @@ struct rtos_type
        int (*detect_rtos)                 ( struct target* target );
        int (*create)                      ( struct target* target );
        int (*update_threads)              ( struct rtos*   rtos );
-       int (*get_thread_reg_list)         ( struct rtos *rtos, long long thread_id, char ** hex_reg_list );
+       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[] );
 };
 
@@ -97,7 +97,7 @@ struct rtos_register_stacking
 #define GDB_THREAD_PACKET_NOT_CONSUMED (-40)
 
 int rtos_create(Jim_GetOptInfo *goi, struct target * target);
-int rtos_generic_stack_read( struct target * target, const struct rtos_register_stacking* stacking, long long stack_ptr, char ** hex_reg_list );
+int rtos_generic_stack_read( struct target * target, const struct rtos_register_stacking* stacking, int64_t stack_ptr, char ** hex_reg_list );
 int rtos_try_next( struct target * target );
 int gdb_thread_packet(struct connection *connection, struct target *target, char *packet, int packet_size);
 int rtos_get_gdb_reg_list(struct connection *connection, struct target *target, struct reg **reg_list[], int *reg_list_size);

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)