VirtualBox

source: vbox/trunk/src/VBox/Debugger/DBGPlugInCommonELF.h@ 76678

Last change on this file since 76678 was 76564, checked in by vboxsync, 5 years ago

Debugger: Use DEBUGGER_INCLUDED_SRC_ as header guard prefix with scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 2.3 KB
Line 
1/* $Id: DBGPlugInCommonELF.h 76564 2019-01-01 03:57:14Z vboxsync $ */
2/** @file
3 * DBGPlugInCommonELF - Common code for dealing with ELF images, Header.
4 */
5
6/*
7 * Copyright (C) 2008-2019 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#ifndef DEBUGGER_INCLUDED_SRC_DBGPlugInCommonELF_h
19#define DEBUGGER_INCLUDED_SRC_DBGPlugInCommonELF_h
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24#include <VBox/types.h>
25#include <iprt/formats/elf32.h>
26#include <iprt/formats/elf64.h>
27
28/** @name DBGDiggerCommonParseElf32Mod and DBGDiggerCommonParseElf64Mod flags
29 * @{ */
30/** Whether to adjust the symbol values or not. */
31#define DBG_DIGGER_ELF_ADJUST_SYM_VALUE RT_BIT_32(0)
32/** Indicates that we're missing section headers and that
33 * all section indexes are to be considered invalid. (Solaris hack.)
34 * This flag is incompatible with DBG_DIGGER_ELF_ADJUST_SYM_VALUE. */
35#define DBG_DIGGER_ELF_FUNNY_SHDRS RT_BIT_32(1)
36/** Valid bit mask. */
37#define DBG_DIGGER_ELF_MASK UINT32_C(0x00000003)
38/* @} */
39
40int DBGDiggerCommonParseElf32Mod(PUVM pUVM, const char *pszModName, const char *pszFilename, uint32_t fFlags,
41 Elf32_Ehdr const *pEhdr, Elf32_Shdr const *paShdrs,
42 Elf32_Sym const *paSyms, size_t cMaxSyms,
43 char const *pbStrings, size_t cbMaxStrings,
44 RTGCPTR MinAddr, RTGCPTR MaxAddr, uint64_t uModTag);
45
46int DBGDiggerCommonParseElf64Mod(PUVM pUVM, const char *pszModName, const char *pszFilename, uint32_t fFlags,
47 Elf64_Ehdr const *pEhdr, Elf64_Shdr const *paShdrs,
48 Elf64_Sym const *paSyms, size_t cMaxSyms,
49 char const *pbStrings, size_t cbMaxStrings,
50 RTGCPTR MinAddr, RTGCPTR MaxAddr, uint64_t uModTag);
51
52#endif /* !DEBUGGER_INCLUDED_SRC_DBGPlugInCommonELF_h */
53
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use