diff options
author | Alan Modra <amodra@gmail.com> | 2023-03-31 13:36:16 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2023-04-03 07:29:35 +0930 |
commit | a6336913332303c45608d77b731bee5c3a3095e0 (patch) | |
tree | 242a75f53aeb5eafb0122f70107574ad3c178929 /binutils/budbg.h | |
parent | 31991eaaeee55fbf077e5c7ed1bc5deece050933 (diff) | |
download | binutils-a6336913332303c45608d77b731bee5c3a3095e0.zip binutils-a6336913332303c45608d77b731bee5c3a3095e0.tar.gz binutils-a6336913332303c45608d77b731bee5c3a3095e0.tar.bz2 |
rddbg.c stabs FIXMEs
This should sort out some very old FIXMEs in code handling stabs
debug info. Necessary if we are to fuss over freeing up memory before
objdump and objcopy exit. It is of course better from a user
viewpoint to *not* free memory, which takes some time, and leave that
to process exit. The only reason to do so is that having many memory
leaks in binutils/ code tends to hide leaks in bfd/ or opcodes/, which
we should care about.
* budbg.h (parse_stab): Update prototype.
* debug.h (debug_start_source): Update prototype.
* debug.c (debug_start_source): Add name_used. Set if stashed.
* rddbg.c (read_symbol_stabs_debugging_info): Always malloc
stab string passed to parse_stab. Free stab string when
unreferenced.
(read_section_stabs_debugging_info): Likewise, and strings
section contents.
* stabs.c (parse_stab): Add string_used param. Set if string
stashed. Pass to debug_start_source. Realloc file_types
array rather that using malloc. Clarify comment about
debug_make_indirect_type.
Diffstat (limited to 'binutils/budbg.h')
-rw-r--r-- | binutils/budbg.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/binutils/budbg.h b/binutils/budbg.h index a507ff9..4a93b4e 100644 --- a/binutils/budbg.h +++ b/binutils/budbg.h @@ -39,7 +39,7 @@ extern void *start_stab (void *, bfd *, bool, asymbol **, long); extern bool finish_stab (void *, void *); extern bool parse_stab - (void *, void *, int, int, bfd_vma, const char *); + (void *, void *, int, int, bfd_vma, const char *, bool *); extern bool write_stabs_in_sections_debugging_info (bfd *, void *, bfd_byte **, bfd_size_type *, bfd_byte **, bfd_size_type *); |