Changeset 96b02eb9 in mainline for kernel/generic/src/udebug
- Timestamp:
- 2010-12-14T12:52:38Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6b10dab
- Parents:
- 554debd
- Location:
- kernel/generic/src/udebug
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/udebug/udebug.c
r554debd r96b02eb9 219 219 * 220 220 */ 221 void udebug_syscall_event( unative_t a1, unative_t a2, unative_t a3,222 unative_t a4, unative_t a5, unative_t a6, unative_t id, unative_t rc,221 void udebug_syscall_event(sysarg_t a1, sysarg_t a2, sysarg_t a3, 222 sysarg_t a4, sysarg_t a5, sysarg_t a6, sysarg_t id, sysarg_t rc, 223 223 bool end_variant) 224 224 { … … 314 314 IPC_SET_RETVAL(call->data, 0); 315 315 IPC_SET_ARG1(call->data, UDEBUG_EVENT_THREAD_B); 316 IPC_SET_ARG2(call->data, ( unative_t) thread);316 IPC_SET_ARG2(call->data, (sysarg_t) thread); 317 317 318 318 /* -
kernel/generic/src/udebug/udebug_ipc.c
r554debd r96b02eb9 210 210 static void udebug_receive_name_read(call_t *call) 211 211 { 212 unative_t uspace_addr;213 unative_t to_copy;212 sysarg_t uspace_addr; 213 sysarg_t to_copy; 214 214 size_t data_size; 215 215 size_t buf_size; … … 257 257 static void udebug_receive_areas_read(call_t *call) 258 258 { 259 unative_t uspace_addr;260 unative_t to_copy;259 sysarg_t uspace_addr; 260 sysarg_t to_copy; 261 261 size_t data_size; 262 262 size_t buf_size; … … 304 304 { 305 305 thread_t *t; 306 unative_t uspace_addr;306 sysarg_t uspace_addr; 307 307 int rc; 308 308 void *buffer; … … 328 328 (no way to distinguish method in answer) */ 329 329 IPC_SET_ARG1(call->data, uspace_addr); 330 IPC_SET_ARG2(call->data, 6 * sizeof( unative_t));330 IPC_SET_ARG2(call->data, 6 * sizeof(sysarg_t)); 331 331 call->buffer = buffer; 332 332 … … 341 341 { 342 342 thread_t *t; 343 unative_t uspace_addr;344 unative_t to_copy;343 sysarg_t uspace_addr; 344 sysarg_t to_copy; 345 345 void *buffer; 346 346 int rc; … … 382 382 static void udebug_receive_mem_read(call_t *call) 383 383 { 384 unative_t uspace_dst;385 unative_t uspace_src;384 sysarg_t uspace_dst; 385 sysarg_t uspace_src; 386 386 unsigned size; 387 387 void *buffer; -
kernel/generic/src/udebug/udebug_ops.c
r554debd r96b02eb9 371 371 372 372 /* Allocate a buffer to hold thread IDs */ 373 unative_t *id_buffer = malloc(buf_size + 1, 0);373 sysarg_t *id_buffer = malloc(buf_size + 1, 0); 374 374 375 375 mutex_lock(&TASK->udebug.lock); … … 385 385 /* Copy down the thread IDs */ 386 386 387 size_t max_ids = buf_size / sizeof( unative_t);387 size_t max_ids = buf_size / sizeof(sysarg_t); 388 388 size_t copied_ids = 0; 389 389 size_t extra_ids = 0; … … 404 404 if (copied_ids < max_ids) { 405 405 /* Using thread struct pointer as identification hash */ 406 id_buffer[copied_ids++] = ( unative_t) thread;406 id_buffer[copied_ids++] = (sysarg_t) thread; 407 407 } else 408 408 extra_ids++; … … 414 414 415 415 *buffer = id_buffer; 416 *stored = copied_ids * sizeof( unative_t);417 *needed = (copied_ids + extra_ids) * sizeof( unative_t);416 *stored = copied_ids * sizeof(sysarg_t); 417 *needed = (copied_ids + extra_ids) * sizeof(sysarg_t); 418 418 419 419 return 0; … … 463 463 { 464 464 /* Prepare a buffer to hold the arguments. */ 465 unative_t *arg_buffer = malloc(6 * sizeof(unative_t), 0);465 sysarg_t *arg_buffer = malloc(6 * sizeof(sysarg_t), 0); 466 466 467 467 /* On success, this will lock t->udebug.lock. */ … … 478 478 479 479 /* Copy to a local buffer before releasing the lock. */ 480 memcpy(arg_buffer, thread->udebug.syscall_args, 6 * sizeof( unative_t));480 memcpy(arg_buffer, thread->udebug.syscall_args, 6 * sizeof(sysarg_t)); 481 481 482 482 _thread_op_end(thread); … … 539 539 * 540 540 */ 541 int udebug_mem_read( unative_t uspace_addr, size_t n, void **buffer)541 int udebug_mem_read(sysarg_t uspace_addr, size_t n, void **buffer) 542 542 { 543 543 /* Verify task state */
Note:
See TracChangeset
for help on using the changeset viewer.