[PATCH 3/6] Move symbol_t struct to symbols.h |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- Subject: [PATCH 3/6] Move symbol_t struct to symbols.h
- From: Thorsten Otto <admin@xxxxxxxxxxx>
- Date: Mon, 25 Jul 2022 06:58:59 +0200
---
src/debug/symbols-common.c | 7 +------
src/debug/symbols.h | 7 +++++++
tools/debugger/gst2ascii.c | 7 -------
3 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/src/debug/symbols-common.c b/src/debug/symbols-common.c
index 3118ae30..40b4210e 100644
--- a/src/debug/symbols-common.c
+++ b/src/debug/symbols-common.c
@@ -14,12 +14,7 @@
* and the standalone "gst2asciii" tool.
*/
-typedef struct {
- char *name;
- uint32_t address;
- symtype_t type;
- bool name_allocated;
-} symbol_t;
+#include "symbols.h"
typedef struct {
int symbols; /* initial symbol count */
diff --git a/src/debug/symbols.h b/src/debug/symbols.h
index 2f7f3a7e..06b6f1ad 100644
--- a/src/debug/symbols.h
+++ b/src/debug/symbols.h
@@ -16,6 +16,13 @@ typedef enum {
SYMTYPE_ALL = SYMTYPE_TEXT|SYMTYPE_DATA|SYMTYPE_BSS|SYMTYPE_ABS
} symtype_t;
+typedef struct {
+ char *name;
+ uint32_t address;
+ symtype_t type;
+ bool name_allocated;
+} symbol_t;
+
extern const char Symbols_Description[];
/* readline completion support functions for CPU */
diff --git a/tools/debugger/gst2ascii.c b/tools/debugger/gst2ascii.c
index 88193933..749d920f 100644
--- a/tools/debugger/gst2ascii.c
+++ b/tools/debugger/gst2ascii.c
@@ -27,13 +27,6 @@
#include <assert.h>
#include "../../src/debug/a.out.h"
-typedef enum {
- SYMTYPE_TEXT = 1,
- SYMTYPE_DATA = 2,
- SYMTYPE_BSS = 4,
- SYMTYPE_ABS = 8
-} symtype_t;
-
#define ARRAY_SIZE(x) (int)(sizeof(x)/sizeof(x[0]))
#include "../../src/debug/symbols-common.c"
--
2.24.0
--nextPart47411014.jKvtMvv4xN
Content-Disposition: attachment; filename="0004-When-checking-for-duplicate-symbol-names-the-last-sy.patch"
Content-Transfer-Encoding: 7Bit
Content-Type: text/x-patch; charset="UTF-8"; name="0004-When-checking-for-duplicate-symbol-names-the-last-sy.patch"