aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-06-27 21:58:21 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-06-27 21:58:21 -0700
commit2b1f51f1cac1e6b7b75d226b2e01329365319d0d (patch)
tree051a8e0b12dd814c2adeca595976942f7a967037
parent2d115448b4f3a0133f97cf93b75dec7ed0bc9e42 (diff)
downloadnasm-2b1f51f1cac1e6b7b75d226b2e01329365319d0d.tar.gz
nasm-2b1f51f1cac1e6b7b75d226b2e01329365319d0d.tar.xz
nasm-2b1f51f1cac1e6b7b75d226b2e01329365319d0d.zip
debug: make *all* the null debug routines available as a library
Make all the null debug routines available as a library, so we can use them whenever appropriate. We really don't need to have a bunch of dummy functions scattered all over the code. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--nasmlib.h10
-rw-r--r--output/outelf32.c11
-rw-r--r--output/outelf64.c11
3 files changed, 12 insertions, 20 deletions
diff --git a/nasmlib.h b/nasmlib.h
index d9015207..1470b379 100644
--- a/nasmlib.h
+++ b/nasmlib.h
@@ -323,7 +323,17 @@ int src_get(int32_t *xline, char **xname);
char *nasm_strcat(const char *one, const char *two);
+/* Do-nothing versions of all the debug routines */
+struct ofmt;
+void null_debug_init(struct ofmt *of, void *id, FILE * fp, efunc error);
+void null_debug_linenum(const char *filename, int32_t linenumber,
+ int32_t segto);
+void null_debug_deflabel(char *name, int32_t segment, int64_t offset,
+ int is_global, char *special);
void null_debug_routine(const char *directive, const char *params);
+void null_debug_typevalue(int32_t type);
+void null_debug_output(int type, void *param);
+void null_debug_cleanup(void);
extern struct dfmt null_debug_form;
extern struct dfmt *null_debug_arr[2];
diff --git a/output/outelf32.c b/output/outelf32.c
index a374adcb..1e2d76f1 100644
--- a/output/outelf32.c
+++ b/output/outelf32.c
@@ -186,7 +186,6 @@ static void debug32_deflabel(char *, int32_t, int64_t, int, char *);
static void debug32_directive(const char *, const char *);
/* stabs debugging routines */
-static void stabs32_init(struct ofmt *, void *, FILE *, efunc);
static void stabs32_linenum(const char *filename, int32_t linenumber, int32_t);
static void stabs32_output(int, void *);
static void stabs32_generate(void);
@@ -1431,7 +1430,7 @@ static struct dfmt df_dwarf = {
static struct dfmt df_stabs = {
"ELF32 (i386) stabs debug format for Linux/Unix",
"stabs",
- stabs32_init,
+ null_debug_init,
stabs32_linenum,
debug32_deflabel,
debug32_directive,
@@ -1479,14 +1478,6 @@ struct ofmt of_elf = {
};
/* again, the stabs debugging stuff (code) */
-static void stabs32_init(struct ofmt *of, void *id, FILE * fp, efunc error)
-{
- (void)of;
- (void)id;
- (void)fp;
- (void)error;
-}
-
static void stabs32_linenum(const char *filename, int32_t linenumber,
int32_t segto)
{
diff --git a/output/outelf64.c b/output/outelf64.c
index 5d53bd23..7068764f 100644
--- a/output/outelf64.c
+++ b/output/outelf64.c
@@ -193,7 +193,6 @@ static void debug64_deflabel(char *, int32_t, int64_t, int, char *);
static void debug64_directive(const char *, const char *);
/* stabs debugging routines */
-static void stabs64_init(struct ofmt *, void *, FILE *, efunc);
static void stabs64_linenum(const char *filename, int32_t linenumber, int32_t);
static void stabs64_output(int, void *);
static void stabs64_generate(void);
@@ -1521,7 +1520,7 @@ static struct dfmt df_dwarf = {
static struct dfmt df_stabs = {
"ELF64 (x86-64) stabs debug format for Linux/Unix",
"stabs",
- stabs64_init,
+ null_debug_init,
stabs64_linenum,
debug64_deflabel,
debug64_directive,
@@ -1631,14 +1630,6 @@ static void debug64_typevalue(int32_t type)
}
/* stabs debugging routines */
-static void stabs64_init(struct ofmt *of, void *id, FILE * fp, efunc error)
-{
- (void)of;
- (void)id;
- (void)fp;
- (void)error;
-}
-
static void stabs64_linenum(const char *filename, int32_t linenumber, int32_t segto)
{