* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
- * along with this program; if not, write to the *
- * Free Software Foundation, Inc., *
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
+ * along with this program. If not, see <http://www.gnu.org/licenses/>. *
static int ChibiOS_create(struct target *target);
static int ChibiOS_update_threads(struct rtos *rtos);
static int ChibiOS_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, char **hex_reg_list);
static int ChibiOS_create(struct target *target);
static int ChibiOS_update_threads(struct rtos *rtos);
static int ChibiOS_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, char **hex_reg_list);
};
static symbol_table_elem_t ChibiOS_symbol_list[] = {
{ "rlist", 0, true}, /* Thread ready list */
{ "ch", 0, true}, /* System data structure */
{ "ch_debug", 0, false}, /* Memory Signature containing offsets of fields in rlist */
};
static symbol_table_elem_t ChibiOS_symbol_list[] = {
{ "rlist", 0, true}, /* Thread ready list */
{ "ch", 0, true}, /* System data structure */
{ "ch_debug", 0, false}, /* Memory Signature containing offsets of fields in rlist */
/* Sometimes the stacking can not be determined only by looking at the
* target name but only a runtime.
*
/* Sometimes the stacking can not be determined only by looking at the
* target name but only a runtime.
*
* only stack the FPU registers if it is enabled during ChibiOS build.
*
* Terminating which stacking is used is target depending.
* only stack the FPU registers if it is enabled during ChibiOS build.
*
* Terminating which stacking is used is target depending.
struct armv7m_common *armv7m_target = target_to_armv7m(rtos->target);
if (is_armv7m(armv7m_target)) {
struct armv7m_common *armv7m_target = target_to_armv7m(rtos->target);
if (is_armv7m(armv7m_target)) {
sizeof(struct thread_detail));
rtos->thread_details->threadid = 1;
rtos->thread_details->exists = true;
sizeof(struct thread_detail));
rtos->thread_details->threadid = 1;
rtos->thread_details->exists = true;
- *symbol_list = ChibiOS_symbol_list;
+ *symbol_list = malloc(sizeof(ChibiOS_symbol_list));
+
+ if (*symbol_list == NULL)
+ return ERROR_FAIL;
+
+ memcpy(*symbol_list, ChibiOS_symbol_list, sizeof(ChibiOS_symbol_list));