Changeset fea0ce6 in mainline for kernel/generic/include


Ignore:
Timestamp:
2010-01-23T20:20:54Z (16 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e095644
Parents:
9d3133d (diff), bc310a05 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge task dump infrastructure.

Location:
kernel/generic/include
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/interrupt.h

    r9d3133d rfea0ce6  
    4646typedef void (* iroutine)(int n, istate_t *istate);
    4747
    48 #define fault_if_from_uspace(istate, fmt, ...) \
    49 { \
    50         if (istate_from_uspace(istate)) { \
    51                 task_t *task = TASK; \
    52                 printf("Task %s (%" PRIu64 ") killed due to an exception at " \
    53                     "program counter %p.\n", task->name, task->taskid, istate_get_pc(istate)); \
    54                 stack_trace_istate(istate); \
    55                 printf("Kill message: " fmt "\n", ##__VA_ARGS__); \
    56                 task_kill(task->taskid); \
    57                 thread_exit(); \
    58         } \
    59 }
    60 
     48extern void fault_if_from_uspace(istate_t *istate, char *fmt, ...);
    6149extern iroutine exc_register(int n, const char *name, iroutine f);
    6250extern void exc_dispatch(int n, istate_t *t);
  • kernel/generic/include/ipc/event_types.h

    r9d3133d rfea0ce6  
    3737
    3838typedef enum event_type {
     39        /** New data available in kernel log */
    3940        EVENT_KLOG = 0,
     41        /** Returning from kernel console to userspace */
    4042        EVENT_KCONSOLE,
     43        /** A thread has faulted and will be terminated */
     44        EVENT_FAULT,
    4145        EVENT_END
    4246} event_type_t;
  • kernel/generic/include/mm/as.h

    r9d3133d rfea0ce6  
    3636#define KERN_AS_H_
    3737
     38#ifdef KERNEL
     39#include <arch/types.h>
     40#else
     41#include <sys/types.h>
     42#endif
     43
    3844/** Address space area flags. */
    3945#define AS_AREA_READ            1
     
    4147#define AS_AREA_EXEC            4
    4248#define AS_AREA_CACHEABLE       8
     49
     50/** Address space area info exported to userspace. */
     51typedef struct {
     52        /** Starting address */
     53        uintptr_t start_addr;
     54
     55        /** Area size */
     56        size_t size;
     57
     58        /** Area flags */
     59        int flags;
     60} as_area_info_t;
    4361
    4462#ifdef KERNEL
     
    268286
    269287/* Introspection functions. */
     288extern void as_get_area_info(as_t *as, as_area_info_t **obuf, size_t *osize);
    270289extern void as_print(as_t *as);
    271290
  • kernel/generic/include/udebug/udebug.h

    r9d3133d rfea0ce6  
    9696 */
    9797UDEBUG_M_THREAD_READ,
     98
     99/** Read the list of the debugged task's address space areas.
     100 *
     101 * - ARG2 - destination address in the caller's address space
     102 * - ARG3 - size of receiving buffer in bytes
     103 *
     104 * The kernel fills the buffer with a series of as_area_info_t structures.
     105 * Upon answer, the kernel will set:
     106 *
     107 * - ARG2 - number of bytes that were actually copied
     108 * - ARG3 - number of bytes of the complete data
     109 *
     110 */
     111UDEBUG_M_AREAS_READ,
    98112
    99113/** Read the debugged tasks's memory.
     
    139153
    140154#include <synch/mutex.h>
     155#include <synch/condvar.h>
    141156#include <arch/interrupt.h>
    142157#include <atomic.h>
     
    181196        bool stoppable;         /**< thread is stoppable */
    182197        bool active;            /**< thread is in a debugging session */
     198        condvar_t active_cv;
    183199} udebug_thread_t;
    184200
  • kernel/generic/include/udebug/udebug_ops.h

    r9d3133d rfea0ce6  
    4545int udebug_stop(thread_t *t, call_t *call);
    4646
    47 int udebug_thread_read(void **buffer, size_t buf_size, size_t *n);
     47int udebug_thread_read(void **buffer, size_t buf_size, size_t *stored,
     48    size_t *needed);
    4849int udebug_args_read(thread_t *t, void **buffer);
    4950
Note: See TracChangeset for help on using the changeset viewer.