Ignore:
Timestamp:
Jul 16, 2017, 11:53:11 PM (2 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
master
Children:
8ad4d93
Parents:
2465c01
git-author:
Chris Johns <chrisj@…> (07/16/17 23:53:11)
git-committer:
Chris Johns <chrisj@…> (08/15/17 01:39:22)
Message:

libdebugger: Fixes to debugging, ARM support, locking, and gcc-7.1 warnings.

  • Add printk support to aid multi-core debugging.
  • Add lock trace to aid lock debugging.
  • Fixes to gcc-7.1 warnings.
  • Fixes from ticket #2879.
  • Add verbose command controls.
  • Change using the RTEMS sys/lock.h API to manage exception threads.
  • ARM hardware breakpoint fixes. Support for SMP stepping is not implemented, this requires use of the context id register.

Closes #2879.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libdebugger/rtems-debugger-server.h

    r2465c01 rb2353ed9  
    11/*
    2  * Copyright (c) 2016 Chris Johns <chrisj@rtems.org>.  All rights reserved.
     2 * Copyright (c) 2016-2017 Chris Johns <chrisj@rtems.org>.
     3 * All rights reserved.
    34 *
    45 * Redistribution and use in source and binary forms, with or without
     
    101102#define RTEMS_DEBUGGER_FLAG_VCONT        (1 << 3)
    102103#define RTEMS_DEBUGGER_FLAG_MULTIPROCESS (1 << 4)
     104#define RTEMS_DEBUGGER_FLAG_VERBOSE_LOCK (1 << 5)
     105#define RTEMS_DEBUGGER_FLAG_VERBOSE_CMDS (1 << 6)
    103106
    104107/**
     
    108111typedef struct rtems_debugger_threads rtems_debugger_threads;
    109112typedef struct rtems_debugger_target  rtems_debugger_target;
     113
     114/**
     115 * Local types for the RTEMS-X interface.
     116 */
     117typedef struct _Condition_Control       rtems_rx_cond;
     118typedef struct _Mutex_recursive_Control rtems_rx_mutex;
    110119
    111120/**
     
    117126  int                     timeout;
    118127  rtems_task_priority     priority;
    119   rtems_id                lock;
    120   rtems_id                lock_output;
     128  rtems_rx_mutex          lock;
    121129  rtems_debugger_remote*  remote;
    122130  rtems_id                server_task;
     131  rtems_rx_cond           server_cond;
    123132  volatile bool           server_running;
    124133  volatile bool           server_finished;
     
    135144  uint8_t                 output[RTEMS_DEBUGGER_BUFFER_SIZE];
    136145  rtems_debugger_threads* threads;
     146  rtems_chain_control     exception_threads;
    137147  int                     signal;
    138148  rtems_debugger_target*  target;
     
    148158 */
    149159extern int rtems_debugger_printf(const char* format, ...) RTEMS_PRINTFLIKE(1, 2);
     160extern int rtems_debugger_clean_printf(const char* format, ...) RTEMS_PRINTFLIKE(1, 2);
     161extern void rtems_debugger_printk_lock(rtems_interrupt_lock_context* lock_context);
     162extern void rtems_debugger_printk_unlock(rtems_interrupt_lock_context* lock_context);
    150163
    151164/**
    152165 * Lock the Debugger.
    153166 */
    154 extern int rtems_debugger_lock(void);
     167extern void rtems_debugger_lock(void);
    155168
    156169/**
    157170 * Unlock the Debugger.
    158171 */
    159 extern int rtems_debugger_unlock(void);
     172extern void rtems_debugger_unlock(void);
    160173
    161174/**
    162175 * Is the server still running?
    163176 */
    164 bool rtems_debugger_server_running(void);
     177extern bool rtems_debugger_server_running(void);
    165178
    166179/**
    167180 * Get the remote handle from the debugger.
    168181 */
    169 rtems_debugger_remote* rtems_debugger_remote_handle(void);
     182extern rtems_debugger_remote* rtems_debugger_remote_handle(void);
    170183
    171184/**
    172185 * Is the debugger connected?
    173186 */
    174 bool rtems_debugger_connected(void);
     187extern bool rtems_debugger_connected(void);
    175188
    176189/**
    177190 * Is the debugger events thread runnins?
    178191 */
    179 bool rtems_debugger_server_events_running(void);
    180 
    181 /**
    182  * Wake events thread in the debug server.
    183  */
    184 extern int rtems_debugger_server_events_wake(void);
     192extern bool rtems_debugger_server_events_running(void);
     193
     194/**
     195 * Signal events thread in the debug server to run.
     196 */
     197extern void rtems_debugger_server_events_signal(void);
    185198
    186199/**
Note: See TracChangeset for help on using the changeset viewer.