Permalink
Please sign in to comment.
Showing
with
506 additions
and 25 deletions.
- +5 −1 CHANGES
- +14 −0 CMakeLists.txt
- +1 −0 README.md
- +51 −0 include/mgba-util/elf-read.h
- +8 −0 include/mgba/core/core.h
- +3 −0 include/mgba/core/scripting.h
- +1 −0 include/mgba/debugger/debugger.h
- +1 −0 include/mgba/internal/gba/gba.h
- +69 −0 src/core/core.c
- +25 −0 src/core/scripting.c
- +6 −0 src/debugger/cli-debugger.c
- +1 −0 src/debugger/gdb-stub.c
- +34 −1 src/gba/core.c
- +46 −0 src/gba/gba.c
- +3 −2 src/gba/memory.c
- +1 −0 src/platform/python/_builder.h
- +42 −9 src/platform/python/_builder.py
- +7 −0 src/platform/python/engine.c
- +1 −0 src/platform/python/lib.h
- +21 −0 src/platform/python/mgba/debugger.py
- +20 −8 src/platform/qt/Window.cpp
- +3 −1 src/platform/qt/Window.h
- +18 −3 src/platform/sdl/main.c
- +125 −0 src/util/elf-read.c
| @@ -0,0 +1,51 @@ | ||
| +/* Copyright (c) 2013-2017 Jeffrey Pfau | ||
| + * | ||
| + * This Source Code Form is subject to the terms of the Mozilla Public | ||
| + * License, 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/. */ | ||
| +#ifndef ELF_READ_H | ||
| +#define ELF_READ_H | ||
| + | ||
| +#include <mgba-util/common.h> | ||
| + | ||
| +CXX_GUARD_START | ||
| + | ||
| +#ifdef USE_ELF | ||
| + | ||
| +#include <libelf.h> | ||
| + | ||
| +#if USE_ELF_REPL | ||
| +#include <elf_repl.h> | ||
| +#else | ||
| +#include <elf.h> | ||
| +#endif | ||
| + | ||
| +#include <mgba-util/vector.h> | ||
| + | ||
| +struct ELF; | ||
| +struct VFile; | ||
| + | ||
| +DECLARE_VECTOR(ELFProgramHeaders, Elf32_Phdr); | ||
| +DECLARE_VECTOR(ELFSectionHeaders, Elf32_Shdr); | ||
| + | ||
| +struct ELF* ELFOpen(struct VFile*); | ||
| +void ELFClose(struct ELF*); | ||
| + | ||
| +void* ELFBytes(struct ELF*, size_t* size); | ||
| + | ||
| +uint16_t ELFMachine(struct ELF*); | ||
| +uint32_t ELFEntry(struct ELF*); | ||
| + | ||
| +void ELFGetProgramHeaders(struct ELF*, struct ELFProgramHeaders*); | ||
| + | ||
| +size_t ELFFindSection(struct ELF*, const char* name); | ||
| +void ELFGetSectionHeaders(struct ELF*, struct ELFSectionHeaders*); | ||
| +Elf32_Shdr* ELFGetSectionHeader(struct ELF*, size_t index); | ||
| + | ||
| +const char* ELFGetString(struct ELF*, size_t section, size_t string); | ||
| + | ||
| +#endif | ||
| + | ||
| +CXX_GUARD_END | ||
| + | ||
| +#endif |
Oops, something went wrong.
0 comments on commit
45169bc