summaryrefslogtreecommitdiff
path: root/src/core_dump_handler/i686
diff options
context:
space:
mode:
authorLutz Helwing <lutz_helwing@mentor.com>2015-06-23 18:32:44 +0200
committerAlexander Wenzel <Alexander.AW.Wenzel@bmw.de>2015-10-28 11:38:27 +0100
commitd7cea9b4df048a3b5da68710a5b62efe082fb447 (patch)
treea7e114d2bbf5814b5f221cb0273cc05fbbf52483 /src/core_dump_handler/i686
parent2355ca4927cffd8307fdb78aaadeb584450bef21 (diff)
downloadDLT-daemon-d7cea9b4df048a3b5da68710a5b62efe082fb447.tar.gz
Added core dump handler code
Fixed author Doxygen tag Added licence headers Moved return value definition to new header Converted all DOS line endings to Unix Solution for CPU dependency by using CMAKE_SYSTEM_PROCESSOR cmake variable CPU specific stuff is implemented in own implementation file for each CPU architecture Added config file for sysctl. Fixed wrong parameters to open call for lockfile Added mechanism to overwrite TARGET_CPU_NAME with command line option Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
Diffstat (limited to 'src/core_dump_handler/i686')
-rw-r--r--src/core_dump_handler/i686/dlt_cdh_cpuinfo.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/core_dump_handler/i686/dlt_cdh_cpuinfo.c b/src/core_dump_handler/i686/dlt_cdh_cpuinfo.c
new file mode 100644
index 0000000..2e547a2
--- /dev/null
+++ b/src/core_dump_handler/i686/dlt_cdh_cpuinfo.c
@@ -0,0 +1,37 @@
+/*
+ * @licence app begin@
+ * SPDX license identifier: MPL-2.0
+ *
+ * Copyright (C) 2011-2015, BMW AG
+ *
+ * This file is part of GENIVI Project DLT - Diagnostic Log and Trace.
+ *
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License (MPL), v. 2.0.
+ * If a copy of the MPL was not distributed with this file,
+ * You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * For further information see http://www.genivi.org/.
+ * @licence end@
+ */
+
+/*!
+ * \author Magneti Marelli http://www.magnetimarelli.com
+ * \author Lutz Helwing <lutz_helwing@mentor.com>
+ *
+ * \copyright Copyright © 2011-2015 BMW AG. \n
+ * License MPL-2.0: Mozilla Public License version 2.0 http://mozilla.org/MPL/2.0/.
+ *
+ * \file dlt_cdh_cpuinfo.c
+ */
+
+#include "../dlt_cdh_cpuinfo.h"
+
+void get_registers(prstatus_t* prstatus, cdh_registers_t* registers)
+{
+ struct user_regs_struct* ptr_reg = (struct user_regs_struct*) prstatus->pr_reg;
+
+ registers->pc = ptr_reg->ecx; // [REG_PROC_COUNTER];
+ registers->ip = ptr_reg->eip; // [REG_INSTR_POINTER];
+ registers->lr = ptr_reg->ebp; // [REG_LINK_REGISTER];
+}