Skip to content

Commit

Permalink
Add common dlt_cdh_cpuinfo.c to unblock build on non amd64 and i386 a…
Browse files Browse the repository at this point in the history
…rcs (#544)
  • Loading branch information
LocutusOfBorg authored Oct 6, 2023
1 parent 38407d9 commit e81c422
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/core_dump_handler/dlt_cdh.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ typedef struct
uint64_t pc;
uint64_t ip;
uint64_t lr;
uint64_t sp;
uint64_t fp;

} cdh_registers_t;

Expand Down
33 changes: 33 additions & 0 deletions src/core_dump_handler/dlt_cdh_cpuinfo.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* SPDX license identifier: MPL-2.0
*
* Copyright (C) 2011-2015, BMW AG
*
* This file is part of COVESA 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.covesa.org/.
*/

/*!
* \author Gianfranco Costamagna <[email protected]>
*
* \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->pc;*/ /* [REG_PROC_COUNTER]; */

}
2 changes: 1 addition & 1 deletion src/core_dump_handler/dlt_cdh_crashid.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <asm/prctl.h>
#include <sys/prctl.h>
#include <inttypes.h>

#include "dlt_cdh.h"
Expand Down

0 comments on commit e81c422

Please sign in to comment.