From 2f6a210e31d69b79f34e4dc652100e1d404f1690 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Mon, 23 Jan 2006 06:24:35 +0000 Subject: [PATCH] * parser.h (do_parse): Add dbgfmt parameter. * gas-parser.c, nasm-parser.c: Likewise. * yasm.c (main): Pass current dbgfmt to do_parse. svn path=/trunk/yasm/; revision=1342 --- frontends/yasm/yasm.c | 5 +++-- libyasm/parser.h | 5 +++-- modules/parsers/gas/gas-parser.c | 6 ++++-- modules/parsers/gas/gas-parser.h | 1 + modules/parsers/nasm/nasm-parser.c | 6 ++++-- modules/parsers/nasm/nasm-parser.h | 1 + 6 files changed, 16 insertions(+), 8 deletions(-) diff --git a/frontends/yasm/yasm.c b/frontends/yasm/yasm.c index ed93c767..b212910a 100644 --- a/frontends/yasm/yasm.c +++ b/frontends/yasm/yasm.c @@ -615,8 +615,9 @@ main(int argc, char *argv[]) } /* Parse! */ - cur_parser_module->do_parse(object, cur_preproc, cur_arch, cur_objfmt, in, - in_filename, list_filename != NULL, def_sect); + cur_parser_module->do_parse(object, cur_preproc, cur_arch, cur_objfmt, + cur_dbgfmt, in, in_filename, + list_filename != NULL, def_sect); /* Close input file */ if (in != stdin) diff --git a/libyasm/parser.h b/libyasm/parser.h index 1a94bbb5..31ba0707 100644 --- a/libyasm/parser.h +++ b/libyasm/parser.h @@ -68,8 +68,9 @@ typedef struct yasm_parser_module { * yasm__error(); see errwarn.h for details. */ void (*do_parse) (yasm_object *object, yasm_preproc *pp, yasm_arch *a, - yasm_objfmt *of, FILE *f, const char *in_filename, - int save_input, yasm_section *def_sect); + yasm_objfmt *of, yasm_dbgfmt *df, FILE *f, + const char *in_filename, int save_input, + yasm_section *def_sect); } yasm_parser_module; #endif diff --git a/modules/parsers/gas/gas-parser.c b/modules/parsers/gas/gas-parser.c index 9e215a72..e8f72ede 100644 --- a/modules/parsers/gas/gas-parser.c +++ b/modules/parsers/gas/gas-parser.c @@ -38,8 +38,9 @@ static void gas_parser_do_parse(yasm_object *object, yasm_preproc *pp, yasm_arch *a, - yasm_objfmt *of, FILE *f, const char *in_filename, - int save_input, yasm_section *def_sect) + yasm_objfmt *of, yasm_dbgfmt *df, FILE *f, + const char *in_filename, int save_input, + yasm_section *def_sect) { yasm_parser_gas parser_gas; @@ -55,6 +56,7 @@ gas_parser_do_parse(yasm_object *object, yasm_preproc *pp, yasm_arch *a, parser_gas.preproc = pp; parser_gas.arch = a; parser_gas.objfmt = of; + parser_gas.dbgfmt = df; parser_gas.cur_section = def_sect; parser_gas.prev_bc = yasm_section_bcs_first(def_sect); diff --git a/modules/parsers/gas/gas-parser.h b/modules/parsers/gas/gas-parser.h index 23806c29..e0f712e9 100644 --- a/modules/parsers/gas/gas-parser.h +++ b/modules/parsers/gas/gas-parser.h @@ -74,6 +74,7 @@ typedef struct yasm_parser_gas { /*@dependent@*/ yasm_preproc *preproc; /*@dependent@*/ yasm_arch *arch; /*@dependent@*/ yasm_objfmt *objfmt; + /*@dependent@*/ yasm_dbgfmt *dbgfmt; /*@dependent@*/ yasm_linemap *linemap; /*@dependent@*/ yasm_symtab *symtab; diff --git a/modules/parsers/nasm/nasm-parser.c b/modules/parsers/nasm/nasm-parser.c index 95f23c96..107b24a7 100644 --- a/modules/parsers/nasm/nasm-parser.c +++ b/modules/parsers/nasm/nasm-parser.c @@ -35,8 +35,9 @@ static void nasm_parser_do_parse(yasm_object *object, yasm_preproc *pp, yasm_arch *a, - yasm_objfmt *of, FILE *f, const char *in_filename, - int save_input, yasm_section *def_sect) + yasm_objfmt *of, yasm_dbgfmt *df, FILE *f, + const char *in_filename, int save_input, + yasm_section *def_sect) { yasm_parser_nasm parser_nasm; @@ -52,6 +53,7 @@ nasm_parser_do_parse(yasm_object *object, yasm_preproc *pp, yasm_arch *a, parser_nasm.preproc = pp; parser_nasm.arch = a; parser_nasm.objfmt = of; + parser_nasm.dbgfmt = df; parser_nasm.cur_section = def_sect; parser_nasm.prev_bc = yasm_section_bcs_first(def_sect); diff --git a/modules/parsers/nasm/nasm-parser.h b/modules/parsers/nasm/nasm-parser.h index c2147018..d0062d2b 100644 --- a/modules/parsers/nasm/nasm-parser.h +++ b/modules/parsers/nasm/nasm-parser.h @@ -51,6 +51,7 @@ typedef struct yasm_parser_nasm { /*@dependent@*/ yasm_preproc *preproc; /*@dependent@*/ yasm_arch *arch; /*@dependent@*/ yasm_objfmt *objfmt; + /*@dependent@*/ yasm_dbgfmt *dbgfmt; /*@dependent@*/ yasm_linemap *linemap; /*@dependent@*/ yasm_symtab *symtab; -- 2.40.0