aboutsummaryrefslogtreecommitdiff
path: root/gas/read.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2023-02-13 20:28:41 +1030
committerAlan Modra <amodra@gmail.com>2023-02-13 21:04:09 +1030
commit24b7e8b18ae6410e0b2445475cd21503a2c38922 (patch)
tree5b799b222400cef0d4907ff8f78d6d2a2d324d01 /gas/read.h
parent103357fb75c93ba8195166f65719b03aecce497e (diff)
downloadgdb-24b7e8b18ae6410e0b2445475cd21503a2c38922.zip
gdb-24b7e8b18ae6410e0b2445475cd21503a2c38922.tar.gz
gdb-24b7e8b18ae6410e0b2445475cd21503a2c38922.tar.bz2
stabs.c static state
Move all the function local static state variables to file scope, in order to tidy memory on exit and to reinit everything for that annoying oss-fuzz. Also fix a couple memory leaks. * read.h (read_begin, read_end): Declare. * read.c (read_begin): Call stabs_begin. (read_end): Call stabs_end. * stabs.c (stabs_begin, stabs_end): New functions. (in_dot_func_p): Delete, use current_function_label instead. (cached_sec): Move from s_stab_generic. (last_asm_file, file_label_count): Move from generate_asm_file. (line_label_count, prev_lineno, prev_line_file): Move from stabs_generate_asm_lineno. (void_emitted_p): Move from stabs_generate_asm_func. (endfunc_label_count): Move from stabs_generate_asm_endfunc. (stabs_generate_asm_lineno): Simplify setting of prev_line_file. (stabs_generate_asm_func): Don't leak current_function_label. (stabs_generate_asm_endfunc): Likewise.
Diffstat (limited to 'gas/read.h')
-rw-r--r--gas/read.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/gas/read.h b/gas/read.h
index baac591..406b026 100644
--- a/gas/read.h
+++ b/gas/read.h
@@ -149,6 +149,8 @@ extern void stabs_generate_asm_file (void);
extern void stabs_generate_asm_lineno (void);
extern void stabs_generate_asm_func (const char *, const char *);
extern void stabs_generate_asm_endfunc (const char *, const char *);
+extern void stabs_begin (void);
+extern void stabs_end (void);
extern void do_repeat (size_t, const char *, const char *, const char *);
extern void end_repeat (int);
extern void do_parse_cons_expression (expressionS *, int);